From 15b680ae86eefae754c3a348d89207fa100b4ca6 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Thu, 3 Jul 2014 07:43:12 -0700 Subject: [PATCH] Test fixes and rebase conflicts --- src/librustc/metadata/creader.rs | 2 +- src/librustc/middle/trans/debuginfo.rs | 2 +- src/test/run-make/issue-11908/Makefile | 6 ++++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/librustc/metadata/creader.rs b/src/librustc/metadata/creader.rs index 7d3d67df6d157..29566fb1e7cd1 100644 --- a/src/librustc/metadata/creader.rs +++ b/src/librustc/metadata/creader.rs @@ -180,7 +180,7 @@ pub fn validate_crate_name(sess: Option<&Session>, s: &str, sp: Option) { 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(), diff --git a/src/librustc/middle/trans/debuginfo.rs b/src/librustc/middle/trans/debuginfo.rs index 0a8b844d2542e..7eb3fcce7803f 100644 --- a/src/librustc/middle/trans/debuginfo.rs +++ b/src/librustc/middle/trans/debuginfo.rs @@ -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 { diff --git a/src/test/run-make/issue-11908/Makefile b/src/test/run-make/issue-11908/Makefile index 66f360daa1a33..663a9f7125e70 100644 --- a/src/test/run-make/issue-11908/Makefile +++ b/src/test/run-make/issue-11908/Makefile @@ -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"