rust/compiler/rustc_middle/src
Luca Versari c8b76bcf58 Emit warning when calling/declaring functions with unavailable vectors.
On some architectures, vector types may have a different ABI depending
on whether the relevant target features are enabled. (The ABI when the
feature is disabled is often not specified, but LLVM implements some
de-facto ABI.)

As discussed in rust-lang/lang-team#235, this turns out to very easily
lead to unsound code.

This commit makes it a post-monomorphization future-incompat warning to
declare or call functions using those vector types in a context in which
the corresponding target features are disabled, if using an ABI for
which the difference is relevant. This ensures that these functions are
always called with a consistent ABI.

See the [nomination comment](https://github.com/rust-lang/rust/pull/127731#issuecomment-2288558187)
for more discussion.

Part of #116558
2024-11-01 22:24:35 +01:00
..
dep_graph Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
hir tcx.is_const_fn doesn't work the way it is described, remove it 2024-10-25 20:52:39 +02:00
hooks Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
infer Remove associated type based effects logic 2024-10-24 09:46:36 +00:00
middle Remap impl-trait lifetimes on HIR instead of AST lowering. 2024-10-30 16:18:50 +00:00
mir Rollup merge of #132168 - fee1-dead-contrib:fxclean, r=compiler-errors 2024-10-26 06:29:48 +02:00
query Emit warning when calling/declaring functions with unavailable vectors. 2024-11-01 22:24:35 +01:00
thir various fixes for naked_asm! implementation 2024-10-06 19:00:09 +02:00
traits Remove ObligationCause::span() method 2024-10-27 23:54:06 +00:00
ty Auto merge of #131186 - compiler-errors:precise-capturing-borrowck, r=estebank 2024-10-31 03:36:06 +00:00
util Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
arena.rs compiler: Rename LayoutS to LayoutData 2024-10-27 22:31:14 -07:00
error.rs Use bool in favor of Option<()> for diagnostics 2024-08-21 01:31:11 -04:00
lib.rs move strict provenance lints to new feature gate, remove old feature gates 2024-10-21 15:22:17 +01:00
lint.rs Remove module passes filtering 2024-10-19 16:20:51 +02:00
macros.rs Improve const traits diagnostics for new desugaring 2024-10-02 19:45:17 +08:00
metadata.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
tests.rs Give an item related to issue 27438 a more meaningful name 2024-04-30 22:27:19 +02:00
thir.rs various fixes for naked_asm! implementation 2024-10-06 19:00:09 +02:00
values.rs only query params_in_repr if def kind is adt 2024-10-02 17:36:31 +08:00