From 6aae0cf7fa042d51e97c7606cdf3a338f172f7d2 Mon Sep 17 00:00:00 2001 From: Robin Freyler Date: Sat, 13 Apr 2019 16:43:49 +0200 Subject: replace usages of `algo::generate` with `iter::successors` from std --- crates/ra_hir/src/ty/autoderef.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/ra_hir/src') diff --git a/crates/ra_hir/src/ty/autoderef.rs b/crates/ra_hir/src/ty/autoderef.rs index ab5f008ef..a442a856c 100644 --- a/crates/ra_hir/src/ty/autoderef.rs +++ b/crates/ra_hir/src/ty/autoderef.rs @@ -3,7 +3,7 @@ //! reference to a type with the field `bar`. This is an approximation of the //! logic in rustc (which lives in librustc_typeck/check/autoderef.rs). -use ra_syntax::algo::generate; +use std::iter::successors; use crate::HirDatabase; use super::Ty; @@ -11,7 +11,7 @@ use super::Ty; impl Ty { /// Iterates over the possible derefs of `ty`. pub fn autoderef<'a>(self, db: &'a impl HirDatabase) -> impl Iterator + 'a { - generate(Some(self), move |ty| ty.autoderef_step(db)) + successors(Some(self), move |ty| ty.autoderef_step(db)) } fn autoderef_step(&self, _db: &impl HirDatabase) -> Option { -- cgit v1.2.3