]> git.lizzy.rs Git - rust.git/commitdiff
also fix the Fixed code
authorNiko Matsakis <niko@alum.mit.edu>
Wed, 21 Mar 2018 23:23:29 +0000 (19:23 -0400)
committerNiko Matsakis <niko@alum.mit.edu>
Wed, 21 Mar 2018 23:23:29 +0000 (19:23 -0400)
src/librustc/diagnostics.rs

index 10156d22501e7c2e8021bdec615825f8ad576e97..2fd875c3447677b4d841b320535abbfe543b6917 100644 (file)
@@ -2109,11 +2109,13 @@ fn foo<'x, 'y>(x: Cell<&'x u32>) -> impl Trait<'y>
 would work:
 
 ```
+#![feature(conservative_impl_trait)]
+
 use std::cell::Cell;
 
 trait Trait<'a> { }
 
-impl Trait<'b> for Cell<&'a u32> { }
+impl<'a,'b> Trait<'b> for Cell<&'a u32> { }
 
 fn foo<'x, 'y>(x: Cell<&'x u32>) -> impl Trait<'y> + 'x
 where 'x: 'y