rust/tests/ui/higher-ranked/well-formed-aliases.rs
2024-05-21 15:56:10 -04:00

9 lines
227 B
Rust

trait Trait {
type Gat<U: ?Sized>;
}
fn test<T>(f: for<'a> fn(<&'a T as Trait>::Gat<&'a [str]>)) where for<'a> &'a T: Trait {}
//~^ ERROR the size for values of type `str` cannot be known at compilation time
fn main() {}