Skip to content

Commit 0928168

Browse files
committed
Remove "#![feature(plugin)]" in the test".
1 parent 4bbda68 commit 0928168

File tree

3 files changed

+18
-23
lines changed

3 files changed

+18
-23
lines changed

clippy_lints/src/const_static_lifetime.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ impl StaticConst {
3939
match ty.node {
4040
// Be carefull of nested structures (arrays and tuples)
4141
TyKind::Array(ref ty, _) => {
42-
println!("array");
4342
self.visit_type(&*ty, cx);
4443
},
4544
TyKind::Tup(ref tup) => {

tests/ui/const_static_lifetime.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#![feature(plugin)]
2-
31
#[derive(Debug)]
42
struct Foo {}
53

tests/ui/const_static_lifetime.stderr

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,50 @@
1-
warning: running cargo clippy on a crate that also imports the clippy plugin
2-
31
error: Constants have by default a `'static` lifetime
4-
--> $DIR/const_static_lifetime.rs:7:17
2+
--> $DIR/const_static_lifetime.rs:4:17
53
|
6-
7 | const VAR_ONE: &'static str = "Test constant #1"; // ERROR Consider removing 'static.
4+
4 | const VAR_ONE: &'static str = "Test constant #1"; // ERROR Consider removing 'static.
75
| ^^^^^^^ help: consider removing `'static`: `&str`
86
|
97
= note: `-D const-static-lifetime` implied by `-D warnings`
108

119
error: Constants have by default a `'static` lifetime
12-
--> $DIR/const_static_lifetime.rs:11:21
13-
|
14-
11 | const VAR_THREE: &[&'static str] = &["one", "two"]; // ERROR Consider removing 'static
15-
| ^^^^^^^ help: consider removing `'static`: `&str`
10+
--> $DIR/const_static_lifetime.rs:8:21
11+
|
12+
8 | const VAR_THREE: &[&'static str] = &["one", "two"]; // ERROR Consider removing 'static
13+
| ^^^^^^^ help: consider removing `'static`: `&str`
1614

1715
error: Constants have by default a `'static` lifetime
18-
--> $DIR/const_static_lifetime.rs:13:32
16+
--> $DIR/const_static_lifetime.rs:10:32
1917
|
20-
13 | const VAR_FOUR: (&str, (&str, &'static str), &'static str) = ("on", ("th", "th"), "on"); // ERROR Consider removing 'static
18+
10 | const VAR_FOUR: (&str, (&str, &'static str), &'static str) = ("on", ("th", "th"), "on"); // ERROR Consider removing 'static
2119
| ^^^^^^^ help: consider removing `'static`: `&str`
2220

2321
error: Constants have by default a `'static` lifetime
24-
--> $DIR/const_static_lifetime.rs:13:47
22+
--> $DIR/const_static_lifetime.rs:10:47
2523
|
26-
13 | const VAR_FOUR: (&str, (&str, &'static str), &'static str) = ("on", ("th", "th"), "on"); // ERROR Consider removing 'static
24+
10 | const VAR_FOUR: (&str, (&str, &'static str), &'static str) = ("on", ("th", "th"), "on"); // ERROR Consider removing 'static
2725
| ^^^^^^^ help: consider removing `'static`: `&str`
2826

2927
error: Constants have by default a `'static` lifetime
30-
--> $DIR/const_static_lifetime.rs:15:30
28+
--> $DIR/const_static_lifetime.rs:12:30
3129
|
32-
15 | const VAR_FIVE: &'static [&[&'static str]] = &[&["test"], &["other one"]]; // ERROR Consider removing 'static
30+
12 | const VAR_FIVE: &'static [&[&'static str]] = &[&["test"], &["other one"]]; // ERROR Consider removing 'static
3331
| ^^^^^^^ help: consider removing `'static`: `&str`
3432

3533
error: Constants have by default a `'static` lifetime
36-
--> $DIR/const_static_lifetime.rs:17:17
34+
--> $DIR/const_static_lifetime.rs:14:17
3735
|
38-
17 | const VAR_SIX: &'static u8 = &5;
36+
14 | const VAR_SIX: &'static u8 = &5;
3937
| ^^^^^^^ help: consider removing `'static`: `&u8`
4038

4139
error: Constants have by default a `'static` lifetime
42-
--> $DIR/const_static_lifetime.rs:19:39
40+
--> $DIR/const_static_lifetime.rs:16:39
4341
|
44-
19 | const VAR_SEVEN: &[&(&str, &'static [&'static str])] = &[&("one", &["other one"])];
42+
16 | const VAR_SEVEN: &[&(&str, &'static [&'static str])] = &[&("one", &["other one"])];
4543
| ^^^^^^^ help: consider removing `'static`: `&str`
4644

4745
error: Constants have by default a `'static` lifetime
48-
--> $DIR/const_static_lifetime.rs:21:20
46+
--> $DIR/const_static_lifetime.rs:18:20
4947
|
50-
21 | const VAR_HEIGHT: &'static Foo = &Foo {};
48+
18 | const VAR_HEIGHT: &'static Foo = &Foo {};
5149
| ^^^^^^^ help: consider removing `'static`: `&Foo`
5250

0 commit comments

Comments
 (0)