about summary refs log tree commit diff
path: root/src/libsyntax_ext
diff options
context:
space:
mode:
authorAndy Russell <arussell123@gmail.com>2019-01-04 15:00:15 -0500
committerAndy Russell <arussell123@gmail.com>2019-01-08 13:24:38 -0500
commite37997005601e838aa221dc5be087e827df57264 (patch)
tree972f764941a61a2793f97707754fd1f83e2fc6da /src/libsyntax_ext
parent7c0d145ec1603fd7d4de2ef38a70baeffbedaad2 (diff)
downloadrust-e37997005601e838aa221dc5be087e827df57264.tar.gz
rust-e37997005601e838aa221dc5be087e827df57264.zip
improve non_upper_case_globals diagnostics
Use a structured suggestion and tighten the span to just the identifier.
Diffstat (limited to 'src/libsyntax_ext')
-rw-r--r--src/libsyntax_ext/test.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libsyntax_ext/test.rs b/src/libsyntax_ext/test.rs
index cf842dddeb3..a19d0458edd 100644
--- a/src/libsyntax_ext/test.rs
+++ b/src/libsyntax_ext/test.rs
@@ -124,14 +124,14 @@ pub fn expand_test_or_bench(
         ])
     };
 
-    let mut test_const = cx.item(sp, item.ident.gensym(),
+    let mut test_const = cx.item(sp, ast::Ident::new(item.ident.name.gensymed(), sp),
         vec![
             // #[cfg(test)]
             cx.attribute(attr_sp, cx.meta_list(attr_sp, Symbol::intern("cfg"), vec![
                 cx.meta_list_item_word(attr_sp, Symbol::intern("test"))
             ])),
             // #[rustc_test_marker]
-            cx.attribute(attr_sp, cx.meta_word(attr_sp, Symbol::intern("rustc_test_marker")))
+            cx.attribute(attr_sp, cx.meta_word(attr_sp, Symbol::intern("rustc_test_marker"))),
         ],
         // const $ident: test::TestDescAndFn =
         ast::ItemKind::Const(cx.ty(sp, ast::TyKind::Path(None, test_path("TestDescAndFn"))),