Added Expect
lint level and attribute (RFC-2383)
* Also added the `LintExpectationId` which will be used in future commits
This commit is contained in:
parent
c42d846add
commit
9fef3d9e0a
10 changed files with 107 additions and 5 deletions
|
@ -109,6 +109,7 @@ struct LintGroup {
|
|||
depr: Option<LintAlias>,
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub enum CheckLintNameResult<'a> {
|
||||
Ok(&'a [LintId]),
|
||||
/// Lint doesn't exist. Potentially contains a suggestion for a correct lint name.
|
||||
|
@ -377,6 +378,9 @@ impl LintStore {
|
|||
Level::ForceWarn => "--force-warn",
|
||||
Level::Deny => "-D",
|
||||
Level::Forbid => "-F",
|
||||
Level::Expect(_) => {
|
||||
unreachable!("lints with the level of `expect` should not run this code");
|
||||
}
|
||||
},
|
||||
lint_name
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue