diff options
Diffstat (limited to 'tests/ui/never_type/never-from-impl-is-reserved.rs')
-rw-r--r-- | tests/ui/never_type/never-from-impl-is-reserved.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/ui/never_type/never-from-impl-is-reserved.rs b/tests/ui/never_type/never-from-impl-is-reserved.rs new file mode 100644 index 000000000..9d16015bd --- /dev/null +++ b/tests/ui/never_type/never-from-impl-is-reserved.rs @@ -0,0 +1,12 @@ +// check that the `for<T> T: From<!>` impl is reserved + +#![feature(never_type)] + +pub struct MyFoo; +pub trait MyTrait {} + +impl MyTrait for MyFoo {} +// This will conflict with the first impl if we impl `for<T> T: From<!>`. +impl<T> MyTrait for T where T: From<!> {} //~ ERROR conflicting implementation + +fn main() {} |