1
Fork 0

Revert "Rollup merge of #124099 - voidc:disallow-ambiguous-expr-attrs, r=davidtwco"

This reverts commit 57dad1d75e, reversing
changes made to 36316df9fe.
This commit is contained in:
Rémy Rakic 2024-06-06 20:39:54 +00:00
parent e1ac0fa95b
commit 216424da32
15 changed files with 49 additions and 141 deletions

View file

@ -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);
}

View file

@ -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);
}

View file

@ -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