fork/rust
git clone https://git.julia.blue/fork/rust
f3e1a954d2e
1.41.1
1error[E0053]: method `call` has an incompatible type for trait 2 --> $DIR/issue-20225.rs:6:3 3 | 4LL | impl<'a, T> Fn<(&'a T,)> for Foo { 5 | - this type parameter 6LL | extern "rust-call" fn call(&self, (_,): (T,)) {} 7 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `&T`, found type parameter `T` 8 | 9 = note: expected fn pointer `extern "rust-call" fn(&Foo, (&'a T,))` 10 found fn pointer `extern "rust-call" fn(&Foo, (T,))` 11 = help: type parameters must be constrained to match other types 12 = note: for more information, visit https://doc.rust-lang.org/book/ch10-02-traits.html#traits-as-parameters 13 14error[E0053]: method `call_mut` has an incompatible type for trait 15 --> $DIR/issue-20225.rs:11:3 16 | 17LL | impl<'a, T> FnMut<(&'a T,)> for Foo { 18 | - this type parameter 19LL | extern "rust-call" fn call_mut(&mut self, (_,): (T,)) {} 20 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `&T`, found type parameter `T` 21 | 22 = note: expected fn pointer `extern "rust-call" fn(&mut Foo, (&'a T,))` 23 found fn pointer `extern "rust-call" fn(&mut Foo, (T,))` 24 = help: type parameters must be constrained to match other types 25 = note: for more information, visit https://doc.rust-lang.org/book/ch10-02-traits.html#traits-as-parameters 26 27error[E0053]: method `call_once` has an incompatible type for trait 28 --> $DIR/issue-20225.rs:18:3 29 | 30LL | impl<'a, T> FnOnce<(&'a T,)> for Foo { 31 | - this type parameter 32... 33LL | extern "rust-call" fn call_once(self, (_,): (T,)) {} 34 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `&T`, found type parameter `T` 35 | 36 = note: expected fn pointer `extern "rust-call" fn(Foo, (&'a T,))` 37 found fn pointer `extern "rust-call" fn(Foo, (T,))` 38 = help: type parameters must be constrained to match other types 39 = note: for more information, visit https://doc.rust-lang.org/book/ch10-02-traits.html#traits-as-parameters 40 41error: aborting due to 3 previous errors 42 43For more information about this error, try `rustc --explain E0053`.