-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Open
Labels
A-MIRArea: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.htmlArea: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.htmlC-cleanupCategory: PRs that clean code up or issues documenting cleanup.Category: PRs that clean code up or issues documenting cleanup.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
Today if a path refers to unnamed defs such as closures, it's printed using double braces e.g. for the following example, rustc
refers to Foo
as main::{{closure}}#0::Foo
:
fn main() {
|| {
struct Foo;
let () = Foo;
// ^^ expected struct `main::{{closure}}#0::Foo`, found `()`
}
}
However, the new Rust Symbol Mangling (rust-lang/rfcs#2603 / #60705), uses {closure#0}
instead.
I forget if I wrote about this before, but I prefer the newer form and it would be nice if we could switch everything uniformly to it.
As an aside, I've long believed that the double braces (e.g. {{closure}}
, {{impl}}
) were meant to be single braces (i.e. {closure}
, {impl}
), escaped for format!
, and that somehow that got lost.
oli-obk
Metadata
Metadata
Assignees
Labels
A-MIRArea: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.htmlArea: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.htmlC-cleanupCategory: PRs that clean code up or issues documenting cleanup.Category: PRs that clean code up or issues documenting cleanup.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.