Skip to content

Commit 5a6faec

Browse files
committed
Fix rustdoc
1 parent 22b3e1f commit 5a6faec

File tree

8 files changed

+12
-12
lines changed

8 files changed

+12
-12
lines changed

src/librustdoc/clean/auto_trait.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ impl<'a, 'tcx> AutoTraitFinder<'a, 'tcx> {
316316
let bound_predicate = pred.kind();
317317
let tcx = self.cx.tcx;
318318
let regions = match bound_predicate.skip_binder() {
319-
ty::PredicateKind::Trait(poly_trait_pred, _) => {
319+
ty::PredicateKind::Trait(poly_trait_pred, _, _) => {
320320
tcx.collect_referenced_late_bound_regions(&bound_predicate.rebind(poly_trait_pred))
321321
}
322322
ty::PredicateKind::Projection(poly_proj_pred) => {
@@ -465,7 +465,7 @@ impl<'a, 'tcx> AutoTraitFinder<'a, 'tcx> {
465465
.filter(|p| {
466466
!orig_bounds.contains(p)
467467
|| match p.kind().skip_binder() {
468-
ty::PredicateKind::Trait(pred, _) => pred.def_id() == sized_trait,
468+
ty::PredicateKind::Trait(pred, _, _) => pred.def_id() == sized_trait,
469469
_ => false,
470470
}
471471
})

src/librustdoc/clean/mod.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ impl<'a> Clean<Option<WherePredicate>> for ty::Predicate<'a> {
346346
fn clean(&self, cx: &mut DocContext<'_>) -> Option<WherePredicate> {
347347
let bound_predicate = self.kind();
348348
match bound_predicate.skip_binder() {
349-
ty::PredicateKind::Trait(pred, _) => Some(bound_predicate.rebind(pred).clean(cx)),
349+
ty::PredicateKind::Trait(pred, _, _) => Some(bound_predicate.rebind(pred).clean(cx)),
350350
ty::PredicateKind::RegionOutlives(pred) => pred.clean(cx),
351351
ty::PredicateKind::TypeOutlives(pred) => pred.clean(cx),
352352
ty::PredicateKind::Projection(pred) => Some(pred.clean(cx)),
@@ -626,7 +626,7 @@ impl<'a, 'tcx> Clean<Generics> for (&'a ty::Generics, ty::GenericPredicates<'tcx
626626
let param_idx = (|| {
627627
let bound_p = p.kind();
628628
match bound_p.skip_binder() {
629-
ty::PredicateKind::Trait(pred, _constness) => {
629+
ty::PredicateKind::Trait(pred, _constness, _) => {
630630
if let ty::Param(param) = pred.self_ty().kind() {
631631
return Some(param.index);
632632
}
@@ -1559,8 +1559,8 @@ impl<'tcx> Clean<Type> for Ty<'tcx> {
15591559
.filter_map(|bound| {
15601560
let bound_predicate = bound.kind();
15611561
let trait_ref = match bound_predicate.skip_binder() {
1562-
ty::PredicateKind::Trait(tr, _constness) => {
1563-
bound_predicate.rebind(tr.trait_ref)
1562+
ty::PredicateKind::Trait(pred, _constness, _) => {
1563+
bound_predicate.rebind(pred.trait_ref)
15641564
}
15651565
ty::PredicateKind::TypeOutlives(ty::OutlivesPredicate(_ty, reg)) => {
15661566
if let Some(r) = reg.clean(cx) {

src/librustdoc/clean/simplify.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ fn trait_is_same_or_supertrait(cx: &DocContext<'_>, child: DefId, trait_: DefId)
129129
.predicates
130130
.iter()
131131
.filter_map(|(pred, _)| {
132-
if let ty::PredicateKind::Trait(pred, _) = pred.kind().skip_binder() {
132+
if let ty::PredicateKind::Trait(pred, _, _) = pred.kind().skip_binder() {
133133
if pred.trait_ref.self_ty() == self_ty { Some(pred.def_id()) } else { None }
134134
} else {
135135
None

src/tools/clippy/clippy_lints/src/future_not_send.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ impl<'tcx> LateLintPass<'tcx> for FutureNotSend {
9494
cx.tcx.infer_ctxt().enter(|infcx| {
9595
for FulfillmentError { obligation, .. } in send_errors {
9696
infcx.maybe_note_obligation_cause_for_async_await(db, &obligation);
97-
if let Trait(trait_pred, _) = obligation.predicate.kind().skip_binder() {
97+
if let Trait(trait_pred, _, _) = obligation.predicate.kind().skip_binder() {
9898
db.note(&format!(
9999
"`{}` doesn't implement `{}`",
100100
trait_pred.self_ty(),

src/tools/clippy/clippy_lints/src/needless_pass_by_value.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ impl<'tcx> LateLintPass<'tcx> for NeedlessPassByValue {
120120
.filter_map(|obligation| {
121121
// Note that we do not want to deal with qualified predicates here.
122122
match obligation.predicate.kind().no_bound_vars() {
123-
Some(ty::PredicateKind::Trait(pred, _)) if pred.def_id() != sized_trait => Some(pred),
123+
Some(ty::PredicateKind::Trait(pred, _, _)) if pred.def_id() != sized_trait => Some(pred),
124124
_ => None,
125125
}
126126
})

src/tools/clippy/clippy_lints/src/unit_return_expecting_ord.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ fn get_trait_predicates_for_trait_id<'tcx>(
4343
let mut preds = Vec::new();
4444
for (pred, _) in generics.predicates {
4545
if_chain! {
46-
if let PredicateKind::Trait(poly_trait_pred, _) = pred.kind().skip_binder();
46+
if let PredicateKind::Trait(poly_trait_pred, _, _) = pred.kind().skip_binder();
4747
let trait_pred = cx.tcx.erase_late_bound_regions(pred.kind().rebind(poly_trait_pred));
4848
if let Some(trait_def_id) = trait_id;
4949
if trait_def_id == trait_pred.trait_ref.def_id;

src/tools/clippy/clippy_utils/src/qualify_min_const_fn.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ pub fn is_min_const_fn(tcx: TyCtxt<'tcx>, body: &'a Body<'tcx>, msrv: Option<&Ru
3636
ty::PredicateKind::ObjectSafe(_) => panic!("object safe predicate on function: {:#?}", predicate),
3737
ty::PredicateKind::ClosureKind(..) => panic!("closure kind predicate on function: {:#?}", predicate),
3838
ty::PredicateKind::Subtype(_) => panic!("subtype predicate on function: {:#?}", predicate),
39-
ty::PredicateKind::Trait(pred, _) => {
39+
ty::PredicateKind::Trait(pred, _, _) => {
4040
if Some(pred.def_id()) == tcx.lang_items().sized_trait() {
4141
continue;
4242
}

src/tools/clippy/clippy_utils/src/ty.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ pub fn is_must_use_ty<'tcx>(cx: &LateContext<'tcx>, ty: Ty<'tcx>) -> bool {
155155
ty::Tuple(ref substs) => substs.types().any(|ty| is_must_use_ty(cx, ty)),
156156
ty::Opaque(ref def_id, _) => {
157157
for (predicate, _) in cx.tcx.explicit_item_bounds(*def_id) {
158-
if let ty::PredicateKind::Trait(trait_predicate, _) = predicate.kind().skip_binder() {
158+
if let ty::PredicateKind::Trait(trait_predicate, _, _) = predicate.kind().skip_binder() {
159159
if must_use_attr(&cx.tcx.get_attrs(trait_predicate.trait_ref.def_id)).is_some() {
160160
return true;
161161
}

0 commit comments

Comments
 (0)