Catch forward declarations in default type params at AST conversion.
This commit is contained in:
parent
52a53e8ae7
commit
f829d208a3
2 changed files with 19 additions and 3 deletions
|
|
@ -12,8 +12,7 @@
|
|||
|
||||
// Ensure that we get an error and not an ICE for this problematic case.
|
||||
struct Foo<T = Option<U>, U = bool>;
|
||||
|
||||
//~^ ERROR type parameters with a default cannot use forward declared identifiers
|
||||
fn main() {
|
||||
let x: Foo;
|
||||
//~^ ERROR missing type param `U` in the substitution of `std::option::Option<U>`
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue