Skip to content

Commit

Permalink
Adapt ui test of #50092 to beta
Browse files Browse the repository at this point in the history
* Changed `// compile-pass` to `// must-compile-successfully`
* Removed checks on unstable features
  • Loading branch information
pietroalbini committed Apr 30, 2018
1 parent dacebb8 commit 81c564e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 27 deletions.
9 changes: 2 additions & 7 deletions src/test/ui/issue-49934.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,11 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// compile-pass
// must-compile-successfully

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

fn foo<#[derive(Debug)] T>() { //~ WARN unused attribute
fn foo() {
match 0 {
#[derive(Debug)] //~ WARN unused attribute
_ => (),
Expand All @@ -40,10 +39,6 @@ fn main() {
#[derive(Debug)] //~ WARN unused attribute
let _ = "Hello, world!";

// fold_expr
let _ = #[derive(Debug)] "Hello, world!";
//~^ WARN unused attribute

let _ = [
// fold_opt_expr
#[derive(Debug)] //~ WARN unused attribute
Expand Down
28 changes: 8 additions & 20 deletions src/test/ui/issue-49934.stderr
Original file line number Diff line number Diff line change
@@ -1,49 +1,37 @@
warning: `#[derive]` does nothing on macro invocations
--> $DIR/issue-49934.rs:30:5
--> $DIR/issue-49934.rs:29:5
|
LL | #[derive(Debug)]
| ^^^^^^^^^^^^^^^^
|
= note: this may become a hard error in a future release

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

warning: unused attribute
--> $DIR/issue-49934.rs:18:9
|
LL | #[derive(Debug)] //~ WARN unused attribute
| ^^^^^^^^^^^^^^^^

warning: unused attribute
--> $DIR/issue-49934.rs:36:5
--> $DIR/issue-49934.rs:35:5
|
LL | #[derive(Debug)] //~ WARN unused attribute
| ^^^^^^^^^^^^^^^^

warning: unused attribute
--> $DIR/issue-49934.rs:40:5
--> $DIR/issue-49934.rs:39:5
|
LL | #[derive(Debug)] //~ WARN unused attribute
| ^^^^^^^^^^^^^^^^

warning: unused attribute
--> $DIR/issue-49934.rs:44:13
|
LL | let _ = #[derive(Debug)] "Hello, world!";
| ^^^^^^^^^^^^^^^^

warning: unused attribute
--> $DIR/issue-49934.rs:49:9
--> $DIR/issue-49934.rs:44:9
|
LL | #[derive(Debug)] //~ WARN unused attribute
| ^^^^^^^^^^^^^^^^
Expand Down

0 comments on commit 81c564e

Please sign in to comment.