feat: Provide an config option to not set cfg(test)#18085
Merged
bors merged 2 commits intorust-lang:masterfrom Sep 30, 2024
Merged
feat: Provide an config option to not set cfg(test)#18085bors merged 2 commits intorust-lang:masterfrom
cfg(test)#18085bors merged 2 commits intorust-lang:masterfrom
Conversation
ChayimFriedman2
commented
Sep 9, 2024
3ec4600 to
4069f01
Compare
ChayimFriedman2
added a commit
to ChayimFriedman2/rust-analyzer
that referenced
this pull request
Sep 10, 2024
This is a small change, but it was the cause of 90% of the errors in `rust-analyzer diagnostics .` 🫢 With this change and rust-lang#18085 together, all remaining errors are type errors. This may mean we can enable more errors, but this is out of scope for this PR.
ChayimFriedman2
added a commit
to ChayimFriedman2/rust-analyzer
that referenced
this pull request
Sep 10, 2024
This is a small change, but it was the cause of 90% of the errors in `rust-analyzer diagnostics .` 🫢 With this change and rust-lang#18085 together, all remaining errors are type errors. This may mean we can enable more errors, but this is out of scope for this PR.
ChayimFriedman2
added a commit
to ChayimFriedman2/rust-analyzer
that referenced
this pull request
Sep 10, 2024
This is a small change, but it was the cause of 90% of the errors in `rust-analyzer diagnostics .` 🫢 With this change and rust-lang#18085 together, all remaining errors are type errors. This may mean we can enable more errors, but this is out of scope for this PR.
ChayimFriedman2
added a commit
to ChayimFriedman2/rust-analyzer
that referenced
this pull request
Sep 10, 2024
This is a small change, but it was the cause of 90% of the errors in `rust-analyzer diagnostics .` 🫢 With this change and rust-lang#18085 together, all remaining errors are type errors. This may mean we can enable more errors, but this is out of scope for this PR.
bors
added a commit
that referenced
this pull request
Sep 10, 2024
fix: Correctly escape strings in our quote macro This is a small change, but it was the cause of 90% of the errors in `rust-analyzer diagnostics .` 🫢 (because this worked incorrectly with `stringify!()`, which means every `quote!()` (the original one) quoting a string also didn't work). With this change and #18085 together, all remaining errors are type errors. This may mean we can enable more errors, but this is out of scope for this PR.
Contributor
|
☔ The latest upstream changes (presumably #18057) made this pull request unmergeable. Please resolve the merge conflicts. |
Veykril
reviewed
Sep 11, 2024
4069f01 to
d5c631b
Compare
Contributor
|
☔ The latest upstream changes (presumably #18117) made this pull request unmergeable. Please resolve the merge conflicts. |
This will mean users opting to not activate `cfg(test)` will lose IDE experience on them, which is quite unfortunate, but this is unavoidable if we want to avoid false positives on e.g. diagnostics. The real fix is to provide IDE experience even for cfg'ed out code, but this is out of scope for this PR.
d5c631b to
4a06675
Compare
Contributor
Author
|
@Veykril, addressed comments (side note: maybe use |
Veykril
approved these changes
Sep 30, 2024
Member
|
@bors r+ |
Contributor
Contributor
Contributor
|
☀️ Test successful - checks-actions |
This was referenced Oct 10, 2024
lnicola
pushed a commit
to lnicola/rust
that referenced
this pull request
Oct 17, 2024
Skip #[test_case] expansion Fixes rust-lang#18274, although I don't fully understand if this is the best fix (it's not clear to me why this didn't cause issues before rust-lang/rust-analyzer#18085).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #17957.