-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Use ?0
notation for ty/ct/int/float/region vars
#110811
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This comment has been minimized.
This comment has been minimized.
b7c525f
to
32a15f6
Compare
This comment has been minimized.
This comment has been minimized.
32a15f6
to
10a6461
Compare
This comment has been minimized.
This comment has been minimized.
10a6461
to
8baf122
Compare
r=me with green CI |
This comment has been minimized.
This comment has been minimized.
8baf122
to
bb99cdc
Compare
r? @WaffleLapkin @bors r=WaffleLapkin |
☀️ Test successful - checks-actions |
Finished benchmarking commit (f33379b): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesThis benchmark run did not return any relevant results for this metric. |
@@ -1436,7 +1436,7 @@ pub struct ConstVid<'tcx> { | |||
rustc_index::newtype_index! { | |||
/// A **region** (lifetime) **v**ariable **ID**. | |||
#[derive(HashStable)] | |||
#[debug_format = "'_#{}r"] | |||
#[debug_format = "'?{}"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The '_#
prefix had the advantage of being closer to correct syntax than '?
: text editors used to be able to do syntax coloring on a .mir file as if it were a rust file :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😅 Maybe we should format MIR dumps separately, and not rely on the display impl of RegionVid for that...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also maybe we should just make tools for syntax highlighting MIR dumps 🤔
Aligns the notation for infer vars that T-types and friends most often uses for inference variables with the notation in the compiler (which is kinda a sigil nightmare IMO:
_#
) by adopting?0
style infer vars.This mostly affects debug output since verbose infer vars shouldn't show up in user-facing places.
Does this need an MCP? It's debug output, so I'm thinking no, but happy to open one. 🤔
r? types