about summary refs log tree commit diff
path: root/src/libstd/sys/unix/stack_overflow.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2016-03-11 20:57:39 -0800
committerbors <bors@rust-lang.org>2016-03-11 20:57:39 -0800
commit1a019dc86de1459809f776b869e36f8e71a7665a (patch)
tree992312b494f02d65307b79fe8cb7a7eae2d4c3f6 /src/libstd/sys/unix/stack_overflow.rs
parentf1d6f126effd61c21c2134751b75b6e8924d65e3 (diff)
parent6265b6bec872240adf3cb72eecd6b0cae8627014 (diff)
downloadrust-1a019dc86de1459809f776b869e36f8e71a7665a.tar.gz
rust-1a019dc86de1459809f776b869e36f8e71a7665a.zip
Auto merge of #31925 - aturon:inherent-overlap, r=nikomatsakis
Forbid items with the same name from appearing in overlapping inherent impl blocks

For example, the following is now correctly illegal:

```rust
struct Foo;

impl Foo {
    fn id() {}
}

impl Foo {
    fn id() {}
}
```

"Overlapping" here is determined the same way it is for traits (and in fact shares the same code path): roughly, there must be some way of substituting any generic types to unify the impls, such that none of the `where` clauses are provably unsatisfiable under such a unification.

Along the way, this PR also introduces an `ImplHeader` abstraction (the first commit) that makes it easier to work with impls abstractly (without caring whether they are trait or inherent impl blocks); see the first commit.

Closes #22889
r? @nikomatsakis
Diffstat (limited to 'src/libstd/sys/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions