forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rustc: Make all impls even more reachable
With this we write metadata for all impls so that we can properly find reexported impls.
- Loading branch information
Showing
3 changed files
with
49 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#[link(name = "crate_method_reexport_grrrrrrr2")]; | ||
|
||
export rust; | ||
|
||
import name_pool::methods; | ||
|
||
mod name_pool { | ||
|
||
type name_pool = (); | ||
|
||
impl methods for name_pool { | ||
fn add(s: str) { | ||
} | ||
} | ||
} | ||
|
||
mod rust { | ||
|
||
export rt; | ||
export methods; | ||
|
||
type rt = @(); | ||
|
||
impl methods for rt { | ||
fn cx() { | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// This is a regression test that the metadata for the | ||
// name_pool::methods impl in the other crate is reachable from this | ||
// crate. | ||
|
||
// aux-build:crate-method-reexport-grrrrrrr2.rs | ||
|
||
use crate_method_reexport_grrrrrrr2; | ||
|
||
fn main() { | ||
import crate_method_reexport_grrrrrrr2::rust::methods; | ||
let x = @(); | ||
x.cx(); | ||
let y = (); | ||
y.add("hi"); | ||
} |