Repository navigation
Skip long type files for expected lints - #166357
LusterSourav wants to merge 8 commits into
Conversation
|
Thanks for the pull request, and welcome! The Rust Project has assigned @oli-obk (or someone else) to review your changes, you should hear from them (or someone else) within the next two weeks. Please see the contribution instructions and our LLM policy for more information. Why was this reviewer chosen?The reviewer was selected based on:
|
| is_lint: None, | ||
| long_ty_path: None, | ||
| // Expected lints are never shown, so they must not write long type files. | ||
| long_ty_path: matches!(level, Level::Warning(Some(EmissionOverride::Expected { .. }))) |
There was a problem hiding this comment.
Actually could we make this a custom enum rather than an option? I think that's clearer
Like
enum LongTyPath {
None,
Surpressed,
Some(PathBuf)
}
There was a problem hiding this comment.
Yes, I agree a enum with none, suppresed and some(PathBuf) states the intent directl & its removes the empty path trick and makes it hard to forget the suppresed case here cost is that every place that uses the field need updting hmhmhm
There was a problem hiding this comment.
but the q is i have to changes it one many file like 40+
The trait IntoDiagArg has a method that takes &mut option PathBuf ,it is declared in rustc_error_messages.
and every typ that implments this trait has to repeat that exact sigature. About 30 types across about 20 crates implemnt it, in rustc_abi, rustc_hir, rustc_target and others..... and the change option PathBuf to LongTyPath, evry one of those signatues stops compiling...so more and more line edts
There was a problem hiding this comment.
this enum get me more edits... ???????
There was a problem hiding this comment.
could u please suggest me what to doooo plsss
|
Reminder, once the PR becomes ready for a review, use |
|
so i will updates the test files means rename it & add the allow case then the overwrite sites onee and i will switch to enum |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
|
@rustbot ready |
|
The job Click to see the possible cause of the failure (guessed by this bot)Important For more information how to resolve CI failures of this job, visit this link. |
View all comments
#166293
P=thee expected lint is never shown but its diagnostic was still built,building it wrote a long type file to disk
F+=Diagnostics for expected lints now carry an empty path marker. short_string_namespace sees the marker and returns the short string without writing a file
T+=new run make test checks that no long type file is created for an expected lint. It also checks that a shown lint still creates one
i cheked ;)
./x check compiler
and tests/run-make/expect-lint-no-long-type-file it cheekc that no long-type file pikabo ...
./x test tidy
full tests/ui and the rest of the compiler suite not run or else my lap gona cry -_-