blob: 97fac59149b98cbceeda3c6b6308cd995788b73a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
// check that the `for<T> T: From<!>` impl is reserved
// revisions: current next
//[next] compile-flags: -Znext-solver=coherence
#![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() {}
|