rust/compiler/rustc_resolve
Jonathan Brouwer 18c62b5d44
Rollup merge of #151077 - issue-84327, r=fmease
Recognize potential `impl<const N: usize>` to `impl<N>` mistake

When encountering code like `impl<N> Bar<N> for [u8; N]`, suggest `impl<const N: Type> Bar<N> for [u8; N]` as a possibility.

```
error[E0423]: expected value, found type parameter `T`
  --> $DIR/issue-69654.rs:5:25
   |
LL | impl<T> Bar<T> for [u8; T] {}
   |      -                  ^ not a value
   |      |
   |      found this type parameter
   |
help: you might have meant to write a const parameter here
   |
LL | impl<const T: Type> Bar<T> for [u8; T] {}
   |      +++++  ++++++
```

Addresses "case 3" from rust-lang/rust#84327.
2026-01-14 11:05:41 +01:00
..
src Rollup merge of #151077 - issue-84327, r=fmease 2026-01-14 11:05:41 +01:00
Cargo.toml resolve: Preserve binding scopes in ambiguity errors 2025-12-27 22:50:02 +03:00
messages.ftl Move more early buffered lints to dyn lint diagnostics (6/N) 2025-11-30 17:59:42 +01:00