Logo
Explore Help
Register Sign In
rust-lang/rust
1
0
Fork 0
You've already forked rust
Code Issues Pull Requests Actions 1 Packages Projects Releases Wiki Activity
Files
9f38ca97eab53ba2f431a48bec2343ef52335714
rust/tests/ui/traits/missing-trait-method-error.rs

24 lines
298 B
Rust
Raw Normal View History

Fix leaking trait imports across modules Turns out the pass in resolve was a little too eager to travel back up the hierarchy chain when looking for trait candidates. Closes #10465
2014-01-06 16:47:00 -08:00
pub mod a {
pub trait A {
fn foo(&self);
}
}
pub mod b {
use a::A;
pub struct B;
impl A for B { fn foo(&self) {} }
pub mod c {
use b::B;
fn foo(b: &B) {
Fix ICE that occurs when an associated const is ambiguous. Also change several error messages to refer to "items" rather than "methods", since associated items that require resolution during type checking are not always methods.
2015-05-02 23:30:59 -06:00
b.foo(); //~ ERROR: no method named `foo` found
Fix leaking trait imports across modules Turns out the pass in resolve was a little too eager to travel back up the hierarchy chain when looking for trait candidates. Closes #10465
2014-01-06 16:47:00 -08:00
}
}
}
fn main() {}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 4807ms Template: 4ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API