Require that the meta items in a use statement have unique names

This commit is contained in:
Brian Anderson 2011-07-05 15:58:48 -07:00
parent a793b85fbd
commit 375f0b2211
2 changed files with 9 additions and 0 deletions

View File

@ -58,6 +58,8 @@ fn find_library_crate(&session::session sess, &ast::ident ident,
&vec[str] library_search_paths) ->
option::t[tup(str, vec[u8])] {
attr::require_unique_names(sess, metas);
auto crate_name = {
auto name_items = attr::find_meta_items_by_name(metas, "name");
alt (vec::last(name_items)) {

View File

@ -0,0 +1,7 @@
// xfail-stage0
// error-pattern:duplicate meta item `name`
use std(name = "std",
name = "nonstd");
fn main(){}