Files
rust/tests/ui/missing/undeclared-generic-parameter.rs
T
Usman Akinyemi b31dc4ab49 diagnostics: avoid ICE for undeclared generic parameter in impl
Avoid an ICE for:

    struct A;
    impl A<B> {}

The compiler no longer panics and can proceed to emit existing diagnostics.

Adds `tests/ui/missing/undeclared-generic-parameter.rs`.

Signed-off-by: Usman Akinyemi <usmanakinyemi202@gmail.com>
2026-03-21 21:54:46 +05:30

6 lines
162 B
Rust

struct A;
impl A<B> {}
//~^ ERROR cannot find type `B` in this scope
//~| ERROR struct takes 0 generic arguments but 1 generic argument was supplied
fn main() {}