Revert "Rollup merge of #124099 - voidc:disallow-ambiguous-expr-attrs, r=davidtwco"
This reverts commit57dad1d75e
, reversing changes made to36316df9fe
.
This commit is contained in:
parent
e1ac0fa95b
commit
216424da32
15 changed files with 49 additions and 141 deletions
|
@ -1,15 +0,0 @@
|
|||
//@ run-rustfix
|
||||
#![feature(stmt_expr_attributes)]
|
||||
#![allow(unused_assignments, unused_attributes)]
|
||||
|
||||
fn main() {
|
||||
let mut x = (#[deprecated] 1) + 2; //~ ERROR ambiguous
|
||||
|
||||
(#[deprecated] x) = 4; //~ ERROR ambiguous
|
||||
|
||||
x = (#[deprecated] 5) as i32; //~ ERROR ambiguous
|
||||
|
||||
let _r = (#[deprecated] 1)..6; //~ ERROR ambiguous
|
||||
|
||||
println!("{}", x);
|
||||
}
|
|
@ -1,15 +0,0 @@
|
|||
//@ run-rustfix
|
||||
#![feature(stmt_expr_attributes)]
|
||||
#![allow(unused_assignments, unused_attributes)]
|
||||
|
||||
fn main() {
|
||||
let mut x = #[deprecated] 1 + 2; //~ ERROR ambiguous
|
||||
|
||||
#[deprecated] x = 4; //~ ERROR ambiguous
|
||||
|
||||
x = #[deprecated] 5 as i32; //~ ERROR ambiguous
|
||||
|
||||
let _r = #[deprecated] 1..6; //~ ERROR ambiguous
|
||||
|
||||
println!("{}", x);
|
||||
}
|
|
@ -1,46 +0,0 @@
|
|||
error: ambiguous outer attributes
|
||||
--> $DIR/attr-binary-expr-ambigous.rs:6:17
|
||||
|
|
||||
LL | let mut x = #[deprecated] 1 + 2;
|
||||
| ^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
help: wrap the expression in parentheses
|
||||
|
|
||||
LL | let mut x = (#[deprecated] 1) + 2;
|
||||
| + +
|
||||
|
||||
error: ambiguous outer attributes
|
||||
--> $DIR/attr-binary-expr-ambigous.rs:8:5
|
||||
|
|
||||
LL | #[deprecated] x = 4;
|
||||
| ^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
help: wrap the expression in parentheses
|
||||
|
|
||||
LL | (#[deprecated] x) = 4;
|
||||
| + +
|
||||
|
||||
error: ambiguous outer attributes
|
||||
--> $DIR/attr-binary-expr-ambigous.rs:10:9
|
||||
|
|
||||
LL | x = #[deprecated] 5 as i32;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
help: wrap the expression in parentheses
|
||||
|
|
||||
LL | x = (#[deprecated] 5) as i32;
|
||||
| + +
|
||||
|
||||
error: ambiguous outer attributes
|
||||
--> $DIR/attr-binary-expr-ambigous.rs:12:14
|
||||
|
|
||||
LL | let _r = #[deprecated] 1..6;
|
||||
| ^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
help: wrap the expression in parentheses
|
||||
|
|
||||
LL | let _r = (#[deprecated] 1)..6;
|
||||
| + +
|
||||
|
||||
error: aborting due to 4 previous errors
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue