Whitelist unsafe_op_in_unsafe_fn in rustdoc
This commit is contained in:
@@ -226,6 +226,11 @@ where
|
||||
{
|
||||
let warnings_lint_name = lint::builtin::WARNINGS.name;
|
||||
|
||||
// Whitelist feature-gated lints to avoid feature errors when trying to
|
||||
// allow all lints.
|
||||
// FIXME(LeSeulArtichaut): handle feature-gated lints properly.
|
||||
let unsafe_op_in_unsafe_fn_name = rustc_lint::builtin::UNSAFE_OP_IN_UNSAFE_FN.name;
|
||||
|
||||
whitelisted_lints.push(warnings_lint_name.to_owned());
|
||||
whitelisted_lints.extend(lint_opts.iter().map(|(lint, _)| lint).cloned());
|
||||
|
||||
@@ -236,7 +241,13 @@ where
|
||||
};
|
||||
|
||||
let lint_opts = lints()
|
||||
.filter_map(|lint| if lint.name == warnings_lint_name { None } else { filter_call(lint) })
|
||||
.filter_map(|lint| {
|
||||
if lint.name == warnings_lint_name || lint.name == unsafe_op_in_unsafe_fn_name {
|
||||
None
|
||||
} else {
|
||||
filter_call(lint)
|
||||
}
|
||||
})
|
||||
.chain(lint_opts.into_iter())
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user