about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJubilee <46493976+workingjubilee@users.noreply.github.com>2024-06-06 21:10:11 -0700
committerGitHub <noreply@github.com>2024-06-06 21:10:11 -0700
commit3e43cfcf24eccf248a4e41df96288d0601e1acbe (patch)
treeb4b67bbdc5b3302139005c0cfbf21afc9f240e23
parent16fcbd21e5a7a08deb7a8181de9894c5d620ac64 (diff)
parent5ea5f6351e29ebbac17d1d45d87322bec8793b83 (diff)
downloadrust-3e43cfcf24eccf248a4e41df96288d0601e1acbe.tar.gz
rust-3e43cfcf24eccf248a4e41df96288d0601e1acbe.zip
Rollup merge of #126101 - lqd:revert-124099, r=wesleywiser
Revert "Disallow ambiguous attributes on expressions" on nightly

As discussed in [today's t-compiler meeting](https://rust-lang.zulipchat.com/#narrow/stream/238009-t-compiler.2Fmeetings/topic/.5Bweekly.5D.202024-06-06/near/443079505), this reverts PR #124099 to fix P-critical beta regressions #125199.

r? ``@wesleywiser``

Opening as draft so that ``@wesleywiser`` and ``@apiraino,`` you can tell me whether you wanted:
1. a `beta-accepted` revert of #124099 on nightly (this PR)? That will need to be backported to beta (even though #126093 may be the last of those)
2. a revert of #124099 on beta?
3. all of the above?

I also opened #126102, another draft PR to revert #124099 on beta, should you choose options 2 or 3.
-rw-r--r--tests/ui/cfg_attr_rustfmt.fixed6
-rw-r--r--tests/ui/cfg_attr_rustfmt.rs6
2 files changed, 6 insertions, 6 deletions
diff --git a/tests/ui/cfg_attr_rustfmt.fixed b/tests/ui/cfg_attr_rustfmt.fixed
index 84dac431169..05d5b3d10ea 100644
--- a/tests/ui/cfg_attr_rustfmt.fixed
+++ b/tests/ui/cfg_attr_rustfmt.fixed
@@ -16,7 +16,7 @@ fn foo(
 
 fn skip_on_statements() {
     #[rustfmt::skip]
-    { 5+3; }
+    5+3;
 }
 
 #[rustfmt::skip]
@@ -33,11 +33,11 @@ mod foo {
 #[clippy::msrv = "1.29"]
 fn msrv_1_29() {
     #[cfg_attr(rustfmt, rustfmt::skip)]
-    { 1+29; }
+    1+29;
 }
 
 #[clippy::msrv = "1.30"]
 fn msrv_1_30() {
     #[rustfmt::skip]
-    { 1+30; }
+    1+30;
 }
diff --git a/tests/ui/cfg_attr_rustfmt.rs b/tests/ui/cfg_attr_rustfmt.rs
index 4ab5c70e13b..bc29e20210e 100644
--- a/tests/ui/cfg_attr_rustfmt.rs
+++ b/tests/ui/cfg_attr_rustfmt.rs
@@ -16,7 +16,7 @@ fn foo(
 
 fn skip_on_statements() {
     #[cfg_attr(rustfmt, rustfmt::skip)]
-    { 5+3; }
+    5+3;
 }
 
 #[cfg_attr(rustfmt, rustfmt_skip)]
@@ -33,11 +33,11 @@ mod foo {
 #[clippy::msrv = "1.29"]
 fn msrv_1_29() {
     #[cfg_attr(rustfmt, rustfmt::skip)]
-    { 1+29; }
+    1+29;
 }
 
 #[clippy::msrv = "1.30"]
 fn msrv_1_30() {
     #[cfg_attr(rustfmt, rustfmt::skip)]
-    { 1+30; }
+    1+30;
 }