Skip to content

Commit 6dab597

Browse files
committed
Fix rustdoc
1 parent 2c58ef5 commit 6dab597

File tree

8 files changed

+12
-12
lines changed

8 files changed

+12
-12
lines changed

src/librustdoc/clean/auto_trait.rs

Lines changed: 2 additions & 2 deletions
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

Lines changed: 4 additions & 4 deletions
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)),
@@ -633,7 +633,7 @@ impl<'a, 'tcx> Clean<Generics> for (&'a ty::Generics, ty::GenericPredicates<'tcx
633633
let param_idx = (|| {
634634
let bound_p = p.kind();
635635
match bound_p.skip_binder() {
636-
ty::PredicateKind::Trait(pred, _constness) => {
636+
ty::PredicateKind::Trait(pred, _constness, _) => {
637637
if let ty::Param(param) = pred.self_ty().kind() {
638638
return Some(param.index);
639639
}
@@ -1566,8 +1566,8 @@ impl<'tcx> Clean<Type> for Ty<'tcx> {
15661566
.filter_map(|bound| {
15671567
let bound_predicate = bound.kind();
15681568
let trait_ref = match bound_predicate.skip_binder() {
1569-
ty::PredicateKind::Trait(tr, _constness) => {
1570-
bound_predicate.rebind(tr.trait_ref)
1569+
ty::PredicateKind::Trait(pred, _constness, _) => {
1570+
bound_predicate.rebind(pred.trait_ref)
15711571
}
15721572
ty::PredicateKind::TypeOutlives(ty::OutlivesPredicate(_ty, reg)) => {
15731573
if let Some(r) = reg.clean(cx) {

src/librustdoc/clean/simplify.rs

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

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

0 commit comments

Comments
 (0)