Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
AZWN committed Oct 30, 2024
1 parent 675da40 commit 0f1b2ea
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 13 deletions.
14 changes: 7 additions & 7 deletions scopegraphs/src/containers/scope.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ pub trait ScopeContainer<'sg, 'rslv, LABEL: Debug + 'sg, DATA: 'sg>: Debug {
/// # trait DBound<'sg>: Hash + Eq + 'sg {}
///
/// fn test<'sg, 'rslv, LABEL: LBound<'sg>, DATA: DBound<'sg>, DWFO>(
/// cont: impl ScopeContainerWf<'sg, 'rslv, LABEL, DATA, DWFO>
/// cont: impl ScopeContainerWf<'sg, 'rslv, LABEL, DATA, DWFO, DWFO>
/// ) { }
///
/// # fn scope_vec<'sg, 'rslv, LABEL: LBound<'sg>, DATA: DBound<'sg>>() {
Expand Down Expand Up @@ -64,9 +64,9 @@ pub trait ScopeContainer<'sg, 'rslv, LABEL: Debug + 'sg, DATA: 'sg>: Debug {
/// # use std::hash::Hash;
///
///
/// fn test<'sg, 'rslv, LABEL: Clone + Hash + Eq + Debug + 'sg, DATA: Hash + Eq + 'sg, DWFO>(cont: impl ScopeContainerWf<'sg, 'rslv, LABEL, DATA, DWFO>) {
///
/// }
/// fn test<'sg, 'rslv, LABEL: Clone + Hash + Eq + Debug + 'sg, DATA: Hash + Eq + 'sg, DWFO>(
/// cont: impl ScopeContainerWf<'sg, 'rslv, LABEL, DATA, DWFO, DWFO>
/// ) { }
/// ```
///
/// ```no_run
Expand All @@ -78,9 +78,9 @@ pub trait ScopeContainer<'sg, 'rslv, LABEL: Debug + 'sg, DATA: 'sg>: Debug {
/// test::<'_, '_, (), (), bool>(Result::<_, ()>::Ok(Vec::<Scope>::new()));
/// test::<'_, '_, (), (), Result<bool, ()>>(Result::<_, ()>::Ok(Vec::<Scope>::new()));
///
/// fn test<'sg, 'rslv, LABEL: Clone + Hash + Eq + Debug + 'sg, DATA: Hash + Eq + 'sg, DWFO>(cont: impl ScopeContainerWf<'sg, 'rslv, LABEL, DATA, DWFO>) {
///
/// }
/// fn test<'sg, 'rslv, LABEL: Clone + Hash + Eq + Debug + 'sg, DATA: Hash + Eq + 'sg, DWFO>(
/// cont: impl ScopeContainerWf<'sg, 'rslv, LABEL, DATA, DWFO, DWFO>
/// ) { }
/// ```
///
pub trait ScopeContainerWf<'sg, 'rslv, LABEL, DATA, DWFO, DEQO>:
Expand Down
19 changes: 13 additions & 6 deletions scopegraphs/src/resolve/lookup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -227,12 +227,19 @@ where
let mut base_env = base_env.clone();
let sub_env = local_self.resolve_edge(path_wellformedness.clone(), edge, path);
sub_env.flat_map(move |sub_env| {
let filtered_env: EnvC<'sg, 'rslv, CMPL, LABEL, DATA, DWF::Output, DEq::Output> =
Filterable::filter(&base_env, sub_env, local_self.data_equiv);
filtered_env.flat_map(move |filtered_env| {
base_env.merge(filtered_env);
base_env.into()
})
let filtered_env: EnvC<
'sg,
'rslv,
CMPL,
LABEL,
DATA,
DWF::Output,
DEq::Output,
> = Filterable::filter(&base_env, sub_env, local_self.data_equiv);
filtered_env.flat_map(move |filtered_env| {
base_env.merge(filtered_env);
base_env.into()
})
})
}
}))
Expand Down

0 comments on commit 0f1b2ea

Please sign in to comment.