File tree 1 file changed +3
-5
lines changed
1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -24,8 +24,7 @@ use core::either::Either;
24
24
use core:: either;
25
25
use core:: option;
26
26
use core:: vec;
27
- use std:: oldmap:: HashMap ;
28
- use std:: oldmap;
27
+ use core:: hashmap:: linear:: LinearSet ;
29
28
use std;
30
29
31
30
/* Constructors */
@@ -358,16 +357,15 @@ pub fn find_inline_attr(attrs: &[ast::attribute]) -> inline_attr {
358
357
359
358
pub fn require_unique_names(diagnostic: span_handler,
360
359
metas: &[@ast::meta_item]) {
361
- let map = oldmap::HashMap ();
360
+ let mut set = LinearSet::new ();
362
361
for metas.each |meta| {
363
362
let name = get_meta_item_name(*meta);
364
363
365
364
// FIXME: How do I silence the warnings? --pcw (#2619)
366
- if map.contains_key(& name) {
365
+ if !set.insert( name) {
367
366
diagnostic.span_fatal(meta.span,
368
367
fmt!(" duplicate meta item `%s`", name) ) ;
369
368
}
370
- map. insert( name, ( ) ) ;
371
369
}
372
370
}
373
371
You can’t perform that action at this time.
0 commit comments