Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#103774 - compiler-errors:dyn-trait-in-type-…
…name, r=eholk Format `dyn Trait` better in `type_name` intrinsic Noticed this in rust-lang#103764 (though not related to that PR at all!) ```rust trait Foo { type Bar; } fn main() { println!( "`dyn Fn(i32, i32) -> i32` => `{}`", std::any::type_name::<dyn Fn(i32, i32) -> i32>() ); println!( "`dyn Foo<Bar = i32> + Send + Sync` => `{}`", std::any::type_name::<dyn Foo<Bar = i32> + Send + Sync>() ); } ``` ``` `dyn Fn(i32, i32) -> i32` => `dyn core::ops::function::Fn<(i32, i32)>+Output = i32` `dyn Foo<Bar = i32> + Send + Sync` => `dyn playground::Foo+Bar = i32+core::marker::Sync+core::marker::Send` ``` Just reuse `pretty_print_dyn_existential` which already makes an attempt to make its output stable.
- Loading branch information