File tree Expand file tree Collapse file tree 1 file changed +0
-21
lines changed
Expand file tree Collapse file tree 1 file changed +0
-21
lines changed Original file line number Diff line number Diff line change @@ -100,27 +100,6 @@ impl<'tcx> LateLintPass<'tcx> for NeedlessPathNew<'tcx> {
100100
101101 let parameters = sig. inputs ( ) ;
102102
103- let _bounds = tcx. param_env ( def_id) . caller_bounds ( ) ;
104- // dbg!(bounds);
105-
106- let generic_args_we_can_change: Vec < _ > = generic_args
107- . iter ( )
108- . filter_map ( |g| g. as_type ( ) )
109- // if a generic is used in multiple places, we should better not touch it,
110- // since we'd need to suggest changing both parameters that using it at once,
111- // which might not be possible
112- . filter ( |g| sig. inputs_and_output . into_iter ( ) . filter ( |i| i. contains ( * g) ) . count ( ) < 2 )
113- // don't want to mess with the output type, since that probably has some additional
114- // restrictions imposed from the outside, which we don't want to bother checking
115- . filter ( |g| !sig. output ( ) . contains ( * g) )
116- . collect ( ) ;
117- dbg ! ( & generic_args_we_can_change) ;
118-
119- if generic_args_we_can_change. is_empty ( ) {
120- // can't change anything
121- return ;
122- }
123-
124103 for ( argument, parameter) in iter:: zip ( arguments, parameters) {
125104 // we want `argument` to be `Path::new(x)`, which has one arg, x
126105 if let ExprKind :: Call ( func, [ arg] ) = argument. kind
You can’t perform that action at this time.
0 commit comments