Skip to content

Conversation

compiler-errors
Copy link
Member

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

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Apr 25, 2023
@rust-log-analyzer

This comment has been minimized.

@rust-cloud-vms rust-cloud-vms bot force-pushed the vars-are-question-mark branch from b7c525f to 32a15f6 Compare April 25, 2023 17:12
@rust-log-analyzer

This comment has been minimized.

@rust-cloud-vms rust-cloud-vms bot force-pushed the vars-are-question-mark branch from 32a15f6 to 10a6461 Compare April 25, 2023 17:39
@rust-log-analyzer

This comment has been minimized.

@rust-cloud-vms rust-cloud-vms bot force-pushed the vars-are-question-mark branch from 10a6461 to 8baf122 Compare April 25, 2023 19:17
@WaffleLapkin
Copy link
Member

r=me with green CI

@rust-log-analyzer

This comment has been minimized.

@rust-cloud-vms rust-cloud-vms bot force-pushed the vars-are-question-mark branch from 8baf122 to bb99cdc Compare April 25, 2023 19:59
@compiler-errors
Copy link
Member Author

r? @WaffleLapkin @bors r=WaffleLapkin

@bors
Copy link
Collaborator

bors commented Apr 25, 2023

📌 Commit bb99cdc has been approved by WaffleLapkin

It is now in the queue for this repository.

@rustbot rustbot assigned WaffleLapkin and unassigned oli-obk Apr 25, 2023
@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 25, 2023
@bors
Copy link
Collaborator

bors commented Apr 25, 2023

⌛ Testing commit bb99cdc with merge f33379b...

@bors
Copy link
Collaborator

bors commented Apr 26, 2023

☀️ Test successful - checks-actions
Approved by: WaffleLapkin
Pushing f33379b to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Apr 26, 2023
@bors bors merged commit f33379b into rust-lang:master Apr 26, 2023
@rustbot rustbot added this to the 1.71.0 milestone Apr 26, 2023
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (f33379b): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results

This 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.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
2.6% [2.5%, 2.7%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Cycles

This 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 = "'?{}"]
Copy link
Member

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 :)

Copy link
Member Author

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...

Copy link
Member

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 🤔

@compiler-errors compiler-errors deleted the vars-are-question-mark branch August 11, 2023 20:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants