Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 81c564e

Browse files
committedApr 30, 2018
Adapt ui test of #50092 to beta
* Changed `// compile-pass` to `// must-compile-successfully` * Removed checks on unstable features
1 parent dacebb8 commit 81c564e

File tree

2 files changed

+10
-27
lines changed

2 files changed

+10
-27
lines changed
 

‎src/test/ui/issue-49934.rs

+2-7
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,11 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// compile-pass
11+
// must-compile-successfully
1212

13-
#![feature(stmt_expr_attributes)]
1413
#![warn(unused_attributes)] //~ NOTE lint level defined here
1514

16-
fn foo<#[derive(Debug)] T>() { //~ WARN unused attribute
15+
fn foo() {
1716
match 0 {
1817
#[derive(Debug)] //~ WARN unused attribute
1918
_ => (),
@@ -40,10 +39,6 @@ fn main() {
4039
#[derive(Debug)] //~ WARN unused attribute
4140
let _ = "Hello, world!";
4241

43-
// fold_expr
44-
let _ = #[derive(Debug)] "Hello, world!";
45-
//~^ WARN unused attribute
46-
4742
let _ = [
4843
// fold_opt_expr
4944
#[derive(Debug)] //~ WARN unused attribute

‎src/test/ui/issue-49934.stderr

+8-20
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,37 @@
11
warning: `#[derive]` does nothing on macro invocations
2-
--> $DIR/issue-49934.rs:30:5
2+
--> $DIR/issue-49934.rs:29:5
33
|
44
LL | #[derive(Debug)]
55
| ^^^^^^^^^^^^^^^^
66
|
77
= note: this may become a hard error in a future release
88

99
warning: unused attribute
10-
--> $DIR/issue-49934.rs:16:8
10+
--> $DIR/issue-49934.rs:17:9
1111
|
12-
LL | fn foo<#[derive(Debug)] T>() { //~ WARN unused attribute
13-
| ^^^^^^^^^^^^^^^^
12+
LL | #[derive(Debug)] //~ WARN unused attribute
13+
| ^^^^^^^^^^^^^^^^
1414
|
1515
note: lint level defined here
16-
--> $DIR/issue-49934.rs:14:9
16+
--> $DIR/issue-49934.rs:13:9
1717
|
1818
LL | #![warn(unused_attributes)] //~ NOTE lint level defined here
1919
| ^^^^^^^^^^^^^^^^^
2020

2121
warning: unused attribute
22-
--> $DIR/issue-49934.rs:18:9
23-
|
24-
LL | #[derive(Debug)] //~ WARN unused attribute
25-
| ^^^^^^^^^^^^^^^^
26-
27-
warning: unused attribute
28-
--> $DIR/issue-49934.rs:36:5
22+
--> $DIR/issue-49934.rs:35:5
2923
|
3024
LL | #[derive(Debug)] //~ WARN unused attribute
3125
| ^^^^^^^^^^^^^^^^
3226

3327
warning: unused attribute
34-
--> $DIR/issue-49934.rs:40:5
28+
--> $DIR/issue-49934.rs:39:5
3529
|
3630
LL | #[derive(Debug)] //~ WARN unused attribute
3731
| ^^^^^^^^^^^^^^^^
3832

3933
warning: unused attribute
40-
--> $DIR/issue-49934.rs:44:13
41-
|
42-
LL | let _ = #[derive(Debug)] "Hello, world!";
43-
| ^^^^^^^^^^^^^^^^
44-
45-
warning: unused attribute
46-
--> $DIR/issue-49934.rs:49:9
34+
--> $DIR/issue-49934.rs:44:9
4735
|
4836
LL | #[derive(Debug)] //~ WARN unused attribute
4937
| ^^^^^^^^^^^^^^^^

0 commit comments

Comments
 (0)
Please sign in to comment.