Skip to content

Commit

Permalink
Test fixes and rebase conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
alexcrichton committed Jul 5, 2014
1 parent 41ed455 commit 15b680a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/librustc/metadata/creader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/middle/trans/debuginfo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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> {
Expand Down
6 changes: 4 additions & 2 deletions src/test/run-make/issue-11908/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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"

0 comments on commit 15b680a

Please sign in to comment.