mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-08 01:28:18 +03:00
rustc: Handle #[link(name = "")] error
This commit is contained in:
@@ -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 {}
|
||||
|
||||
Reference in New Issue
Block a user