Skip to content

Commit 979937e

Browse files
committed
remove implicit field
1 parent d445c12 commit 979937e

40 files changed

+122
-162
lines changed

compiler/rustc_borrowck/src/type_check/canonical.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
9595
trait_ref,
9696
constness: ty::BoundConstness::NotConst,
9797
polarity: ty::ImplPolarity::Positive,
98-
implicit: ty::ImplicitBound::No,
98+
// implicit: ty::ImplicitBound::No,
9999
}))),
100100
locations,
101101
category,

compiler/rustc_const_eval/src/transform/check_consts/check.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -813,7 +813,7 @@ impl Visitor<'tcx> for Checker<'mir, 'tcx> {
813813
trait_ref,
814814
constness: ty::BoundConstness::ConstIfConst,
815815
polarity: ty::ImplPolarity::Positive,
816-
implicit: ty::ImplicitBound::No,
816+
// implicit: ty::ImplicitBound::No,
817817
}),
818818
);
819819

compiler/rustc_const_eval/src/transform/check_consts/qualifs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ impl Qualif for NeedsNonConstDrop {
162162
trait_ref,
163163
constness: ty::BoundConstness::ConstIfConst,
164164
polarity: ty::ImplPolarity::Positive,
165-
implicit: ty::ImplicitBound::No,
165+
// implicit: ty::ImplicitBound::No,
166166
}),
167167
);
168168

compiler/rustc_middle/src/ty/mod.rs

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -165,24 +165,24 @@ pub struct ImplHeader<'tcx> {
165165
pub predicates: Vec<Predicate<'tcx>>,
166166
}
167167

168-
#[derive(
169-
Copy,
170-
Clone,
171-
PartialEq,
172-
Eq,
173-
Hash,
174-
TyEncodable,
175-
TyDecodable,
176-
HashStable,
177-
Debug,
178-
TypeFoldable
179-
)]
180-
pub enum ImplicitBound {
181-
/// `T: Trait`
182-
No,
183-
/// implicit `T: Sized`
184-
Yes,
185-
}
168+
// #[derive(
169+
// Copy,
170+
// Clone,
171+
// PartialEq,
172+
// Eq,
173+
// Hash,
174+
// TyEncodable,
175+
// TyDecodable,
176+
// HashStable,
177+
// Debug,
178+
// TypeFoldable
179+
// )]
180+
// pub enum ImplicitBound {
181+
// /// `T: Trait`
182+
// No,
183+
// /// implicit `T: Sized`
184+
// Yes,
185+
// }
186186

187187
#[derive(
188188
Copy,
@@ -541,12 +541,12 @@ impl<'tcx> Predicate<'tcx> {
541541
trait_ref,
542542
constness,
543543
polarity,
544-
implicit,
544+
// implicit,
545545
}) => Some(PredicateKind::Trait(TraitPredicate {
546546
trait_ref,
547547
constness,
548548
polarity: polarity.flip()?,
549-
implicit,
549+
// implicit,
550550
})),
551551

552552
_ => None,
@@ -753,7 +753,7 @@ pub struct TraitPredicate<'tcx> {
753753

754754
pub polarity: ImplPolarity,
755755

756-
pub implicit: ImplicitBound,
756+
// pub implicit: ImplicitBound,
757757
}
758758

759759
pub type PolyTraitPredicate<'tcx> = ty::Binder<'tcx, TraitPredicate<'tcx>>;
@@ -1450,7 +1450,7 @@ impl PolyTraitRef<'tcx> {
14501450
trait_ref,
14511451
constness,
14521452
polarity: ty::ImplPolarity::Positive,
1453-
implicit: ty::ImplicitBound::No,
1453+
// implicit: ty::ImplicitBound::No,
14541454
})
14551455
}
14561456
#[inline]

compiler/rustc_middle/src/ty/relate.rs

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -788,20 +788,20 @@ impl<'tcx> Relate<'tcx> for GenericArg<'tcx> {
788788
}
789789
}
790790

