diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2022-11-29 13:46:28 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2022-12-02 13:50:00 +1100 |
| commit | d5526ff40d3213f6138c1c1311d0c1a0f5c40133 (patch) | |
| tree | 8a194b0f1a15d836c75cec4fe67d1679d1c38c16 | |
| parent | 2fd364acff5f962b0ce4f4dffb5ae085d5f2b67a (diff) | |
| download | rust-d5526ff40d3213f6138c1c1311d0c1a0f5c40133.tar.gz rust-d5526ff40d3213f6138c1c1311d0c1a0f5c40133.zip | |
Reorder `StrLit` fields.
To better match `MetaItemLit`.
| -rw-r--r-- | compiler/rustc_ast/src/ast.rs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/compiler/rustc_ast/src/ast.rs b/compiler/rustc_ast/src/ast.rs index c1795be2290..fc70b68e27f 100644 --- a/compiler/rustc_ast/src/ast.rs +++ b/compiler/rustc_ast/src/ast.rs @@ -1746,13 +1746,14 @@ pub struct MetaItemLit { /// Similar to `MetaItemLit`, but restricted to string literals. #[derive(Clone, Copy, Encodable, Decodable, Debug)] pub struct StrLit { - /// The original literal token as written in source code. - pub style: StrStyle, + /// The original literal as written in source code. pub symbol: Symbol, + /// The original suffix as written in source code. pub suffix: Option<Symbol>, - pub span: Span, - /// The unescaped "semantic" representation of the literal lowered from the original token. + /// The semantic (unescaped) representation of the literal. pub symbol_unescaped: Symbol, + pub style: StrStyle, + pub span: Span, } impl StrLit { |
