summary refs log tree commit diff
path: root/src/test/ui/error-codes
diff options
context:
space:
mode:
authorTaylor Cramer <cramertj@google.com>2018-02-08 15:40:27 -0800
committerTaylor Cramer <cramertj@google.com>2018-02-13 17:34:26 -0800
commit75f72c0de141573eef56f13fd48a3af12deaee4f (patch)
tree95077d9f4c90323f469213386175b706daa40a93 /src/test/ui/error-codes
parent4d2d3fc5dadf894a8ad709a5860a549f2c0b1032 (diff)
downloadrust-75f72c0de141573eef56f13fd48a3af12deaee4f.tar.gz
rust-75f72c0de141573eef56f13fd48a3af12deaee4f.zip
Make nested impl Trait a hard error
Diffstat (limited to 'src/test/ui/error-codes')
-rw-r--r--src/test/ui/error-codes/E0657.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/test/ui/error-codes/E0657.rs b/src/test/ui/error-codes/E0657.rs
index 4595e413081..31b3acd86ef 100644
--- a/src/test/ui/error-codes/E0657.rs
+++ b/src/test/ui/error-codes/E0657.rs
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 #![allow(warnings)]
-#![feature(conservative_impl_trait, nested_impl_trait)]
+#![feature(conservative_impl_trait)]
 
 trait Id<T> {}
 trait Lt<'a> {}
@@ -17,7 +17,7 @@ impl<'a> Lt<'a> for () {}
 impl<T> Id<T> for T {}
 
 fn free_fn_capture_hrtb_in_impl_trait()
-    -> impl for<'a> Id<impl Lt<'a>>
+    -> Box<for<'a> Id<impl Lt<'a>>>
         //~^ ERROR `impl Trait` can only capture lifetimes bound at the fn or impl level [E0657]
 {
     ()
@@ -26,7 +26,7 @@ fn free_fn_capture_hrtb_in_impl_trait()
 struct Foo;
 impl Foo {
     fn impl_fn_capture_hrtb_in_impl_trait()
-        -> impl for<'a> Id<impl Lt<'a>>
+        -> Box<for<'a> Id<impl Lt<'a>>>
             //~^ ERROR `impl Trait` can only capture lifetimes bound at the fn or impl level
     {
         ()