Chalk lowering rule: WellFormed-TraitRef#50250
Conversation
|
The job Click to expand the log.I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
|
The job Click to expand the log.I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
|
@bors delegate=scalexm Just giving scalexm ability to r+ too |
|
✌️ @scalexm can now approve this pull request |
|
cc @csmoe -- I guess you know this doesn't build yet. =) Do you need help w/ that? |
|
@nikomatsakis |
637d034 to
c87d2d1
Compare
|
The job Click to expand the log.I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
|
The job Click to expand the log.I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
|
✌️ @scalexm can now approve this pull request |
src/librustc_traits/lowering.rs
Outdated
There was a problem hiding this comment.
Nit: could we have two traits IntoFromEnvGoal and IntoWellFormedGoal instead of just one? I find the name IntoGoal not very informative.
src/librustc_traits/lowering.rs
Outdated
There was a problem hiding this comment.
Very nit: well_formed is how we snake-casify WellFormed in chalk, so I'd like into_well_formed_goal for consistency :)
src/librustc_traits/lowering.rs
Outdated
There was a problem hiding this comment.
Nit: Impemented -> Implemented
src/librustc_traits/lowering.rs
Outdated
There was a problem hiding this comment.
Actually the guide is a bit misleading here, WC should represent the full set of where clauses e.g. you have WC := WC1, WC2, ..., WCn and we want to output only one clause which is:
WellFormed(Self: Trait<P1..Pn>) :-
Implemented(Self: Trait<P1..Pn>) && WC1 && ... && WCn
There was a problem hiding this comment.
(So you should change your code logic a bit)
There was a problem hiding this comment.
Implemented(Self: Trait<P1..Pn>) && WC1 && ... && WCn
^^^ = should this be WellFormed(WC1)?
Since the wellformed guide says:
T: Trait is well-formed if (a) T: Trait is implemented and (b) all the where-clauses declared on Trait are well-formed
Thus do you mean this(merge all the WellFormed(WC_1...n) inside one clause instead of split them like current test/ui output below)?
Currently(copy from ui test output)
= note: WellFormed(Self: Foo<'a, 'b, S, T, U>) :- Implemented(Self: Foo<'a, 'b, S, T, U>), RegionOutlives('a : 'b).
= note: WellFormed(Self: Foo<'a, 'b, S, T, U>) :- Implemented(Self: Foo<'a, 'b, S, T, U>), TypeOutlives(U : 'b).
= note: WellFormed(Self: Foo<'a, 'b, S, T, U>) :- Implemented(Self: Foo<'a, 'b, S, T, U>), WellFormed(S: std::fmt::Debug).
= note: WellFormed(Self: Foo<'a, 'b, S, T, U>) :- Implemented(Self: Foo<'a, 'b, S, T, U>), WellFormed(S: std::marker::Sized).
= note: WellFormed(Self: Foo<'a, 'b, S, T, U>) :- Implemented(Self: Foo<'a, 'b, S, T, U>), WellFormed(T: std::borrow::Borrow<U>).
= note: WellFormed(Self: Foo<'a, 'b, S, T, U>) :- Implemented(Self: Foo<'a, 'b, S, T, U>), WellFormed(T: std::marker::Sized).
After=>
= note: WellFormed(Self: Foo<'a, 'b, S, T, U>) :- Implemented(...), ..., WellFormed(WC1) , ..., WellFormed(WCn).
There was a problem hiding this comment.
Yes absolutely, merge all into one clause (and yes you’re right about WellFormed(WC1), ..., WellFormed(WCn)
|
☔ The latest upstream changes (presumably #50200) made this pull request unmergeable. Please resolve the merge conflicts. |
|
The job Click to expand the log.I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
|
@nikomatsakis more commits soon. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
@bors r+ |
|
📌 Commit 37c5c0b has been approved by |
Chalk lowering rule: WellFormed-TraitRef Address chalk lowering "Implemented-From-Env" as part of #49177. r? @nikomatsakis
|
☀️ Test successful - status-appveyor, status-travis |
Address chalk lowering "Implemented-From-Env" as part of #49177.
r? @nikomatsakis