|
| 1 | +error[E0308]: mismatched types |
| 2 | + --> $DIR/issue-105675.rs:5:5 |
| 3 | + | |
| 4 | +LL | thing(f); |
| 5 | + | ^^^^^^^^ one type is more general than the other |
| 6 | + | |
| 7 | + = note: expected trait `for<'a, 'b> FnOnce<(&'a u32, &'b u32)>` |
| 8 | + found trait `FnOnce<(&u32, &u32)>` |
| 9 | +note: this closure does not fulfill the lifetime requirements |
| 10 | + --> $DIR/issue-105675.rs:4:13 |
| 11 | + | |
| 12 | +LL | let f = |_, _| (); |
| 13 | + | ^^^^^^ |
| 14 | +note: the lifetime requirement is introduced here |
| 15 | + --> $DIR/issue-105675.rs:1:18 |
| 16 | + | |
| 17 | +LL | fn thing(x: impl FnOnce(&u32, &u32)) {} |
| 18 | + | ^^^^^^^^^^^^^^^^^^ |
| 19 | +help: consider specifying the type of the closure parameters |
| 20 | + | |
| 21 | +LL | let f = |_: &_, _: &_| (); |
| 22 | + | ~~~~~~~~~~~~~~ |
| 23 | + |
| 24 | +error[E0308]: mismatched types |
| 25 | + --> $DIR/issue-105675.rs:5:5 |
| 26 | + | |
| 27 | +LL | thing(f); |
| 28 | + | ^^^^^^^^ one type is more general than the other |
| 29 | + | |
| 30 | + = note: expected trait `for<'a, 'b> FnOnce<(&'a u32, &'b u32)>` |
| 31 | + found trait `FnOnce<(&u32, &u32)>` |
| 32 | +note: this closure does not fulfill the lifetime requirements |
| 33 | + --> $DIR/issue-105675.rs:4:13 |
| 34 | + | |
| 35 | +LL | let f = |_, _| (); |
| 36 | + | ^^^^^^ |
| 37 | +note: the lifetime requirement is introduced here |
| 38 | + --> $DIR/issue-105675.rs:1:18 |
| 39 | + | |
| 40 | +LL | fn thing(x: impl FnOnce(&u32, &u32)) {} |
| 41 | + | ^^^^^^^^^^^^^^^^^^ |
| 42 | +help: consider specifying the type of the closure parameters |
| 43 | + | |
| 44 | +LL | let f = |_: &_, _: &_| (); |
| 45 | + | ~~~~~~~~~~~~~~ |
| 46 | + |
| 47 | +error: implementation of `FnOnce` is not general enough |
| 48 | + --> $DIR/issue-105675.rs:5:5 |
| 49 | + | |
| 50 | +LL | thing(f); |
| 51 | + | ^^^^^^^^ implementation of `FnOnce` is not general enough |
| 52 | + | |
| 53 | + = note: closure with signature `fn(&'2 u32, &u32)` must implement `FnOnce<(&'1 u32, &u32)>`, for any lifetime `'1`... |
| 54 | + = note: ...but it actually implements `FnOnce<(&'2 u32, &u32)>`, for some specific lifetime `'2` |
| 55 | + |
| 56 | +error: implementation of `FnOnce` is not general enough |
| 57 | + --> $DIR/issue-105675.rs:5:5 |
| 58 | + | |
| 59 | +LL | thing(f); |
| 60 | + | ^^^^^^^^ implementation of `FnOnce` is not general enough |
| 61 | + | |
| 62 | + = note: closure with signature `fn(&u32, &'2 u32)` must implement `FnOnce<(&u32, &'1 u32)>`, for any lifetime `'1`... |
| 63 | + = note: ...but it actually implements `FnOnce<(&u32, &'2 u32)>`, for some specific lifetime `'2` |
| 64 | + |
| 65 | +error[E0308]: mismatched types |
| 66 | + --> $DIR/issue-105675.rs:11:5 |
| 67 | + | |
| 68 | +LL | thing(f); |
| 69 | + | ^^^^^^^^ one type is more general than the other |
| 70 | + | |
| 71 | + = note: expected trait `for<'a, 'b> FnOnce<(&'a u32, &'b u32)>` |
| 72 | + found trait `FnOnce<(&u32, &u32)>` |
| 73 | +note: this closure does not fulfill the lifetime requirements |
| 74 | + --> $DIR/issue-105675.rs:10:13 |
| 75 | + | |
| 76 | +LL | let f = |x, y| (); |
| 77 | + | ^^^^^^ |
| 78 | +note: the lifetime requirement is introduced here |
| 79 | + --> $DIR/issue-105675.rs:1:18 |
| 80 | + | |
| 81 | +LL | fn thing(x: impl FnOnce(&u32, &u32)) {} |
| 82 | + | ^^^^^^^^^^^^^^^^^^ |
| 83 | +help: consider specifying the type of the closure parameters |
| 84 | + | |
| 85 | +LL | let f = |x: &_, y: &_| (); |
| 86 | + | ~~~~~~~~~~~~~~ |
| 87 | + |
| 88 | +error[E0308]: mismatched types |
| 89 | + --> $DIR/issue-105675.rs:11:5 |
| 90 | + | |
| 91 | +LL | thing(f); |
| 92 | + | ^^^^^^^^ one type is more general than the other |
| 93 | + | |
| 94 | + = note: expected trait `for<'a, 'b> FnOnce<(&'a u32, &'b u32)>` |
| 95 | + found trait `FnOnce<(&u32, &u32)>` |
| 96 | +note: this closure does not fulfill the lifetime requirements |
| 97 | + --> $DIR/issue-105675.rs:10:13 |
| 98 | + | |
| 99 | +LL | let f = |x, y| (); |
| 100 | + | ^^^^^^ |
| 101 | +note: the lifetime requirement is introduced here |
| 102 | + --> $DIR/issue-105675.rs:1:18 |
| 103 | + | |
| 104 | +LL | fn thing(x: impl FnOnce(&u32, &u32)) {} |
| 105 | + | ^^^^^^^^^^^^^^^^^^ |
| 106 | +help: consider specifying the type of the closure parameters |
| 107 | + | |
| 108 | +LL | let f = |x: &_, y: &_| (); |
| 109 | + | ~~~~~~~~~~~~~~ |
| 110 | + |
| 111 | +error: implementation of `FnOnce` is not general enough |
| 112 | + --> $DIR/issue-105675.rs:11:5 |
| 113 | + | |
| 114 | +LL | thing(f); |
| 115 | + | ^^^^^^^^ implementation of `FnOnce` is not general enough |
| 116 | + | |
| 117 | + = note: closure with signature `fn(&'2 u32, &u32)` must implement `FnOnce<(&'1 u32, &u32)>`, for any lifetime `'1`... |
| 118 | + = note: ...but it actually implements `FnOnce<(&'2 u32, &u32)>`, for some specific lifetime `'2` |
| 119 | + |
| 120 | +error: implementation of `FnOnce` is not general enough |
| 121 | + --> $DIR/issue-105675.rs:11:5 |
| 122 | + | |
| 123 | +LL | thing(f); |
| 124 | + | ^^^^^^^^ implementation of `FnOnce` is not general enough |
| 125 | + | |
| 126 | + = note: closure with signature `fn(&u32, &'2 u32)` must implement `FnOnce<(&u32, &'1 u32)>`, for any lifetime `'1`... |
| 127 | + = note: ...but it actually implements `FnOnce<(&u32, &'2 u32)>`, for some specific lifetime `'2` |
| 128 | + |
| 129 | +error: aborting due to 8 previous errors |
| 130 | + |
| 131 | +For more information about this error, try `rustc --explain E0308`. |
0 commit comments