about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJubilee <46493976+workingjubilee@users.noreply.github.com>2024-03-11 09:29:38 -0700
committerGitHub <noreply@github.com>2024-03-11 09:29:38 -0700
commit9aca5c03c12d795f4c897e49b5a19e6da7eb8d12 (patch)
tree06f7776fdaf7954d55388634a77b3303c405f02f
parent028e2600c9500736e9d7eff3a5f3271cc4cbd56e (diff)
parentaea60b0cc78cf7b0d189c52f79563f1e4e82dfb8 (diff)
Rollup merge of #122328 - Enselic:sig_dfl-not-inherit, r=davidtwco
unix_sigpipe: Replace `inherit` with `sig_dfl` in syntax tests

The `sig_dfl` variant of the attribute is the most likely variant to be stabilized first, and thus to become the "most allowed" variant of the attribute. Because of this, it is the most appropriate variant to use in syntax tests, because even if the most allowed variant is used, the compiler shall still emit errors if it e.g. is used in the wrong places.

r? ``@davidtwco`` who already [approved ](https://github.com/rust-lang/rust/pull/120832#pullrequestreview-1875075341) this commit in https://github.com/rust-lang/rust/pull/120832.

It would be nice to land the last preparatory commit of that PR before we begin to [rename ](https://github.com/rust-lang/rust/pull/120832#issuecomment-1987023484) things which will of course create a lot of code conflicts.
-rw-r--r--tests/ui/attributes/unix_sigpipe/unix_sigpipe-crate.rs2
-rw-r--r--tests/ui/attributes/unix_sigpipe/unix_sigpipe-crate.stderr6
-rw-r--r--tests/ui/attributes/unix_sigpipe/unix_sigpipe-list.rs2
-rw-r--r--tests/ui/attributes/unix_sigpipe/unix_sigpipe-list.stderr2
-rw-r--r--tests/ui/attributes/unix_sigpipe/unix_sigpipe-non-main-fn.rs2
-rw-r--r--tests/ui/attributes/unix_sigpipe/unix_sigpipe-non-main-fn.stderr2
-rw-r--r--tests/ui/attributes/unix_sigpipe/unix_sigpipe-non-root-main.rs2
-rw-r--r--tests/ui/attributes/unix_sigpipe/unix_sigpipe-non-root-main.stderr2
-rw-r--r--tests/ui/attributes/unix_sigpipe/unix_sigpipe-start.rs2
-rw-r--r--tests/ui/attributes/unix_sigpipe/unix_sigpipe-start.stderr2
-rw-r--r--tests/ui/attributes/unix_sigpipe/unix_sigpipe-struct.rs2
-rw-r--r--tests/ui/attributes/unix_sigpipe/unix_sigpipe-struct.stderr2
12 files changed, 14 insertions, 14 deletions
diff --git a/tests/ui/attributes/unix_sigpipe/unix_sigpipe-crate.rs b/tests/ui/attributes/unix_sigpipe/unix_sigpipe-crate.rs
index d6d020c52b2..f5fa177f29c 100644
--- a/tests/ui/attributes/unix_sigpipe/unix_sigpipe-crate.rs
+++ b/tests/ui/attributes/unix_sigpipe/unix_sigpipe-crate.rs
@@ -1,4 +1,4 @@
 #![feature(unix_sigpipe)]
-#![unix_sigpipe = "inherit"] //~ error: `unix_sigpipe` attribute cannot be used at crate level
+#![unix_sigpipe = "sig_dfl"] //~ error: `unix_sigpipe` attribute cannot be used at crate level
 
 fn main() {}
diff --git a/tests/ui/attributes/unix_sigpipe/unix_sigpipe-crate.stderr b/tests/ui/attributes/unix_sigpipe/unix_sigpipe-crate.stderr
index 1666f4a3ee8..fdfa3018086 100644
--- a/tests/ui/attributes/unix_sigpipe/unix_sigpipe-crate.stderr
+++ b/tests/ui/attributes/unix_sigpipe/unix_sigpipe-crate.stderr
@@ -1,7 +1,7 @@
 error: `unix_sigpipe` attribute cannot be used at crate level
   --> $DIR/unix_sigpipe-crate.rs:2:1
    |
-LL | #![unix_sigpipe = "inherit"]
+LL | #![unix_sigpipe = "sig_dfl"]
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 LL |
 LL | fn main() {}
@@ -9,8 +9,8 @@ LL | fn main() {}
    |
 help: perhaps you meant to use an outer attribute
    |
-LL - #![unix_sigpipe = "inherit"]
-LL + #[unix_sigpipe = "inherit"]
+LL - #![unix_sigpipe = "sig_dfl"]
+LL + #[unix_sigpipe = "sig_dfl"]
    |
 
 error: aborting due to 1 previous error
diff --git a/tests/ui/attributes/unix_sigpipe/unix_sigpipe-list.rs b/tests/ui/attributes/unix_sigpipe/unix_sigpipe-list.rs
index b5ebc07a043..462ae24a884 100644
--- a/tests/ui/attributes/unix_sigpipe/unix_sigpipe-list.rs
+++ b/tests/ui/attributes/unix_sigpipe/unix_sigpipe-list.rs
@@ -1,4 +1,4 @@
 #![feature(unix_sigpipe)]
 
-#[unix_sigpipe(inherit)] //~ error: malformed `unix_sigpipe` attribute input
+#[unix_sigpipe(sig_dfl)] //~ error: malformed `unix_sigpipe` attribute input
 fn main() {}
diff --git a/tests/ui/attributes/unix_sigpipe/unix_sigpipe-list.stderr b/tests/ui/attributes/unix_sigpipe/unix_sigpipe-list.stderr
index 17507243f7a..66902f3ca9a 100644
--- a/tests/ui/attributes/unix_sigpipe/unix_sigpipe-list.stderr
+++ b/tests/ui/attributes/unix_sigpipe/unix_sigpipe-list.stderr
@@ -1,7 +1,7 @@
 error: malformed `unix_sigpipe` attribute input
   --> $DIR/unix_sigpipe-list.rs:3:1
    |
-LL | #[unix_sigpipe(inherit)]
+LL | #[unix_sigpipe(sig_dfl)]
    | ^^^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[unix_sigpipe = "inherit|sig_ign|sig_dfl"]`
 
 error: aborting due to 1 previous error
diff --git a/tests/ui/attributes/unix_sigpipe/unix_sigpipe-non-main-fn.rs b/tests/ui/attributes/unix_sigpipe/unix_sigpipe-non-main-fn.rs
index cde6719fc9c..16731a4ba2c 100644
--- a/tests/ui/attributes/unix_sigpipe/unix_sigpipe-non-main-fn.rs
+++ b/tests/ui/attributes/unix_sigpipe/unix_sigpipe-non-main-fn.rs
@@ -1,6 +1,6 @@
 #![feature(unix_sigpipe)]
 
-#[unix_sigpipe = "inherit"] //~ error: `unix_sigpipe` attribute can only be used on `fn main()`
+#[unix_sigpipe = "sig_dfl"] //~ error: `unix_sigpipe` attribute can only be used on `fn main()`
 fn f() {}
 
 fn main() {}
diff --git a/tests/ui/attributes/unix_sigpipe/unix_sigpipe-non-main-fn.stderr b/tests/ui/attributes/unix_sigpipe/unix_sigpipe-non-main-fn.stderr
index 124141b6552..fcdd5db8f29 100644
--- a/tests/ui/attributes/unix_sigpipe/unix_sigpipe-non-main-fn.stderr
+++ b/tests/ui/attributes/unix_sigpipe/unix_sigpipe-non-main-fn.stderr
@@ -1,7 +1,7 @@
 error: `unix_sigpipe` attribute can only be used on `fn main()`
   --> $DIR/unix_sigpipe-non-main-fn.rs:3:1
    |
-LL | #[unix_sigpipe = "inherit"]
+LL | #[unix_sigpipe = "sig_dfl"]
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to 1 previous error
diff --git a/tests/ui/attributes/unix_sigpipe/unix_sigpipe-non-root-main.rs b/tests/ui/attributes/unix_sigpipe/unix_sigpipe-non-root-main.rs
index 16f7276398e..a2435258620 100644
--- a/tests/ui/attributes/unix_sigpipe/unix_sigpipe-non-root-main.rs
+++ b/tests/ui/attributes/unix_sigpipe/unix_sigpipe-non-root-main.rs
@@ -1,7 +1,7 @@
 #![feature(unix_sigpipe)]
 
 mod m {
-    #[unix_sigpipe = "inherit"] //~ error: `unix_sigpipe` attribute can only be used on root `fn main()`
+    #[unix_sigpipe = "sig_dfl"] //~ error: `unix_sigpipe` attribute can only be used on root `fn main()`
     fn main() {}
 }
 
diff --git a/tests/ui/attributes/unix_sigpipe/unix_sigpipe-non-root-main.stderr b/tests/ui/attributes/unix_sigpipe/unix_sigpipe-non-root-main.stderr
index 346d83fa664..98afb62fdb4 100644
--- a/tests/ui/attributes/unix_sigpipe/unix_sigpipe-non-root-main.stderr
+++ b/tests/ui/attributes/unix_sigpipe/unix_sigpipe-non-root-main.stderr
@@ -1,7 +1,7 @@
 error: `unix_sigpipe` attribute can only be used on root `fn main()`
   --> $DIR/unix_sigpipe-non-root-main.rs:4:5
    |
-LL |     #[unix_sigpipe = "inherit"]
+LL |     #[unix_sigpipe = "sig_dfl"]
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to 1 previous error
diff --git a/tests/ui/attributes/unix_sigpipe/unix_sigpipe-start.rs b/tests/ui/attributes/unix_sigpipe/unix_sigpipe-start.rs
index 64fd5ec4f0e..945b820f9e0 100644
--- a/tests/ui/attributes/unix_sigpipe/unix_sigpipe-start.rs
+++ b/tests/ui/attributes/unix_sigpipe/unix_sigpipe-start.rs
@@ -2,5 +2,5 @@
 #![feature(unix_sigpipe)]
 
 #[start]
-#[unix_sigpipe = "inherit"] //~ error: `unix_sigpipe` attribute can only be used on `fn main()`
+#[unix_sigpipe = "sig_dfl"] //~ error: `unix_sigpipe` attribute can only be used on `fn main()`
 fn custom_start(argc: isize, argv: *const *const u8) -> isize { 0 }
diff --git a/tests/ui/attributes/unix_sigpipe/unix_sigpipe-start.stderr b/tests/ui/attributes/unix_sigpipe/unix_sigpipe-start.stderr
index 9f691e396bd..3d56b3655c9 100644
--- a/tests/ui/attributes/unix_sigpipe/unix_sigpipe-start.stderr
+++ b/tests/ui/attributes/unix_sigpipe/unix_sigpipe-start.stderr
@@ -1,7 +1,7 @@
 error: `unix_sigpipe` attribute can only be used on `fn main()`
   --> $DIR/unix_sigpipe-start.rs:5:1
    |
-LL | #[unix_sigpipe = "inherit"]
+LL | #[unix_sigpipe = "sig_dfl"]
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to 1 previous error
diff --git a/tests/ui/attributes/unix_sigpipe/unix_sigpipe-struct.rs b/tests/ui/attributes/unix_sigpipe/unix_sigpipe-struct.rs
index a5e47cfebc8..662779c0821 100644
--- a/tests/ui/attributes/unix_sigpipe/unix_sigpipe-struct.rs
+++ b/tests/ui/attributes/unix_sigpipe/unix_sigpipe-struct.rs
@@ -1,6 +1,6 @@
 #![feature(unix_sigpipe)]
 
-#[unix_sigpipe = "inherit"] //~ error: `unix_sigpipe` attribute can only be used on `fn main()`
+#[unix_sigpipe = "sig_dfl"] //~ error: `unix_sigpipe` attribute can only be used on `fn main()`
 struct S;
 
 fn main() {}
diff --git a/tests/ui/attributes/unix_sigpipe/unix_sigpipe-struct.stderr b/tests/ui/attributes/unix_sigpipe/unix_sigpipe-struct.stderr
index d5eec9424c8..a8fc51bdbc4 100644
--- a/tests/ui/attributes/unix_sigpipe/unix_sigpipe-struct.stderr
+++ b/tests/ui/attributes/unix_sigpipe/unix_sigpipe-struct.stderr
@@ -1,7 +1,7 @@
 error: `unix_sigpipe` attribute can only be used on `fn main()`
   --> $DIR/unix_sigpipe-struct.rs:3:1
    |
-LL | #[unix_sigpipe = "inherit"]
+LL | #[unix_sigpipe = "sig_dfl"]
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to 1 previous error