File tree 1 file changed +12
-1
lines changed
1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -226,6 +226,11 @@ where
226
226
{
227
227
let warnings_lint_name = lint:: builtin:: WARNINGS . name ;
228
228
229
+ // Whitelist feature-gated lints to avoid feature errors when trying to
230
+ // allow all lints.
231
+ // FIXME(LeSeulArtichaut): handle feature-gated lints properly.
232
+ let unsafe_op_in_unsafe_fn_name = rustc_lint:: builtin:: UNSAFE_OP_IN_UNSAFE_FN . name ;
233
+
229
234
whitelisted_lints. push ( warnings_lint_name. to_owned ( ) ) ;
230
235
whitelisted_lints. extend ( lint_opts. iter ( ) . map ( |( lint, _) | lint) . cloned ( ) ) ;
231
236
@@ -236,7 +241,13 @@ where
236
241
} ;
237
242
238
243
let lint_opts = lints ( )
239
- . filter_map ( |lint| if lint. name == warnings_lint_name { None } else { filter_call ( lint) } )
244
+ . filter_map ( |lint| {
245
+ if lint. name == warnings_lint_name || lint. name == unsafe_op_in_unsafe_fn_name {
246
+ None
247
+ } else {
248
+ filter_call ( lint)
249
+ }
250
+ } )
240
251
. chain ( lint_opts. into_iter ( ) )
241
252
. collect :: < Vec < _ > > ( ) ;
242
253
You can’t perform that action at this time.
0 commit comments