remove unused imports and feature gate from tests

This commit is contained in:
dylan_DPC 2019-01-04 17:21:29 +05:30
parent 1ef99f1353
commit 64a17a0e59
4 changed files with 5 additions and 10 deletions

View File

@ -5,7 +5,6 @@ use feature_gate::{
Features,
get_features,
GateIssue,
emit_feature_err,
};
use {fold, attr};
use ast;
@ -94,8 +93,6 @@ impl<'a> StripUnconfigured<'a> {
return vec![attr];
}
let cfg_attr_span = attr.span;
let (cfg_predicate, expanded_attrs) = match attr.parse(self.sess, |parser| {
parser.expect(&token::OpenDelim(token::Paren))?;

View File

@ -4,7 +4,6 @@
// compile-pass
#![warn(unused_must_use)]
#![cfg_attr(stage0, feature(cfg_attr_multi))]
#[cfg_attr(any(), deprecated, must_use)]
struct Struct {}

View File

@ -5,7 +5,6 @@
// compile-pass
#![warn(unused_must_use)]
#![cfg_attr(stage0, feature(cfg_attr_multi))]
#[cfg_attr(all(), deprecated, must_use)]
struct MustUseDeprecated {}

View File

@ -1,5 +1,5 @@
warning: use of deprecated item 'MustUseDeprecated'
--> $DIR/cfg-attr-multi-true.rs:13:6
--> $DIR/cfg-attr-multi-true.rs:12:6
|
LL | impl MustUseDeprecated { //~ warning: use of deprecated item
| ^^^^^^^^^^^^^^^^^
@ -7,25 +7,25 @@ LL | impl MustUseDeprecated { //~ warning: use of deprecated item
= note: #[warn(deprecated)] on by default
warning: use of deprecated item 'MustUseDeprecated'
--> $DIR/cfg-attr-multi-true.rs:20:5
--> $DIR/cfg-attr-multi-true.rs:19:5
|
LL | MustUseDeprecated::new(); //~ warning: use of deprecated item
| ^^^^^^^^^^^^^^^^^^^^^^
warning: use of deprecated item 'MustUseDeprecated'
--> $DIR/cfg-attr-multi-true.rs:14:17
--> $DIR/cfg-attr-multi-true.rs:13:17
|
LL | fn new() -> MustUseDeprecated { //~ warning: use of deprecated item
| ^^^^^^^^^^^^^^^^^
warning: use of deprecated item 'MustUseDeprecated'
--> $DIR/cfg-attr-multi-true.rs:15:9
--> $DIR/cfg-attr-multi-true.rs:14:9
|
LL | MustUseDeprecated {} //~ warning: use of deprecated item
| ^^^^^^^^^^^^^^^^^
warning: unused `MustUseDeprecated` that must be used
--> $DIR/cfg-attr-multi-true.rs:20:5
--> $DIR/cfg-attr-multi-true.rs:19:5
|
LL | MustUseDeprecated::new(); //~ warning: use of deprecated item
| ^^^^^^^^^^^^^^^^^^^^^^^^^