diff options
| author | bors <bors@rust-lang.org> | 2018-07-04 09:33:33 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2018-07-04 09:33:33 +0000 |
| commit | 8dd715ee5e462384668e3c83c17ee641e9776b64 (patch) | |
| tree | 7174b02139c75cca14582615e9615758dd723971 /src/libstd/sys/unix/stack_overflow.rs | |
| parent | a739c51d108b1958a1c3e145588035c580e7973a (diff) | |
| parent | 90ea49b891937eb7f121c1ded01ceacb66074e74 (diff) | |
| download | rust-8dd715ee5e462384668e3c83c17ee641e9776b64.tar.gz rust-8dd715ee5e462384668e3c83c17ee641e9776b64.zip | |
Auto merge of #51895 - nikomatsakis:move-self-trait-predicate-to-items, r=scalexm
Move self trait predicate to items
This is a "reimagination" of @tmandry's PR #50183. The main effect is described in this comment from one of the commits:
---
Before we had the following results for `predicates_of`:
```rust
trait Foo { // predicates_of: Self: Foo
fn bar(); // predicates_of: Self: Foo (inherited from trait)
}
```
Now we have removed the `Self: Foo` from the trait. However, we still
add it to the trait ITEM. This is because when people do things like
`<T as Foo>::bar()`, they still need to prove that `T: Foo`, and
having it in the `predicates_of` seems to be the cleanest way to
ensure that happens right now (otherwise, we'd need special case code
in various places):
```rust
trait Foo { // predicates_of: []
fn bar(); // predicates_of: Self: Foo
}
```
However, we sometimes want to get the list of *just* the predicates
truly defined on a trait item (e.g., for chalk, but also for a few
other bits of code). For that, we define `predicates_defined_on`,
which does not contain the `Self: Foo` predicate yet, and we plumb
that through metadata and so forth.
---
I'm assigning @eddyb as the main reviewer, but I thought I might delegate to scalexm for this one in any case. I also want to post an alternative that I'll leave in the comments; it occurred to me as I was writing. =)
r? @eddyb
cc @scalexm @tmandry @leodasvacas
Diffstat (limited to 'src/libstd/sys/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions
