Skip to content

Skip long type files for expected lints - #166357

Closed
LusterSourav wants to merge 10 commits into
rust-lang:mainfrom
LusterSourav:wee
Closed

LusterSourav wants to merge 10 commits into
rust-lang:mainfrom
LusterSourav:wee

Conversation

@LusterSourav

@LusterSourav LusterSourav commented Nov 22, 2026 •

Copy link
Copy Markdown

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 -_-

@rustbot rustbot added A-run-make Area: port run-make Makefiles to rmake.rs S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Nov 22, 2026
@rustbot

rustbot commented Nov 22, 2026

Copy link
Copy Markdown
Collaborator

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:

  • Owners of files modified in this PR: compiler
  • compiler expanded to 79 candidates
  • Random selection from 20 candidates

@JonathanBrouwer JonathanBrouwer added the A-diagnostics Area: Messages for errors, warnings, and lints label Nov 22, 2026
Comment thread compiler/rustc_errors/src/diagnostic.rs Resolved
Comment thread compiler/rustc_errors/src/diagnostic.rs Resolved
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 { .. })))

@JonathanBrouwer JonathanBrouwer Nov 22, 2026 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually could we make this a custom enum rather than an option? I think that's clearer
Like

enum LongTyPath {
    None,
    Surpressed,
    Some(PathBuf)
}

View changes since the review

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this enum get me more edits... ???????

@LusterSourav LusterSourav Nov 22, 2026 •

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could u please suggest me what to doooo plsss

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 22, 2026
@rustbot

rustbot commented Nov 22, 2026

Copy link
Copy Markdown
Collaborator

Reminder, once the PR becomes ready for a review, use @rustbot ready.

@LusterSourav

LusterSourav commented Nov 22, 2026 •

Copy link
Copy Markdown
Author

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
good stuff right ;)
i will update it after dinner

@oli-obk

This comment was marked as resolved.

@oli-obk

This comment was marked as resolved.

@oli-obk oli-obk closed this Nov 23, 2026
@rustbot rustbot removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Nov 23, 2026
@oli-obk oli-obk reopened this Nov 23, 2026
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 23, 2026
@LusterSourav

Copy link
Copy Markdown
Author

@rustbot ready
but the q is the enum will make more changes pls read mine comments for your suggestion after reviewing it pls suggest what to do but eventually its actually work means mine one

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@LusterSourav

LusterSourav commented Nov 24, 2026 •

Copy link
Copy Markdown
Author

fmt: checked modified file tests/run-make/expect-lint-no-long-type-file/expected.rs fmt: checked modified file tests/run-make/expect-lint-no-long-type-file/rmake.rs fmt: checked modified file tests/run-make/expect-lint-no-long-type-file/shown.rs tidy check x.py completions check tidy: All tidy checks succeeded

how test-tidy failing ???

@oli-obk oli-obk closed this Nov 25, 2026
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 25, 2026
@oli-obk

oli-obk commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

LusterSourav has reached out to me on zulip stating they do no longer wish to try to contribute

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-diagnostics Area: Messages for errors, warnings, and lints A-run-make Area: port run-make Makefiles to rmake.rs T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants