blob: 7f40e93cd87ac84b6b56eb400dccf60aaa7f6614 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
// Test that NLL generates proper error spans for trait HRTB errors
//
// compile-flags:-Zno-leak-check
trait Foo<'a> {}
fn make_foo<'a>() -> Box<dyn Foo<'a>> {
panic!()
}
fn main() {
let x: Box<dyn Foo<'static>> = make_foo();
let y: Box<dyn for<'a> Foo<'a>> = x; //~ ERROR mismatched types [E0308]
}
|