File tree 2 files changed +34
-2
lines changed
2 files changed +34
-2
lines changed Original file line number Diff line number Diff line change @@ -5498,11 +5498,10 @@ impl Resolver {
5498
5498
5499
5499
// Move to the next parent.
5500
5500
match search_module. parent_link {
5501
- NoParentLink => {
5501
+ NoParentLink | ModuleParentLink ( .. ) => {
5502
5502
// Done.
5503
5503
break ;
5504
5504
}
5505
- ModuleParentLink ( parent_module, _) |
5506
5505
BlockParentLink ( parent_module, _) => {
5507
5506
search_module = parent_module;
5508
5507
}
Original file line number Diff line number Diff line change
1
+ // Copyright 2014 The Rust Project Developers. See the COPYRIGHT
2
+ // file at the top-level directory of this distribution and at
3
+ // http://rust-lang.org/COPYRIGHT.
4
+ //
5
+ // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6
+ // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7
+ // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8
+ // option. This file may not be copied, modified, or distributed
9
+ // except according to those terms.
10
+
11
+ pub mod a {
12
+ pub trait A {
13
+ fn foo ( & self ) ;
14
+ }
15
+
16
+ }
17
+ pub mod b {
18
+ use a:: A ;
19
+
20
+ pub struct B ;
21
+ impl A for B { fn foo ( & self ) { } }
22
+
23
+ pub mod c {
24
+ use b:: B ;
25
+
26
+ fn foo ( b : & B ) {
27
+ b. foo ( ) ; //~ ERROR: does not implement any method in scope named
28
+ }
29
+ }
30
+
31
+ }
32
+
33
+ fn main ( ) { }
You can’t perform that action at this time.
0 commit comments