]> git.proxmox.com Git - rustc.git/blame - src/test/ui/mismatched_types/closure-mismatch.stderr
New upstream version 1.41.1+dfsg1
[rustc.git] / src / test / ui / mismatched_types / closure-mismatch.stderr
CommitLineData
0731742a
XL
1error[E0271]: type mismatch resolving `for<'r> <[closure@$DIR/closure-mismatch.rs:8:9: 8:15] as std::ops::FnOnce<(&'r (),)>>::Output == ()`
2 --> $DIR/closure-mismatch.rs:8:5
7cac9316 3 |
e1599b0c
XL
4LL | fn baz<T: Foo>(_: T) {}
5 | --- --- required by this bound in `baz`
6...
532ac7d7 7LL | baz(|_| ());
7cac9316
XL
8 | ^^^ expected bound lifetime parameter, found concrete lifetime
9 |
0731742a 10 = note: required because of the requirements on the impl of `Foo` for `[closure@$DIR/closure-mismatch.rs:8:9: 8:15]`
7cac9316 11
ea8adc8c 12error[E0631]: type mismatch in closure arguments
0731742a 13 --> $DIR/closure-mismatch.rs:8:5
7cac9316 14 |
e1599b0c
XL
15LL | fn baz<T: Foo>(_: T) {}
16 | --- --- required by this bound in `baz`
17...
532ac7d7 18LL | baz(|_| ());
ea8adc8c 19 | ^^^ ------ found signature of `fn(_) -> _`
7cac9316 20 | |
ea8adc8c 21 | expected signature of `for<'r> fn(&'r ()) -> _`
7cac9316 22 |
0731742a 23 = note: required because of the requirements on the impl of `Foo` for `[closure@$DIR/closure-mismatch.rs:8:9: 8:15]`
7cac9316 24
041b39d2 25error: aborting due to 2 previous errors
7cac9316 26
60c5eb7d
XL
27Some errors have detailed explanations: E0271, E0631.
28For more information about an error, try `rustc --explain E0271`.