Skip to content

Commit

Permalink
Use a type-alias-impl-trait in ObligationForest
Browse files Browse the repository at this point in the history
  • Loading branch information
Noratrieb committed Jan 21, 2023
1 parent e098eb1 commit f74ca88
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions compiler/rustc_data_structures/src/obligation_forest/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,7 @@ pub enum ProcessResult<O, E> {
#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
struct ObligationTreeId(usize);

type ObligationTreeIdGenerator =
std::iter::Map<std::ops::RangeFrom<usize>, fn(usize) -> ObligationTreeId>;
type ObligationTreeIdGenerator = impl Iterator<Item = ObligationTreeId>;

pub struct ObligationForest<O: ForestObligation> {
/// The list of obligations. In between calls to [Self::process_obligations],
Expand Down

0 comments on commit f74ca88

Please sign in to comment.