-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Allow multiple suggestions for malformed crate_type attribute #130923
Allow multiple suggestions for malformed crate_type attribute #130923
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @nnethercote (or someone else) some time within the next two weeks. Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (
|
rust-analyzer is developed in its own repository. If possible, consider making this change to rust-lang/rust-analyzer instead. cc @rust-lang/rust-analyzer |
I think you got the wrong file, #61288 points to rust/src/libsyntax/feature_gate.rs. |
This comment has been minimized.
This comment has been minimized.
I think since the last time this issue was made, refactors have been made and the
Hello @lnicola to begin with, I think that the path isn't valid again cause a lot of changes have been made since the creation of these issue. The must have been some refactor cause the Moreover if you look into that |
After a couple of diggings i found the And if you look carefully as from line 21 to 28 you will see it was done by Lukas Wirth 3 years ago same as done here src/libsyntax/feature_gate.rs from line 870 to 877. |
@Blindspot22 rust-analyzer is in most part a reimplementation of the compiler, so you should never need to modify r-a to fix a compiler issue. |
Okay thanks for that info 👍 |
@Blindspot22 you can find where this diagnostic is emitted in rustc with [
|
Might be able to massage
to produce extra help by matching on |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as off-topic.
This comment was marked as off-topic.
…-in-template-for-bad-attribute-use-rust-lang#61288, r=<try> Allow multiple suggestions for malformed crate_type attribute Solves these rust-lang#61288
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment has been minimized.
This comment has been minimized.
@Blindspot22 |
Hello @alex-semenyuk. Sorry I have been kind of busy lately and forgot about this, working on it right away 👍 |
This comment has been minimized.
This comment has been minimized.
Hey @jieyouxu I'm having this issue. Meanwhile we're intentionally testing a malformed attribute. We actually want that each time someone uses |
This comment has been minimized.
This comment has been minimized.
@Blindspot22: You have modified the Also, you should squash the commits into a single commit, because they don't make sense individually. And the |
Okay thanks @nnethercote on that 👍 |
This comment has been minimized.
This comment has been minimized.
There are merge commits (commits with multiple parents) in your changes. We have a no merge policy so these commits will need to be removed for this pull request to be merged. You can start a rebase with the following commands:
The following commits are merge commits: |
This comment has been minimized.
This comment has been minimized.
Hey @nnethercote, a small look in on this might help :) |
☔ The latest upstream changes (presumably #128657) made this pull request unmergeable. Please resolve the merge conflicts. |
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.
This is getting closer, but there are still some problems.
- There is a merge commit, which isn't acceptable, as explained here.
- Something weird has happened with the merge commit, which is causing the compile errors.
- The change to
rust/src/test/ui/no_crate_type.stderr
present in an earlier commit has been reverted in a later commit. This change is the motivation for this whole PR. - The multiple commits still need to be squashed.
- Plus the various comments I have made below.
Please make sure these are fixed. If any of them are unclear, feel free to ask for clarification here or on Zulip.
Hello @nnethercote thanks. I'm presently working on the changes, almost done. As for the |
Hello @nnethercote to solve the no merge policy and squash issue i created a new branch/PR with reference to this one here below |
It would have been possible to remove the merge commit in this PR, but given that #136125 has been opened I will close this. |
Solves these #61288