From e37997005601e838aa221dc5be087e827df57264 Mon Sep 17 00:00:00 2001 From: Andy Russell Date: Fri, 4 Jan 2019 15:00:15 -0500 Subject: improve non_upper_case_globals diagnostics Use a structured suggestion and tighten the span to just the identifier. --- src/libsyntax_ext/test.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/libsyntax_ext') 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"))), -- cgit 1.4.1-3-g733a5