Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
5fef462
Add 1.82 release notes
Mark-Simulacrum Oct 2, 2024
a0e687f
Remove unnecessary sorts in `rustc_hir_analysis`.
ismailarilik Oct 6, 2024
005a629
re-sync with latest tracking issue changes
Mark-Simulacrum Oct 7, 2024
cae29b2
Import another update
Mark-Simulacrum Oct 12, 2024
276d112
Add stabilized APIs
Mark-Simulacrum Oct 12, 2024
5b2985f
Add explicit link to PR
Mark-Simulacrum Oct 12, 2024
feecfaa
Fix bug where `option_env!` would return `None` when env var is prese…
beetrees Mar 18, 2024
b6b6c12
Update lint message for ABI not supported
tdittr Oct 14, 2024
c6e1fbf
Fix up-to-date checking for run-make tests
Zalathar Oct 14, 2024
7500e09
Move trait bound modifiers into hir::PolyTraitRef
compiler-errors Oct 13, 2024
95dba28
Move trait bound modifiers into ast::PolyTraitRef
compiler-errors Oct 13, 2024
eb6062c
Resolved python deprecation warning in publish_toolstate.py
alex Oct 14, 2024
b73e613
De-duplicate and move `adjust_nan` to `InterpCx`
eduardosm Oct 14, 2024
4e438f7
Fix two const-hacks
GKFX Oct 14, 2024
029a881
Make some float methods unstable `const fn`
eduardosm Oct 14, 2024
b4a0529
Rollup merge of #122670 - beetrees:non-unicode-option-env-error, r=co…
matthiaskrgr Oct 14, 2024
628c9ab
Rollup merge of #130568 - eduardosm:const-float-methods, r=RalfJung,t…
matthiaskrgr Oct 14, 2024
8d4befd
Rollup merge of #131137 - Mark-Simulacrum:relnotes, r=cuviper
matthiaskrgr Oct 14, 2024
4a954da
Rollup merge of #131328 - ismailarilik:remove-unnecessary-sorts-in-ru…
matthiaskrgr Oct 14, 2024
32beeaf
Rollup merge of #131652 - compiler-errors:modifiers, r=Nadrieril,jiey…
matthiaskrgr Oct 14, 2024
344a4ad
Rollup merge of #131675 - tdittr:update-unsupported-abi-message, r=co…
matthiaskrgr Oct 14, 2024
ba74130
Rollup merge of #131681 - Zalathar:fix-run-make-stamp, r=jieyouxu
matthiaskrgr Oct 14, 2024
5960708
Rollup merge of #131703 - alex:patch-1, r=Kobzol
matthiaskrgr Oct 14, 2024
2fa07c7
Rollup merge of #131706 - GKFX:fix-const-hacks, r=tgross35
matthiaskrgr Oct 14, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update lint message for ABI not supported
  • Loading branch information
tdittr committed Oct 14, 2024
commit b6b6c12819bbffca3aa75298afb79cf1a70e0312
6 changes: 3 additions & 3 deletions compiler/rustc_hir_analysis/src/check/check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ pub fn check_abi_fn_ptr(tcx: TyCtxt<'_>, hir_id: hir::HirId, span: Span, abi: Ab
Some(true) => (),
Some(false) | None => {
tcx.node_span_lint(UNSUPPORTED_FN_PTR_CALLING_CONVENTIONS, hir_id, span, |lint| {
lint.primary_message(
"use of calling convention not supported on this target on function pointer",
);
lint.primary_message(format!(
"the calling convention {abi} is not supported on this target"
));
});
}
}
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_lint_defs/src/builtin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3859,7 +3859,7 @@ declare_lint! {
/// This will produce:
///
/// ```text
/// warning: use of calling convention not supported on this target on function pointer
/// warning: the calling convention `"stdcall"` is not supported on this target
/// --> $DIR/unsupported.rs:34:15
/// |
/// LL | fn stdcall_ptr(f: extern "stdcall" fn()) {
Expand Down
20 changes: 10 additions & 10 deletions tests/ui/abi/unsupported.aarch64.stderr
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
warning: use of calling convention not supported on this target on function pointer
warning: the calling convention "ptx-kernel" is not supported on this target
--> $DIR/unsupported.rs:35:15
|
LL | fn ptx_ptr(f: extern "ptx-kernel" fn()) {
Expand All @@ -14,7 +14,7 @@ error[E0570]: `"ptx-kernel"` is not a supported ABI for the current target
LL | extern "ptx-kernel" {}
| ^^^^^^^^^^^^^^^^^^^^^^

warning: use of calling convention not supported on this target on function pointer
warning: the calling convention "aapcs" is not supported on this target
--> $DIR/unsupported.rs:49:17
|
LL | fn aapcs_ptr(f: extern "aapcs" fn()) {
Expand All @@ -29,7 +29,7 @@ error[E0570]: `"aapcs"` is not a supported ABI for the current target
LL | extern "aapcs" {}
| ^^^^^^^^^^^^^^^^^

warning: use of calling convention not supported on this target on function pointer
warning: the calling convention "msp430-interrupt" is not supported on this target
--> $DIR/unsupported.rs:71:18
|
LL | fn msp430_ptr(f: extern "msp430-interrupt" fn()) {
Expand All @@ -44,7 +44,7 @@ error[E0570]: `"msp430-interrupt"` is not a supported ABI for the current target
LL | extern "msp430-interrupt" {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

warning: use of calling convention not supported on this target on function pointer
warning: the calling convention "avr-interrupt" is not supported on this target
--> $DIR/unsupported.rs:81:15
|
LL | fn avr_ptr(f: extern "avr-interrupt" fn()) {
Expand All @@ -59,7 +59,7 @@ error[E0570]: `"avr-interrupt"` is not a supported ABI for the current target
LL | extern "avr-interrupt" {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^

warning: use of calling convention not supported on this target on function pointer
warning: the calling convention "riscv-interrupt-m" is not supported on this target
--> $DIR/unsupported.rs:94:17
|
LL | fn riscv_ptr(f: extern "riscv-interrupt-m" fn()) {
Expand All @@ -74,7 +74,7 @@ error[E0570]: `"riscv-interrupt-m"` is not a supported ABI for the current targe
LL | extern "riscv-interrupt-m" {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

warning: use of calling convention not supported on this target on function pointer
warning: the calling convention "x86-interrupt" is not supported on this target
--> $DIR/unsupported.rs:116:15
|
LL | fn x86_ptr(f: extern "x86-interrupt" fn()) {
Expand All @@ -89,7 +89,7 @@ error[E0570]: `"x86-interrupt"` is not a supported ABI for the current target
LL | extern "x86-interrupt" {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^

warning: use of calling convention not supported on this target on function pointer
warning: the calling convention "thiscall" is not supported on this target
--> $DIR/unsupported.rs:139:20
|
LL | fn thiscall_ptr(f: extern "thiscall" fn()) {
Expand All @@ -104,7 +104,7 @@ error[E0570]: `"thiscall"` is not a supported ABI for the current target
LL | extern "thiscall" {}
| ^^^^^^^^^^^^^^^^^^^^

warning: use of calling convention not supported on this target on function pointer
warning: the calling convention "stdcall" is not supported on this target
--> $DIR/unsupported.rs:170:19
|
LL | fn stdcall_ptr(f: extern "stdcall" fn()) {
Expand All @@ -123,7 +123,7 @@ LL | extern "stdcall" {}
= note: for more information, see issue #87678 <https://github.com/rust-lang/rust/issues/87678>
= note: `#[warn(unsupported_calling_conventions)]` on by default

warning: use of calling convention not supported on this target on function pointer
warning: the calling convention "C-cmse-nonsecure-call" is not supported on this target
--> $DIR/unsupported.rs:195:21
|
LL | fn cmse_call_ptr(f: extern "C-cmse-nonsecure-call" fn()) {
Expand All @@ -132,7 +132,7 @@ LL | fn cmse_call_ptr(f: extern "C-cmse-nonsecure-call" 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 on function pointer
warning: the calling convention "C-cmse-nonsecure-entry" is not supported on this target
--> $DIR/unsupported.rs:203:22
|
LL | fn cmse_entry_ptr(f: extern "C-cmse-nonsecure-entry" fn()) {
Expand Down
18 changes: 9 additions & 9 deletions tests/ui/abi/unsupported.arm.stderr
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
warning: use of calling convention not supported on this target on function pointer
warning: the calling convention "ptx-kernel" is not supported on this target
--> $DIR/unsupported.rs:35:15
|
LL | fn ptx_ptr(f: extern "ptx-kernel" fn()) {
Expand All @@ -14,7 +14,7 @@ error[E0570]: `"ptx-kernel"` is not a supported ABI for the current target
LL | extern "ptx-kernel" {}
| ^^^^^^^^^^^^^^^^^^^^^^

warning: use of calling convention not supported on this target on function pointer
warning: the calling convention "msp430-interrupt" is not supported on this target
--> $DIR/unsupported.rs:71:18
|
LL | fn msp430_ptr(f: extern "msp430-interrupt" fn()) {
Expand All @@ -29,7 +29,7 @@ error[E0570]: `"msp430-interrupt"` is not a supported ABI for the current target
LL | extern "msp430-interrupt" {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

warning: use of calling convention not supported on this target on function pointer
warning: the calling convention "avr-interrupt" is not supported on this target
--> $DIR/unsupported.rs:81:15
|
LL | fn avr_ptr(f: extern "avr-interrupt" fn()) {
Expand All @@ -44,7 +44,7 @@ error[E0570]: `"avr-interrupt"` is not a supported ABI for the current target
LL | extern "avr-interrupt" {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^

warning: use of calling convention not supported on this target on function pointer
warning: the calling convention "riscv-interrupt-m" is not supported on this target
--> $DIR/unsupported.rs:94:17
|
LL | fn riscv_ptr(f: extern "riscv-interrupt-m" fn()) {
Expand All @@ -59,7 +59,7 @@ error[E0570]: `"riscv-interrupt-m"` is not a supported ABI for the current targe
LL | extern "riscv-interrupt-m" {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

warning: use of calling convention not supported on this target on function pointer
warning: the calling convention "x86-interrupt" is not supported on this target
--> $DIR/unsupported.rs:116:15
|
LL | fn x86_ptr(f: extern "x86-interrupt" fn()) {
Expand All @@ -74,7 +74,7 @@ error[E0570]: `"x86-interrupt"` is not a supported ABI for the current target
LL | extern "x86-interrupt" {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^

warning: use of calling convention not supported on this target on function pointer
warning: the calling convention "thiscall" is not supported on this target
--> $DIR/unsupported.rs:139:20
|
LL | fn thiscall_ptr(f: extern "thiscall" fn()) {
Expand All @@ -89,7 +89,7 @@ error[E0570]: `"thiscall"` is not a supported ABI for the current target
LL | extern "thiscall" {}
| ^^^^^^^^^^^^^^^^^^^^

warning: use of calling convention not supported on this target on function pointer
warning: the calling convention "stdcall" is not supported on this target
--> $DIR/unsupported.rs:170:19
|
LL | fn stdcall_ptr(f: extern "stdcall" fn()) {
Expand All @@ -108,7 +108,7 @@ LL | extern "stdcall" {}
= note: for more information, see issue #87678 <https://github.com/rust-lang/rust/issues/87678>
= note: `#[warn(unsupported_calling_conventions)]` on by default

warning: use of calling convention not supported on this target on function pointer
warning: the calling convention "C-cmse-nonsecure-call" is not supported on this target
--> $DIR/unsupported.rs:195:21
|
LL | fn cmse_call_ptr(f: extern "C-cmse-nonsecure-call" fn()) {
Expand All @@ -117,7 +117,7 @@ LL | fn cmse_call_ptr(f: extern "C-cmse-nonsecure-call" 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 on function pointer
warning: the calling convention "C-cmse-nonsecure-entry" is not supported on this target
--> $DIR/unsupported.rs:203:22
|
LL | fn cmse_entry_ptr(f: extern "C-cmse-nonsecure-entry" fn()) {
Expand Down
14 changes: 7 additions & 7 deletions tests/ui/abi/unsupported.i686.stderr
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
warning: use of calling convention not supported on this target on function pointer
warning: the calling convention "ptx-kernel" is not supported on this target
--> $DIR/unsupported.rs:35:15
|
LL | fn ptx_ptr(f: extern "ptx-kernel" fn()) {
Expand All @@ -14,7 +14,7 @@ error[E0570]: `"ptx-kernel"` is not a supported ABI for the current target
LL | extern "ptx-kernel" {}
| ^^^^^^^^^^^^^^^^^^^^^^

warning: use of calling convention not supported on this target on function pointer
warning: the calling convention "aapcs" is not supported on this target
--> $DIR/unsupported.rs:49:17
|
LL | fn aapcs_ptr(f: extern "aapcs" fn()) {
Expand All @@ -29,7 +29,7 @@ error[E0570]: `"aapcs"` is not a supported ABI for the current target
LL | extern "aapcs" {}
| ^^^^^^^^^^^^^^^^^

warning: use of calling convention not supported on this target on function pointer
warning: the calling convention "msp430-interrupt" is not supported on this target
--> $DIR/unsupported.rs:71:18
|
LL | fn msp430_ptr(f: extern "msp430-interrupt" fn()) {
Expand All @@ -44,7 +44,7 @@ error[E0570]: `"msp430-interrupt"` is not a supported ABI for the current target
LL | extern "msp430-interrupt" {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

warning: use of calling convention not supported on this target on function pointer
warning: the calling convention "avr-interrupt" is not supported on this target
--> $DIR/unsupported.rs:81:15
|
LL | fn avr_ptr(f: extern "avr-interrupt" fn()) {
Expand All @@ -59,7 +59,7 @@ error[E0570]: `"avr-interrupt"` is not a supported ABI for the current target
LL | extern "avr-interrupt" {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^

warning: use of calling convention not supported on this target on function pointer
warning: the calling convention "riscv-interrupt-m" is not supported on this target
--> $DIR/unsupported.rs:94:17
|
LL | fn riscv_ptr(f: extern "riscv-interrupt-m" fn()) {
Expand All @@ -74,7 +74,7 @@ error[E0570]: `"riscv-interrupt-m"` is not a supported ABI for the current targe
LL | extern "riscv-interrupt-m" {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

warning: use of calling convention not supported on this target on function pointer
warning: the calling convention "C-cmse-nonsecure-call" is not supported on this target
--> $DIR/unsupported.rs:195:21
|
LL | fn cmse_call_ptr(f: extern "C-cmse-nonsecure-call" fn()) {
Expand All @@ -83,7 +83,7 @@ LL | fn cmse_call_ptr(f: extern "C-cmse-nonsecure-call" 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 on function pointer
warning: the calling convention "C-cmse-nonsecure-entry" is not supported on this target
--> $DIR/unsupported.rs:203:22
|
LL | fn cmse_entry_ptr(f: extern "C-cmse-nonsecure-entry" fn()) {
Expand Down
18 changes: 9 additions & 9 deletions tests/ui/abi/unsupported.riscv32.stderr
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
warning: use of calling convention not supported on this target on function pointer
warning: the calling convention "ptx-kernel" is not supported on this target
--> $DIR/unsupported.rs:35:15
|
LL | fn ptx_ptr(f: extern "ptx-kernel" fn()) {
Expand All @@ -14,7 +14,7 @@ error[E0570]: `"ptx-kernel"` is not a supported ABI for the current target
LL | extern "ptx-kernel" {}
| ^^^^^^^^^^^^^^^^^^^^^^

warning: use of calling convention not supported on this target on function pointer
warning: the calling convention "aapcs" is not supported on this target
--> $DIR/unsupported.rs:49:17
|
LL | fn aapcs_ptr(f: extern "aapcs" fn()) {
Expand All @@ -29,7 +29,7 @@ error[E0570]: `"aapcs"` is not a supported ABI for the current target
LL | extern "aapcs" {}
| ^^^^^^^^^^^^^^^^^

warning: use of calling convention not supported on this target on function pointer
warning: the calling convention "msp430-interrupt" is not supported on this target
--> $DIR/unsupported.rs:71:18
|
LL | fn msp430_ptr(f: extern "msp430-interrupt" fn()) {
Expand All @@ -44,7 +44,7 @@ error[E0570]: `"msp430-interrupt"` is not a supported ABI for the current target
LL | extern "msp430-interrupt" {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

warning: use of calling convention not supported on this target on function pointer
warning: the calling convention "avr-interrupt" is not supported on this target
--> $DIR/unsupported.rs:81:15
|
LL | fn avr_ptr(f: extern "avr-interrupt" fn()) {
Expand All @@ -59,7 +59,7 @@ error[E0570]: `"avr-interrupt"` is not a supported ABI for the current target
LL | extern "avr-interrupt" {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^

warning: use of calling convention not supported on this target on function pointer
warning: the calling convention "x86-interrupt" is not supported on this target
--> $DIR/unsupported.rs:116:15
|
LL | fn x86_ptr(f: extern "x86-interrupt" fn()) {
Expand All @@ -74,7 +74,7 @@ error[E0570]: `"x86-interrupt"` is not a supported ABI for the current target
LL | extern "x86-interrupt" {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^

warning: use of calling convention not supported on this target on function pointer
warning: the calling convention "thiscall" is not supported on this target
--> $DIR/unsupported.rs:139:20
|
LL | fn thiscall_ptr(f: extern "thiscall" fn()) {
Expand All @@ -89,7 +89,7 @@ error[E0570]: `"thiscall"` is not a supported ABI for the current target
LL | extern "thiscall" {}
| ^^^^^^^^^^^^^^^^^^^^

warning: use of calling convention not supported on this target on function pointer
warning: the calling convention "stdcall" is not supported on this target
--> $DIR/unsupported.rs:170:19
|
LL | fn stdcall_ptr(f: extern "stdcall" fn()) {
Expand All @@ -108,7 +108,7 @@ LL | extern "stdcall" {}
= note: for more information, see issue #87678 <https://github.com/rust-lang/rust/issues/87678>
= note: `#[warn(unsupported_calling_conventions)]` on by default

warning: use of calling convention not supported on this target on function pointer
warning: the calling convention "C-cmse-nonsecure-call" is not supported on this target
--> $DIR/unsupported.rs:195:21
|
LL | fn cmse_call_ptr(f: extern "C-cmse-nonsecure-call" fn()) {
Expand All @@ -117,7 +117,7 @@ LL | fn cmse_call_ptr(f: extern "C-cmse-nonsecure-call" 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 on function pointer
warning: the calling convention "C-cmse-nonsecure-entry" is not supported on this target
--> $DIR/unsupported.rs:203:22
|
LL | fn cmse_entry_ptr(f: extern "C-cmse-nonsecure-entry" fn()) {
Expand Down
Loading