mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-24 07:44:10 +00:00
17a6ae2df3
When an associated type with GATs isn't specified in a `dyn Trait`, emit an object safety error instead of only complaining about the missing associated type, as it will lead the user down a path of three different errors before letting them know that what they were trying to do is impossible to begin with. Fix #103155.
9 lines
153 B
Rust
9 lines
153 B
Rust
pub trait Foo {
|
|
type A;
|
|
}
|
|
|
|
type I<'a> = &'a (dyn Foo + 'a);
|
|
//~^ ERROR the value of the associated type `A` in `Foo` must be specified
|
|
|
|
fn main() {}
|