@@ -16,7 +16,6 @@ declare_lint_pass! {
16
16
/// that are used by other parts of the compiler.
17
17
HardwiredLints => [
18
18
// tidy-alphabetical-start
19
- ABI_UNSUPPORTED_VECTOR_TYPES ,
20
19
ABSOLUTE_PATHS_NOT_STARTING_WITH_CRATE ,
21
20
AMBIGUOUS_ASSOCIATED_ITEMS ,
22
21
AMBIGUOUS_GLOB_IMPORTS ,
@@ -5027,74 +5026,6 @@ declare_lint! {
5027
5026
crate_level_only
5028
5027
}
5029
5028
5030
- declare_lint ! {
5031
- /// The `abi_unsupported_vector_types` lint detects function definitions and calls
5032
- /// whose ABI depends on enabling certain target features, but those features are not enabled.
5033
- ///
5034
- /// ### Example
5035
- ///
5036
- /// ```rust,ignore (fails on non-x86_64)
5037
- /// extern "C" fn missing_target_feature(_: std::arch::x86_64::__m256) {
5038
- /// todo!()
5039
- /// }
5040
- ///
5041
- /// #[target_feature(enable = "avx")]
5042
- /// unsafe extern "C" fn with_target_feature(_: std::arch::x86_64::__m256) {
5043
- /// todo!()
5044
- /// }
5045
- ///
5046
- /// fn main() {
5047
- /// let v = unsafe { std::mem::zeroed() };
5048
- /// unsafe { with_target_feature(v); }
5049
- /// }
5050
- /// ```
5051
- ///
5052
- /// This will produce:
5053
- ///
5054
- /// ```text
5055
- /// warning: ABI error: this function call uses a avx vector type, which is not enabled in the caller
5056
- /// --> lint_example.rs:18:12
5057
- /// |
5058
- /// | unsafe { with_target_feature(v); }
5059
- /// | ^^^^^^^^^^^^^^^^^^^^^^ function called here
5060
- /// |
5061
- /// = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
5062
- /// = note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
5063
- /// = help: consider enabling it globally (-C target-feature=+avx) or locally (#[target_feature(enable="avx")])
5064
- /// = note: `#[warn(abi_unsupported_vector_types)]` on by default
5065
- ///
5066
- ///
5067
- /// warning: ABI error: this function definition uses a avx vector type, which is not enabled
5068
- /// --> lint_example.rs:3:1
5069
- /// |
5070
- /// | pub extern "C" fn with_target_feature(_: std::arch::x86_64::__m256) {
5071
- /// | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
5072
- /// |
5073
- /// = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
5074
- /// = note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
5075
- /// = help: consider enabling it globally (-C target-feature=+avx) or locally (#[target_feature(enable="avx")])
5076
- /// ```
5077
- ///
5078
- ///
5079
- ///
5080
- /// ### Explanation
5081
- ///
5082
- /// The C ABI for `__m256` requires the value to be passed in an AVX register,
5083
- /// which is only possible when the `avx` target feature is enabled.
5084
- /// Therefore, `missing_target_feature` cannot be compiled without that target feature.
5085
- /// A similar (but complementary) message is triggered when `with_target_feature` is called
5086
- /// by a function that does not enable the `avx` target feature.
5087
- ///
5088
- /// Note that this lint is very similar to the `-Wpsabi` warning in `gcc`/`clang`.
5089
- pub ABI_UNSUPPORTED_VECTOR_TYPES ,
5090
- Warn ,
5091
- "this function call or definition uses a vector type which is not enabled" ,
5092
- @future_incompatible = FutureIncompatibleInfo {
5093
- reason: FutureIncompatibilityReason :: FutureReleaseErrorReportInDeps ,
5094
- reference: "issue #116558 <https://github.com/rust-lang/rust/issues/116558>" ,
5095
- } ;
5096
- }
5097
-
5098
5029
declare_lint ! {
5099
5030
/// The `wasm_c_abi` lint detects usage of the `extern "C"` ABI of wasm that is affected
5100
5031
/// by a planned ABI change that has the goal of aligning Rust with the standard C ABI
0 commit comments