diff options
| author | bors <bors@rust-lang.org> | 2019-01-14 06:35:51 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2019-01-14 06:35:51 +0000 |
| commit | 1d029c67e22b272ecc7a32044710600bfa3578e5 (patch) | |
| tree | d3f7419b858bce0bff4919cb06d3c946d5c118b2 /src/libsyntax_ext | |
| parent | 0bc0015f20d95a676359273259a6c07a85edf4b0 (diff) | |
| parent | 1b28f5aa668504fd84ce4ab7298f20696b9ffb5a (diff) | |
Auto merge of #57387 - euclio:nonstandard-style-suggestions, r=oli-obk
Use structured suggestions for nonstandard style lints This PR modifies the lints in the nonstandard_style group to use structured suggestions. Note that there's a bit of tricky span calculation going on for the `crate_name` attribute. It also simplifies the code a bit: I don't think the "fallback" suggestions for these lints can actually be triggered. Fixes #48103. Fixes #52414.
Diffstat (limited to 'src/libsyntax_ext')
| -rw-r--r-- | src/libsyntax_ext/test.rs | 4 |
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"))), |
