diff options
| author | Michael Goulet <michael@errs.io> | 2023-07-03 15:27:41 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2023-07-03 21:40:04 +0000 |
| commit | 0c73b41cd69c33b76ba2a833bf8bd94a95e73ccb (patch) | |
| tree | f10552ff044bed6c09e81b4ac239efe06c0b3545 /compiler/rustc_middle/src | |
| parent | c6fcbaae0f11f3f7d7827f946e8ca9a44c1da3ef (diff) | |
| download | rust-0c73b41cd69c33b76ba2a833bf8bd94a95e73ccb.tar.gz rust-0c73b41cd69c33b76ba2a833bf8bd94a95e73ccb.zip | |
remove TypeWellFormedFromEnv
Diffstat (limited to 'compiler/rustc_middle/src')
| -rw-r--r-- | compiler/rustc_middle/src/ty/flags.rs | 3 | ||||
| -rw-r--r-- | compiler/rustc_middle/src/ty/mod.rs | 17 | ||||
| -rw-r--r-- | compiler/rustc_middle/src/ty/print/pretty.rs | 3 | ||||
| -rw-r--r-- | compiler/rustc_middle/src/ty/structural_impls.rs | 3 |
4 files changed, 4 insertions, 22 deletions
diff --git a/compiler/rustc_middle/src/ty/flags.rs b/compiler/rustc_middle/src/ty/flags.rs index 06a8e34cbab..ff391794703 100644 --- a/compiler/rustc_middle/src/ty/flags.rs +++ b/compiler/rustc_middle/src/ty/flags.rs @@ -287,9 +287,6 @@ impl FlagComputation { self.add_const(expected); self.add_const(found); } - ty::PredicateKind::Clause(ty::ClauseKind::TypeWellFormedFromEnv(ty)) => { - self.add_ty(ty); - } ty::PredicateKind::Ambiguous => {} ty::PredicateKind::AliasRelate(t1, t2, _) => { self.add_term(t1); diff --git a/compiler/rustc_middle/src/ty/mod.rs b/compiler/rustc_middle/src/ty/mod.rs index 7bd49ad07ea..48388be2f46 100644 --- a/compiler/rustc_middle/src/ty/mod.rs +++ b/compiler/rustc_middle/src/ty/mod.rs @@ -554,8 +554,7 @@ impl<'tcx> Predicate<'tcx> { | PredicateKind::Coerce(_) | PredicateKind::Clause(ClauseKind::ConstEvaluatable(_)) | PredicateKind::ConstEquate(_, _) - | PredicateKind::Ambiguous - | PredicateKind::Clause(ClauseKind::TypeWellFormedFromEnv(_)) => true, + | PredicateKind::Ambiguous => true, } } } @@ -661,11 +660,6 @@ pub enum ClauseKind<'tcx> { /// Constant initializer must evaluate successfully. ConstEvaluatable(ty::Const<'tcx>), - - /// Represents a type found in the environment that we can use for implied bounds. - /// - /// Only used for Chalk. - TypeWellFormedFromEnv(Ty<'tcx>), } #[derive(Clone, Copy, PartialEq, Eq, Hash, TyEncodable, TyDecodable)] @@ -1424,8 +1418,7 @@ impl<'tcx> Predicate<'tcx> { | PredicateKind::Clause(ClauseKind::TypeOutlives(..)) | PredicateKind::Clause(ClauseKind::ConstEvaluatable(..)) | PredicateKind::ConstEquate(..) - | PredicateKind::Ambiguous - | PredicateKind::Clause(ClauseKind::TypeWellFormedFromEnv(..)) => None, + | PredicateKind::Ambiguous => None, } } @@ -1445,8 +1438,7 @@ impl<'tcx> Predicate<'tcx> { | PredicateKind::Clause(ClauseKind::TypeOutlives(..)) | PredicateKind::Clause(ClauseKind::ConstEvaluatable(..)) | PredicateKind::ConstEquate(..) - | PredicateKind::Ambiguous - | PredicateKind::Clause(ClauseKind::TypeWellFormedFromEnv(..)) => None, + | PredicateKind::Ambiguous => None, } } @@ -1466,8 +1458,7 @@ impl<'tcx> Predicate<'tcx> { | PredicateKind::ClosureKind(..) | PredicateKind::Clause(ClauseKind::ConstEvaluatable(..)) | PredicateKind::ConstEquate(..) - | PredicateKind::Ambiguous - | PredicateKind::Clause(ClauseKind::TypeWellFormedFromEnv(..)) => None, + | PredicateKind::Ambiguous => None, } } diff --git a/compiler/rustc_middle/src/ty/print/pretty.rs b/compiler/rustc_middle/src/ty/print/pretty.rs index dcc8247937d..f912ff04496 100644 --- a/compiler/rustc_middle/src/ty/print/pretty.rs +++ b/compiler/rustc_middle/src/ty/print/pretty.rs @@ -2888,9 +2888,6 @@ define_print_and_forward_display! { ty::ClauseKind::ConstEvaluatable(ct) => { p!("the constant `", print(ct), "` can be evaluated") } - ty::ClauseKind::TypeWellFormedFromEnv(ty) => { - p!("the type `", print(ty), "` is found in the environment") - } } } diff --git a/compiler/rustc_middle/src/ty/structural_impls.rs b/compiler/rustc_middle/src/ty/structural_impls.rs index 113328de176..f195b062a62 100644 --- a/compiler/rustc_middle/src/ty/structural_impls.rs +++ b/compiler/rustc_middle/src/ty/structural_impls.rs @@ -189,9 +189,6 @@ impl<'tcx> fmt::Debug for ty::ClauseKind<'tcx> { ty::ClauseKind::ConstEvaluatable(ct) => { write!(f, "ConstEvaluatable({ct:?})") } - ty::ClauseKind::TypeWellFormedFromEnv(ty) => { - write!(f, "TypeWellFormedFromEnv({:?})", ty) - } } } } |
