Skip to content

Commit 6fef4f0

Browse files
authored
Rollup merge of rust-lang#116696 - c410-f3r:in-doc, r=petrochenkov
Misc improvements cc rust-lang#116323 (comment) r? `@petrochenkov`
2 parents e515116 + 6b59f6f commit 6fef4f0

File tree

2 files changed

+35
-6
lines changed

2 files changed

+35
-6
lines changed

compiler/rustc_ast/src/token.rs

+27
Original file line numberDiff line numberDiff line change
@@ -229,35 +229,61 @@ fn ident_can_begin_type(name: Symbol, span: Span, is_raw: bool) -> bool {
229229
#[derive(PartialEq, Encodable, Decodable, Debug, HashStable_Generic)]
230230
pub enum TokenKind {
231231
/* Expression-operator symbols. */
232+
/// `=`
232233
Eq,
234+
/// `<`
233235
Lt,
236+
/// `<=`
234237
Le,
238+
/// `==`
235239
EqEq,
240+
/// `!=`
236241
Ne,
242+
/// `>`
237243
Ge,
244+
/// `>=`
238245
Gt,
246+
/// `&&`
239247
AndAnd,
248+
/// `||`
240249
OrOr,
250+
/// `!`
241251
Not,
252+
/// `~`
242253
Tilde,
243254
BinOp(BinOpToken),
244255
BinOpEq(BinOpToken),
245256

246257
/* Structural symbols */
258+
/// `@`
247259
At,
260+
/// `.`
248261
Dot,
262+
/// `..`
249263
DotDot,
264+
/// `...`
250265
DotDotDot,
266+
/// `..=`
251267
DotDotEq,
268+
/// `,`
252269
Comma,
270+
/// `;`
253271
Semi,
272+
/// `:`
254273
Colon,
274+
/// `::`
255275
ModSep,
276+
/// `->`
256277
RArrow,
278+
/// `<-`
257279
LArrow,
280+
/// `=>`
258281
FatArrow,
282+
/// `#`
259283
Pound,
284+
/// `$`
260285
Dollar,
286+
/// `?`
261287
Question,
262288
/// Used by proc macros for representing lifetimes, not generated by lexer right now.
263289
SingleQuote,
@@ -296,6 +322,7 @@ pub enum TokenKind {
296322
/// similarly to symbols in string literal tokens.
297323
DocComment(CommentKind, ast::AttrStyle, Symbol),
298324

325+
/// End Of File
299326
Eof,
300327
}
301328

compiler/rustc_builtin_macros/src/lib.rs

+8-6
Original file line numberDiff line numberDiff line change
@@ -71,33 +71,35 @@ pub fn register_builtin_macros(resolver: &mut dyn ResolverExpand) {
7171
}
7272

7373
register_bang! {
74+
// tidy-alphabetical-start
7475
asm: asm::expand_asm,
7576
assert: assert::expand_assert,
7677
cfg: cfg::expand_cfg,
7778
column: source_util::expand_column,
7879
compile_error: compile_error::expand_compile_error,
80+
concat: concat::expand_concat,
7981
concat_bytes: concat_bytes::expand_concat_bytes,
8082
concat_idents: concat_idents::expand_concat_idents,
81-
concat: concat::expand_concat,
83+
const_format_args: format::expand_format_args,
84+
core_panic: edition_panic::expand_panic,
8285
env: env::expand_env,
8386
file: source_util::expand_file,
84-
format_args_nl: format::expand_format_args_nl,
8587
format_args: format::expand_format_args,
86-
const_format_args: format::expand_format_args,
88+
format_args_nl: format::expand_format_args_nl,
8789
global_asm: asm::expand_global_asm,
90+
include: source_util::expand_include,
8891
include_bytes: source_util::expand_include_bytes,
8992
include_str: source_util::expand_include_str,
90-
include: source_util::expand_include,
9193
line: source_util::expand_line,
9294
log_syntax: log_syntax::expand_log_syntax,
9395
module_path: source_util::expand_mod,
9496
option_env: env::expand_option_env,
95-
core_panic: edition_panic::expand_panic,
9697
std_panic: edition_panic::expand_panic,
97-
unreachable: edition_panic::expand_unreachable,
9898
stringify: source_util::expand_stringify,
9999
trace_macros: trace_macros::expand_trace_macros,
100100
type_ascribe: type_ascribe::expand_type_ascribe,
101+
unreachable: edition_panic::expand_unreachable,
102+
// tidy-alphabetical-end
101103
}
102104

103105
register_attr! {

0 commit comments

Comments
 (0)