]> git.lizzy.rs Git - rust.git/commit - src/tools/miri
Rollup merge of #94810 - michaelwoerister:fix-trait-pointer-debuginfo-names, r=wesley...
authorMatthias Krüger <matthias.krueger@famsik.de>
Tue, 15 Mar 2022 16:15:52 +0000 (17:15 +0100)
committerGitHub <noreply@github.com>
Tue, 15 Mar 2022 16:15:52 +0000 (17:15 +0100)
commite755f2c7cdf8636f53243f2fdaffab2a87c5a3c5
tree57e06d8637ffae44b89724db3f43a8aa871ebdd2
parentbe52b4af5ec7e49572cb16519b7e144d6bcb051d
parent5cd8a2addaf4aae55c52fb9af5fdb36243295070
Rollup merge of #94810 - michaelwoerister:fix-trait-pointer-debuginfo-names, r=wesleywiser

debuginfo: Fix bug in type name generation for dyn types with associated types but no other generic arguments.

For types like `&dyn Future<Output=bool>` the compiler currently emits invalid types names in debuginfo. This PR fixes this.

Before:
```txt
// DWARF
&dyn core::future::future::Future, Output=bool>

// CodeView
ref$<dyn$<core::future::future::Future,assoc$<Output,bool> > > >
```

After:
```txt
// DWARF
&dyn core::future::future::Future<Output=bool>

// CodeView
ref$<dyn$<core::future::future::Future<assoc$<Output,bool> > > >
```

These syntactically incorrect type names can cause downstream tools (e.g. debugger extensions) crash when trying to parse them.

r? `@wesleywiser`
compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs
src/test/debuginfo/type-names.rs