summaryrefslogtreecommitdiffstats
path: root/tests/ui/never_type/never-from-impl-is-reserved.rs
blob: 9d16015bdc129bd5e0a5c43ccb674ca1727a98e0 (plain)
1
2
3
4
5
6
7
8
9
10
11
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() {}