|
| 1 | +error[E0403]: the name `'b` is already used for a generic parameter in this item's generic parameters |
| 2 | + --> $DIR/escaping-late-bound-region-in-canonical-ice-113870.rs:6:20 |
| 3 | + | |
| 4 | +LL | const fn allow<'b, 'b>() -> usize |
| 5 | + | -- ^^ already used |
| 6 | + | | |
| 7 | + | first use of `'b` |
| 8 | + |
| 9 | +error[E0496]: lifetime name `'b` shadows a lifetime name that is already in scope |
| 10 | + --> $DIR/escaping-late-bound-region-in-canonical-ice-113870.rs:9:9 |
| 11 | + | |
| 12 | +LL | const fn allow<'b, 'b>() -> usize |
| 13 | + | -- first declared here |
| 14 | +... |
| 15 | +LL | for<'b> [u8; foo::<'a, 'b>()]: Sized, |
| 16 | + | ^^ lifetime `'b` already in scope |
| 17 | + |
| 18 | +error[E0261]: use of undeclared lifetime name `'a` |
| 19 | + --> $DIR/escaping-late-bound-region-in-canonical-ice-113870.rs:9:24 |
| 20 | + | |
| 21 | +LL | for<'b> [u8; foo::<'a, 'b>()]: Sized, |
| 22 | + | ^^ undeclared lifetime |
| 23 | + | |
| 24 | + = note: for more information on higher-ranked polymorphism, visit https://doc.rust-lang.org/nomicon/hrtb.html |
| 25 | +help: consider making the bound lifetime-generic with a new `'a` lifetime |
| 26 | + | |
| 27 | +LL | for<'a, 'b> [u8; foo::<'a, 'b>()]: Sized, |
| 28 | + | +++ |
| 29 | +help: consider introducing lifetime `'a` here |
| 30 | + | |
| 31 | +LL | const fn allow<'a, 'b, 'b>() -> usize |
| 32 | + | +++ |
| 33 | + |
| 34 | +error[E0601]: `main` function not found in crate `escaping_late_bound_region_in_canonical_ice_113870` |
| 35 | + --> $DIR/escaping-late-bound-region-in-canonical-ice-113870.rs:23:2 |
| 36 | + | |
| 37 | +LL | } |
| 38 | + | ^ consider adding a `main` function to `$DIR/escaping-late-bound-region-in-canonical-ice-113870.rs` |
| 39 | + |
| 40 | +error: cannot capture late-bound lifetime in constant |
| 41 | + --> $DIR/escaping-late-bound-region-in-canonical-ice-113870.rs:9:28 |
| 42 | + | |
| 43 | +LL | const fn allow<'b, 'b>() -> usize |
| 44 | + | -- lifetime defined here |
| 45 | +... |
| 46 | +LL | for<'b> [u8; foo::<'a, 'b>()]: Sized, |
| 47 | + | ^^ |
| 48 | + |
| 49 | +error: aborting due to 5 previous errors |
| 50 | + |
| 51 | +Some errors have detailed explanations: E0261, E0403, E0496, E0601. |
| 52 | +For more information about an error, try `rustc --explain E0261`. |
0 commit comments