summaryrefslogtreecommitdiffstats
path: root/tests/ui/symbol-mangling-version
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-07 05:48:48 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-07 05:48:48 +0000
commitef24de24a82fe681581cc130f342363c47c0969a (patch)
tree0d494f7e1a38b95c92426f58fe6eaa877303a86c /tests/ui/symbol-mangling-version
parentReleasing progress-linux version 1.74.1+dfsg1-1~progress7.99u1. (diff)
downloadrustc-ef24de24a82fe681581cc130f342363c47c0969a.tar.xz
rustc-ef24de24a82fe681581cc130f342363c47c0969a.zip
Merging upstream version 1.75.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/symbol-mangling-version')
-rw-r--r--tests/ui/symbol-mangling-version/bad-value.bad.stderr2
-rw-r--r--tests/ui/symbol-mangling-version/bad-value.blank.stderr2
-rw-r--r--tests/ui/symbol-mangling-version/bad-value.no-value.stderr2
-rw-r--r--tests/ui/symbol-mangling-version/bad-value.rs6
-rw-r--r--tests/ui/symbol-mangling-version/stable.rs5
-rw-r--r--tests/ui/symbol-mangling-version/unstable.legacy.stderr2
-rw-r--r--tests/ui/symbol-mangling-version/unstable.rs6
7 files changed, 25 insertions, 0 deletions
diff --git a/tests/ui/symbol-mangling-version/bad-value.bad.stderr b/tests/ui/symbol-mangling-version/bad-value.bad.stderr
new file mode 100644
index 000000000..c36c73c60
--- /dev/null
+++ b/tests/ui/symbol-mangling-version/bad-value.bad.stderr
@@ -0,0 +1,2 @@
+error: incorrect value `bad-value` for codegen option `symbol-mangling-version` - either `legacy` or `v0` (RFC 2603) was expected
+
diff --git a/tests/ui/symbol-mangling-version/bad-value.blank.stderr b/tests/ui/symbol-mangling-version/bad-value.blank.stderr
new file mode 100644
index 000000000..0e70af5b8
--- /dev/null
+++ b/tests/ui/symbol-mangling-version/bad-value.blank.stderr
@@ -0,0 +1,2 @@
+error: incorrect value `` for codegen option `symbol-mangling-version` - either `legacy` or `v0` (RFC 2603) was expected
+
diff --git a/tests/ui/symbol-mangling-version/bad-value.no-value.stderr b/tests/ui/symbol-mangling-version/bad-value.no-value.stderr
new file mode 100644
index 000000000..77013b72b
--- /dev/null
+++ b/tests/ui/symbol-mangling-version/bad-value.no-value.stderr
@@ -0,0 +1,2 @@
+error: codegen option `symbol-mangling-version` requires either `legacy` or `v0` (RFC 2603) (C symbol-mangling-version=<value>)
+
diff --git a/tests/ui/symbol-mangling-version/bad-value.rs b/tests/ui/symbol-mangling-version/bad-value.rs
new file mode 100644
index 000000000..7623857d4
--- /dev/null
+++ b/tests/ui/symbol-mangling-version/bad-value.rs
@@ -0,0 +1,6 @@
+// revisions: no-value blank bad
+// [no-value] compile-flags: -Csymbol-mangling-version
+// [blank] compile-flags: -Csymbol-mangling-version=
+// [bad] compile-flags: -Csymbol-mangling-version=bad-value
+
+fn main() {}
diff --git a/tests/ui/symbol-mangling-version/stable.rs b/tests/ui/symbol-mangling-version/stable.rs
new file mode 100644
index 000000000..dac9bb18d
--- /dev/null
+++ b/tests/ui/symbol-mangling-version/stable.rs
@@ -0,0 +1,5 @@
+// check-pass
+// revisions: v0
+// [v0] compile-flags: -Csymbol-mangling-version=v0
+
+fn main() {}
diff --git a/tests/ui/symbol-mangling-version/unstable.legacy.stderr b/tests/ui/symbol-mangling-version/unstable.legacy.stderr
new file mode 100644
index 000000000..c5b359b41
--- /dev/null
+++ b/tests/ui/symbol-mangling-version/unstable.legacy.stderr
@@ -0,0 +1,2 @@
+error: `-C symbol-mangling-version=legacy` requires `-Z unstable-options`
+
diff --git a/tests/ui/symbol-mangling-version/unstable.rs b/tests/ui/symbol-mangling-version/unstable.rs
new file mode 100644
index 000000000..df87a39cd
--- /dev/null
+++ b/tests/ui/symbol-mangling-version/unstable.rs
@@ -0,0 +1,6 @@
+// revisions: legacy legacy-ok
+// [legacy] compile-flags: -Csymbol-mangling-version=legacy
+// [legacy-ok] check-pass
+// [legacy-ok] compile-flags: -Zunstable-options -Csymbol-mangling-version=legacy
+
+fn main() {}