We have not yet stabilized `dyn Trait` (see https://github.com/rust-lang/rust/issues/49218), but once we do, we should start using it in error messages. So for example this test: ```rust #![feature(dyn_trait)] use std::fmt::{Debug, Display}; fn main() { let x: Box<dyn Debug> = Box::new(1); let _: Box<dyn Display> = x; } ``` should print ``` error[E0308]: mismatched types --> src/main.rs:5:31 | 5 | let _: Box<dyn Display> = x; | ^ expected trait `std::fmt::Display`, found trait `std::fmt::Debug` | = note: expected type `std::boxed::Box<dyn std::fmt::Display>` found type `std::boxed::Box<dyn std::fmt::Debug>` ```
Activity
Rollup merge of rust-lang#51104 - zackmdavis:dynamo, r=nikomatsakis