From b45d30da34142fc33dd41bbf67c7dfc1a69ddf01 Mon Sep 17 00:00:00 2001 From: Eduard Burtescu Date: Fri, 19 Dec 2014 14:02:22 +0200 Subject: Fix fallout of removing import_shadowing in tests. --- src/libsyntax/parse/mod.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/libsyntax/parse') diff --git a/src/libsyntax/parse/mod.rs b/src/libsyntax/parse/mod.rs index d6f5d0e248a..3d0877dd432 100644 --- a/src/libsyntax/parse/mod.rs +++ b/src/libsyntax/parse/mod.rs @@ -745,8 +745,7 @@ mod test { use owned_slice::OwnedSlice; use ast; use abi; - use attr; - use attr::AttrMetaMethods; + use attr::{first_attr_value_str_by_name, AttrMetaMethods}; use parse::parser::Parser; use parse::token::{str_to_ident}; use print::pprust::view_item_to_string; @@ -1195,7 +1194,7 @@ mod test { let name = "".to_string(); let source = "/// doc comment\r\nfn foo() {}".to_string(); let item = parse_item_from_source_str(name.clone(), source, Vec::new(), &sess).unwrap(); - let doc = attr::first_attr_value_str_by_name(item.attrs.as_slice(), "doc").unwrap(); + let doc = first_attr_value_str_by_name(item.attrs.as_slice(), "doc").unwrap(); assert_eq!(doc.get(), "/// doc comment"); let source = "/// doc comment\r\n/// line 2\r\nfn foo() {}".to_string(); @@ -1207,7 +1206,7 @@ mod test { let source = "/** doc comment\r\n * with CRLF */\r\nfn foo() {}".to_string(); let item = parse_item_from_source_str(name, source, Vec::new(), &sess).unwrap(); - let doc = attr::first_attr_value_str_by_name(item.attrs.as_slice(), "doc").unwrap(); + let doc = first_attr_value_str_by_name(item.attrs.as_slice(), "doc").unwrap(); assert_eq!(doc.get(), "/** doc comment\n * with CRLF */"); } } -- cgit 1.4.1-3-g733a5