Skip to content

Commit d18988e

Browse files
committed
---
yaml --- r: 186345 b: refs/heads/try c: c0a8744 h: refs/heads/master i: 186343: f870e93 v: v3
1 parent fc37645 commit d18988e

File tree

7 files changed

+12
-75
lines changed

7 files changed

+12
-75
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: b4c965ee803a4521d8b4575f634e036f93e408f3
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 3a96d6a9818fe2affc98a187fb1065120458cee9
5-
refs/heads/try: 80627cd3cc4099b76cb2fb26ebe2f2f8a6c2335e
5+
refs/heads/try: c0a874472a863058ac39654626bf62c2d953b27b
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
88
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596

branches/try/src/librustc/metadata/loader.rs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -370,8 +370,9 @@ impl<'a> Context<'a> {
370370
// must be loaded via -L plus some filtering.
371371
if self.hash.is_none() {
372372
self.should_match_name = false;
373-
if let Some(s) = self.sess.opts.externs.get(self.crate_name) {
374-
return self.find_commandline_library(s);
373+
match self.find_commandline_library() {
374+
Some(l) => return Some(l),
375+
None => {}
375376
}
376377
self.should_match_name = true;
377378
}
@@ -618,7 +619,12 @@ impl<'a> Context<'a> {
618619
(t.options.dll_prefix.clone(), t.options.dll_suffix.clone())
619620
}
620621

621-
fn find_commandline_library(&mut self, locs: &[String]) -> Option<Library> {
622+
fn find_commandline_library(&mut self) -> Option<Library> {
623+
let locs = match self.sess.opts.externs.get(self.crate_name) {
624+
Some(s) => s,
625+
None => return None,
626+
};
627+
622628
// First, filter out all libraries that look suspicious. We only accept
623629
// files which actually exist that have the correct naming scheme for
624630
// rlibs/dylibs.

branches/try/src/libsyntax/ast.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -924,13 +924,13 @@ impl TokenTree {
924924
let v = [TtToken(sp, token::Dollar),
925925
TtToken(sp, token::Ident(token::str_to_ident(var.as_str()),
926926
token::Plain))];
927-
v[index]
927+
v[index].clone()
928928
}
929929
(&TtToken(sp, token::MatchNt(name, kind, name_st, kind_st)), _) => {
930930
let v = [TtToken(sp, token::SubstNt(name, name_st)),
931931
TtToken(sp, token::Colon),
932932
TtToken(sp, token::Ident(kind, kind_st))];
933-
v[index]
933+
v[index].clone()
934934
}
935935
(&TtSequence(_, ref seq), _) => {
936936
seq.tts[index].clone()

branches/try/src/test/run-make/use-extern-for-plugins/Makefile

Lines changed: 0 additions & 13 deletions
This file was deleted.

branches/try/src/test/run-make/use-extern-for-plugins/bar.rs

Lines changed: 0 additions & 19 deletions
This file was deleted.

branches/try/src/test/run-make/use-extern-for-plugins/baz.rs

Lines changed: 0 additions & 18 deletions
This file was deleted.

branches/try/src/test/run-make/use-extern-for-plugins/foo.rs

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)