]> git.lizzy.rs Git - rust.git/blob - src/test/ui/never_type/never-from-impl-is-reserved.rs
Merge commit 'c19edfd71a1d0ddef86c2c67fdb40718d40a72b4' into sync_cg_clif-2022-07-25
[rust.git] / src / test / ui / never_type / never-from-impl-is-reserved.rs
1 // check that the `for<T> T: From<!>` impl is reserved
2
3 #![feature(never_type)]
4
5 pub struct MyFoo;
6 pub trait MyTrait {}
7
8 impl MyTrait for MyFoo {}
9 // This will conflict with the first impl if we impl `for<T> T: From<!>`.
10 impl<T> MyTrait for T where T: From<!> {} //~ ERROR conflicting implementation
11
12 fn main() {}