Rollup merge of #142271 - workingjubilee:fn-ptrs-have-two-different-lints, r=RalfJung

compiler: fn ptrs should hit different lints based on ABI

I was looking closer at the code for linting on ABIs and realized a mistake was probably made during rebase or review. I think that for function pointers in the HIR, the lint that fires should probably depend on the ABI we encountered, e.g. if it's on the newly-deprecated set of ABIs or not. This will be slightly confusing for a little bit, but I think we can do more to reduce that confusion by switching `unsupported_fn_ptr_calling_conventions` to a hard error.

r? ``@RalfJung``
This commit is contained in:
León Orell Valerian Liehr 2025-06-10 16:54:52 +02:00 committed by GitHub
commit a2badebce5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 244 additions and 218 deletions

View file

@ -37,22 +37,23 @@ use {rustc_attr_data_structures as attrs, rustc_hir as hir};
use super::compare_impl_item::check_type_bounds;
use super::*;
fn add_abi_diag_help<T: EmissionGuarantee>(abi: ExternAbi, diag: &mut Diag<'_, T>) {
if let ExternAbi::Cdecl { unwind } = abi {
let c_abi = ExternAbi::C { unwind };
diag.help(format!("use `extern {c_abi}` instead",));
} else if let ExternAbi::Stdcall { unwind } = abi {
let c_abi = ExternAbi::C { unwind };
let system_abi = ExternAbi::System { unwind };
diag.help(format!(
"if you need `extern {abi}` on win32 and `extern {c_abi}` everywhere else, \
use `extern {system_abi}`"
));
}
}
pub fn check_abi(tcx: TyCtxt<'_>, hir_id: hir::HirId, span: Span, abi: ExternAbi) {
// FIXME: this should be checked earlier, e.g. in `rustc_ast_lowering`, to fix
// things like #86232.
fn add_help<T: EmissionGuarantee>(abi: ExternAbi, diag: &mut Diag<'_, T>) {
if let ExternAbi::Cdecl { unwind } = abi {
let c_abi = ExternAbi::C { unwind };
diag.help(format!("use `extern {c_abi}` instead",));
} else if let ExternAbi::Stdcall { unwind } = abi {
let c_abi = ExternAbi::C { unwind };
let system_abi = ExternAbi::System { unwind };
diag.help(format!(
"if you need `extern {abi}` on win32 and `extern {c_abi}` everywhere else, \
use `extern {system_abi}`"
));
}
}
match AbiMap::from_target(&tcx.sess.target).canonize_abi(abi, false) {
AbiMapping::Direct(..) => (),
@ -63,13 +64,13 @@ pub fn check_abi(tcx: TyCtxt<'_>, hir_id: hir::HirId, span: Span, abi: ExternAbi
E0570,
"`{abi}` is not a supported ABI for the current target",
);
add_help(abi, &mut err);
add_abi_diag_help(abi, &mut err);
err.emit();
}
AbiMapping::Deprecated(..) => {
tcx.node_span_lint(UNSUPPORTED_CALLING_CONVENTIONS, hir_id, span, |lint| {
lint.primary_message("use of calling convention not supported on this target");
add_help(abi, lint);
add_abi_diag_help(abi, lint);
});
}
}
@ -80,7 +81,16 @@ pub fn check_abi_fn_ptr(tcx: TyCtxt<'_>, hir_id: hir::HirId, span: Span, abi: Ex
// in `check_abi` above.
match AbiMap::from_target(&tcx.sess.target).canonize_abi(abi, false) {
AbiMapping::Direct(..) => (),
AbiMapping::Deprecated(..) | AbiMapping::Invalid => {
// This is not a redundant match arm: these ABIs started linting after introducing
// UNSUPPORTED_FN_PTR_CALLING_CONVENTIONS already existed and we want to
// avoid expanding the scope of that lint so it can move to a hard error sooner.
AbiMapping::Deprecated(..) => {
tcx.node_span_lint(UNSUPPORTED_CALLING_CONVENTIONS, hir_id, span, |lint| {
lint.primary_message("use of calling convention not supported on this target");
add_abi_diag_help(abi, lint);
});
}
AbiMapping::Invalid => {
tcx.node_span_lint(UNSUPPORTED_FN_PTR_CALLING_CONVENTIONS, hir_id, span, |lint| {
lint.primary_message(format!(
"the calling convention {abi} is not supported on this target"

View file

@ -114,7 +114,7 @@ LL | fn stdcall_ptr(f: extern "stdcall" fn()) {
= note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
error[E0570]: `"stdcall"` is not a supported ABI for the current target
--> $DIR/unsupported.rs:117:1
--> $DIR/unsupported.rs:119:1
|
LL | extern "stdcall" {}
| ^^^^^^^^^^^^^^^^^^^
@ -122,35 +122,36 @@ LL | extern "stdcall" {}
= help: if you need `extern "stdcall"` on win32 and `extern "C"` everywhere else, use `extern "system"`
error[E0570]: `"stdcall-unwind"` is not a supported ABI for the current target
--> $DIR/unsupported.rs:121:1
--> $DIR/unsupported.rs:123:1
|
LL | extern "stdcall-unwind" {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: if you need `extern "stdcall-unwind"` on win32 and `extern "C-unwind"` everywhere else, use `extern "system-unwind"`
warning: the calling convention "cdecl" is not supported on this target
--> $DIR/unsupported.rs:129:17
warning: use of calling convention not supported on this target
--> $DIR/unsupported.rs:131:17
|
LL | fn cdecl_ptr(f: extern "cdecl" fn()) {
| ^^^^^^^^^^^^^^^^^^^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
warning: use of calling convention not supported on this target
--> $DIR/unsupported.rs:134:1
|
LL | extern "cdecl" {}
| ^^^^^^^^^^^^^^^^^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
= help: use `extern "C"` instead
= note: `#[warn(unsupported_calling_conventions)]` on by default
warning: use of calling convention not supported on this target
--> $DIR/unsupported.rs:137:1
--> $DIR/unsupported.rs:136:1
|
LL | extern "cdecl" {}
| ^^^^^^^^^^^^^^^^^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
= help: use `extern "C"` instead
warning: use of calling convention not supported on this target
--> $DIR/unsupported.rs:139:1
|
LL | extern "cdecl-unwind" {}
| ^^^^^^^^^^^^^^^^^^^^^^^^
@ -160,7 +161,7 @@ LL | extern "cdecl-unwind" {}
= help: use `extern "C-unwind"` instead
warning: the calling convention "vectorcall" is not supported on this target
--> $DIR/unsupported.rs:143:22
--> $DIR/unsupported.rs:145:22
|
LL | fn vectorcall_ptr(f: extern "vectorcall" fn()) {
| ^^^^^^^^^^^^^^^^^^^^^^^^
@ -169,13 +170,13 @@ LL | fn vectorcall_ptr(f: extern "vectorcall" fn()) {
= note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
error[E0570]: `"vectorcall"` is not a supported ABI for the current target
--> $DIR/unsupported.rs:148:1
--> $DIR/unsupported.rs:150:1
|
LL | extern "vectorcall" {}
| ^^^^^^^^^^^^^^^^^^^^^^
warning: the calling convention "C-cmse-nonsecure-call" is not supported on this target
--> $DIR/unsupported.rs:151:21
--> $DIR/unsupported.rs:153:21
|
LL | fn cmse_call_ptr(f: extern "C-cmse-nonsecure-call" fn()) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -184,7 +185,7 @@ LL | fn cmse_call_ptr(f: extern "C-cmse-nonsecure-call" fn()) {
= note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
warning: the calling convention "C-cmse-nonsecure-entry" is not supported on this target
--> $DIR/unsupported.rs:159:22
--> $DIR/unsupported.rs:161:22
|
LL | fn cmse_entry_ptr(f: extern "C-cmse-nonsecure-entry" fn()) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -193,7 +194,7 @@ LL | fn cmse_entry_ptr(f: extern "C-cmse-nonsecure-entry" fn()) {
= note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
error[E0570]: `"C-cmse-nonsecure-entry"` is not a supported ABI for the current target
--> $DIR/unsupported.rs:164:1
--> $DIR/unsupported.rs:166:1
|
LL | extern "C-cmse-nonsecure-entry" {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -255,7 +256,7 @@ LL | extern "stdcall" fn stdcall() {}
= help: if you need `extern "stdcall"` on win32 and `extern "C"` everywhere else, use `extern "system"`
warning: use of calling convention not supported on this target
--> $DIR/unsupported.rs:126:1
--> $DIR/unsupported.rs:128:1
|
LL | extern "cdecl" fn cdecl() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^
@ -265,13 +266,13 @@ LL | extern "cdecl" fn cdecl() {}
= help: use `extern "C"` instead
error[E0570]: `"vectorcall"` is not a supported ABI for the current target
--> $DIR/unsupported.rs:141:1
--> $DIR/unsupported.rs:143:1
|
LL | extern "vectorcall" fn vectorcall() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0570]: `"C-cmse-nonsecure-entry"` is not a supported ABI for the current target
--> $DIR/unsupported.rs:157:1
--> $DIR/unsupported.rs:159:1
|
LL | extern "C-cmse-nonsecure-entry" fn cmse_entry() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -368,19 +369,20 @@ LL | fn stdcall_ptr(f: extern "stdcall" fn()) {
= note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
Future breakage diagnostic:
warning: the calling convention "cdecl" is not supported on this target
--> $DIR/unsupported.rs:129:17
warning: use of calling convention not supported on this target
--> $DIR/unsupported.rs:131:17
|
LL | fn cdecl_ptr(f: extern "cdecl" fn()) {
| ^^^^^^^^^^^^^^^^^^^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
= note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
= note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
= help: use `extern "C"` instead
= note: `#[warn(unsupported_calling_conventions)]` on by default
Future breakage diagnostic:
warning: use of calling convention not supported on this target
--> $DIR/unsupported.rs:134:1
--> $DIR/unsupported.rs:136:1
|
LL | extern "cdecl" {}
| ^^^^^^^^^^^^^^^^^
@ -392,7 +394,7 @@ LL | extern "cdecl" {}
Future breakage diagnostic:
warning: use of calling convention not supported on this target
--> $DIR/unsupported.rs:137:1
--> $DIR/unsupported.rs:139:1
|
LL | extern "cdecl-unwind" {}
| ^^^^^^^^^^^^^^^^^^^^^^^^
@ -404,7 +406,7 @@ LL | extern "cdecl-unwind" {}
Future breakage diagnostic:
warning: the calling convention "vectorcall" is not supported on this target
--> $DIR/unsupported.rs:143:22
--> $DIR/unsupported.rs:145:22
|
LL | fn vectorcall_ptr(f: extern "vectorcall" fn()) {
| ^^^^^^^^^^^^^^^^^^^^^^^^
@ -415,7 +417,7 @@ LL | fn vectorcall_ptr(f: extern "vectorcall" fn()) {
Future breakage diagnostic:
warning: the calling convention "C-cmse-nonsecure-call" is not supported on this target
--> $DIR/unsupported.rs:151:21
--> $DIR/unsupported.rs:153:21
|
LL | fn cmse_call_ptr(f: extern "C-cmse-nonsecure-call" fn()) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -426,7 +428,7 @@ LL | fn cmse_call_ptr(f: extern "C-cmse-nonsecure-call" fn()) {
Future breakage diagnostic:
warning: the calling convention "C-cmse-nonsecure-entry" is not supported on this target
--> $DIR/unsupported.rs:159:22
--> $DIR/unsupported.rs:161:22
|
LL | fn cmse_entry_ptr(f: extern "C-cmse-nonsecure-entry" fn()) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -437,7 +439,7 @@ LL | fn cmse_entry_ptr(f: extern "C-cmse-nonsecure-entry" fn()) {
Future breakage diagnostic:
warning: use of calling convention not supported on this target
--> $DIR/unsupported.rs:126:1
--> $DIR/unsupported.rs:128:1
|
LL | extern "cdecl" fn cdecl() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^

View file

@ -99,7 +99,7 @@ LL | fn stdcall_ptr(f: extern "stdcall" fn()) {
= note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
error[E0570]: `"stdcall"` is not a supported ABI for the current target
--> $DIR/unsupported.rs:117:1
--> $DIR/unsupported.rs:119:1
|
LL | extern "stdcall" {}
| ^^^^^^^^^^^^^^^^^^^
@ -107,35 +107,36 @@ LL | extern "stdcall" {}
= help: if you need `extern "stdcall"` on win32 and `extern "C"` everywhere else, use `extern "system"`
error[E0570]: `"stdcall-unwind"` is not a supported ABI for the current target
--> $DIR/unsupported.rs:121:1
--> $DIR/unsupported.rs:123:1
|
LL | extern "stdcall-unwind" {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: if you need `extern "stdcall-unwind"` on win32 and `extern "C-unwind"` everywhere else, use `extern "system-unwind"`
warning: the calling convention "cdecl" is not supported on this target
--> $DIR/unsupported.rs:129:17
warning: use of calling convention not supported on this target
--> $DIR/unsupported.rs:131:17
|
LL | fn cdecl_ptr(f: extern "cdecl" fn()) {
| ^^^^^^^^^^^^^^^^^^^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
warning: use of calling convention not supported on this target
--> $DIR/unsupported.rs:134:1
|
LL | extern "cdecl" {}
| ^^^^^^^^^^^^^^^^^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
= help: use `extern "C"` instead
= note: `#[warn(unsupported_calling_conventions)]` on by default
warning: use of calling convention not supported on this target
--> $DIR/unsupported.rs:137:1
--> $DIR/unsupported.rs:136:1
|
LL | extern "cdecl" {}
| ^^^^^^^^^^^^^^^^^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
= help: use `extern "C"` instead
warning: use of calling convention not supported on this target
--> $DIR/unsupported.rs:139:1
|
LL | extern "cdecl-unwind" {}
| ^^^^^^^^^^^^^^^^^^^^^^^^
@ -145,7 +146,7 @@ LL | extern "cdecl-unwind" {}
= help: use `extern "C-unwind"` instead
warning: the calling convention "vectorcall" is not supported on this target
--> $DIR/unsupported.rs:143:22
--> $DIR/unsupported.rs:145:22
|
LL | fn vectorcall_ptr(f: extern "vectorcall" fn()) {
| ^^^^^^^^^^^^^^^^^^^^^^^^
@ -154,13 +155,13 @@ LL | fn vectorcall_ptr(f: extern "vectorcall" fn()) {
= note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
error[E0570]: `"vectorcall"` is not a supported ABI for the current target
--> $DIR/unsupported.rs:148:1
--> $DIR/unsupported.rs:150:1
|
LL | extern "vectorcall" {}
| ^^^^^^^^^^^^^^^^^^^^^^
warning: the calling convention "C-cmse-nonsecure-call" is not supported on this target
--> $DIR/unsupported.rs:151:21
--> $DIR/unsupported.rs:153:21
|
LL | fn cmse_call_ptr(f: extern "C-cmse-nonsecure-call" fn()) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -169,7 +170,7 @@ LL | fn cmse_call_ptr(f: extern "C-cmse-nonsecure-call" fn()) {
= note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
warning: the calling convention "C-cmse-nonsecure-entry" is not supported on this target
--> $DIR/unsupported.rs:159:22
--> $DIR/unsupported.rs:161:22
|
LL | fn cmse_entry_ptr(f: extern "C-cmse-nonsecure-entry" fn()) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -178,7 +179,7 @@ LL | fn cmse_entry_ptr(f: extern "C-cmse-nonsecure-entry" fn()) {
= note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
error[E0570]: `"C-cmse-nonsecure-entry"` is not a supported ABI for the current target
--> $DIR/unsupported.rs:164:1
--> $DIR/unsupported.rs:166:1
|
LL | extern "C-cmse-nonsecure-entry" {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -234,7 +235,7 @@ LL | extern "stdcall" fn stdcall() {}
= help: if you need `extern "stdcall"` on win32 and `extern "C"` everywhere else, use `extern "system"`
warning: use of calling convention not supported on this target
--> $DIR/unsupported.rs:126:1
--> $DIR/unsupported.rs:128:1
|
LL | extern "cdecl" fn cdecl() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^
@ -244,13 +245,13 @@ LL | extern "cdecl" fn cdecl() {}
= help: use `extern "C"` instead
error[E0570]: `"vectorcall"` is not a supported ABI for the current target
--> $DIR/unsupported.rs:141:1
--> $DIR/unsupported.rs:143:1
|
LL | extern "vectorcall" fn vectorcall() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0570]: `"C-cmse-nonsecure-entry"` is not a supported ABI for the current target
--> $DIR/unsupported.rs:157:1
--> $DIR/unsupported.rs:159:1
|
LL | extern "C-cmse-nonsecure-entry" fn cmse_entry() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -336,19 +337,20 @@ LL | fn stdcall_ptr(f: extern "stdcall" fn()) {
= note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
Future breakage diagnostic:
warning: the calling convention "cdecl" is not supported on this target
--> $DIR/unsupported.rs:129:17
warning: use of calling convention not supported on this target
--> $DIR/unsupported.rs:131:17
|
LL | fn cdecl_ptr(f: extern "cdecl" fn()) {
| ^^^^^^^^^^^^^^^^^^^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
= note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
= note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
= help: use `extern "C"` instead
= note: `#[warn(unsupported_calling_conventions)]` on by default
Future breakage diagnostic:
warning: use of calling convention not supported on this target
--> $DIR/unsupported.rs:134:1
--> $DIR/unsupported.rs:136:1
|
LL | extern "cdecl" {}
| ^^^^^^^^^^^^^^^^^
@ -360,7 +362,7 @@ LL | extern "cdecl" {}
Future breakage diagnostic:
warning: use of calling convention not supported on this target
--> $DIR/unsupported.rs:137:1
--> $DIR/unsupported.rs:139:1
|
LL | extern "cdecl-unwind" {}
| ^^^^^^^^^^^^^^^^^^^^^^^^
@ -372,7 +374,7 @@ LL | extern "cdecl-unwind" {}
Future breakage diagnostic:
warning: the calling convention "vectorcall" is not supported on this target
--> $DIR/unsupported.rs:143:22
--> $DIR/unsupported.rs:145:22
|
LL | fn vectorcall_ptr(f: extern "vectorcall" fn()) {
| ^^^^^^^^^^^^^^^^^^^^^^^^
@ -383,7 +385,7 @@ LL | fn vectorcall_ptr(f: extern "vectorcall" fn()) {
Future breakage diagnostic:
warning: the calling convention "C-cmse-nonsecure-call" is not supported on this target
--> $DIR/unsupported.rs:151:21
--> $DIR/unsupported.rs:153:21
|
LL | fn cmse_call_ptr(f: extern "C-cmse-nonsecure-call" fn()) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -394,7 +396,7 @@ LL | fn cmse_call_ptr(f: extern "C-cmse-nonsecure-call" fn()) {
Future breakage diagnostic:
warning: the calling convention "C-cmse-nonsecure-entry" is not supported on this target
--> $DIR/unsupported.rs:159:22
--> $DIR/unsupported.rs:161:22
|
LL | fn cmse_entry_ptr(f: extern "C-cmse-nonsecure-entry" fn()) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -405,7 +407,7 @@ LL | fn cmse_entry_ptr(f: extern "C-cmse-nonsecure-entry" fn()) {
Future breakage diagnostic:
warning: use of calling convention not supported on this target
--> $DIR/unsupported.rs:126:1
--> $DIR/unsupported.rs:128:1
|
LL | extern "cdecl" fn cdecl() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^

View file

@ -75,7 +75,7 @@ LL | extern "riscv-interrupt-m" {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
warning: the calling convention "C-cmse-nonsecure-call" is not supported on this target
--> $DIR/unsupported.rs:151:21
--> $DIR/unsupported.rs:153:21
|
LL | fn cmse_call_ptr(f: extern "C-cmse-nonsecure-call" fn()) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -84,7 +84,7 @@ LL | fn cmse_call_ptr(f: extern "C-cmse-nonsecure-call" fn()) {
= note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
warning: the calling convention "C-cmse-nonsecure-entry" is not supported on this target
--> $DIR/unsupported.rs:159:22
--> $DIR/unsupported.rs:161:22
|
LL | fn cmse_entry_ptr(f: extern "C-cmse-nonsecure-entry" fn()) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -93,7 +93,7 @@ LL | fn cmse_entry_ptr(f: extern "C-cmse-nonsecure-entry" fn()) {
= note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
error[E0570]: `"C-cmse-nonsecure-entry"` is not a supported ABI for the current target
--> $DIR/unsupported.rs:164:1
--> $DIR/unsupported.rs:166:1
|
LL | extern "C-cmse-nonsecure-entry" {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -135,7 +135,7 @@ LL | extern "riscv-interrupt-m" fn riscv() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0570]: `"C-cmse-nonsecure-entry"` is not a supported ABI for the current target
--> $DIR/unsupported.rs:157:1
--> $DIR/unsupported.rs:159:1
|
LL | extern "C-cmse-nonsecure-entry" fn cmse_entry() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -200,7 +200,7 @@ LL | fn riscv_ptr(f: extern "riscv-interrupt-m" fn()) {
Future breakage diagnostic:
warning: the calling convention "C-cmse-nonsecure-call" is not supported on this target
--> $DIR/unsupported.rs:151:21
--> $DIR/unsupported.rs:153:21
|
LL | fn cmse_call_ptr(f: extern "C-cmse-nonsecure-call" fn()) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -211,7 +211,7 @@ LL | fn cmse_call_ptr(f: extern "C-cmse-nonsecure-call" fn()) {
Future breakage diagnostic:
warning: the calling convention "C-cmse-nonsecure-entry" is not supported on this target
--> $DIR/unsupported.rs:159:22
--> $DIR/unsupported.rs:161:22
|
LL | fn cmse_entry_ptr(f: extern "C-cmse-nonsecure-entry" fn()) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

View file

@ -99,7 +99,7 @@ LL | fn stdcall_ptr(f: extern "stdcall" fn()) {
= note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
error[E0570]: `"stdcall"` is not a supported ABI for the current target
--> $DIR/unsupported.rs:117:1
--> $DIR/unsupported.rs:119:1
|
LL | extern "stdcall" {}
| ^^^^^^^^^^^^^^^^^^^
@ -107,35 +107,36 @@ LL | extern "stdcall" {}
= help: if you need `extern "stdcall"` on win32 and `extern "C"` everywhere else, use `extern "system"`
error[E0570]: `"stdcall-unwind"` is not a supported ABI for the current target
--> $DIR/unsupported.rs:121:1
--> $DIR/unsupported.rs:123:1
|
LL | extern "stdcall-unwind" {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: if you need `extern "stdcall-unwind"` on win32 and `extern "C-unwind"` everywhere else, use `extern "system-unwind"`
warning: the calling convention "cdecl" is not supported on this target
--> $DIR/unsupported.rs:129:17
warning: use of calling convention not supported on this target
--> $DIR/unsupported.rs:131:17
|
LL | fn cdecl_ptr(f: extern "cdecl" fn()) {
| ^^^^^^^^^^^^^^^^^^^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
warning: use of calling convention not supported on this target
--> $DIR/unsupported.rs:134:1
|
LL | extern "cdecl" {}
| ^^^^^^^^^^^^^^^^^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
= help: use `extern "C"` instead
= note: `#[warn(unsupported_calling_conventions)]` on by default
warning: use of calling convention not supported on this target
--> $DIR/unsupported.rs:137:1
--> $DIR/unsupported.rs:136:1
|
LL | extern "cdecl" {}
| ^^^^^^^^^^^^^^^^^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
= help: use `extern "C"` instead
warning: use of calling convention not supported on this target
--> $DIR/unsupported.rs:139:1
|
LL | extern "cdecl-unwind" {}
| ^^^^^^^^^^^^^^^^^^^^^^^^
@ -145,7 +146,7 @@ LL | extern "cdecl-unwind" {}
= help: use `extern "C-unwind"` instead
warning: the calling convention "vectorcall" is not supported on this target
--> $DIR/unsupported.rs:143:22
--> $DIR/unsupported.rs:145:22
|
LL | fn vectorcall_ptr(f: extern "vectorcall" fn()) {
| ^^^^^^^^^^^^^^^^^^^^^^^^
@ -154,13 +155,13 @@ LL | fn vectorcall_ptr(f: extern "vectorcall" fn()) {
= note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
error[E0570]: `"vectorcall"` is not a supported ABI for the current target
--> $DIR/unsupported.rs:148:1
--> $DIR/unsupported.rs:150:1
|
LL | extern "vectorcall" {}
| ^^^^^^^^^^^^^^^^^^^^^^
warning: the calling convention "C-cmse-nonsecure-call" is not supported on this target
--> $DIR/unsupported.rs:151:21
--> $DIR/unsupported.rs:153:21
|
LL | fn cmse_call_ptr(f: extern "C-cmse-nonsecure-call" fn()) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -169,7 +170,7 @@ LL | fn cmse_call_ptr(f: extern "C-cmse-nonsecure-call" fn()) {
= note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
warning: the calling convention "C-cmse-nonsecure-entry" is not supported on this target
--> $DIR/unsupported.rs:159:22
--> $DIR/unsupported.rs:161:22
|
LL | fn cmse_entry_ptr(f: extern "C-cmse-nonsecure-entry" fn()) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -178,7 +179,7 @@ LL | fn cmse_entry_ptr(f: extern "C-cmse-nonsecure-entry" fn()) {
= note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
error[E0570]: `"C-cmse-nonsecure-entry"` is not a supported ABI for the current target
--> $DIR/unsupported.rs:164:1
--> $DIR/unsupported.rs:166:1
|
LL | extern "C-cmse-nonsecure-entry" {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -234,7 +235,7 @@ LL | extern "stdcall" fn stdcall() {}
= help: if you need `extern "stdcall"` on win32 and `extern "C"` everywhere else, use `extern "system"`
warning: use of calling convention not supported on this target
--> $DIR/unsupported.rs:126:1
--> $DIR/unsupported.rs:128:1
|
LL | extern "cdecl" fn cdecl() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^
@ -244,13 +245,13 @@ LL | extern "cdecl" fn cdecl() {}
= help: use `extern "C"` instead
error[E0570]: `"vectorcall"` is not a supported ABI for the current target
--> $DIR/unsupported.rs:141:1
--> $DIR/unsupported.rs:143:1
|
LL | extern "vectorcall" fn vectorcall() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0570]: `"C-cmse-nonsecure-entry"` is not a supported ABI for the current target
--> $DIR/unsupported.rs:157:1
--> $DIR/unsupported.rs:159:1
|
LL | extern "C-cmse-nonsecure-entry" fn cmse_entry() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -336,19 +337,20 @@ LL | fn stdcall_ptr(f: extern "stdcall" fn()) {
= note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
Future breakage diagnostic:
warning: the calling convention "cdecl" is not supported on this target
--> $DIR/unsupported.rs:129:17
warning: use of calling convention not supported on this target
--> $DIR/unsupported.rs:131:17
|
LL | fn cdecl_ptr(f: extern "cdecl" fn()) {
| ^^^^^^^^^^^^^^^^^^^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
= note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
= note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
= help: use `extern "C"` instead
= note: `#[warn(unsupported_calling_conventions)]` on by default
Future breakage diagnostic:
warning: use of calling convention not supported on this target
--> $DIR/unsupported.rs:134:1
--> $DIR/unsupported.rs:136:1
|
LL | extern "cdecl" {}
| ^^^^^^^^^^^^^^^^^
@ -360,7 +362,7 @@ LL | extern "cdecl" {}
Future breakage diagnostic:
warning: use of calling convention not supported on this target
--> $DIR/unsupported.rs:137:1
--> $DIR/unsupported.rs:139:1
|
LL | extern "cdecl-unwind" {}
| ^^^^^^^^^^^^^^^^^^^^^^^^
@ -372,7 +374,7 @@ LL | extern "cdecl-unwind" {}
Future breakage diagnostic:
warning: the calling convention "vectorcall" is not supported on this target
--> $DIR/unsupported.rs:143:22
--> $DIR/unsupported.rs:145:22
|
LL | fn vectorcall_ptr(f: extern "vectorcall" fn()) {
| ^^^^^^^^^^^^^^^^^^^^^^^^
@ -383,7 +385,7 @@ LL | fn vectorcall_ptr(f: extern "vectorcall" fn()) {
Future breakage diagnostic:
warning: the calling convention "C-cmse-nonsecure-call" is not supported on this target
--> $DIR/unsupported.rs:151:21
--> $DIR/unsupported.rs:153:21
|
LL | fn cmse_call_ptr(f: extern "C-cmse-nonsecure-call" fn()) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -394,7 +396,7 @@ LL | fn cmse_call_ptr(f: extern "C-cmse-nonsecure-call" fn()) {
Future breakage diagnostic:
warning: the calling convention "C-cmse-nonsecure-entry" is not supported on this target
--> $DIR/unsupported.rs:159:22
--> $DIR/unsupported.rs:161:22
|
LL | fn cmse_entry_ptr(f: extern "C-cmse-nonsecure-entry" fn()) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -405,7 +407,7 @@ LL | fn cmse_entry_ptr(f: extern "C-cmse-nonsecure-entry" fn()) {
Future breakage diagnostic:
warning: use of calling convention not supported on this target
--> $DIR/unsupported.rs:126:1
--> $DIR/unsupported.rs:128:1
|
LL | extern "cdecl" fn cdecl() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^

View file

@ -99,7 +99,7 @@ LL | fn stdcall_ptr(f: extern "stdcall" fn()) {
= note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
error[E0570]: `"stdcall"` is not a supported ABI for the current target
--> $DIR/unsupported.rs:117:1
--> $DIR/unsupported.rs:119:1
|
LL | extern "stdcall" {}
| ^^^^^^^^^^^^^^^^^^^
@ -107,35 +107,36 @@ LL | extern "stdcall" {}
= help: if you need `extern "stdcall"` on win32 and `extern "C"` everywhere else, use `extern "system"`
error[E0570]: `"stdcall-unwind"` is not a supported ABI for the current target
--> $DIR/unsupported.rs:121:1
--> $DIR/unsupported.rs:123:1
|
LL | extern "stdcall-unwind" {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: if you need `extern "stdcall-unwind"` on win32 and `extern "C-unwind"` everywhere else, use `extern "system-unwind"`
warning: the calling convention "cdecl" is not supported on this target
--> $DIR/unsupported.rs:129:17
warning: use of calling convention not supported on this target
--> $DIR/unsupported.rs:131:17
|
LL | fn cdecl_ptr(f: extern "cdecl" fn()) {
| ^^^^^^^^^^^^^^^^^^^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
warning: use of calling convention not supported on this target
--> $DIR/unsupported.rs:134:1
|
LL | extern "cdecl" {}
| ^^^^^^^^^^^^^^^^^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
= help: use `extern "C"` instead
= note: `#[warn(unsupported_calling_conventions)]` on by default
warning: use of calling convention not supported on this target
--> $DIR/unsupported.rs:137:1
--> $DIR/unsupported.rs:136:1
|
LL | extern "cdecl" {}
| ^^^^^^^^^^^^^^^^^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
= help: use `extern "C"` instead
warning: use of calling convention not supported on this target
--> $DIR/unsupported.rs:139:1
|
LL | extern "cdecl-unwind" {}
| ^^^^^^^^^^^^^^^^^^^^^^^^
@ -145,7 +146,7 @@ LL | extern "cdecl-unwind" {}
= help: use `extern "C-unwind"` instead
warning: the calling convention "vectorcall" is not supported on this target
--> $DIR/unsupported.rs:143:22
--> $DIR/unsupported.rs:145:22
|
LL | fn vectorcall_ptr(f: extern "vectorcall" fn()) {
| ^^^^^^^^^^^^^^^^^^^^^^^^
@ -154,13 +155,13 @@ LL | fn vectorcall_ptr(f: extern "vectorcall" fn()) {
= note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
error[E0570]: `"vectorcall"` is not a supported ABI for the current target
--> $DIR/unsupported.rs:148:1
--> $DIR/unsupported.rs:150:1
|
LL | extern "vectorcall" {}
| ^^^^^^^^^^^^^^^^^^^^^^
warning: the calling convention "C-cmse-nonsecure-call" is not supported on this target
--> $DIR/unsupported.rs:151:21
--> $DIR/unsupported.rs:153:21
|
LL | fn cmse_call_ptr(f: extern "C-cmse-nonsecure-call" fn()) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -169,7 +170,7 @@ LL | fn cmse_call_ptr(f: extern "C-cmse-nonsecure-call" fn()) {
= note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
warning: the calling convention "C-cmse-nonsecure-entry" is not supported on this target
--> $DIR/unsupported.rs:159:22
--> $DIR/unsupported.rs:161:22
|
LL | fn cmse_entry_ptr(f: extern "C-cmse-nonsecure-entry" fn()) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -178,7 +179,7 @@ LL | fn cmse_entry_ptr(f: extern "C-cmse-nonsecure-entry" fn()) {
= note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
error[E0570]: `"C-cmse-nonsecure-entry"` is not a supported ABI for the current target
--> $DIR/unsupported.rs:164:1
--> $DIR/unsupported.rs:166:1
|
LL | extern "C-cmse-nonsecure-entry" {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -234,7 +235,7 @@ LL | extern "stdcall" fn stdcall() {}
= help: if you need `extern "stdcall"` on win32 and `extern "C"` everywhere else, use `extern "system"`
warning: use of calling convention not supported on this target
--> $DIR/unsupported.rs:126:1
--> $DIR/unsupported.rs:128:1
|
LL | extern "cdecl" fn cdecl() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^
@ -244,13 +245,13 @@ LL | extern "cdecl" fn cdecl() {}
= help: use `extern "C"` instead
error[E0570]: `"vectorcall"` is not a supported ABI for the current target
--> $DIR/unsupported.rs:141:1
--> $DIR/unsupported.rs:143:1
|
LL | extern "vectorcall" fn vectorcall() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0570]: `"C-cmse-nonsecure-entry"` is not a supported ABI for the current target
--> $DIR/unsupported.rs:157:1
--> $DIR/unsupported.rs:159:1
|
LL | extern "C-cmse-nonsecure-entry" fn cmse_entry() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -336,19 +337,20 @@ LL | fn stdcall_ptr(f: extern "stdcall" fn()) {
= note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
Future breakage diagnostic:
warning: the calling convention "cdecl" is not supported on this target
--> $DIR/unsupported.rs:129:17
warning: use of calling convention not supported on this target
--> $DIR/unsupported.rs:131:17
|
LL | fn cdecl_ptr(f: extern "cdecl" fn()) {
| ^^^^^^^^^^^^^^^^^^^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
= note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
= note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
= help: use `extern "C"` instead
= note: `#[warn(unsupported_calling_conventions)]` on by default
Future breakage diagnostic:
warning: use of calling convention not supported on this target
--> $DIR/unsupported.rs:134:1
--> $DIR/unsupported.rs:136:1
|
LL | extern "cdecl" {}
| ^^^^^^^^^^^^^^^^^
@ -360,7 +362,7 @@ LL | extern "cdecl" {}
Future breakage diagnostic:
warning: use of calling convention not supported on this target
--> $DIR/unsupported.rs:137:1
--> $DIR/unsupported.rs:139:1
|
LL | extern "cdecl-unwind" {}
| ^^^^^^^^^^^^^^^^^^^^^^^^
@ -372,7 +374,7 @@ LL | extern "cdecl-unwind" {}
Future breakage diagnostic:
warning: the calling convention "vectorcall" is not supported on this target
--> $DIR/unsupported.rs:143:22
--> $DIR/unsupported.rs:145:22
|
LL | fn vectorcall_ptr(f: extern "vectorcall" fn()) {
| ^^^^^^^^^^^^^^^^^^^^^^^^
@ -383,7 +385,7 @@ LL | fn vectorcall_ptr(f: extern "vectorcall" fn()) {
Future breakage diagnostic:
warning: the calling convention "C-cmse-nonsecure-call" is not supported on this target
--> $DIR/unsupported.rs:151:21
--> $DIR/unsupported.rs:153:21
|
LL | fn cmse_call_ptr(f: extern "C-cmse-nonsecure-call" fn()) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -394,7 +396,7 @@ LL | fn cmse_call_ptr(f: extern "C-cmse-nonsecure-call" fn()) {
Future breakage diagnostic:
warning: the calling convention "C-cmse-nonsecure-entry" is not supported on this target
--> $DIR/unsupported.rs:159:22
--> $DIR/unsupported.rs:161:22
|
LL | fn cmse_entry_ptr(f: extern "C-cmse-nonsecure-entry" fn()) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -405,7 +407,7 @@ LL | fn cmse_entry_ptr(f: extern "C-cmse-nonsecure-entry" fn()) {
Future breakage diagnostic:
warning: use of calling convention not supported on this target
--> $DIR/unsupported.rs:126:1
--> $DIR/unsupported.rs:128:1
|
LL | extern "cdecl" fn cdecl() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^

View file

@ -110,8 +110,10 @@ extern "stdcall" fn stdcall() {}
//[x64_win]~^^ WARN unsupported_calling_conventions
//[x64_win]~^^^ WARN this was previously accepted
fn stdcall_ptr(f: extern "stdcall" fn()) {
//[x64,x64_win,arm,aarch64,riscv32,riscv64]~^ WARN unsupported_fn_ptr_calling_conventions
//[x64,x64_win,arm,aarch64,riscv32,riscv64]~^^ WARN this was previously accepted
//[x64_win]~^ WARN unsupported_calling_conventions
//[x64_win]~| WARN this was previously accepted
//[x64,arm,aarch64,riscv32,riscv64]~^^^ WARN unsupported_fn_ptr_calling_conventions
//[x64,arm,aarch64,riscv32,riscv64]~| WARN this was previously accepted
f()
}
extern "stdcall" {}
@ -127,7 +129,7 @@ extern "cdecl" fn cdecl() {}
//[x64,x64_win,arm,aarch64,riscv32,riscv64]~^ WARN unsupported_calling_conventions
//[x64,x64_win,arm,aarch64,riscv32,riscv64]~^^ WARN this was previously accepted
fn cdecl_ptr(f: extern "cdecl" fn()) {
//[x64,x64_win,arm,aarch64,riscv32,riscv64]~^ WARN unsupported_fn_ptr_calling_conventions
//[x64,x64_win,arm,aarch64,riscv32,riscv64]~^ WARN unsupported_calling_conventions
//[x64,x64_win,arm,aarch64,riscv32,riscv64]~^^ WARN this was previously accepted
f()
}

View file

@ -99,7 +99,7 @@ LL | fn stdcall_ptr(f: extern "stdcall" fn()) {
= note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
error[E0570]: `"stdcall"` is not a supported ABI for the current target
--> $DIR/unsupported.rs:117:1
--> $DIR/unsupported.rs:119:1
|
LL | extern "stdcall" {}
| ^^^^^^^^^^^^^^^^^^^
@ -107,35 +107,36 @@ LL | extern "stdcall" {}
= help: if you need `extern "stdcall"` on win32 and `extern "C"` everywhere else, use `extern "system"`
error[E0570]: `"stdcall-unwind"` is not a supported ABI for the current target
--> $DIR/unsupported.rs:121:1
--> $DIR/unsupported.rs:123:1
|
LL | extern "stdcall-unwind" {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: if you need `extern "stdcall-unwind"` on win32 and `extern "C-unwind"` everywhere else, use `extern "system-unwind"`
warning: the calling convention "cdecl" is not supported on this target
--> $DIR/unsupported.rs:129:17
warning: use of calling convention not supported on this target
--> $DIR/unsupported.rs:131:17
|
LL | fn cdecl_ptr(f: extern "cdecl" fn()) {
| ^^^^^^^^^^^^^^^^^^^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
warning: use of calling convention not supported on this target
--> $DIR/unsupported.rs:134:1
|
LL | extern "cdecl" {}
| ^^^^^^^^^^^^^^^^^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
= help: use `extern "C"` instead
= note: `#[warn(unsupported_calling_conventions)]` on by default
warning: use of calling convention not supported on this target
--> $DIR/unsupported.rs:137:1
--> $DIR/unsupported.rs:136:1
|
LL | extern "cdecl" {}
| ^^^^^^^^^^^^^^^^^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
= help: use `extern "C"` instead
warning: use of calling convention not supported on this target
--> $DIR/unsupported.rs:139:1
|
LL | extern "cdecl-unwind" {}
| ^^^^^^^^^^^^^^^^^^^^^^^^
@ -145,7 +146,7 @@ LL | extern "cdecl-unwind" {}
= help: use `extern "C-unwind"` instead
warning: the calling convention "C-cmse-nonsecure-call" is not supported on this target
--> $DIR/unsupported.rs:151:21
--> $DIR/unsupported.rs:153:21
|
LL | fn cmse_call_ptr(f: extern "C-cmse-nonsecure-call" fn()) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -154,7 +155,7 @@ LL | fn cmse_call_ptr(f: extern "C-cmse-nonsecure-call" fn()) {
= note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
warning: the calling convention "C-cmse-nonsecure-entry" is not supported on this target
--> $DIR/unsupported.rs:159:22
--> $DIR/unsupported.rs:161:22
|
LL | fn cmse_entry_ptr(f: extern "C-cmse-nonsecure-entry" fn()) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -163,7 +164,7 @@ LL | fn cmse_entry_ptr(f: extern "C-cmse-nonsecure-entry" fn()) {
= note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
error[E0570]: `"C-cmse-nonsecure-entry"` is not a supported ABI for the current target
--> $DIR/unsupported.rs:164:1
--> $DIR/unsupported.rs:166:1
|
LL | extern "C-cmse-nonsecure-entry" {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -219,7 +220,7 @@ LL | extern "stdcall" fn stdcall() {}
= help: if you need `extern "stdcall"` on win32 and `extern "C"` everywhere else, use `extern "system"`
warning: use of calling convention not supported on this target
--> $DIR/unsupported.rs:126:1
--> $DIR/unsupported.rs:128:1
|
LL | extern "cdecl" fn cdecl() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^
@ -229,7 +230,7 @@ LL | extern "cdecl" fn cdecl() {}
= help: use `extern "C"` instead
error[E0570]: `"C-cmse-nonsecure-entry"` is not a supported ABI for the current target
--> $DIR/unsupported.rs:157:1
--> $DIR/unsupported.rs:159:1
|
LL | extern "C-cmse-nonsecure-entry" fn cmse_entry() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -315,19 +316,20 @@ LL | fn stdcall_ptr(f: extern "stdcall" fn()) {
= note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
Future breakage diagnostic:
warning: the calling convention "cdecl" is not supported on this target
--> $DIR/unsupported.rs:129:17
warning: use of calling convention not supported on this target
--> $DIR/unsupported.rs:131:17
|
LL | fn cdecl_ptr(f: extern "cdecl" fn()) {
| ^^^^^^^^^^^^^^^^^^^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
= note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
= note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
= help: use `extern "C"` instead
= note: `#[warn(unsupported_calling_conventions)]` on by default
Future breakage diagnostic:
warning: use of calling convention not supported on this target
--> $DIR/unsupported.rs:134:1
--> $DIR/unsupported.rs:136:1
|
LL | extern "cdecl" {}
| ^^^^^^^^^^^^^^^^^
@ -339,7 +341,7 @@ LL | extern "cdecl" {}
Future breakage diagnostic:
warning: use of calling convention not supported on this target
--> $DIR/unsupported.rs:137:1
--> $DIR/unsupported.rs:139:1
|
LL | extern "cdecl-unwind" {}
| ^^^^^^^^^^^^^^^^^^^^^^^^
@ -351,7 +353,7 @@ LL | extern "cdecl-unwind" {}
Future breakage diagnostic:
warning: the calling convention "C-cmse-nonsecure-call" is not supported on this target
--> $DIR/unsupported.rs:151:21
--> $DIR/unsupported.rs:153:21
|
LL | fn cmse_call_ptr(f: extern "C-cmse-nonsecure-call" fn()) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -362,7 +364,7 @@ LL | fn cmse_call_ptr(f: extern "C-cmse-nonsecure-call" fn()) {
Future breakage diagnostic:
warning: the calling convention "C-cmse-nonsecure-entry" is not supported on this target
--> $DIR/unsupported.rs:159:22
--> $DIR/unsupported.rs:161:22
|
LL | fn cmse_entry_ptr(f: extern "C-cmse-nonsecure-entry" fn()) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -373,7 +375,7 @@ LL | fn cmse_entry_ptr(f: extern "C-cmse-nonsecure-entry" fn()) {
Future breakage diagnostic:
warning: use of calling convention not supported on this target
--> $DIR/unsupported.rs:126:1
--> $DIR/unsupported.rs:128:1
|
LL | extern "cdecl" fn cdecl() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^

View file

@ -89,28 +89,29 @@ error[E0570]: `"thiscall"` is not a supported ABI for the current target
LL | extern "thiscall" {}
| ^^^^^^^^^^^^^^^^^^^^
warning: the calling convention "stdcall" is not supported on this target
warning: use of calling convention not supported on this target
--> $DIR/unsupported.rs:112:19
|
LL | fn stdcall_ptr(f: extern "stdcall" fn()) {
| ^^^^^^^^^^^^^^^^^^^^^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
warning: use of calling convention not supported on this target
--> $DIR/unsupported.rs:117:1
|
LL | extern "stdcall" {}
| ^^^^^^^^^^^^^^^^^^^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
= help: if you need `extern "stdcall"` on win32 and `extern "C"` everywhere else, use `extern "system"`
= note: `#[warn(unsupported_calling_conventions)]` on by default
warning: use of calling convention not supported on this target
--> $DIR/unsupported.rs:121:1
--> $DIR/unsupported.rs:119:1
|
LL | extern "stdcall" {}
| ^^^^^^^^^^^^^^^^^^^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
= help: if you need `extern "stdcall"` on win32 and `extern "C"` everywhere else, use `extern "system"`
warning: use of calling convention not supported on this target
--> $DIR/unsupported.rs:123:1
|
LL | extern "stdcall-unwind" {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -119,17 +120,18 @@ LL | extern "stdcall-unwind" {}
= note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
= help: if you need `extern "stdcall-unwind"` on win32 and `extern "C-unwind"` everywhere else, use `extern "system-unwind"`
warning: the calling convention "cdecl" is not supported on this target
--> $DIR/unsupported.rs:129:17
warning: use of calling convention not supported on this target
--> $DIR/unsupported.rs:131:17
|
LL | fn cdecl_ptr(f: extern "cdecl" fn()) {
| ^^^^^^^^^^^^^^^^^^^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
= note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
= help: use `extern "C"` instead
warning: use of calling convention not supported on this target
--> $DIR/unsupported.rs:134:1
--> $DIR/unsupported.rs:136:1
|
LL | extern "cdecl" {}
| ^^^^^^^^^^^^^^^^^
@ -139,7 +141,7 @@ LL | extern "cdecl" {}
= help: use `extern "C"` instead
warning: use of calling convention not supported on this target
--> $DIR/unsupported.rs:137:1
--> $DIR/unsupported.rs:139:1
|
LL | extern "cdecl-unwind" {}
| ^^^^^^^^^^^^^^^^^^^^^^^^
@ -149,7 +151,7 @@ LL | extern "cdecl-unwind" {}
= help: use `extern "C-unwind"` instead
warning: the calling convention "C-cmse-nonsecure-call" is not supported on this target
--> $DIR/unsupported.rs:151:21
--> $DIR/unsupported.rs:153:21
|
LL | fn cmse_call_ptr(f: extern "C-cmse-nonsecure-call" fn()) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -158,7 +160,7 @@ LL | fn cmse_call_ptr(f: extern "C-cmse-nonsecure-call" fn()) {
= note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
warning: the calling convention "C-cmse-nonsecure-entry" is not supported on this target
--> $DIR/unsupported.rs:159:22
--> $DIR/unsupported.rs:161:22
|
LL | fn cmse_entry_ptr(f: extern "C-cmse-nonsecure-entry" fn()) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -167,13 +169,13 @@ LL | fn cmse_entry_ptr(f: extern "C-cmse-nonsecure-entry" fn()) {
= note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
error[E0570]: `"C-cmse-nonsecure-entry"` is not a supported ABI for the current target
--> $DIR/unsupported.rs:164:1
--> $DIR/unsupported.rs:166:1
|
LL | extern "C-cmse-nonsecure-entry" {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
warning: use of calling convention not supported on this target
--> $DIR/unsupported.rs:169:1
--> $DIR/unsupported.rs:171:1
|
LL | extern "cdecl" {}
| ^^^^^^^^^^^^^^^^^
@ -235,7 +237,7 @@ LL | extern "stdcall" fn stdcall() {}
= help: if you need `extern "stdcall"` on win32 and `extern "C"` everywhere else, use `extern "system"`
warning: use of calling convention not supported on this target
--> $DIR/unsupported.rs:126:1
--> $DIR/unsupported.rs:128:1
|
LL | extern "cdecl" fn cdecl() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^
@ -245,7 +247,7 @@ LL | extern "cdecl" fn cdecl() {}
= help: use `extern "C"` instead
error[E0570]: `"C-cmse-nonsecure-entry"` is not a supported ABI for the current target
--> $DIR/unsupported.rs:157:1
--> $DIR/unsupported.rs:159:1
|
LL | extern "C-cmse-nonsecure-entry" fn cmse_entry() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -320,19 +322,20 @@ LL | fn thiscall_ptr(f: extern "thiscall" fn()) {
= note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
Future breakage diagnostic:
warning: the calling convention "stdcall" is not supported on this target
warning: use of calling convention not supported on this target
--> $DIR/unsupported.rs:112:19
|
LL | fn stdcall_ptr(f: extern "stdcall" fn()) {
| ^^^^^^^^^^^^^^^^^^^^^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
= note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
= note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
= help: if you need `extern "stdcall"` on win32 and `extern "C"` everywhere else, use `extern "system"`
= note: `#[warn(unsupported_calling_conventions)]` on by default
Future breakage diagnostic:
warning: use of calling convention not supported on this target
--> $DIR/unsupported.rs:117:1
--> $DIR/unsupported.rs:119:1
|
LL | extern "stdcall" {}
| ^^^^^^^^^^^^^^^^^^^
@ -344,7 +347,7 @@ LL | extern "stdcall" {}
Future breakage diagnostic:
warning: use of calling convention not supported on this target
--> $DIR/unsupported.rs:121:1
--> $DIR/unsupported.rs:123:1
|
LL | extern "stdcall-unwind" {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -355,19 +358,20 @@ LL | extern "stdcall-unwind" {}
= note: `#[warn(unsupported_calling_conventions)]` on by default
Future breakage diagnostic:
warning: the calling convention "cdecl" is not supported on this target
--> $DIR/unsupported.rs:129:17
warning: use of calling convention not supported on this target
--> $DIR/unsupported.rs:131:17
|
LL | fn cdecl_ptr(f: extern "cdecl" fn()) {
| ^^^^^^^^^^^^^^^^^^^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
= note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
= note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
= help: use `extern "C"` instead
= note: `#[warn(unsupported_calling_conventions)]` on by default
Future breakage diagnostic:
warning: use of calling convention not supported on this target
--> $DIR/unsupported.rs:134:1
--> $DIR/unsupported.rs:136:1
|
LL | extern "cdecl" {}
| ^^^^^^^^^^^^^^^^^
@ -379,7 +383,7 @@ LL | extern "cdecl" {}
Future breakage diagnostic:
warning: use of calling convention not supported on this target
--> $DIR/unsupported.rs:137:1
--> $DIR/unsupported.rs:139:1
|
LL | extern "cdecl-unwind" {}
| ^^^^^^^^^^^^^^^^^^^^^^^^
@ -391,7 +395,7 @@ LL | extern "cdecl-unwind" {}
Future breakage diagnostic:
warning: the calling convention "C-cmse-nonsecure-call" is not supported on this target
--> $DIR/unsupported.rs:151:21
--> $DIR/unsupported.rs:153:21
|
LL | fn cmse_call_ptr(f: extern "C-cmse-nonsecure-call" fn()) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -402,7 +406,7 @@ LL | fn cmse_call_ptr(f: extern "C-cmse-nonsecure-call" fn()) {
Future breakage diagnostic:
warning: the calling convention "C-cmse-nonsecure-entry" is not supported on this target
--> $DIR/unsupported.rs:159:22
--> $DIR/unsupported.rs:161:22
|
LL | fn cmse_entry_ptr(f: extern "C-cmse-nonsecure-entry" fn()) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -413,7 +417,7 @@ LL | fn cmse_entry_ptr(f: extern "C-cmse-nonsecure-entry" fn()) {
Future breakage diagnostic:
warning: use of calling convention not supported on this target
--> $DIR/unsupported.rs:169:1
--> $DIR/unsupported.rs:171:1
|
LL | extern "cdecl" {}
| ^^^^^^^^^^^^^^^^^
@ -437,7 +441,7 @@ LL | extern "stdcall" fn stdcall() {}
Future breakage diagnostic:
warning: use of calling convention not supported on this target
--> $DIR/unsupported.rs:126:1
--> $DIR/unsupported.rs:128:1
|
LL | extern "cdecl" fn cdecl() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^