]> git.proxmox.com Git - rustc.git/blame - src/test/ui/issues/issue-20225.rs
New upstream version 1.60.0+dfsg1
[rustc.git] / src / test / ui / issues / issue-20225.rs
CommitLineData
476ff2be 1#![feature(fn_traits, unboxed_closures)]
c34b1796
AL
2
3struct Foo;
4
5impl<'a, T> Fn<(&'a T,)> for Foo {
6 extern "rust-call" fn call(&self, (_,): (T,)) {}
c1a9b12d 7 //~^ ERROR: has an incompatible type for trait
c34b1796
AL
8}
9
10impl<'a, T> FnMut<(&'a T,)> for Foo {
11 extern "rust-call" fn call_mut(&mut self, (_,): (T,)) {}
c1a9b12d 12 //~^ ERROR: has an incompatible type for trait
c34b1796
AL
13}
14
15impl<'a, T> FnOnce<(&'a T,)> for Foo {
16 type Output = ();
17
18 extern "rust-call" fn call_once(self, (_,): (T,)) {}
c1a9b12d 19 //~^ ERROR: has an incompatible type for trait
c34b1796
AL
20}
21
22fn main() {}