diff options
Diffstat (limited to 'src/test/ui/traits/map-types.stderr')
-rw-r--r-- | src/test/ui/traits/map-types.stderr | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/test/ui/traits/map-types.stderr b/src/test/ui/traits/map-types.stderr new file mode 100644 index 000000000..f685c50b0 --- /dev/null +++ b/src/test/ui/traits/map-types.stderr @@ -0,0 +1,12 @@ +error[E0277]: the trait bound `Box<dyn Map<isize, isize>>: Map<usize, isize>` is not satisfied + --> $DIR/map-types.rs:17:41 + | +LL | let y: Box<dyn Map<usize, isize>> = Box::new(x); + | ^^^^^^^^^^^ the trait `Map<usize, isize>` is not implemented for `Box<dyn Map<isize, isize>>` + | + = help: the trait `Map<K, V>` is implemented for `HashMap<K, V>` + = note: required for the cast from `Box<dyn Map<isize, isize>>` to the object type `dyn Map<usize, isize>` + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0277`. |