-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Improve dangerous_implicit_aurorefs
diagnostic output
#140768
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
Not a good reviewer for this, maybe r? @RalfJung |
I'm not really an expert for lint implementations, and hardly use these HIR APIs. Let's see if this works |
e4fac05
to
5e5cacd
Compare
r? fmease |
This comment was marked as resolved.
This comment was marked as resolved.
5e5cacd
to
9b3abe7
Compare
@@ -362,6 +362,10 @@ lint_impl_trait_redundant_captures = all possible in-scope parameters are alread | |||
|
|||
lint_implicit_unsafe_autorefs = implicit autoref creates a reference to the dereference of a raw pointer | |||
.note = creating a reference requires the pointer target to be valid and imposes aliasing requirements | |||
.raw_ptr = this raw pointer has type `{$raw_ptr_ty}` | |||
.autoref = autoref is being applied to this expression, resulting in: `{$autoref_ty}` |
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.
We talked about rephrasing "autoref is being applied" to sth. along the lines of "references to this expression are implicitly created", "references are implicitly applied ...", ...
Is that still something we want to pursue?
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.
Yeah, I wanted to do that but given that the end result type is not going to have a visible reference I just removed the "autoref" note, and just show the deref one.
@bors r+ rollup |
🌲 The tree is currently closed for pull requests below priority 100. This pull request will be tested once the tree is reopened. |
Improve `dangerous_implicit_aurorefs` diagnostic output This PR *greatly* improves the `dangerous_implicit_aurorefs` lint diagnostic output. Kind of related to rust-lang#140721. r? `@jieyouxu` (maybe)
Improve `dangerous_implicit_aurorefs` diagnostic output This PR *greatly* improves the `dangerous_implicit_aurorefs` lint diagnostic output. Kind of related to rust-lang#140721. r? ``@jieyouxu`` (maybe)
…mpiler-errors Rollup of 14 pull requests Successful merges: - rust-lang#139749 (docs(library/core/src/pin): fix typo "necessarily" -> "necessary") - rust-lang#140130 (Add LLDB providers for BTreeMap and BTreeSet) - rust-lang#140685 (Simplify `Vec::as_non_null` implementation and make it `const`) - rust-lang#140712 (normalization: avoid incompletely constraining GAT args) - rust-lang#140768 (Improve `dangerous_implicit_aurorefs` diagnostic output) - rust-lang#140834 (move (or remove) some impl Trait tests) - rust-lang#140910 (Remove `stable` attribute from wasi fs (read_exact|write_all)_at) - rust-lang#140947 (Flush errors before deep normalize in `dropck_outlives`) - rust-lang#140966 (Remove #![feature(let_chains)] from library and src/librustdoc) - rust-lang#140977 ([win] Use a dash instead of slash for linker to avoid breaking lld) - rust-lang#140990 (VxWorks: updates from recent libc versions) - rust-lang#141003 (Improve ternary operator recovery) - rust-lang#141013 (Implement methods to set STARTUPINFO flags for Command API on Windows) - rust-lang#141026 (rustc-dev-guide subtree update) r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#139749 (docs(library/core/src/pin): fix typo "necessarily" -> "necessary") - rust-lang#140685 (Simplify `Vec::as_non_null` implementation and make it `const`) - rust-lang#140712 (normalization: avoid incompletely constraining GAT args) - rust-lang#140768 (Improve `dangerous_implicit_aurorefs` diagnostic output) - rust-lang#140947 (Flush errors before deep normalize in `dropck_outlives`) - rust-lang#140966 (Remove #![feature(let_chains)] from library and src/librustdoc) - rust-lang#140990 (VxWorks: updates from recent libc versions) - rust-lang#141027 (remove `RustfmtState` to reduce `initial_rustfmt` complexity) r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#139749 (docs(library/core/src/pin): fix typo "necessarily" -> "necessary") - rust-lang#140685 (Simplify `Vec::as_non_null` implementation and make it `const`) - rust-lang#140712 (normalization: avoid incompletely constraining GAT args) - rust-lang#140768 (Improve `dangerous_implicit_aurorefs` diagnostic output) - rust-lang#140947 (Flush errors before deep normalize in `dropck_outlives`) - rust-lang#140990 (VxWorks: updates from recent libc versions) - rust-lang#141027 (remove `RustfmtState` to reduce `initial_rustfmt` complexity) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#140768 - Urgau:improv_autorefs-lint, r=fmease Improve `dangerous_implicit_aurorefs` diagnostic output This PR *greatly* improves the `dangerous_implicit_aurorefs` lint diagnostic output. Kind of related to rust-lang#140721. r? ```@jieyouxu``` (maybe)
This PR greatly improves the
dangerous_implicit_aurorefs
lint diagnostic output.Kind of related to #140721.
r? @jieyouxu (maybe)