diff options
Diffstat (limited to 'src/test/ui/traits/associated_type_bound/check-trait-object-bounds-3.rs')
-rw-r--r-- | src/test/ui/traits/associated_type_bound/check-trait-object-bounds-3.rs | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/src/test/ui/traits/associated_type_bound/check-trait-object-bounds-3.rs b/src/test/ui/traits/associated_type_bound/check-trait-object-bounds-3.rs deleted file mode 100644 index ba04fd93a..000000000 --- a/src/test/ui/traits/associated_type_bound/check-trait-object-bounds-3.rs +++ /dev/null @@ -1,20 +0,0 @@ -// Check that we validate associated type bounds for trait objects - -trait X<'a> { - type Y: Into<&'static str> + From<&'a str>; -} - -fn f<'a, T: X<'a> + ?Sized>(s: &'a str) -> &'static str { - T::Y::from(s).into() -} - -pub fn main() { - let z; - { - let s = String::from("abcdef"); - z = f::<dyn X<Y = &str>>(&s); - //~^ ERROR `s` does not live long enough - } - - println!("{}", z) -} |