-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Tracking Issue for LintDiagnostic migration #153099
Copy link
Copy link
Open
Labels
A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFC
Metadata
Metadata
Assignees
Labels
A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFC
Type
Fields
Give feedbackNo fields configured for issues without a type.
This is a tracking issue for the
LintDiagnosticmigration that @GuillaumeGomez and I are doing.Mostly meant to be a place we can put ideas and keep track of what is left to do.
Implementation history
LintDiagnostic#152811LintDiagnosticitems by adding API and migratingLinkerOutputlint #152933LintDiagnostic- part 2 #153016LintDiagnostic- part 3 #153051LintDiagnostic- part 4 #153091LintDiagnostic- part 5 #153152LintDiagnostic- part 6 #153352LintDiagnostic- part 7 #153401TyCtxt::node_span_lintmethod #153621rustc_middle::lint::diag_lint_levelintolint_level#153787opt_span_diag_lintintoopt_span_lintand removeemit_diag_lint#153820Removing
BuiltinLintDiagDecorateDiagCompat::Builtinitems toDecorateDiagCompat::Dynamic#154120BuiltinLintDiagvariants #154224BuiltinLintDiagvariants - part 2 #154303AttributeLint#154432BuiltinLintDiag#154912TODO list
opt_span_diag_lintMigration ofLintDiagnostic- part 4 #153091 (comment)lint_level, we will need to updateDiagnostic::into_diagso that it looks like:Tytranslation into diagnostic message, which would callDiagCtxt::set_must_produce_diag, forcing theDiagto be emitted. So before it's even possible, we need to ensure that theDiagwill actually be emitted, and if not, we return early withNone.BuiltinLintDiagin favour of a boxed diagnostic of some kind