Rollup merge of #139001 - folkertdev:naked-function-rustic-abi, r=traviscross,compiler-errors
add `naked_functions_rustic_abi` feature gate tracking issue: https://github.com/rust-lang/rust/issues/138997 Because the details of the rust abi are unstable, and a naked function must match its stated ABI, this feature gate keeps naked functions with a rustic abi ("Rust", "rust-cold", "rust-call" and "rust-intrinsic") unstable. r? ````@traviscross````
This commit is contained in:
commit
7f691d28f1
17 changed files with 142 additions and 107 deletions
|
@ -110,7 +110,6 @@ declare_lint_pass! {
|
|||
UNCONDITIONAL_PANIC,
|
||||
UNCONDITIONAL_RECURSION,
|
||||
UNCOVERED_PARAM_IN_PROJECTION,
|
||||
UNDEFINED_NAKED_FUNCTION_ABI,
|
||||
UNEXPECTED_CFGS,
|
||||
UNFULFILLED_LINT_EXPECTATIONS,
|
||||
UNINHABITED_STATIC,
|
||||
|
@ -2830,39 +2829,6 @@ declare_lint! {
|
|||
"detects deprecation attributes with no effect",
|
||||
}
|
||||
|
||||
declare_lint! {
|
||||
/// The `undefined_naked_function_abi` lint detects naked function definitions that
|
||||
/// either do not specify an ABI or specify the Rust ABI.
|
||||
///
|
||||
/// ### Example
|
||||
///
|
||||
/// ```rust
|
||||
/// #![feature(asm_experimental_arch, naked_functions)]
|
||||
///
|
||||
/// use std::arch::naked_asm;
|
||||
///
|
||||
/// #[naked]
|
||||
/// pub fn default_abi() -> u32 {
|
||||
/// unsafe { naked_asm!(""); }
|
||||
/// }
|
||||
///
|
||||
/// #[naked]
|
||||
/// pub extern "Rust" fn rust_abi() -> u32 {
|
||||
/// unsafe { naked_asm!(""); }
|
||||
/// }
|
||||
/// ```
|
||||
///
|
||||
/// {{produces}}
|
||||
///
|
||||
/// ### Explanation
|
||||
///
|
||||
/// The Rust ABI is currently undefined. Therefore, naked functions should
|
||||
/// specify a non-Rust ABI.
|
||||
pub UNDEFINED_NAKED_FUNCTION_ABI,
|
||||
Warn,
|
||||
"undefined naked function ABI"
|
||||
}
|
||||
|
||||
declare_lint! {
|
||||
/// The `ineffective_unstable_trait_impl` lint detects `#[unstable]` attributes which are not used.
|
||||
///
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue