File tree 3 files changed +5
-5
lines changed
3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ expand_invalid_cfg_no_predicate = `cfg` predicate is not specified
63
63
expand_invalid_cfg_predicate_literal = `cfg` predicate key cannot be a literal
64
64
65
65
expand_invalid_fragment_specifier =
66
- invalid fragment specifier `{ $name } `
66
+ invalid fragment specifier `{ $fragment } `
67
67
.help = { $help }
68
68
69
69
expand_macro_body_stability =
Original file line number Diff line number Diff line change @@ -415,6 +415,6 @@ pub struct DuplicateMatcherBinding {
415
415
pub struct InvalidFragmentSpecifier {
416
416
#[ primary_span]
417
417
pub span : Span ,
418
- pub name : String ,
418
+ pub fragment : Ident ,
419
419
pub help : String ,
420
420
}
Original file line number Diff line number Diff line change @@ -61,11 +61,11 @@ pub(super) fn parse(
61
61
Some ( & tokenstream:: TokenTree :: Token ( Token { kind : token:: Colon , span } , _) ) => {
62
62
match trees. next ( ) {
63
63
Some ( tokenstream:: TokenTree :: Token ( token, _) ) => match token. ident ( ) {
64
- Some ( ( frag , _) ) => {
64
+ Some ( ( fragment , _) ) => {
65
65
let span = token. span . with_lo ( start_sp. lo ( ) ) ;
66
66
67
67
let kind =
68
- token:: NonterminalKind :: from_symbol ( frag . name , || {
68
+ token:: NonterminalKind :: from_symbol ( fragment . name , || {
69
69
// FIXME(#85708) - once we properly decode a foreign
70
70
// crate's `SyntaxContext::root`, then we can replace
71
71
// this with just `span.edition()`. A
@@ -85,7 +85,7 @@ pub(super) fn parse(
85
85
sess. dcx ( ) . emit_err (
86
86
errors:: InvalidFragmentSpecifier {
87
87
span,
88
- name : frag . name . to_string ( ) ,
88
+ fragment ,
89
89
help : VALID_FRAGMENT_NAMES_MSG . into ( ) ,
90
90
} ,
91
91
) ;
You can’t perform that action at this time.
0 commit comments