]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-20225.rs
Remove E0308 note when primary label has all info
[rust.git] / src / test / ui / issues / issue-20225.rs
1 #![feature(fn_traits, unboxed_closures)]
2
3 struct Foo;
4
5 impl<'a, T> Fn<(&'a T,)> for Foo {
6   extern "rust-call" fn call(&self, (_,): (T,)) {}
7   //~^ ERROR: has an incompatible type for trait
8 }
9
10 impl<'a, T> FnMut<(&'a T,)> for Foo {
11   extern "rust-call" fn call_mut(&mut self, (_,): (T,)) {}
12   //~^ ERROR: has an incompatible type for trait
13 }
14
15 impl<'a, T> FnOnce<(&'a T,)> for Foo {
16   type Output = ();
17
18   extern "rust-call" fn call_once(self, (_,): (T,)) {}
19   //~^ ERROR: has an incompatible type for trait
20 }
21
22 fn main() {}