Skip to content

Commit 0e3f74c

Browse files
committed
wip
1 parent 4bc39f0 commit 0e3f74c

File tree

5 files changed

+391
-431
lines changed

5 files changed

+391
-431
lines changed

src/librustdoc/clean/auto_trait.rs

+9-10
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,9 @@ use rustc_trait_selection::traits::auto_trait::{self, RegionTarget};
99

1010
use thin_vec::ThinVec;
1111

12-
use crate::clean::{self, simplify, Lifetime};
12+
use crate::clean::{self, Lifetime};
1313
use crate::clean::{
14-
clean_generic_param_def, clean_middle_ty, clean_predicate, clean_trait_ref_with_constraints,
15-
clean_ty_generics,
14+
clean_generic_param_def, clean_middle_ty, clean_trait_ref_with_constraints, clean_ty_generics,
1615
};
1716
use crate::core::DocContext;
1817

@@ -169,7 +168,7 @@ fn clean_param_env<'tcx>(
169168
// FIXME(#111101): Incorporate the explicit predicates of the item here...
170169
let item_predicates: FxIndexSet<_> =
171170
tcx.param_env(item_def_id).caller_bounds().iter().collect();
172-
let where_predicates = param_env
171+
let predicates = param_env
173172
.caller_bounds()
174173
.iter()
175174
// FIXME: ...which hopefully allows us to simplify this:
@@ -194,14 +193,14 @@ fn clean_param_env<'tcx>(
194193
}
195194
})
196195
})
197-
.flat_map(|pred| clean_predicate(pred, cx))
198-
.chain(clean_region_outlives_constraints(&region_data, generics))
196+
.map(|pred| (pred, rustc_span::DUMMY_SP))
199197
.collect();
200198

201-
let mut generics = clean::Generics { params, where_predicates };
202-
simplify::sized_bounds(cx, &mut generics);
203-
generics.where_predicates = simplify::where_clauses(cx, generics.where_predicates);
204-
generics
199+
let mut where_predicates = super::modern::clean_predicates(cx, predicates);
200+
// FIXME: these no longer get "simplif[ied]::where_clauses"
201+
where_predicates.extend(clean_region_outlives_constraints(&region_data, generics));
202+
203+
clean::Generics { params, where_predicates }
205204
}
206205

207206
/// Clean region outlives constraints to where-predicates.

0 commit comments

Comments
 (0)