]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/eta.fixed
Rustup to https://github.com/rust-lang/rust/pull/61203
[rust.git] / tests / ui / eta.fixed
index a3e57956f35b4e5c8ba1b83bbaea7640a752bdd4..1ad836d25ff6630a7fdd1f657f8e820c26b7b292 100644 (file)
@@ -32,8 +32,8 @@ fn main() {
     let e = Some(1u8).map(generic);
     let e = Some(1u8).map(generic);
     // See #515
-    let a: Option<Box<::std::ops::Deref<Target = [i32]>>> =
-        Some(vec![1i32, 2]).map(|v| -> Box<::std::ops::Deref<Target = [i32]>> { Box::new(v) });
+    let a: Option<Box<dyn (::std::ops::Deref<Target = [i32]>)>> =
+        Some(vec![1i32, 2]).map(|v| -> Box<dyn (::std::ops::Deref<Target = [i32]>)> { Box::new(v) });
 }
 
 trait TestTrait {
@@ -108,7 +108,7 @@ fn test_redundant_closures_containing_method_calls() {
     let _: Vec<_> = arr.iter().map(|x| x.map_err(some.take().unwrap())).collect();
 }
 
-struct Thunk<T>(Box<FnMut() -> T>);
+struct Thunk<T>(Box<dyn FnMut() -> T>);
 
 impl<T> Thunk<T> {
     fn new<F: 'static + FnOnce() -> T>(f: F) -> Thunk<T> {