]> git.lizzy.rs Git - rust.git/blob - tests/ui/never_type/never-from-impl-is-reserved.rs
Rollup merge of #107615 - notriddle:notriddle/nbsp, r=GuillaumeGomez
[rust.git] / tests / 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() {}