-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Point at local similarly named element and tweak references to variants #65421
Conversation
r? @davidtwco (rust_highfive has picked a reviewer for you, use r? to override) |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
r? @petrochenkov (to make sure there's consensus due to #65386 (comment) and because Vadim knows resolve well ^^) |
::: $SRC_DIR/libcore/cmp.rs:LL:COL | ||
| | ||
LL | pub macro Eq($item:item) { /* compiler built-in */ } | ||
| ---------------------------------------------------- similarly named derive macro `Eq` defined here |
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.
It seems to me that for some proc and derive macros the new output might be more confusing than helpful for new comers ("how do I do that"), but at the same time they'd be nice to have as well for everyone else.
src/test/ui/imports/extern-prelude-extern-crate-restricted-shadowing.stderr
Show resolved
Hide resolved
::: $SRC_DIR/libcore/result.rs:LL:COL | ||
| | ||
LL | Ok(#[stable(feature = "rust1", since = "1.0.0")] T), | ||
| --------------------------------------------------- similarly named tuple variant `Ok` defined here |
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.
Somewhat unexpectedly (but not unforeseeably), this change now makes more obvious that attribute annotations are part of the public documentation and will be more visible than currently. In some cases like this one it might make sense to tweak them "out of the way" to improve readability while keeping the same semantic meaning.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
We cannot land this with disabled tests. The change causing non-reproducible output needs to be either removed or investigated/fixed to remove the source of non-reproducibility. Beside that the PR looks good. |
Point at the span for the definition of ADTs internal to the current crate. Look at the leading char of the ident to determine whether we're expecting a likely fn or any of a fn, a tuple struct or a tuple variant. Turn fn `add_typo_suggestion` into a `Resolver` method.
@bors r=petrochenkov |
📌 Commit b26ddb8 has been approved by |
Point at local similarly named element and tweak references to variants Partially address rust-lang#65386.
Point at local similarly named element and tweak references to variants Partially address #65386.
☀️ Test successful - checks-azure |
Tested on commit rust-lang/rust@8d78bf6. Direct link to PR: <rust-lang/rust#65421> 💔 rls on windows: test-pass → test-fail (cc @Xanewok, @rust-lang/infra). 💔 rls on linux: test-pass → test-fail (cc @Xanewok, @rust-lang/infra).
Partially address #65386.