librustc: Disallow use from reaching into impls or traits.

This can perhaps be restored in the future. For now this is a precursor to
making typedefs work as expected.
This commit is contained in:
Patrick Walton 2013-05-13 16:13:20 -07:00
parent 291518712f
commit ca9bb2d9ac
5 changed files with 187 additions and 65 deletions

View file

@ -602,7 +602,6 @@ impl PkgSrc {
/// Infers crates to build. Called only in the case where there
/// is no custom build logic
fn find_crates(&mut self) {
use PkgSrc::push_crate;
use conditions::missing_pkg_files::cond;
let dir = self.check_dir();
@ -610,14 +609,18 @@ impl PkgSrc {
debug!("Matching against %?", self.id.local_path.filestem());
for os::walk_dir(&dir) |pth| {
match pth.filename() {
Some(~"lib.rs") => push_crate(&mut self.libs,
prefix, pth),
Some(~"main.rs") => push_crate(&mut self.mains,
prefix, pth),
Some(~"test.rs") => push_crate(&mut self.tests,
prefix, pth),
Some(~"bench.rs") => push_crate(&mut self.benchs,
prefix, pth),
Some(~"lib.rs") => PkgSrc::push_crate(&mut self.libs,
prefix,
pth),
Some(~"main.rs") => PkgSrc::push_crate(&mut self.mains,
prefix,
pth),
Some(~"test.rs") => PkgSrc::push_crate(&mut self.tests,
prefix,
pth),
Some(~"bench.rs") => PkgSrc::push_crate(&mut self.benchs,
prefix,
pth),
_ => ()
}
}