-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
feat: Provide an config option to not set cfg(test)
#18085
Conversation
3ec4600
to
4069f01
Compare
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.
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.
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.
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.
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.
☔ The latest upstream changes (presumably #18057) made this pull request unmergeable. Please resolve the merge conflicts. |
4069f01
to
d5c631b
Compare
☔ 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
@Veykril, addressed comments (side note: maybe use |
@bors r+ |
☀️ Test successful - checks-actions |
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).
Fixes #17957.