diff options
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/attr.rs | 2 | ||||
| -rw-r--r-- | src/libsyntax/diagnostic.rs | 2 | ||||
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/src/libsyntax/attr.rs b/src/libsyntax/attr.rs index 56fe46251e9..ed52fbd0f5a 100644 --- a/src/libsyntax/attr.rs +++ b/src/libsyntax/attr.rs @@ -245,7 +245,7 @@ fn contains_name(metas: &[@ast::meta_item], name: &str) -> bool { } fn attrs_contains_name(attrs: &[ast::attribute], name: &str) -> bool { - vec::is_not_empty(find_attrs_by_name(attrs, name)) + !find_attrs_by_name(attrs, name).is_empty() } fn first_attr_value_str_by_name(attrs: ~[ast::attribute], name: ~str) diff --git a/src/libsyntax/diagnostic.rs b/src/libsyntax/diagnostic.rs index c00b956f553..6112313cf48 100644 --- a/src/libsyntax/diagnostic.rs +++ b/src/libsyntax/diagnostic.rs @@ -192,7 +192,7 @@ fn diagnosticcolor(lvl: level) -> u8 { fn print_diagnostic(topic: ~str, lvl: level, msg: &str) { let use_color = term::color_supported() && io::stderr().get_type() == io::Screen; - if str::is_not_empty(topic) { + if !topic.is_empty() { io::stderr().write_str(fmt!("%s ", topic)); } if use_color { diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 7183b623ef4..0bd08250617 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -2237,7 +2237,7 @@ impl Parser { fn check_expected_item(p: Parser, current_attrs: ~[attribute]) { // If we have attributes then we should have an item - if vec::is_not_empty(current_attrs) { + if !current_attrs.is_empty() { p.fatal(~"expected item after attrs"); } } |
