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

Don't display function path for unsafe_op_in_unsafe_fn lints #106127

Conversation

LeSeulArtichaut
Copy link
Contributor

Fixes #106126, partially reverts #96294.

@rustbot
Copy link
Collaborator

rustbot commented Dec 24, 2022

r? @petrochenkov

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

@rustbot rustbot added A-translation Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic 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 Dec 24, 2022
@rustbot
Copy link
Collaborator

rustbot commented Dec 24, 2022

rustc_error_messages was changed

cc @davidtwco, @compiler-errors, @JohnTitor, @estebank, @TaKO8Ki

@LeSeulArtichaut
Copy link
Contributor Author

Alternatively, #106157 disables path trimming. Unsure of which solution is preferred.

@petrochenkov
Copy link
Contributor

r? rust-lang/compiler
I'd like to take some break from reviewing.

@rustbot rustbot assigned Noratrieb and unassigned petrochenkov Jan 2, 2023
@Noratrieb
Copy link
Member

How do other lints that print paths handle this? I think we should try to align with them if possible. Showing the path seems pretty nice to me and I would prefer having it, not trimming it doesn't sound too bad given that it's just a function.

@LeSeulArtichaut
Copy link
Contributor Author

Closing in favor of #106157 as discussed on Zulip. Thanks @Nilstrieb

@LeSeulArtichaut LeSeulArtichaut deleted the 106126-thir-unsafeck-good-path-bug branch January 2, 2023 23:24
compiler-errors added a commit to compiler-errors/rust that referenced this pull request Jan 4, 2023
…ck-good-path-bug-2, r=compiler-errors

Don't trim path for `unsafe_op_in_unsafe_fn` lints

Fixes rust-lang#106126, alternative to rust-lang#106127.
r? `@ghost` for now.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-translation Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ICE: 'trimmed_def_paths constructed but no error emitted' in THIR unsafety checker
4 participants