Skip to content

Commit 3a48021

Browse files
committed
Include lifetimes in error reporting spans
1 parent 2e04053 commit 3a48021

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

syntax/tokens.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ impl ToTokens for ExternType {
153153
// Notional token range for error reporting purposes.
154154
self.type_token.to_tokens(tokens);
155155
self.name.rust.to_tokens(tokens);
156+
self.generics.to_tokens(tokens);
156157
}
157158
}
158159

@@ -161,6 +162,7 @@ impl ToTokens for TypeAlias {
161162
// Notional token range for error reporting purposes.
162163
self.type_token.to_tokens(tokens);
163164
self.name.rust.to_tokens(tokens);
165+
self.generics.to_tokens(tokens);
164166
}
165167
}
166168

@@ -169,6 +171,7 @@ impl ToTokens for Struct {
169171
// Notional token range for error reporting purposes.
170172
self.struct_token.to_tokens(tokens);
171173
self.name.rust.to_tokens(tokens);
174+
self.generics.to_tokens(tokens);
172175
}
173176
}
174177

@@ -177,6 +180,7 @@ impl ToTokens for Enum {
177180
// Notional token range for error reporting purposes.
178181
self.enum_token.to_tokens(tokens);
179182
self.name.rust.to_tokens(tokens);
183+
self.generics.to_tokens(tokens);
180184
}
181185
}
182186

0 commit comments

Comments
 (0)