Skip to content

Commit b65911d

Browse files
authored
Merge pull request #18577 from compiler-errors/redundant-dyn-atb
Remove redundant associated type bounds from `dyn TypeFolder`
2 parents ab44866 + 29d59c5 commit b65911d

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

crates/hir-ty/src/infer/unify.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -666,7 +666,7 @@ impl<'a> InferenceTable<'a> {
666666
highest_known_var: InferenceVar,
667667
}
668668
impl TypeFolder<Interner> for VarFudger<'_, '_> {
669-
fn as_dyn(&mut self) -> &mut dyn TypeFolder<Interner, Error = Self::Error> {
669+
fn as_dyn(&mut self) -> &mut dyn TypeFolder<Interner> {
670670
self
671671
}
672672

@@ -1004,7 +1004,7 @@ mod resolve {
10041004
where
10051005
F: Fn(InferenceVar, VariableKind, GenericArg, DebruijnIndex) -> GenericArg,
10061006
{
1007-
fn as_dyn(&mut self) -> &mut dyn TypeFolder<Interner, Error = Self::Error> {
1007+
fn as_dyn(&mut self) -> &mut dyn TypeFolder<Interner> {
10081008
self
10091009
}
10101010

crates/hir-ty/src/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -646,7 +646,7 @@ pub(crate) fn fold_free_vars<T: HasInterner<Interner = Interner> + TypeFoldable<
646646
F2: FnMut(Ty, BoundVar, DebruijnIndex) -> Const,
647647
> TypeFolder<Interner> for FreeVarFolder<F1, F2>
648648
{
649-
fn as_dyn(&mut self) -> &mut dyn TypeFolder<Interner, Error = Self::Error> {
649+
fn as_dyn(&mut self) -> &mut dyn TypeFolder<Interner> {
650650
self
651651
}
652652

@@ -697,7 +697,7 @@ pub(crate) fn fold_tys_and_consts<T: HasInterner<Interner = Interner> + TypeFold
697697
impl<F: FnMut(Either<Ty, Const>, DebruijnIndex) -> Either<Ty, Const>> TypeFolder<Interner>
698698
for TyFolder<F>
699699
{
700-
fn as_dyn(&mut self) -> &mut dyn TypeFolder<Interner, Error = Self::Error> {
700+
fn as_dyn(&mut self) -> &mut dyn TypeFolder<Interner> {
701701
self
702702
}
703703

0 commit comments

Comments
 (0)