]> git.lizzy.rs Git - rust.git/blob - tests/ui/never_type/feature-gate-never_type_fallback.rs
Rollup merge of #106714 - Ezrashaw:remove-e0490, r=davidtwco
[rust.git] / tests / ui / never_type / feature-gate-never_type_fallback.rs
1 // This is a feature gate test for `never_type_fallback`.
2 // It works by using a scenario where the type fall backs to `()` rather than ยด!`
3 // in the case where `#![feature(never_type_fallback)]` would change it to `!`.
4
5 fn main() {}
6
7 trait T {}
8
9 fn should_ret_unit() {
10     foo(panic!()) //~ ERROR
11 }
12
13 fn foo(_: impl T) {}