modified lint to work with MIR
Working with MIR let's us exclude expressions like `&fn_name as &dyn Something` and `(&fn_name)()`. Also added ABI, unsafety and whether a function is variadic in the lint suggestion, included the `&` in the span of the lint and updated the test.
This commit is contained in:
@@ -27,6 +27,7 @@ pub mod dest_prop;
|
||||
pub mod dump_mir;
|
||||
pub mod early_otherwise_branch;
|
||||
pub mod elaborate_drops;
|
||||
pub mod function_references;
|
||||
pub mod generator;
|
||||
pub mod inline;
|
||||
pub mod instcombine;
|
||||
@@ -266,6 +267,7 @@ fn mir_const<'tcx>(
|
||||
// MIR-level lints.
|
||||
&check_packed_ref::CheckPackedRef,
|
||||
&check_const_item_mutation::CheckConstItemMutation,
|
||||
&function_references::FunctionReferences,
|
||||
// What we need to do constant evaluation.
|
||||
&simplify::SimplifyCfg::new("initial"),
|
||||
&rustc_peek::SanityCheck,
|
||||
|
||||
Reference in New Issue
Block a user