diff options
| author | Dylan DPC <99973273+Dylan-DPC@users.noreply.github.com> | 2022-11-02 22:32:03 +0530 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-11-02 22:32:03 +0530 |
| commit | bbd3a106636d0e283c825310c45a071e9699ee79 (patch) | |
| tree | c299b98473e44e62c3feea8b9d2554127908a1a5 /library/std/src/sys/unix/stack_overflow.rs | |
| parent | 109f887bf54718cea89b9b9c51ada1f06956b335 (diff) | |
| parent | e24df2778fb7a19dfe386ad563ea216a816db94a (diff) | |
| download | rust-bbd3a106636d0e283c825310c45a071e9699ee79.tar.gz rust-bbd3a106636d0e283c825310c45a071e9699ee79.zip | |
Rollup merge of #103774 - compiler-errors:dyn-trait-in-type-name, r=eholk
Format `dyn Trait` better in `type_name` intrinsic
Noticed this in #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.
Diffstat (limited to 'library/std/src/sys/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions
