summaryrefslogtreecommitdiffstats
path: root/tests/ui/never_type/feature-gate-never_type_fallback.rs
blob: 7d020841180012580290b044c221ea6b79b2df02 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// This is a feature gate test for `never_type_fallback`.
// It works by using a scenario where the type fall backs to `()` rather than ´!`
// in the case where `#![feature(never_type_fallback)]` would change it to `!`.

fn main() {}

trait T {}

fn should_ret_unit() {
    foo(panic!()) //~ ERROR
}

fn foo(_: impl T) {}