Skip to content

Commit 64732c4

Browse files
authored
Unrolled build for #142272
Rollup merge of #142272 - workingjubilee:change-some-abi-tests, r=aDotInTheVoid tests: Change ABIs in tests to more future-resilient ones Eventually we're going to make these tests not work as they are currently written on HEAD, so change them now to get ahead of that. r? aDotInTheVoid
2 parents f77bb1b + 518eb0d commit 64732c4

File tree

6 files changed

+42
-28
lines changed

6 files changed

+42
-28
lines changed

tests/debuginfo/type-names.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
// gdb-check:type = type_names::GenericStruct<type_names::mod1::Struct2, type_names::mod1::mod2::Struct3>
2020

2121
// gdb-command:whatis generic_struct2
22-
// gdb-check:type = type_names::GenericStruct<type_names::Struct1, extern "fastcall" fn(isize) -> usize>
22+
// gdb-check:type = type_names::GenericStruct<type_names::Struct1, extern "system" fn(isize) -> usize>
2323

2424
// gdb-command:whatis mod_struct
2525
// gdb-check:type = type_names::mod1::Struct2
@@ -379,7 +379,7 @@ fn main() {
379379
let simple_struct = Struct1;
380380
let generic_struct1: GenericStruct<mod1::Struct2, mod1::mod2::Struct3> =
381381
GenericStruct(PhantomData);
382-
let generic_struct2: GenericStruct<Struct1, extern "fastcall" fn(isize) -> usize> =
382+
let generic_struct2: GenericStruct<Struct1, extern "system" fn(isize) -> usize> =
383383
GenericStruct(PhantomData);
384384
let mod_struct = mod1::Struct2;
385385

tests/incremental/hashes/trait_defs.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ trait TraitAddExternModifier {
440440

441441
// Change extern "C" to extern "stdcall"
442442
#[cfg(any(cfail1,cfail4))]
443-
trait TraitChangeExternCToRustIntrinsic {
443+
trait TraitChangeExternCToExternSystem {
444444
// --------------------------------------------------------------
445445
// -------------------------
446446
// --------------------------------------------------------------
@@ -458,7 +458,7 @@ trait TraitChangeExternCToRustIntrinsic {
458458
#[rustc_clean(cfg="cfail3")]
459459
#[rustc_clean(except="opt_hir_owner_nodes,fn_sig", cfg="cfail5")]
460460
#[rustc_clean(cfg="cfail6")]
461-
extern "stdcall" fn method();
461+
extern "system" fn method();
462462
}
463463

464464

tests/rustdoc-json/fn_pointer/abi.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![feature(abi_vectorcall)]
1+
#![feature(rust_cold_cc)]
22

33
//@ is "$.index[?(@.name=='AbiRust')].inner.type_alias.type.function_pointer.header.abi" \"Rust\"
44
pub type AbiRust = fn();
@@ -15,8 +15,5 @@ pub type AbiCUnwind = extern "C-unwind" fn();
1515
//@ is "$.index[?(@.name=='AbiSystemUnwind')].inner.type_alias.type.function_pointer.header.abi" '{"System": {"unwind": true}}'
1616
pub type AbiSystemUnwind = extern "system-unwind" fn();
1717

18-
//@ is "$.index[?(@.name=='AbiVecorcall')].inner.type_alias.type.function_pointer.header.abi.Other" '"\"vectorcall\""'
19-
pub type AbiVecorcall = extern "vectorcall" fn();
20-
21-
//@ is "$.index[?(@.name=='AbiVecorcallUnwind')].inner.type_alias.type.function_pointer.header.abi.Other" '"\"vectorcall-unwind\""'
22-
pub type AbiVecorcallUnwind = extern "vectorcall-unwind" fn();
18+
//@ is "$.index[?(@.name=='AbiRustCold')].inner.type_alias.type.function_pointer.header.abi.Other" '"\"rust-cold\""'
19+
pub type AbiRustCold = extern "rust-cold" fn();

tests/rustdoc-json/fns/abi.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![feature(abi_vectorcall)]
1+
#![feature(rust_cold_cc)]
22

33
//@ is "$.index[?(@.name=='abi_rust')].inner.function.header.abi" \"Rust\"
44
pub fn abi_rust() {}
@@ -15,8 +15,5 @@ pub extern "C-unwind" fn abi_c_unwind() {}
1515
//@ is "$.index[?(@.name=='abi_system_unwind')].inner.function.header.abi" '{"System": {"unwind": true}}'
1616
pub extern "system-unwind" fn abi_system_unwind() {}
1717

18-
//@ is "$.index[?(@.name=='abi_vectorcall')].inner.function.header.abi.Other" '"\"vectorcall\""'
19-
pub extern "vectorcall" fn abi_vectorcall() {}
20-
21-
//@ is "$.index[?(@.name=='abi_vectorcall_unwind')].inner.function.header.abi.Other" '"\"vectorcall-unwind\""'
22-
pub extern "vectorcall-unwind" fn abi_vectorcall_unwind() {}
18+
//@ is "$.index[?(@.name=='abi_rust_cold')].inner.function.header.abi.Other" '"\"rust-cold\""'
19+
pub extern "rust-cold" fn abi_rust_cold() {}

tests/rustdoc-json/methods/abi.rs

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
#![feature(abi_vectorcall)]
2-
1+
#![feature(rust_cold_cc)]
32
//@ has "$.index[?(@.name=='Foo')]"
43
pub struct Foo;
54

@@ -19,11 +18,8 @@ impl Foo {
1918
//@ is "$.index[?(@.name=='abi_system_unwind')].inner.function.header.abi" '{"System": {"unwind": true}}'
2019
pub extern "system-unwind" fn abi_system_unwind() {}
2120

22-
//@ is "$.index[?(@.name=='abi_vectorcall')].inner.function.header.abi.Other" '"\"vectorcall\""'
23-
pub extern "vectorcall" fn abi_vectorcall() {}
24-
25-
//@ is "$.index[?(@.name=='abi_vectorcall_unwind')].inner.function.header.abi.Other" '"\"vectorcall-unwind\""'
26-
pub extern "vectorcall-unwind" fn abi_vectorcall_unwind() {}
21+
//@ is "$.index[?(@.name=='abi_rust_cold')].inner.function.header.abi.Other" '"\"rust-cold\""'
22+
pub extern "rust-cold" fn abi_rust_cold() {}
2723
}
2824

2925
pub trait Bar {
@@ -42,9 +38,6 @@ pub trait Bar {
4238
//@ is "$.index[?(@.name=='trait_abi_system_unwind')].inner.function.header.abi" '{"System": {"unwind": true}}'
4339
extern "system-unwind" fn trait_abi_system_unwind() {}
4440

45-
//@ is "$.index[?(@.name=='trait_abi_vectorcall')].inner.function.header.abi.Other" '"\"vectorcall\""'
46-
extern "vectorcall" fn trait_abi_vectorcall() {}
47-
48-
//@ is "$.index[?(@.name=='trait_abi_vectorcall_unwind')].inner.function.header.abi.Other" '"\"vectorcall-unwind\""'
49-
extern "vectorcall-unwind" fn trait_abi_vectorcall_unwind() {}
41+
//@ is "$.index[?(@.name=='trait_abi_rust_cold')].inner.function.header.abi.Other" '"\"rust-cold\""'
42+
extern "rust-cold" fn trait_abi_rust_cold() {}
5043
}

tests/rustdoc-json/vectorcall.rs

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#![feature(abi_vectorcall)]
2+
//@ only-x86_64
3+
4+
//@ is "$.index[?(@.name=='AbiVectorcall')].inner.type_alias.type.function_pointer.header.abi.Other" '"\"vectorcall\""'
5+
pub type AbiVectorcall = extern "vectorcall" fn();
6+
7+
//@ is "$.index[?(@.name=='AbiVectorcallUnwind')].inner.type_alias.type.function_pointer.header.abi.Other" '"\"vectorcall-unwind\""'
8+
pub type AbiVectorcallUnwind = extern "vectorcall-unwind" fn();
9+
10+
//@ has "$.index[?(@.name=='Foo')]"
11+
pub struct Foo;
12+
13+
impl Foo {
14+
//@ is "$.index[?(@.name=='abi_vectorcall')].inner.function.header.abi.Other" '"\"vectorcall\""'
15+
pub extern "vectorcall" fn abi_vectorcall() {}
16+
17+
//@ is "$.index[?(@.name=='abi_vectorcall_unwind')].inner.function.header.abi.Other" '"\"vectorcall-unwind\""'
18+
pub extern "vectorcall-unwind" fn abi_vectorcall_unwind() {}
19+
}
20+
21+
pub trait Bar {
22+
//@ is "$.index[?(@.name=='trait_abi_vectorcall')].inner.function.header.abi.Other" '"\"vectorcall\""'
23+
extern "vectorcall" fn trait_abi_vectorcall() {}
24+
25+
//@ is "$.index[?(@.name=='trait_abi_vectorcall_unwind')].inner.function.header.abi.Other" '"\"vectorcall-unwind\""'
26+
extern "vectorcall-unwind" fn trait_abi_vectorcall_unwind() {}
27+
}

0 commit comments

Comments
 (0)