]> git.lizzy.rs Git - rust.git/commitdiff
Order the Rust and C ABIs first to reduce test churn
authorJake Goulding <jake.goulding@gmail.com>
Tue, 2 Jun 2020 02:20:12 +0000 (22:20 -0400)
committerJake Goulding <jake.goulding@gmail.com>
Sun, 7 Jun 2020 02:36:21 +0000 (22:36 -0400)
src/librustc_target/spec/abi.rs
src/test/ui/codemap_tests/unicode.stderr
src/test/ui/parser/issue-8537.stderr
src/test/ui/symbol-names/basic.legacy.stderr
src/test/ui/symbol-names/impl1.legacy.stderr
src/test/ui/symbol-names/impl1.rs
src/test/ui/symbol-names/issue-60925.legacy.stderr

index 1736063cc5f7c5f9be2514ea448e79c44e42847f..226fe0b8bc69bcb68bd73a4f6f4fbe32e8ac652d 100644 (file)
@@ -11,6 +11,15 @@ pub enum Abi {
     // N.B., this ordering MUST match the AbiDatas array below.
     // (This is ensured by the test indices_are_correct().)
 
+    // Multiplatform / generic ABIs
+    //
+    // These ABIs come first because every time we add a new ABI, we
+    // have to re-bless all the hashing tests. These are used in many
+    // places, so giving them stable values reduces test churn. The
+    // specific values are meaningless.
+    Rust = 0,
+    C = 1,
+
     // Single platform ABIs
     Cdecl,
     Stdcall,
@@ -27,8 +36,6 @@ pub enum Abi {
     EfiApi,
 
     // Multiplatform / generic ABIs
-    Rust,
-    C,
     System,
     RustIntrinsic,
     RustCall,
@@ -49,6 +56,9 @@ pub struct AbiData {
 
 #[allow(non_upper_case_globals)]
 const AbiDatas: &[AbiData] = &[
+    // Cross-platform ABIs
+    AbiData { abi: Abi::Rust, name: "Rust", generic: true },
+    AbiData { abi: Abi::C, name: "C", generic: true },
     // Platform-specific ABIs
     AbiData { abi: Abi::Cdecl, name: "cdecl", generic: false },
     AbiData { abi: Abi::Stdcall, name: "stdcall", generic: false },
@@ -64,8 +74,6 @@ pub struct AbiData {
     AbiData { abi: Abi::AmdGpuKernel, name: "amdgpu-kernel", generic: false },
     AbiData { abi: Abi::EfiApi, name: "efiapi", generic: false },
     // Cross-platform ABIs
-    AbiData { abi: Abi::Rust, name: "Rust", generic: true },
-    AbiData { abi: Abi::C, name: "C", generic: true },
     AbiData { abi: Abi::System, name: "system", generic: true },
     AbiData { abi: Abi::RustIntrinsic, name: "rust-intrinsic", generic: true },
     AbiData { abi: Abi::RustCall, name: "rust-call", generic: true },
index 01d54ac8cc8a2bc23f711c5c29031d349d1c8038..4d4440fd07f22b7b1d9986542ba49980482ede3d 100644 (file)
@@ -4,7 +4,7 @@ error[E0703]: invalid ABI: found `路濫狼á́́`
 LL | extern "路濫狼á́́" fn foo() {}
    |        ^^^^^^^^^ invalid ABI
    |
-   = help: valid ABIs: cdecl, stdcall, fastcall, vectorcall, thiscall, aapcs, win64, sysv64, ptx-kernel, msp430-interrupt, x86-interrupt, amdgpu-kernel, efiapi, Rust, C, system, rust-intrinsic, rust-call, platform-intrinsic, unadjusted
+   = help: valid ABIs: Rust, C, cdecl, stdcall, fastcall, vectorcall, thiscall, aapcs, win64, sysv64, ptx-kernel, msp430-interrupt, x86-interrupt, amdgpu-kernel, efiapi, system, rust-intrinsic, rust-call, platform-intrinsic, unadjusted
 
 error: aborting due to previous error
 
index a0793d94653da33978cd3e8259738cf10558ecc1..9ff28ce51e047abb76fdead63a92e5f10a9912b8 100644 (file)
@@ -4,7 +4,7 @@ error[E0703]: invalid ABI: found `invalid-ab_isize`
 LL |   "invalid-ab_isize"
    |   ^^^^^^^^^^^^^^^^^^ invalid ABI
    |
-   = help: valid ABIs: cdecl, stdcall, fastcall, vectorcall, thiscall, aapcs, win64, sysv64, ptx-kernel, msp430-interrupt, x86-interrupt, amdgpu-kernel, efiapi, Rust, C, system, rust-intrinsic, rust-call, platform-intrinsic, unadjusted
+   = help: valid ABIs: Rust, C, cdecl, stdcall, fastcall, vectorcall, thiscall, aapcs, win64, sysv64, ptx-kernel, msp430-interrupt, x86-interrupt, amdgpu-kernel, efiapi, system, rust-intrinsic, rust-call, platform-intrinsic, unadjusted
 
 error: aborting due to previous error
 
index 895ff5ae54fde758551d27eb4022ca11fc62b7d3..dec57e06ea24b8a9e9c4f414903ac150b41d6ae2 100644 (file)
@@ -1,10 +1,10 @@
-error: symbol-name(_ZN5basic4main17h81759b0695851718E)
+error: symbol-name(_ZN5basic4main17h4272b3de5e868f5aE)
   --> $DIR/basic.rs:8:1
    |
 LL | #[rustc_symbol_name]
    | ^^^^^^^^^^^^^^^^^^^^
 
-error: demangling(basic::main::h81759b0695851718)
+error: demangling(basic::main::h4272b3de5e868f5a)
   --> $DIR/basic.rs:8:1
    |
 LL | #[rustc_symbol_name]
index 33cacaf212855c8990ef5de14bcd0c55a8465507..52ee3452a48f7704188b2201d3422bae65b5795b 100644 (file)
@@ -1,10 +1,10 @@
-error: symbol-name(_ZN5impl13foo3Foo3bar17h92cf46db76791039E)
+error: symbol-name(_ZN5impl13foo3Foo3bar17ha318160f105e638cE)
   --> $DIR/impl1.rs:16:9
    |
 LL |         #[rustc_symbol_name]
    |         ^^^^^^^^^^^^^^^^^^^^
 
-error: demangling(impl1::foo::Foo::bar::h92cf46db76791039)
+error: demangling(impl1::foo::Foo::bar::ha318160f105e638c)
   --> $DIR/impl1.rs:16:9
    |
 LL |         #[rustc_symbol_name]
@@ -22,13 +22,13 @@ error: def-path(foo::Foo::bar)
 LL |         #[rustc_def_path]
    |         ^^^^^^^^^^^^^^^^^
 
-error: symbol-name(_ZN5impl13bar33_$LT$impl$u20$impl1..foo..Foo$GT$3baz17h90c4a800b1aa0df0E)
+error: symbol-name(_ZN5impl13bar33_$LT$impl$u20$impl1..foo..Foo$GT$3baz17h6c2dbab6e66f9fa3E)
   --> $DIR/impl1.rs:34:9
    |
 LL |         #[rustc_symbol_name]
    |         ^^^^^^^^^^^^^^^^^^^^
 
-error: demangling(impl1::bar::<impl impl1::foo::Foo>::baz::h90c4a800b1aa0df0)
+error: demangling(impl1::bar::<impl impl1::foo::Foo>::baz::h6c2dbab6e66f9fa3)
   --> $DIR/impl1.rs:34:9
    |
 LL |         #[rustc_symbol_name]
index cdcf89e4e614e31263fc0b327eceafb6fe410f24..380d20d0b12c684c22dff759e9082bae27d822be 100644 (file)
@@ -3,8 +3,8 @@
 // revisions: legacy v0
 //[legacy]compile-flags: -Z symbol-mangling-version=legacy
     //[v0]compile-flags: -Z symbol-mangling-version=v0
-//[legacy]normalize-stderr-32bit: "h5ef5dfc14aeecbfc" -> "SYMBOL_HASH"
-//[legacy]normalize-stderr-64bit: "h9e54d216f70fcbc5" -> "SYMBOL_HASH"
+//[legacy]normalize-stderr-32bit: "hee444285569b39c2" -> "SYMBOL_HASH"
+//[legacy]normalize-stderr-64bit: "h310ea0259fc3d32d" -> "SYMBOL_HASH"
 
 #![feature(optin_builtin_traits, rustc_attrs)]
 #![allow(dead_code)]
index 0e3a34adbc7cf65824ed2a90888925f7aa17408f..f5699052795b875639b065948c67cec3a143f7fe 100644 (file)
@@ -1,10 +1,10 @@
-error: symbol-name(_ZN11issue_609253foo37Foo$LT$issue_60925..llv$u6d$..Foo$GT$3foo17hc86312d25b60f6eeE)
+error: symbol-name(_ZN11issue_609253foo37Foo$LT$issue_60925..llv$u6d$..Foo$GT$3foo17h79d9aaa05f4b26d6E)
   --> $DIR/issue-60925.rs:22:9
    |
 LL |         #[rustc_symbol_name]
    |         ^^^^^^^^^^^^^^^^^^^^
 
-error: demangling(issue_60925::foo::Foo<issue_60925::llvm::Foo>::foo::hc86312d25b60f6ee)
+error: demangling(issue_60925::foo::Foo<issue_60925::llvm::Foo>::foo::h79d9aaa05f4b26d6)
   --> $DIR/issue-60925.rs:22:9
    |
 LL |         #[rustc_symbol_name]