mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-24 07:44:10 +00:00
12 lines
255 B
Rust
12 lines
255 B
Rust
//@ check-fail
|
|
// Ensure we don't error when emitting trait bound not satisfied when self type
|
|
// has late bound var
|
|
|
|
fn main() {
|
|
test(&|| 0); //~ ERROR the trait bound
|
|
}
|
|
|
|
trait Trait {}
|
|
|
|
fn test<T>(arg: &impl Fn() -> T) where for<'a> &'a T: Trait {}
|