Skip to content

Commit

Permalink
Merge pull request rust-lang#18577 from compiler-errors/redundant-dyn…
Browse files Browse the repository at this point in the history
…-atb

Remove redundant associated type bounds from `dyn TypeFolder`
  • Loading branch information
lnicola authored Nov 30, 2024
2 parents ab44866 + 29d59c5 commit b65911d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions crates/hir-ty/src/infer/unify.rs
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,7 @@ impl<'a> InferenceTable<'a> {
highest_known_var: InferenceVar,
}
impl TypeFolder<Interner> for VarFudger<'_, '_> {
fn as_dyn(&mut self) -> &mut dyn TypeFolder<Interner, Error = Self::Error> {
fn as_dyn(&mut self) -> &mut dyn TypeFolder<Interner> {
self
}

Expand Down Expand Up @@ -1004,7 +1004,7 @@ mod resolve {
where
F: Fn(InferenceVar, VariableKind, GenericArg, DebruijnIndex) -> GenericArg,
{
fn as_dyn(&mut self) -> &mut dyn TypeFolder<Interner, Error = Self::Error> {
fn as_dyn(&mut self) -> &mut dyn TypeFolder<Interner> {
self
}

Expand Down
4 changes: 2 additions & 2 deletions crates/hir-ty/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,7 @@ pub(crate) fn fold_free_vars<T: HasInterner<Interner = Interner> + TypeFoldable<
F2: FnMut(Ty, BoundVar, DebruijnIndex) -> Const,
> TypeFolder<Interner> for FreeVarFolder<F1, F2>
{
fn as_dyn(&mut self) -> &mut dyn TypeFolder<Interner, Error = Self::Error> {
fn as_dyn(&mut self) -> &mut dyn TypeFolder<Interner> {
self
}

Expand Down Expand Up @@ -697,7 +697,7 @@ pub(crate) fn fold_tys_and_consts<T: HasInterner<Interner = Interner> + TypeFold
impl<F: FnMut(Either<Ty, Const>, DebruijnIndex) -> Either<Ty, Const>> TypeFolder<Interner>
for TyFolder<F>
{
fn as_dyn(&mut self) -> &mut dyn TypeFolder<Interner, Error = Self::Error> {
fn as_dyn(&mut self) -> &mut dyn TypeFolder<Interner> {
self
}

Expand Down

0 comments on commit b65911d

Please sign in to comment.