|
| 1 | +error[E0308]: mismatched types |
| 2 | + --> $DIR/missing-universe-cause-issue-114907.rs:33:5 |
| 3 | + | |
| 4 | +LL | accept(callback); |
| 5 | + | ^^^^^^^^^^^^^^^^ one type is more general than the other |
| 6 | + | |
| 7 | + = note: expected trait `for<'a> FnOnce<(&'a (),)>` |
| 8 | + found trait `FnOnce<(&(),)>` |
| 9 | +note: this closure does not fulfill the lifetime requirements |
| 10 | + --> $DIR/missing-universe-cause-issue-114907.rs:32:20 |
| 11 | + | |
| 12 | +LL | let callback = |_| {}; |
| 13 | + | ^^^ |
| 14 | +note: the lifetime requirement is introduced here |
| 15 | + --> $DIR/missing-universe-cause-issue-114907.rs:27:14 |
| 16 | + | |
| 17 | +LL | fn accept<C: FnOnce(&())>(_: C) -> Handshake<HandshakeCallback<C>> { |
| 18 | + | ^^^^^^^^^^^ |
| 19 | +help: consider specifying the type of the closure parameters |
| 20 | + | |
| 21 | +LL | let callback = |_: &_| {}; |
| 22 | + | ~~~~~~~ |
| 23 | + |
| 24 | +error: implementation of `FnOnce` is not general enough |
| 25 | + --> $DIR/missing-universe-cause-issue-114907.rs:33:5 |
| 26 | + | |
| 27 | +LL | accept(callback); |
| 28 | + | ^^^^^^^^^^^^^^^^ implementation of `FnOnce` is not general enough |
| 29 | + | |
| 30 | + = note: closure with signature `fn(&'2 ())` must implement `FnOnce<(&'1 (),)>`, for any lifetime `'1`... |
| 31 | + = note: ...but it actually implements `FnOnce<(&'2 (),)>`, for some specific lifetime `'2` |
| 32 | + |
| 33 | +error: implementation of `FnOnce` is not general enough |
| 34 | + --> $DIR/missing-universe-cause-issue-114907.rs:33:5 |
| 35 | + | |
| 36 | +LL | accept(callback); |
| 37 | + | ^^^^^^^^^^^^^^^^ implementation of `FnOnce` is not general enough |
| 38 | + | |
| 39 | + = note: closure with signature `fn(&'2 ())` must implement `FnOnce<(&'1 (),)>`, for any lifetime `'1`... |
| 40 | + = note: ...but it actually implements `FnOnce<(&'2 (),)>`, for some specific lifetime `'2` |
| 41 | + |
| 42 | +error[E0308]: mismatched types |
| 43 | + --> $DIR/missing-universe-cause-issue-114907.rs:33:5 |
| 44 | + | |
| 45 | +LL | accept(callback); |
| 46 | + | ^^^^^^^^^^^^^^^^ one type is more general than the other |
| 47 | + | |
| 48 | + = note: expected trait `for<'a> FnOnce<(&'a (),)>` |
| 49 | + found trait `FnOnce<(&(),)>` |
| 50 | +note: this closure does not fulfill the lifetime requirements |
| 51 | + --> $DIR/missing-universe-cause-issue-114907.rs:32:20 |
| 52 | + | |
| 53 | +LL | let callback = |_| {}; |
| 54 | + | ^^^ |
| 55 | +note: the lifetime requirement is introduced here |
| 56 | + --> $DIR/missing-universe-cause-issue-114907.rs:20:21 |
| 57 | + | |
| 58 | +LL | struct Handshake<R: Role> { |
| 59 | + | ^^^^ |
| 60 | +help: consider specifying the type of the closure parameters |
| 61 | + | |
| 62 | +LL | let callback = |_: &_| {}; |
| 63 | + | ~~~~~~~ |
| 64 | + |
| 65 | +error: higher-ranked subtype error |
| 66 | + --> $DIR/missing-universe-cause-issue-114907.rs:33:21 |
| 67 | + | |
| 68 | +LL | accept(callback); |
| 69 | + | ^ |
| 70 | + |
| 71 | +error: higher-ranked subtype error |
| 72 | + --> $DIR/missing-universe-cause-issue-114907.rs:33:21 |
| 73 | + | |
| 74 | +LL | accept(callback); |
| 75 | + | ^ |
| 76 | + |
| 77 | +error: aborting due to 6 previous errors |
| 78 | + |
| 79 | +For more information about this error, try `rustc --explain E0308`. |
0 commit comments