]> git.lizzy.rs Git - rust.git/commitdiff
split IntoWellFormedGoal
authorcsmoe <35686186+csmoe@users.noreply.github.com>
Fri, 4 May 2018 02:00:11 +0000 (10:00 +0800)
committercsmoe <35686186+csmoe@users.noreply.github.com>
Thu, 5 Jul 2018 10:47:00 +0000 (18:47 +0800)
src/librustc_traits/lowering.rs

index bac0381f0b00541fd30cbb398c85b08bd24e5a2f..c8192f2141867aeeca9abb13ea096d568b22a1ab 100644 (file)
@@ -121,11 +121,11 @@ trait IntoFromEnvGoal {
 }
 
 trait IntoWellFormedGoal {
+    // Transforms an existing goal into a WellFormed goal.
     fn into_wellformed_goal(self) -> Self;
 }
 
-impl<'tcx> IntoGoal for DomainGoal<'tcx> {
-    // Transforms an existing goal into a WellFormed goal.
+impl<'tcx> IntoFromEnvGoal for DomainGoal<'tcx> {
     fn into_from_env_goal(self) -> DomainGoal<'tcx> {
         use self::WhereClause::*;
 
@@ -138,7 +138,7 @@ fn into_from_env_goal(self) -> DomainGoal<'tcx> {
     }
 }
 
-impl<'tcx> IntoFromEnvGoal for DomainGoal<'tcx> {
+impl<'tcx> IntoWellFormedGoal for DomainGoal<'tcx> {
     fn into_wellformed_goal(self) -> DomainGoal<'tcx> {
         use self::DomainGoal::*;
         match self {
@@ -302,7 +302,7 @@ fn wellformed_from_bound<'a, 'tcx>(
 
     // WellFormed(Self: Trait<P1..Pn>)
     let wellformed_trait = DomainGoal::WellFormed(WhereClauseAtom::Implemented(trait_pred));
-    // Impemented(Self: Trait<P1..Pn>)
+    // Implemented(Self: Trait<P1..Pn>)
     let impl_trait = ty::Binder::dummy(DomainGoal::Holds(WhereClauseAtom::Implemented(trait_pred)));
     // WellFormed(WC)
     let wellformed_wc = where_clause