791-
impl<'tcx> Relate<'tcx> for ty::ImplicitBound {
792-
fn relate<R: TypeRelation<'tcx>>(
793-
_relation: &mut R,
794-
a: ty::ImplicitBound,
795-
b: ty::ImplicitBound,
796-
) -> RelateResult<'tcx, ty::ImplicitBound> {
797-
match (a, b) {
798-
(ty::ImplicitBound::No, ty::ty::ImplicitBound::No) => Ok(ty::ImplicitBound::No),
799-
(ty::ImplicitBound::Yes, ty::ty::ImplicitBound::Yes)
800-
| (ty::ImplicitBound::Yes, ty::ty::ImplicitBound::No)
801-
| (ty::ImplicitBound::No, ty::ty::ImplicitBound::Yes) => Ok(ty::ImplicitBound::Yes),
802-
}
803-
}
804-
}
791+
// impl<'tcx> Relate<'tcx> for ty::ImplicitBound {
792+
// fn relate<R: TypeRelation<'tcx>>(
793+
// _relation: &mut R,
794+
// a: ty::ImplicitBound,
795+
// b: ty::ImplicitBound,
796+
// ) -> RelateResult<'tcx, ty::ImplicitBound> {
797+
// match (a, b) {
798+
// (ty::ImplicitBound::No, ty::ty::ImplicitBound::No) => Ok(ty::ImplicitBound::No),
799+
// (ty::ImplicitBound::Yes, ty::ty::ImplicitBound::Yes)
800+
// | (ty::ImplicitBound::Yes, ty::ty::ImplicitBound::No)
801+
// | (ty::ImplicitBound::No, ty::ty::ImplicitBound::Yes) => Ok(ty::ImplicitBound::Yes),
802+
// }
803+
// }
804+
// }
805805

806806
impl<'tcx> Relate<'tcx> for ty::ImplPolarity {
807807
fn relate<R: TypeRelation<'tcx>>(
@@ -827,7 +827,7 @@ impl<'tcx> Relate<'tcx> for ty::TraitPredicate<'tcx> {
827827
trait_ref: relation.relate(a.trait_ref, b.trait_ref)?,
828828
constness: relation.relate(a.constness, b.constness)?,
829829
polarity: relation.relate(a.polarity, b.polarity)?,
830-
implicit: relation.relate(a.implicit, b.implicit)?,
830+
// implicit: relation.relate(a.implicit, b.implicit)?,
831831
})
832832
}
833833
}

compiler/rustc_middle/src/ty/structural_impls.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ impl<'a, 'tcx> Lift<'tcx> for ty::TraitPredicate<'a> {
369369
trait_ref,
370370
constness: self.constness,
371371
polarity: self.polarity,
372-
implicit: ty::ImplicitBound::No,
372+
// implicit: ty::ImplicitBound::No,
373373
})
374374
}
375375
}

compiler/rustc_middle/src/ty/sty.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -944,7 +944,7 @@ impl<'tcx> PolyTraitRef<'tcx> {
944944
trait_ref,
945945
constness: ty::BoundConstness::NotConst,
946946
polarity: ty::ImplPolarity::Positive,
947-
implicit: ty::ImplicitBound::No,
947+
// implicit: ty::ImplicitBound::No,
948948
})
949949
}
950950
}

compiler/rustc_privacy/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ where
128128
trait_ref,
129129
constness: _,
130130
polarity: _,
131-
implicit: _,
131+
// implicit: _,
132132
}) => self.visit_trait(trait_ref),
133133
ty::PredicateKind::Projection(ty::ProjectionPredicate { projection_ty, ty }) => {
134134
ty.visit_with(self)?;

compiler/rustc_trait_selection/src/traits/auto_trait.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ impl AutoTraitFinder<'tcx> {
290290
constness: ty::BoundConstness::NotConst,
291291
// Auto traits are positive
292292
polarity: ty::ImplPolarity::Positive,
293-
implicit: ty::ImplicitBound::No,
293+
// implicit: ty::ImplicitBound::No,
294294
}));
295295

296296
let computed_preds = param_env.caller_bounds().iter();

compiler/rustc_trait_selection/src/traits/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -826,7 +826,7 @@ pub fn vtable_trait_upcasting_coercion_new_vptr_slot(
826826
trait_ref,
827827
constness: ty::BoundConstness::NotConst,
828828
polarity: ty::ImplPolarity::Positive,
829-
implicit: ty::ImplicitBound::No,
829+
// implicit: ty::ImplicitBound::No,
830830
}),
831831
);
832832

0 commit comments

Comments
 (0)