Conversation
0xPoe
force-pushed
the
hint-min-opt-level
branch
7 times, most recently
from
August 21, 2026 07:18
b532a3f to
2b19c48
Compare
0xPoe
commented
Aug 21, 2026
Member
Author
There was a problem hiding this comment.
🔢 Self-check (PR reviewed by myself and ready for feedback)
-
Code compiles successfully
-
Unit tests added
-
No AI-generated elegant nonsense in PR.
-
Comments added where necessary
-
PR title and description updated
-
Documentation updated
-
PR size is reasonable
0xPoe
marked this pull request as ready for review
August 21, 2026 07:20
epage
reviewed
Aug 21, 2026
epage
reviewed
Aug 21, 2026
epage
reviewed
Aug 21, 2026
epage
reviewed
Aug 21, 2026
epage
reviewed
Aug 21, 2026
epage
reviewed
Aug 21, 2026
epage
reviewed
Aug 21, 2026
This comment has been minimized.
This comment has been minimized.
0xPoe
force-pushed
the
hint-min-opt-level
branch
2 times, most recently
from
August 26, 2026 07:53
14ab0ce to
415812c
Compare
This comment has been minimized.
This comment has been minimized.
epage
reviewed
Sep 17, 2026
epage
reviewed
Sep 17, 2026
epage
reviewed
Sep 17, 2026
epage
reviewed
Sep 17, 2026
pull Bot
pushed a commit
to Mu-L/cargo
that referenced
this pull request
Sep 20, 2026
### What does this PR try to resolve? Try to use `annotate-snippets` to report mostly unused warnings. Inspired by rust-lang#17368 (comment). Some behaviour changes after we move it to phase pass. | # | Case | Before | After | |---|---|---|---| | 1 | `hint-mostly-unused = true` in a profile table the build doesn't apply: unselected profile (`[profile.release]` on `cargo check`, config `profile.bench`), `build-override` with no build scripts, `package.<spec>` for a package that isn't built | Silent | Warns | | 2 | `hints.mostly-unused = true` while a profile sets `hint-mostly-unused = false` for that package | Silent, as the flag wouldn't change this build | Warns, as the key is still ignored without the flag (the profile override isn't considered) | | 3 | `hints.mostly-unused = true` while a profile also sets `hint-mostly-unused = true` for that package | Only the profile warning | Both warnings | | 4 | `[hints]` in a workspace member this invocation doesn't compile, e.g. `cargo check -p a` when `b` has the hint | Silent | Warns about `b` | | 5 | `cargo doc -p b` where `b` has `[hints]`| Silent | Warns | | 6 | `cargo clean` with `hint-mostly-unused = true` in a config/env profile | Silent | Warns, as `cargo clean` loads profiles | | 7 | `[hints]` in a path dependency that isn't a workspace member | Warns | Silent | | 8 | `[hints]` in a registry/git dependency | Warns under `-vv` when it is compiled | Silent | | 9 | `cargo install <registry crate>` whose own manifest has `[profile.release] hint-mostly-unused = true` | Warns | Silent | ### How to test and review this PR? Check the unit tests and review each commit individually. r?@ghost LLM disclosure: AI generated the unit tests and helped me move mostly unused diagnostics to the parse pass.
0xPoe
force-pushed
the
hint-min-opt-level
branch
from
September 21, 2026 07:17
961bec9 to
bf6bede
Compare
This comment has been minimized.
This comment has been minimized.
0xPoe
force-pushed
the
hint-min-opt-level
branch
4 times, most recently
from
September 21, 2026 07:59
2314321 to
8ad3d1f
Compare
0xPoe
marked this pull request as draft
September 21, 2026 08:00
0xPoe
force-pushed
the
hint-min-opt-level
branch
from
September 22, 2026 08:26
8ad3d1f to
e720ead
Compare
0xPoe
marked this pull request as ready for review
September 22, 2026 08:27
This comment has been minimized.
This comment has been minimized.
0xPoe
force-pushed
the
hint-min-opt-level
branch
from
October 4, 2026 19:21
e720ead to
d490827
Compare
Record the current ignored-hint behavior across the RFC precedence, scope, validation, and boundary cases. Signed-off-by: 0xPoe <poe.liu@pm.me>
Validating `hints.min-opt-level` only needs the manifest, so run it as a package rule in the parse pass instead of walking the pre-build unit graph. Non-member path dependencies stop being diagnosed, matching how unused manifest keys and unknown hints are already reported. Signed-off-by: 0xPoe <poe.liu@pm.me>
Signed-off-by: 0xPoe <poe.liu@pm.me>
0xPoe
force-pushed
the
hint-min-opt-level
branch
from
October 4, 2026 19:26
d490827 to
1da3c9b
Compare
Collaborator
|
This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
This branch has not been deployed
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.
View all comments
What does this PR try to resolve?
ref #17334
This PR would allow Rust library to provide a simple hint about the minimum opt-level to build them with via the
hint.min-opt-levelsetting in the manifest.How to test and review this PR?
Check the unit tests and review it commit by commit.
r?@ghost