@@ -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 ,
@@ -5061,74 +5060,6 @@ declare_lint! {
5061
5060
crate_level_only
5062
5061
}
5063
5062
5064
- declare_lint ! {
5065
- /// The `abi_unsupported_vector_types` lint detects function definitions and calls
5066
- /// whose ABI depends on enabling certain target features, but those features are not enabled.
5067
- ///
5068
- /// ### Example
5069
- ///
5070
- /// ```rust,ignore (fails on non-x86_64)
5071
- /// extern "C" fn missing_target_feature(_: std::arch::x86_64::__m256) {
5072
- /// todo!()
5073
- /// }
5074
- ///
5075
- /// #[target_feature(enable = "avx")]
5076
- /// unsafe extern "C" fn with_target_feature(_: std::arch::x86_64::__m256) {
5077
- /// todo!()
5078
- /// }
5079
- ///
5080
- /// fn main() {
5081
- /// let v = unsafe { std::mem::zeroed() };
5082
- /// unsafe { with_target_feature(v); }
5083
- /// }
5084
- /// ```
5085
- ///
5086
- /// This will produce:
5087
- ///
5088
- /// ```text
5089
- /// warning: ABI error: this function call uses a avx vector type, which is not enabled in the caller
5090
- /// --> lint_example.rs:18:12
5091
- /// |
5092
- /// | unsafe { with_target_feature(v); }
5093
- /// | ^^^^^^^^^^^^^^^^^^^^^^ function called here
5094
- /// |
5095
- /// = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
5096
- /// = note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
5097
- /// = help: consider enabling it globally (-C target-feature=+avx) or locally (#[target_feature(enable="avx")])
5098
- /// = note: `#[warn(abi_unsupported_vector_types)]` on by default
5099
- ///
5100
- ///
5101
- /// warning: ABI error: this function definition uses a avx vector type, which is not enabled
5102
- /// --> lint_example.rs:3:1
5103
- /// |
5104
- /// | pub extern "C" fn with_target_feature(_: std::arch::x86_64::__m256) {
5105
- /// | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
5106
- /// |
5107
- /// = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
5108
- /// = note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
5109
- /// = help: consider enabling it globally (-C target-feature=+avx) or locally (#[target_feature(enable="avx")])
5110
- /// ```
5111
- ///
5112
- ///
5113
- ///
5114
- /// ### Explanation
5115
- ///
5116
- /// The C ABI for `__m256` requires the value to be passed in an AVX register,
5117
- /// which is only possible when the `avx` target feature is enabled.
5118
- /// Therefore, `missing_target_feature` cannot be compiled without that target feature.
5119
- /// A similar (but complementary) message is triggered when `with_target_feature` is called
5120
- /// by a function that does not enable the `avx` target feature.
5121
- ///
5122
- /// Note that this lint is very similar to the `-Wpsabi` warning in `gcc`/`clang`.
5123
- pub ABI_UNSUPPORTED_VECTOR_TYPES ,
5124
- Warn ,
5125
- "this function call or definition uses a vector type which is not enabled" ,
5126
- @future_incompatible = FutureIncompatibleInfo {
5127
- reason: FutureIncompatibilityReason :: FutureReleaseErrorReportInDeps ,
5128
- reference: "issue #116558 <https://github.com/rust-lang/rust/issues/116558>" ,
5129
- } ;
5130
- }
5131
-
5132
5063
declare_lint ! {
5133
5064
/// The `wasm_c_abi` lint detects usage of the `extern "C"` ABI of wasm that is affected
5134
5065
/// by a planned ABI change that has the goal of aligning Rust with the standard C ABI
0 commit comments