Skip to content

Commit

Permalink
change E0191 suggestion to always include turbofish (rust-lang#91997)
Browse files Browse the repository at this point in the history
  • Loading branch information
Borgerr committed Jun 28, 2024
1 parent 99f77a2 commit e0c68ca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions compiler/rustc_hir_analysis/src/hir_ty_lowering/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -903,8 +903,8 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
format!("{}, {}>", &snippet[..snippet.len() - 1], types.join(", "))
} else {
// The user wrote `Iterator`, so we don't have a type we can suggest, but at
// least we can clue them to the correct syntax `Iterator<Item = Type>`.
format!("{}<{}>", snippet, types.join(", "))
// least we can clue them to the correct syntax `Iterator::<Item = Type>`.
format!("{}::<{}>", snippet, types.join(", "))
};
suggestions.push((*span, code));
} else if dupes {
Expand Down

0 comments on commit e0c68ca

Please sign in to comment.