Skip to content
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

fix #113702 emit a proper diagnostic message for unstable lints passed from CLI #114959

Merged
merged 1 commit into from
Aug 22, 2023

Conversation

kiscad
Copy link
Contributor

@kiscad kiscad commented Aug 18, 2023

Current output:

$ build/host/stage1/bin/rustc hello.rs -Wunnameable_types
warning: unknown lint: `unnameable_types`
  |
  = note: the `unnameable_types` lint is unstable
  = note: see issue #48054 <https://github.com/rust-lang/rust/issues/48054> for more information
  = help: add `-Zcrate-attr="feature(type_privacy_lints)"` to the command-line options to enable
  = note: `#[warn(unknown_lints)]` on by default

warning: 1 warning emitted

Previously, the feature gate diagnostic message is like below, which is the same as the message for unstable lints from the root module.

= help: add `#![feature(type_privacy_lints)]` to the crate attributes to enable

Fixes #113702

@rustbot
Copy link
Collaborator

rustbot commented Aug 18, 2023

r? @cjgillot

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added 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 Aug 18, 2023
@rust-log-analyzer

This comment has been minimized.

@kiscad kiscad changed the title fix #113702 fix #113702 emit a proper diagnostic message for unstable lints passed from CLI Aug 18, 2023
@kiscad
Copy link
Contributor Author

kiscad commented Aug 18, 2023

r? @petrochenkov

@rustbot rustbot assigned petrochenkov and unassigned cjgillot Aug 18, 2023
@petrochenkov petrochenkov 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 Aug 21, 2023
fix #rust-lang#113702

fix rust-lang#113702

unknown unstable lint command lint

improve impelementation
@petrochenkov
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Aug 22, 2023

📌 Commit d274417 has been approved by petrochenkov

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Aug 22, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 22, 2023
…mpiler-errors

Rollup of 6 pull requests

Successful merges:

 - rust-lang#114959 (fix rust-lang#113702 emit a proper diagnostic message for unstable lints passed from CLI)
 - rust-lang#115011 (Warn on elided lifetimes in associated constants (`ELIDED_LIFETIMES_IN_ASSOCIATED_CONSTANT`))
 - rust-lang#115077 (Do not emit invalid suggestion in E0191 when spans overlap)
 - rust-lang#115087 (Add disclaimer on size assertion macro)
 - rust-lang#115090 (Always use `os-release` rather than `/lib` to detect `NixOS` (bootstrap))
 - rust-lang#115101 (triagebot: add dependency licensing pings)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 6c7678d into rust-lang:master Aug 22, 2023
11 checks passed
@rustbot rustbot added this to the 1.74.0 milestone Aug 22, 2023
@kiscad kiscad deleted the issue-113702 branch August 23, 2023 07:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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.

Unstable lints passed on command line can only be ungated from source code
6 participants