Skip to content

Commit c023196

Browse files
Rollup merge of #114490 - kernelmethod:error-reporting-typos, r=compiler-errors
Fix a typo in the error reporting for sealed traits. Fixes a typo in error reporting: "implelement" -> "implement"
2 parents 200fa5d + d64968b commit c023196

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Diff for: compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2789,7 +2789,7 @@ impl<'tcx> TypeErrCtxtExt<'tcx> for TypeErrCtxt<'_, 'tcx> {
27892789
// implement this trait and list them.
27902790
err.note(format!(
27912791
"`{short_item_name}` is a \"sealed trait\", because to implement \
2792-
it you also need to implelement `{}`, which is not accessible; \
2792+
it you also need to implement `{}`, which is not accessible; \
27932793
this is usually done to force you to use one of the provided \
27942794
types that already implement it",
27952795
with_no_trimmed_paths!(tcx.def_path_str(def_id)),

Diff for: tests/ui/privacy/sealed-traits/sealed-trait-local.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ note: required by a bound in `Sealed`
99
|
1010
LL | pub trait Sealed: self::b::Hidden {
1111
| ^^^^^^^^^^^^^^^ required by this bound in `Sealed`
12-
= note: `Sealed` is a "sealed trait", because to implement it you also need to implelement `a::b::Hidden`, which is not accessible; this is usually done to force you to use one of the provided types that already implement it
12+
= note: `Sealed` is a "sealed trait", because to implement it you also need to implement `a::b::Hidden`, which is not accessible; this is usually done to force you to use one of the provided types that already implement it
1313

1414
error: aborting due to previous error
1515

0 commit comments

Comments
 (0)