Skip to content

Commit 9d1b2c4

Browse files
committed
change E0191 suggestion to always include turbofish (rust-lang#91997)
1 parent b8d7dd8 commit 9d1b2c4

File tree

1 file changed

+2
-2
lines changed
  • compiler/rustc_hir_analysis/src/hir_ty_lowering

1 file changed

+2
-2
lines changed

compiler/rustc_hir_analysis/src/hir_ty_lowering/errors.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -903,8 +903,8 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
903903
format!("{}, {}>", &snippet[..snippet.len() - 1], types.join(", "))
904904
} else {
905905
// The user wrote `Iterator`, so we don't have a type we can suggest, but at
906-
// least we can clue them to the correct syntax `Iterator<Item = Type>`.
907-
format!("{}<{}>", snippet, types.join(", "))
906+
// least we can clue them to the correct syntax `Iterator::<Item = Type>`.
907+
format!("{}::<{}>", snippet, types.join(", "))
908908
};
909909
suggestions.push((*span, code));
910910
} else if dupes {

0 commit comments

Comments
 (0)