rustc: Handle #[link(name = "")] error
This commit is contained in:
parent
e86cdaf23d
commit
2afa97a346
2 changed files with 6 additions and 1 deletions
|
|
@ -219,7 +219,11 @@ fn visit_item(e: &Env, i: @ast::item) {
|
|||
@"foo"
|
||||
}
|
||||
};
|
||||
cstore::add_used_library(cstore, n.to_owned(), kind);
|
||||
if n.is_empty() {
|
||||
e.sess.span_err(m.span, "#[link(name = \"\")] given with empty name");
|
||||
} else {
|
||||
cstore::add_used_library(cstore, n.to_owned(), kind);
|
||||
}
|
||||
}
|
||||
None => {}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
#[link()] //~ ERROR: specified without `name =
|
||||
#[link(name = "")] //~ ERROR: with empty name
|
||||
#[link(name = "foo")]
|
||||
#[link(name = "foo", kind = "bar")] //~ ERROR: unknown kind
|
||||
extern {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue