Matthias Krüger
57be141f8a
Rollup merge of #128784 - tdittr:check-abi-on-fn-ptr, r=compiler-errors
...
Check ABI target compatibility for function pointers
Tracking issue: https://github.com/rust-lang/rust/issues/130260
Related tracking issue: #87678
Compatibility of an ABI for a target was previously only performed on function definitions and `extern` blocks. This PR adds it also to function pointers to be consistent.
This might have broken some of the `tests/ui/` depending on the platform, so a try run seems like a good idea.
Also this might break existing code, because we now emit extra errors. Does this require a crater run?
# Example
```rust
// build with: --target=x86_64-unknown-linux-gnu
// These raise E0570
extern "thiscall" fn foo() {}
extern "thiscall" { fn bar() }
// This did not raise any error
fn baz(f: extern "thiscall" fn()) { f() }
```
# Open Questions
* [x] Should this report a future incompatibility warning like #87678 ?
* [ ] Is this the best place to perform the check?
2024-10-12 23:00:55 +02:00
..
2024-08-18 17:41:01 -04:00
2024-08-18 16:58:26 -04:00
2024-08-18 16:58:26 -04:00
2024-08-18 16:58:26 -04:00
2024-08-18 16:58:26 -04:00
2024-08-18 17:00:33 -04:00
2024-08-18 17:00:33 -04:00
2024-08-18 17:00:33 -04:00
2024-08-18 17:00:33 -04:00
2024-08-18 17:00:33 -04:00
2024-08-18 17:00:33 -04:00
2024-08-18 17:00:33 -04:00
2024-08-18 17:00:33 -04:00
2024-08-18 17:00:33 -04:00
2024-09-01 12:37:26 +02:00
2024-08-18 17:00:33 -04:00
2024-08-18 17:00:33 -04:00
2024-08-18 17:00:33 -04:00
2024-08-18 17:00:33 -04:00
2024-08-18 17:00:33 -04:00
2024-08-18 17:00:33 -04:00
2024-06-13 16:04:31 +02:00
2024-06-13 16:04:31 +02:00
2024-08-18 16:58:26 -04:00
2024-08-18 16:58:26 -04:00
2024-09-17 16:45:26 -07:00
2024-08-18 16:58:26 -04:00
2024-08-18 16:58:25 -04:00
2024-08-18 17:00:33 -04:00
2024-08-18 16:58:26 -04:00
2024-08-18 17:00:33 -04:00
2024-08-18 17:00:33 -04:00
2024-08-18 17:00:33 -04:00
2024-08-18 16:58:26 -04:00
2024-08-19 17:10:43 -07:00
2024-08-18 16:58:25 -04:00
2024-08-18 16:58:26 -04:00
2024-08-18 17:00:33 -04:00
2024-08-18 17:00:33 -04:00
2024-08-18 17:00:33 -04:00
2024-07-09 03:47:50 +01:00
2024-08-18 12:39:06 -04:00
2024-08-18 17:00:33 -04:00
2024-06-05 22:39:42 +01:00
2024-08-11 14:20:15 -04:00
2024-08-18 16:58:25 -04:00
2024-08-18 16:58:26 -04:00
2024-08-18 17:00:33 -04:00
2024-08-18 17:00:33 -04:00
2024-08-18 17:41:01 -04:00
2024-08-18 16:58:26 -04:00
2024-08-18 16:58:26 -04:00
2024-08-18 17:41:01 -04:00
2024-08-18 16:59:58 -04:00
2024-08-18 17:00:33 -04:00
2024-08-18 16:58:26 -04:00
2024-08-16 21:14:45 -04:00
2024-08-18 16:58:26 -04:00
2024-08-18 16:58:26 -04:00
2024-08-18 17:00:33 -04:00
2024-08-18 17:00:33 -04:00
2024-08-18 17:00:33 -04:00
2024-08-18 17:00:33 -04:00
2024-08-18 17:00:33 -04:00
2024-08-18 16:58:26 -04:00
2024-08-18 17:00:33 -04:00
2024-08-18 17:00:33 -04:00
2024-08-18 17:00:33 -04:00
2024-08-18 17:00:33 -04:00
2024-08-18 17:00:33 -04:00
2024-08-18 17:00:33 -04:00
2024-08-18 12:39:07 -04:00
2024-08-16 21:14:45 -04:00
2024-09-01 12:37:26 +02:00
2024-08-18 17:41:01 -04:00
2024-08-18 17:00:33 -04:00
2024-08-18 17:00:33 -04:00
2024-08-18 17:00:33 -04:00
2024-08-18 17:00:33 -04:00
2024-08-18 16:58:26 -04:00
2024-08-18 17:00:33 -04:00
2024-08-18 17:00:33 -04:00
2024-08-18 17:00:33 -04:00
2024-08-18 17:00:33 -04:00
2024-08-18 16:58:25 -04:00
2024-08-27 19:12:14 -04:00
2024-08-18 17:00:33 -04:00
2024-08-18 17:00:33 -04:00
2024-08-18 16:58:26 -04:00
2024-08-18 12:39:07 -04:00
2024-08-18 17:00:33 -04:00
2024-08-18 16:58:25 -04:00
2024-08-18 16:58:26 -04:00
2024-08-18 16:58:25 -04:00
2024-08-18 16:58:25 -04:00
2024-08-18 17:00:33 -04:00
2024-08-18 17:00:33 -04:00
2024-08-18 17:00:33 -04:00
2024-08-18 17:00:33 -04:00
2024-08-18 17:00:33 -04:00
2024-08-18 17:00:33 -04:00
2024-08-18 16:58:26 -04:00
2024-09-09 19:39:43 -07:00
2024-08-18 17:00:33 -04:00
2024-08-18 17:00:33 -04:00
2024-08-18 17:00:33 -04:00
2024-08-18 17:00:33 -04:00
2024-08-18 17:00:33 -04:00
2024-08-18 16:58:25 -04:00
2024-08-18 17:00:33 -04:00
2024-08-18 17:00:33 -04:00
2024-08-18 17:00:33 -04:00
2024-08-18 17:00:33 -04:00
2024-08-16 21:14:45 -04:00
2024-08-18 16:58:26 -04:00
2024-08-18 16:58:26 -04:00
2024-08-18 17:00:33 -04:00
2024-08-18 17:00:33 -04:00
2024-08-18 17:00:33 -04:00
2024-09-23 14:04:22 +02:00
2024-08-18 17:00:33 -04:00
2024-08-18 17:00:33 -04:00
2024-08-18 16:58:25 -04:00
2024-08-18 16:58:26 -04:00
2024-08-18 12:39:07 -04:00
2024-08-18 17:00:33 -04:00
2024-08-18 17:00:33 -04:00
2024-08-18 17:00:33 -04:00
2024-08-18 17:00:33 -04:00
2024-08-18 17:00:33 -04:00
2024-09-06 23:12:18 +00:00