]> git.lizzy.rs Git - rust.git/blob - src/test/ui/never_type/never-from-impl-is-reserved.rs
Merge commit 'd556c56f792756dd7cfec742b9f2e07612dc10f4' into sync_cg_clif-2021-02-01
[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() {}