about summary refs log tree commit diff
path: root/src/libsyntax/parse/mod.rs
diff options
context:
space:
mode:
authorNicholas Nethercote <nnethercote@mozilla.com>2019-05-08 13:21:18 +1000
committerNicholas Nethercote <nnethercote@mozilla.com>2019-05-13 09:29:22 +1000
commitfb084a48e2ca663de41b316dc6ece2dceb93e24e (patch)
treeb78379f996dceee6039ea4880c66e7fe30b3efad /src/libsyntax/parse/mod.rs
parent79602c87b561e26fa1a8fe58b9130cca37375f90 (diff)
downloadrust-fb084a48e2ca663de41b316dc6ece2dceb93e24e.tar.gz
rust-fb084a48e2ca663de41b316dc6ece2dceb93e24e.zip
Pass a `Symbol` to `check_name`, `emit_feature_err`, and related functions.
Diffstat (limited to 'src/libsyntax/parse/mod.rs')
-rw-r--r--src/libsyntax/parse/mod.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/libsyntax/parse/mod.rs b/src/libsyntax/parse/mod.rs
index 526143b2875..64f3704e808 100644
--- a/src/libsyntax/parse/mod.rs
+++ b/src/libsyntax/parse/mod.rs
@@ -575,13 +575,15 @@ mod tests {
 
     #[test] fn crlf_doc_comments() {
         with_globals(|| {
+            use crate::symbol::sym;
+
             let sess = ParseSess::new(FilePathMapping::empty());
 
             let name_1 = FileName::Custom("crlf_source_1".to_string());
             let source = "/// doc comment\r\nfn foo() {}".to_string();
             let item = parse_item_from_source_str(name_1, source, &sess)
                 .unwrap().unwrap();
-            let doc = first_attr_value_str_by_name(&item.attrs, "doc").unwrap();
+            let doc = first_attr_value_str_by_name(&item.attrs, sym::doc).unwrap();
             assert_eq!(doc, "/// doc comment");
 
             let name_2 = FileName::Custom("crlf_source_2".to_string());
@@ -596,7 +598,7 @@ mod tests {
             let name_3 = FileName::Custom("clrf_source_3".to_string());
             let source = "/** doc comment\r\n *  with CRLF */\r\nfn foo() {}".to_string();
             let item = parse_item_from_source_str(name_3, source, &sess).unwrap().unwrap();
-            let doc = first_attr_value_str_by_name(&item.attrs, "doc").unwrap();
+            let doc = first_attr_value_str_by_name(&item.attrs, sym::doc).unwrap();
             assert_eq!(doc, "/** doc comment\n *  with CRLF */");
         });
     }