File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
compiler/rustc_typeck/src Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -270,12 +270,9 @@ impl<'a> SessionDiagnostic<'a> for MissingTypeParams {
270270 err. span_label ( self . def_span , rustc_errors:: fluent:: typeck:: label) ;
271271
272272 let mut suggested = false ;
273- if let ( Some ( snippet) , true ) = (
274- self . span_snippet ,
275- // Don't suggest setting the type params if there are some already: the order is
276- // tricky to get right and the user will already know what the syntax is.
277- self . empty_generic_args ,
278- ) {
273+ // Don't suggest setting the type params if there are some already: the order is
274+ // tricky to get right and the user will already know what the syntax is.
275+ if let Some ( snippet) = self . span_snippet && self . empty_generic_args {
279276 if snippet. ends_with ( '>' ) {
280277 // The user wrote `Trait<'a, T>` or similar. To provide an accurate suggestion
281278 // we would have to preserve the right order. For now, as clearly the user is
You can’t perform that action at this time.
0 commit comments