]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/map-types.rs
Rollup merge of #89468 - FabianWolff:issue-89358, r=jackh726
[rust.git] / src / test / ui / map-types.rs
index 89b57087507c8466a9fc6e5af98d8b0bcafd374d..dc33b961800ea8bf75bc8ecef9780493ab95a9da 100644 (file)
@@ -1,7 +1,7 @@
-#![feature(box_syntax)]
-
 use std::collections::HashMap;
 
+
+
 trait Map<K, V>
 {
     fn get(&self, k: K) -> V { panic!() }
@@ -12,7 +12,7 @@ impl<K, V> Map<K, V> for HashMap<K, V> {}
 // Test that trait types printed in error msgs include the type arguments.
 
 fn main() {
-    let x: Box<HashMap<isize, isize>> = box HashMap::new();
+    let x: Box<HashMap<isize, isize>> = HashMap::new().into();
     let x: Box<dyn Map<isize, isize>> = x;
     let y: Box<dyn Map<usize, isize>> = Box::new(x);
     //~^ ERROR `Box<dyn Map<isize, isize>>: Map<usize, isize>` is not satisfied