-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Open
Labels
C-cleanupCategory: PRs that clean code up or issues documenting cleanup.Category: PRs that clean code up or issues documenting cleanup.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
Context: #84447
Motivation:
- This lint asks to do so. An example:
error: using `values` can result in unstable query results --> compiler/rustc_query_system/src/dep_graph/serialized.rs:654:50 | 654 | let mut stats: Vec<_> = record_stats.values().collect(); | ^^^^^^ | = note: if you believe this case to be fine, allow this lint and add a comment explaining your rationale
- This would prevent further fix attempts so wastes of time as well.
- Nearly all of those allowances has a comment which explains the rationale.
To do: Add a comment explaning the rationale behind allowing rustc::potential-query-instability lint for this occurrence in the file compiler/rustc_lint/src/context/diagnostics/check_cfg.rs
:
pub(super) fn unexpected_cfg_name(
sess: &Session,
(name, name_span): (Symbol, Span),
value: Option<(Symbol, Span)>,
) -> lints::UnexpectedCfgName {
#[allow(rustc::potential_query_instability)]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
let possibilities: Vec<Symbol> = sess.psess.check_config.expecteds.keys().copied().collect();
let mut names_possibilities: Vec<_> = if value.is_none() {
Metadata
Metadata
Assignees
Labels
C-cleanupCategory: PRs that clean code up or issues documenting cleanup.Category: PRs that clean code up or issues documenting cleanup.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.