|
| 1 | +error[E0425]: cannot find function `f_t` in this scope |
| 2 | + --> $DIR/const-generics-closure.rs:7:9 |
| 3 | + | |
| 4 | +LL | f_t(&*s); |
| 5 | + | ^^^ not found in this scope |
| 6 | + | |
| 7 | +help: you might be missing a const parameter |
| 8 | + | |
| 9 | +LL | fn bar<const f_t: /* Type */>() -> impl Into< |
| 10 | + | +++++++++++++++++++++++ |
| 11 | + |
| 12 | +error[E0425]: cannot find value `s` in this scope |
| 13 | + --> $DIR/const-generics-closure.rs:7:15 |
| 14 | + | |
| 15 | +LL | f_t(&*s); |
| 16 | + | ^ |
| 17 | +... |
| 18 | +LL | struct X; |
| 19 | + | --------- similarly named unit struct `X` defined here |
| 20 | + | |
| 21 | +help: a unit struct with a similar name exists |
| 22 | + | |
| 23 | +LL - f_t(&*s); |
| 24 | +LL + f_t(&*X); |
| 25 | + | |
| 26 | +help: you might be missing a const parameter |
| 27 | + | |
| 28 | +LL | fn bar<const s: /* Type */>() -> impl Into< |
| 29 | + | +++++++++++++++++++++ |
| 30 | + |
| 31 | +error[E0425]: cannot find function `c` in this scope |
| 32 | + --> $DIR/const-generics-closure.rs:11:9 |
| 33 | + | |
| 34 | +LL | c(&*s); |
| 35 | + | ^ |
| 36 | +... |
| 37 | +LL | struct X; |
| 38 | + | --------- similarly named unit struct `X` defined here |
| 39 | + | |
| 40 | +help: a unit struct with a similar name exists |
| 41 | + | |
| 42 | +LL - c(&*s); |
| 43 | +LL + X(&*s); |
| 44 | + | |
| 45 | +help: you might be missing a const parameter |
| 46 | + | |
| 47 | +LL | fn bar<const c: /* Type */>() -> impl Into< |
| 48 | + | +++++++++++++++++++++ |
| 49 | + |
| 50 | +error[E0425]: cannot find value `s` in this scope |
| 51 | + --> $DIR/const-generics-closure.rs:11:13 |
| 52 | + | |
| 53 | +LL | c(&*s); |
| 54 | + | ^ |
| 55 | +... |
| 56 | +LL | struct X; |
| 57 | + | --------- similarly named unit struct `X` defined here |
| 58 | + | |
| 59 | +help: a unit struct with a similar name exists |
| 60 | + | |
| 61 | +LL - c(&*s); |
| 62 | +LL + c(&*X); |
| 63 | + | |
| 64 | +help: you might be missing a const parameter |
| 65 | + | |
| 66 | +LL | fn bar<const s: /* Type */>() -> impl Into< |
| 67 | + | +++++++++++++++++++++ |
| 68 | + |
| 69 | +error[E0425]: cannot find function `c` in this scope |
| 70 | + --> $DIR/const-generics-closure.rs:15:9 |
| 71 | + | |
| 72 | +LL | c(&*s); |
| 73 | + | ^ |
| 74 | +... |
| 75 | +LL | struct X; |
| 76 | + | --------- similarly named unit struct `X` defined here |
| 77 | + | |
| 78 | +help: a unit struct with a similar name exists |
| 79 | + | |
| 80 | +LL - c(&*s); |
| 81 | +LL + X(&*s); |
| 82 | + | |
| 83 | +help: you might be missing a const parameter |
| 84 | + | |
| 85 | +LL | fn bar<const c: /* Type */>() -> impl Into< |
| 86 | + | +++++++++++++++++++++ |
| 87 | + |
| 88 | +error[E0425]: cannot find value `s` in this scope |
| 89 | + --> $DIR/const-generics-closure.rs:15:13 |
| 90 | + | |
| 91 | +LL | c(&*s); |
| 92 | + | ^ |
| 93 | +... |
| 94 | +LL | struct X; |
| 95 | + | --------- similarly named unit struct `X` defined here |
| 96 | + | |
| 97 | +help: a unit struct with a similar name exists |
| 98 | + | |
| 99 | +LL - c(&*s); |
| 100 | +LL + c(&*X); |
| 101 | + | |
| 102 | +help: you might be missing a const parameter |
| 103 | + | |
| 104 | +LL | fn bar<const s: /* Type */>() -> impl Into< |
| 105 | + | +++++++++++++++++++++ |
| 106 | + |
| 107 | +error[E0425]: cannot find function `c1` in this scope |
| 108 | + --> $DIR/const-generics-closure.rs:21:9 |
| 109 | + | |
| 110 | +LL | c1(*x); |
| 111 | + | ^^ not found in this scope |
| 112 | + | |
| 113 | +help: you might be missing a const parameter |
| 114 | + | |
| 115 | +LL | fn bar<const c1: /* Type */>() -> impl Into< |
| 116 | + | ++++++++++++++++++++++ |
| 117 | + |
| 118 | +error[E0425]: cannot find value `x` in this scope |
| 119 | + --> $DIR/const-generics-closure.rs:21:13 |
| 120 | + | |
| 121 | +LL | struct X; |
| 122 | + | --------- similarly named unit struct `X` defined here |
| 123 | +LL | |
| 124 | +LL | c1(*x); |
| 125 | + | ^ |
| 126 | + | |
| 127 | +help: a unit struct with a similar name exists (notice the capitalization difference) |
| 128 | + | |
| 129 | +LL - c1(*x); |
| 130 | +LL + c1(*X); |
| 131 | + | |
| 132 | +help: you might be missing a const parameter |
| 133 | + | |
| 134 | +LL | fn bar<const x: /* Type */>() -> impl Into< |
| 135 | + | +++++++++++++++++++++ |
| 136 | + |
| 137 | +error[E0658]: `for<...>` binders for closures are experimental |
| 138 | + --> $DIR/const-generics-closure.rs:25:17 |
| 139 | + | |
| 140 | +LL | let _ = for<'a, 'b> |x: &'a &'a Vec<&'b u32>, b: bool| -> &'a Vec<&'b u32> { *x }; |
| 141 | + | ^^^^^^^^^^^ |
| 142 | + | |
| 143 | + = note: see issue #97362 <https://github.com/rust-lang/rust/issues/97362> for more information |
| 144 | + = help: add `#![feature(closure_lifetime_binder)]` to the crate attributes to enable |
| 145 | + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date |
| 146 | + = help: consider removing `for<...>` |
| 147 | + |
| 148 | +error[E0601]: `main` function not found in crate `const_generics_closure` |
| 149 | + --> $DIR/const-generics-closure.rs:30:2 |
| 150 | + | |
| 151 | +LL | } |
| 152 | + | ^ consider adding a `main` function to `$DIR/const-generics-closure.rs` |
| 153 | + |
| 154 | +error[E0308]: mismatched types |
| 155 | + --> $DIR/const-generics-closure.rs:5:10 |
| 156 | + | |
| 157 | +LL | [u8; { |
| 158 | + | __________^ |
| 159 | +LL | | |
| 160 | +LL | | f_t(&*s); |
| 161 | +... | |
| 162 | +LL | | }], |
| 163 | + | |_____^ expected `usize`, found `()` |
| 164 | + |
| 165 | +error: aborting due to 11 previous errors |
| 166 | + |
| 167 | +Some errors have detailed explanations: E0308, E0425, E0601, E0658. |
| 168 | +For more information about an error, try `rustc --explain E0308`. |
0 commit comments