From 81c564ecc40ebcb354e7fac07c0e513911fa9e40 Mon Sep 17 00:00:00 2001 From: Pietro Albini Date: Mon, 30 Apr 2018 10:00:30 +0200 Subject: [PATCH] Adapt ui test of #50092 to beta * Changed `// compile-pass` to `// must-compile-successfully` * Removed checks on unstable features --- src/test/ui/issue-49934.rs | 9 ++------- src/test/ui/issue-49934.stderr | 28 ++++++++-------------------- 2 files changed, 10 insertions(+), 27 deletions(-) diff --git a/src/test/ui/issue-49934.rs b/src/test/ui/issue-49934.rs index 3e30e7a6450fc..edf6fff588801 100644 --- a/src/test/ui/issue-49934.rs +++ b/src/test/ui/issue-49934.rs @@ -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 _ => (), @@ -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 diff --git a/src/test/ui/issue-49934.stderr b/src/test/ui/issue-49934.stderr index 298230b8b29f7..df39162cce909 100644 --- a/src/test/ui/issue-49934.stderr +++ b/src/test/ui/issue-49934.stderr @@ -1,5 +1,5 @@ warning: `#[derive]` does nothing on macro invocations - --> $DIR/issue-49934.rs:30:5 + --> $DIR/issue-49934.rs:29:5 | LL | #[derive(Debug)] | ^^^^^^^^^^^^^^^^ @@ -7,43 +7,31 @@ 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 | ^^^^^^^^^^^^^^^^