Test fixes and rebase conflicts

This commit is contained in:
Alex Crichton 2014-07-03 07:43:12 -07:00
parent 41ed455db8
commit 15b680ae86
3 changed files with 6 additions and 4 deletions

View file

@ -180,7 +180,7 @@ pub fn validate_crate_name(sess: Option<&Session>, s: &str, sp: Option<Span>) {
for c in s.chars() {
if c.is_alphanumeric() { continue }
if c == '_' || c == '-' { continue }
err(format!("invalid character in crate name: `{}`", c).as_slice());
err(format!("invalid character `{}` in crate name: `{}`", c, s).as_slice());
}
match sess {
Some(sess) => sess.abort_if_errors(),

View file

@ -3972,7 +3972,7 @@ impl NamespaceTreeNode {
}
fn crate_root_namespace<'a>(cx: &'a CrateContext) -> &'a str {
cx.link_meta.crateid.name.as_slice()
cx.link_meta.crate_name.as_slice()
}
fn namespace_for_item(cx: &CrateContext, def_id: ast::DefId) -> Rc<NamespaceTreeNode> {

View file

@ -10,12 +10,14 @@
all:
mkdir $(TMPDIR)/other
$(RUSTC) foo.rs --crate-type=dylib
$(RUSTC) foo.rs --crate-type=dylib -o $(TMPDIR)/other/libfoo.so
mv $(call DYLIB,foo) $(TMPDIR)/other
$(RUSTC) foo.rs --crate-type=dylib
$(RUSTC) bar.rs -L $(TMPDIR)/other 2>&1 | \
grep "multiple dylib candidates"
rm -rf $(TMPDIR)
mkdir -p $(TMPDIR)/other
$(RUSTC) foo.rs --crate-type=rlib
$(RUSTC) foo.rs --crate-type=rlib -o $(TMPDIR)/other/libfoo.rlib
mv $(TMPDIR)/libfoo.rlib $(TMPDIR)/other
$(RUSTC) foo.rs --crate-type=rlib
$(RUSTC) bar.rs -L $(TMPDIR)/other 2>&1 | \
grep "multiple rlib candidates"