]> git.proxmox.com Git - rustc.git/blobdiff - src/test/ui/impl-trait/nested_impl_trait.rs
New upstream version 1.67.1+dfsg1
[rustc.git] / src / test / ui / impl-trait / nested_impl_trait.rs
index 85c6f8c462cbbfb60adb2c7a83a72783769961dc..e95fab3b6505780275a9537eb8adec29bf3684c1 100644 (file)
@@ -1,3 +1,4 @@
+#![feature(impl_trait_in_fn_trait_return)]
 use std::fmt::Debug;
 
 fn fine(x: impl Into<u32>) -> impl Into<u32> { x }
@@ -25,8 +26,7 @@ fn allowed_in_assoc_type() -> impl Iterator<Item=impl Fn()> {
 }
 
 fn allowed_in_ret_type() -> impl Fn() -> impl Into<u32> {
-//~^ `impl Trait` only allowed in function and inherent method return types
-    || 5
+    || 5u8
 }
 
 fn main() {}