rustdoc-json: Rearrange deck chairs in ABI testing
We move the vectorcall ABI tests into their own file which is now only run on x86-64, while replacing them with rust-cold ABI tests so that aarch64 hosts continue to test an unstable ABI. A better solution might be cross-compiling or something but I really don't have time for that right now.
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
#![feature(abi_vectorcall)]
|
#![feature(rust_cold_cc)]
|
||||||
|
|
||||||
//@ is "$.index[?(@.name=='AbiRust')].inner.type_alias.type.function_pointer.header.abi" \"Rust\"
|
//@ is "$.index[?(@.name=='AbiRust')].inner.type_alias.type.function_pointer.header.abi" \"Rust\"
|
||||||
pub type AbiRust = fn();
|
pub type AbiRust = fn();
|
||||||
@@ -15,8 +15,5 @@ pub type AbiCUnwind = extern "C-unwind" fn();
|
|||||||
//@ is "$.index[?(@.name=='AbiSystemUnwind')].inner.type_alias.type.function_pointer.header.abi" '{"System": {"unwind": true}}'
|
//@ is "$.index[?(@.name=='AbiSystemUnwind')].inner.type_alias.type.function_pointer.header.abi" '{"System": {"unwind": true}}'
|
||||||
pub type AbiSystemUnwind = extern "system-unwind" fn();
|
pub type AbiSystemUnwind = extern "system-unwind" fn();
|
||||||
|
|
||||||
//@ is "$.index[?(@.name=='AbiVecorcall')].inner.type_alias.type.function_pointer.header.abi.Other" '"\"vectorcall\""'
|
//@ is "$.index[?(@.name=='AbiRustCold')].inner.type_alias.type.function_pointer.header.abi.Other" '"\"rust-cold\""'
|
||||||
pub type AbiVecorcall = extern "vectorcall" fn();
|
pub type AbiRustCold = extern "rust-cold" fn();
|
||||||
|
|
||||||
//@ is "$.index[?(@.name=='AbiVecorcallUnwind')].inner.type_alias.type.function_pointer.header.abi.Other" '"\"vectorcall-unwind\""'
|
|
||||||
pub type AbiVecorcallUnwind = extern "vectorcall-unwind" fn();
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#![feature(abi_vectorcall)]
|
#![feature(rust_cold_cc)]
|
||||||
|
|
||||||
//@ is "$.index[?(@.name=='abi_rust')].inner.function.header.abi" \"Rust\"
|
//@ is "$.index[?(@.name=='abi_rust')].inner.function.header.abi" \"Rust\"
|
||||||
pub fn abi_rust() {}
|
pub fn abi_rust() {}
|
||||||
@@ -15,8 +15,5 @@ pub extern "C-unwind" fn abi_c_unwind() {}
|
|||||||
//@ is "$.index[?(@.name=='abi_system_unwind')].inner.function.header.abi" '{"System": {"unwind": true}}'
|
//@ is "$.index[?(@.name=='abi_system_unwind')].inner.function.header.abi" '{"System": {"unwind": true}}'
|
||||||
pub extern "system-unwind" fn abi_system_unwind() {}
|
pub extern "system-unwind" fn abi_system_unwind() {}
|
||||||
|
|
||||||
//@ is "$.index[?(@.name=='abi_vectorcall')].inner.function.header.abi.Other" '"\"vectorcall\""'
|
//@ is "$.index[?(@.name=='abi_rust_cold')].inner.function.header.abi.Other" '"\"rust-cold\""'
|
||||||
pub extern "vectorcall" fn abi_vectorcall() {}
|
pub extern "rust-cold" fn abi_rust_cold() {}
|
||||||
|
|
||||||
//@ is "$.index[?(@.name=='abi_vectorcall_unwind')].inner.function.header.abi.Other" '"\"vectorcall-unwind\""'
|
|
||||||
pub extern "vectorcall-unwind" fn abi_vectorcall_unwind() {}
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
#![feature(abi_vectorcall)]
|
#![feature(rust_cold_cc)]
|
||||||
|
|
||||||
//@ has "$.index[?(@.name=='Foo')]"
|
//@ has "$.index[?(@.name=='Foo')]"
|
||||||
pub struct Foo;
|
pub struct Foo;
|
||||||
|
|
||||||
@@ -19,11 +18,8 @@ impl Foo {
|
|||||||
//@ is "$.index[?(@.name=='abi_system_unwind')].inner.function.header.abi" '{"System": {"unwind": true}}'
|
//@ is "$.index[?(@.name=='abi_system_unwind')].inner.function.header.abi" '{"System": {"unwind": true}}'
|
||||||
pub extern "system-unwind" fn abi_system_unwind() {}
|
pub extern "system-unwind" fn abi_system_unwind() {}
|
||||||
|
|
||||||
//@ is "$.index[?(@.name=='abi_vectorcall')].inner.function.header.abi.Other" '"\"vectorcall\""'
|
//@ is "$.index[?(@.name=='abi_rust_cold')].inner.function.header.abi.Other" '"\"rust-cold\""'
|
||||||
pub extern "vectorcall" fn abi_vectorcall() {}
|
pub extern "rust-cold" fn abi_rust_cold() {}
|
||||||
|
|
||||||
//@ is "$.index[?(@.name=='abi_vectorcall_unwind')].inner.function.header.abi.Other" '"\"vectorcall-unwind\""'
|
|
||||||
pub extern "vectorcall-unwind" fn abi_vectorcall_unwind() {}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub trait Bar {
|
pub trait Bar {
|
||||||
@@ -42,9 +38,6 @@ pub trait Bar {
|
|||||||
//@ is "$.index[?(@.name=='trait_abi_system_unwind')].inner.function.header.abi" '{"System": {"unwind": true}}'
|
//@ is "$.index[?(@.name=='trait_abi_system_unwind')].inner.function.header.abi" '{"System": {"unwind": true}}'
|
||||||
extern "system-unwind" fn trait_abi_system_unwind() {}
|
extern "system-unwind" fn trait_abi_system_unwind() {}
|
||||||
|
|
||||||
//@ is "$.index[?(@.name=='trait_abi_vectorcall')].inner.function.header.abi.Other" '"\"vectorcall\""'
|
//@ is "$.index[?(@.name=='trait_abi_rust_cold')].inner.function.header.abi.Other" '"\"rust-cold\""'
|
||||||
extern "vectorcall" fn trait_abi_vectorcall() {}
|
extern "rust-cold" fn trait_abi_rust_cold() {}
|
||||||
|
|
||||||
//@ is "$.index[?(@.name=='trait_abi_vectorcall_unwind')].inner.function.header.abi.Other" '"\"vectorcall-unwind\""'
|
|
||||||
extern "vectorcall-unwind" fn trait_abi_vectorcall_unwind() {}
|
|
||||||
}
|
}
|
||||||
|
|||||||
27
tests/rustdoc-json/vectorcall.rs
Normal file
27
tests/rustdoc-json/vectorcall.rs
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
#![feature(abi_vectorcall)]
|
||||||
|
//@ only-x86_64
|
||||||
|
|
||||||
|
//@ is "$.index[?(@.name=='AbiVectorcall')].inner.type_alias.type.function_pointer.header.abi.Other" '"\"vectorcall\""'
|
||||||
|
pub type AbiVectorcall = extern "vectorcall" fn();
|
||||||
|
|
||||||
|
//@ is "$.index[?(@.name=='AbiVectorcallUnwind')].inner.type_alias.type.function_pointer.header.abi.Other" '"\"vectorcall-unwind\""'
|
||||||
|
pub type AbiVectorcallUnwind = extern "vectorcall-unwind" fn();
|
||||||
|
|
||||||
|
//@ has "$.index[?(@.name=='Foo')]"
|
||||||
|
pub struct Foo;
|
||||||
|
|
||||||
|
impl Foo {
|
||||||
|
//@ is "$.index[?(@.name=='abi_vectorcall')].inner.function.header.abi.Other" '"\"vectorcall\""'
|
||||||
|
pub extern "vectorcall" fn abi_vectorcall() {}
|
||||||
|
|
||||||
|
//@ is "$.index[?(@.name=='abi_vectorcall_unwind')].inner.function.header.abi.Other" '"\"vectorcall-unwind\""'
|
||||||
|
pub extern "vectorcall-unwind" fn abi_vectorcall_unwind() {}
|
||||||
|
}
|
||||||
|
|
||||||
|
pub trait Bar {
|
||||||
|
//@ is "$.index[?(@.name=='trait_abi_vectorcall')].inner.function.header.abi.Other" '"\"vectorcall\""'
|
||||||
|
extern "vectorcall" fn trait_abi_vectorcall() {}
|
||||||
|
|
||||||
|
//@ is "$.index[?(@.name=='trait_abi_vectorcall_unwind')].inner.function.header.abi.Other" '"\"vectorcall-unwind\""'
|
||||||
|
extern "vectorcall-unwind" fn trait_abi_vectorcall_unwind() {}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user