about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2016-03-25 05:03:13 -0700
committerbors <bors@rust-lang.org>2016-03-25 05:03:13 -0700
commit64a13a46601bb47a470264936b623b4adf706128 (patch)
tree20bdc3ccf93199048f5fb6c05abdfa70786934e5 /src/rustllvm/RustWrapper.cpp
parentf1578d37dc844ffeefcabc30960784082c3c54fa (diff)
parented8a2e230d64dff35991475f516821ab3ebe455f (diff)
downloadrust-64a13a46601bb47a470264936b623b4adf706128.tar.gz
rust-64a13a46601bb47a470264936b623b4adf706128.zip
Auto merge of #31908 - jseyfried:disallow_shadowed_traits, r=nikomatsakis
Disallow methods from traits that are not in scope

This PR only allows a trait method to be used if the trait is in scope (fixes #31379).
This is a [breaking-change]. For example, the following would break:
```rust
mod foo {
    pub trait T { fn f(&self) {} }
    impl T for () {}
}

mod bar { pub use foo::T; }

fn main() {
    pub use bar::*;
    struct T; // This shadows the trait `T`,
    ().f() // making this an error.
}
```
r? @nikomatsakis
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions