Whitelist unsafe_op_in_unsafe_fn in rustdoc
This commit is contained in:
parent
63066c0c06
commit
db684beb4e
1 changed files with 12 additions and 1 deletions
|
|
@ -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<_>>();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue