Skip to content
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

Avoid the path trimming ICE lint in error reporting #117373

Merged
merged 1 commit into from
Nov 2, 2023

Conversation

saethlin
Copy link
Member

@saethlin saethlin commented Oct 29, 2023

Types or really anything in MIR should never be formatted without path trimming disabled, because its formatting often tries to construct trimmed paths. In this case, the lint turns a nice error report into an irrelevant ICE.

@rustbot
Copy link
Collaborator

rustbot commented Oct 29, 2023

r? @TaKO8Ki

(rustbot has picked a reviewer for you, use r? to override)

@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 Oct 29, 2023
@rustbot
Copy link
Collaborator

rustbot commented Oct 29, 2023

Some changes occurred to the CTFE / Miri engine

cc @rust-lang/miri

@compiler-errors
Copy link
Member

Can you share any information about how to test or repro this? Or how you even encountered this in the first place?

@compiler-errors compiler-errors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 30, 2023
@RalfJung
Copy link
Member

RalfJung commented Oct 30, 2023

We format types all over the place in interpreter errors and debug logs. Does this mean we have to decorate all those places the same as these? That would be quite bad.

@RalfJung
Copy link
Member

I tried MIRI_LOG=trace ./miri run tests/pass/hello.rs and it prints tons of stuff (including a lot of types) without complaining about being on the good path later, so that part is looking good.

@saethlin saethlin added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Nov 1, 2023
@compiler-errors
Copy link
Member

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Nov 1, 2023

📌 Commit c295b7f has been approved by compiler-errors

It is now in the queue for this repository.

@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 Nov 1, 2023
@compiler-errors
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Nov 1, 2023

📌 Commit 88f0688 has been approved by compiler-errors

It is now in the queue for this repository.

GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Nov 1, 2023
…r-errors

Avoid the path trimming ICE lint in error reporting

Types or really anything in MIR should never be formatted without path trimming disabled, because its formatting often tries to construct trimmed paths. In this case, the lint turns a nice error report into an irrelevant ICE.
bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 1, 2023
…llaumeGomez

Rollup of 3 pull requests

Successful merges:

 - rust-lang#117373 (Avoid the path trimming ICE lint in error reporting)
 - rust-lang#117441 (Do not assert in op_to_const.)
 - rust-lang#117488 (Update minifier-rs version to 0.3.0)

r? `@ghost`
`@rustbot` modify labels: rollup
@GuillaumeGomez
Copy link
Member

I think it's the one which failed in #117490.

@bors r-

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Nov 1, 2023
@compiler-errors
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Nov 1, 2023

📌 Commit 88f0688 has been approved by compiler-errors

It is now in the queue for this repository.

@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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Nov 1, 2023
@RalfJung
Copy link
Member

RalfJung commented Nov 1, 2023

If anyone else was confused why @compiler-errors just un-did what @GuillaumeGomez did without any further explanation, see here.

@GuillaumeGomez
Copy link
Member

With my limited knowledge, I saw it failed in miri and this PR was the only one making changes in miri so I deducted that it might be the one. So I commented "I think" it failed in the rollup I linked and added r-. Unless I missed something, it's pretty common in such cases. My bad if more explanations were needed.

@RalfJung
Copy link
Member

RalfJung commented Nov 1, 2023

Nono you are fine, I just would have wished @compiler-errors had said a few words about why he's un-doing your decision. No big deal though, just a minute worth of confusion until I found the other PR. :)

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Nov 1, 2023
…r-errors

Avoid the path trimming ICE lint in error reporting

Types or really anything in MIR should never be formatted without path trimming disabled, because its formatting often tries to construct trimmed paths. In this case, the lint turns a nice error report into an irrelevant ICE.
bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 1, 2023
…iaskrgr

Rollup of 4 pull requests

Successful merges:

 - rust-lang#117298 (Recover from missing param list in function definitions)
 - rust-lang#117373 (Avoid the path trimming ICE lint in error reporting)
 - rust-lang#117441 (Do not assert in op_to_const.)
 - rust-lang#117488 (Update minifier-rs version to 0.3.0)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 3087b63 into rust-lang:master Nov 2, 2023
11 checks passed
@rustbot rustbot added this to the 1.75.0 milestone Nov 2, 2023
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Nov 2, 2023
Rollup merge of rust-lang#117373 - saethlin:avoid-ice-lint, r=compiler-errors

Avoid the path trimming ICE lint in error reporting

Types or really anything in MIR should never be formatted without path trimming disabled, because its formatting often tries to construct trimmed paths. In this case, the lint turns a nice error report into an irrelevant ICE.
@saethlin saethlin deleted the avoid-ice-lint branch November 2, 2023 00:37
bors-ferrocene bot added a commit to ferrocene/ferrocene that referenced this pull request Nov 2, 2023
80: Automated pull from upstream `master` r=tshepang a=github-actions[bot]


This PR pulls the following changes from the upstream repository:

* rust-lang/rust#117498
  * rust-lang/rust#117488
  * rust-lang/rust#117441
  * rust-lang/rust#117373
  * rust-lang/rust#117298
* rust-lang/rust#117029
* rust-lang/rust#117289
* rust-lang/rust#117307
* rust-lang/rust#114208
* rust-lang/rust#117482
  * rust-lang/rust#117475
  * rust-lang/rust#117401
  * rust-lang/rust#117397
  * rust-lang/rust#115626
* rust-lang/rust#117436
* rust-lang/rust#115356
* rust-lang/rust#117422
* rust-lang/rust#116692



Co-authored-by: David CARLIER <devnexen@gmail.com>
Co-authored-by: Taiki Endo <te316e89@gmail.com>
Co-authored-by: ltdk <usr@ltdk.xyz>
Co-authored-by: Ryan Mehri <ryan.mehri1@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

7 participants