rustc: Track stability of trait implementations
Previously an implementation of a stable trait allows implementations of unstable methods. This updates the stability pass to ensure that all items of an impl block of a trait are indeed stable on the trait itself.
This commit is contained in:
parent
f1bb6c2f46
commit
0cf2d00f0e
3 changed files with 37 additions and 3 deletions
|
|
@ -133,6 +133,11 @@ mod cross_crate {
|
|||
impl UnstableTrait for S { } //~ WARNING use of unstable library feature
|
||||
|
||||
trait LocalTrait : UnstableTrait { } //~ WARNING use of unstable library feature
|
||||
|
||||
impl Trait for S {
|
||||
fn trait_stable(&self) {}
|
||||
fn trait_unstable(&self) {} //~ WARNING use of unstable library feature
|
||||
}
|
||||
}
|
||||
|
||||
mod inheritance {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue