1 // Regression test for #66757
3 // Test than when you have a `!` value (e.g., the local variable
4 // never) and an uninferred variable (here the argument to `From`) it
5 // doesn't fallback to `()` but rather `!`.
7 // revisions: nofallback fallback
9 //[nofallback] check-fail
11 #![feature(never_type)]
13 #![cfg_attr(fallback, feature(never_type_fallback))]
23 #[allow(unreachable_code)]
25 #[allow(unused_must_use)]
27 <E as From<!>>::from(never); // Ok
28 <E as From<_>>::from(never); //[nofallback]~ ERROR trait bound `E: From<()>` is not satisfied