Skip to content

Commit a8d94b5

Browse files
committed
---
yaml --- r: 190261 b: refs/heads/tmp c: 85b084f h: refs/heads/master i: 190259: 640cbfa v: v3
1 parent a33e339 commit a8d94b5

File tree

3 files changed

+20
-1
lines changed

3 files changed

+20
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,6 @@ refs/heads/building: 126db549b038c84269a1e4fe46f051b2c15d6970
3434
refs/heads/beta: 522d09dfecbeca1595f25ac58c6d0178bbd21d7d
3535
refs/heads/windistfix: 7608dbad651f02e837ed05eef3d74a6662a6e928
3636
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
37-
refs/heads/tmp: 00211ecfda53521ea6b6405beff1c490b04f3ce5
37+
refs/heads/tmp: 85b084f4bd5c61adf23ca0de08cfba3d23ef1cfc
3838
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3939
refs/tags/homu-tmp: d3c49d2140fc65e8bb7d7cf25bfe74dda6ce5ecf

branches/tmp/src/librustc/session/search_paths.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
use std::slice;
1212
use std::path::{Path, PathBuf};
13+
use session::early_error;
1314

1415
#[derive(Clone, Debug)]
1516
pub struct SearchPaths {
@@ -50,6 +51,9 @@ impl SearchPaths {
5051
} else {
5152
(PathKind::All, path)
5253
};
54+
if path.is_empty() {
55+
early_error("empty search path given via `-L`");
56+
}
5357
self.paths.push((kind, PathBuf::new(path)));
5458
}
5559

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
11+
// compile-flags:-L native=
12+
// error-pattern: empty search path given via `-L`
13+
14+
fn main() {
15+
}

0 commit comments

Comments
 (0)