Fix issues and add test
This commit is contained in:
parent
69a19bfd43
commit
4675690ac4
@ -147,7 +147,7 @@ impl<'s> LintLevelsBuilder<'s> {
|
||||
LintLevelSource::Default => false,
|
||||
LintLevelSource::Node(symbol, _, _) => self.store.is_lint_group(symbol),
|
||||
LintLevelSource::CommandLine(symbol, _) => self.store.is_lint_group(symbol),
|
||||
LintLevelSource::ForceWarn(symbol) => {
|
||||
LintLevelSource::ForceWarn(_symbol) => {
|
||||
bug!("forced warn lint returned a forbid lint level")
|
||||
}
|
||||
};
|
||||
|
@ -1,7 +1,6 @@
|
||||
use std::cmp;
|
||||
|
||||
use crate::ich::StableHashingContext;
|
||||
use chalk_ir::Substitution;
|
||||
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
|
||||
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
|
||||
use rustc_errors::{DiagnosticBuilder, DiagnosticId};
|
||||
|
@ -1,7 +1,7 @@
|
||||
// compile-flags: --force-warns bare_trait_objects
|
||||
// check-pass
|
||||
|
||||
#![allow(rust_2018_compatibility)]
|
||||
#![allow(rust_2018_idioms)]
|
||||
|
||||
pub trait SomeTrait {}
|
||||
|
||||
|
13
src/test/ui/lint/force-warn/force-warn-group.rs
Normal file
13
src/test/ui/lint/force-warn/force-warn-group.rs
Normal file
@ -0,0 +1,13 @@
|
||||
// ignore-test
|
||||
// compile-flags: --force-warns rust_2018_idioms
|
||||
// check-pass
|
||||
|
||||
#![allow(rust_2018_idioms)]
|
||||
|
||||
pub trait SomeTrait {}
|
||||
|
||||
pub fn function(_x: Box<SomeTrait>) {}
|
||||
//~^ WARN trait objects without an explicit `dyn` are deprecated
|
||||
//~| WARN this was previously accepted by the compiler
|
||||
|
||||
fn main() {}
|
Loading…
x
Reference in New Issue
Block a user