diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-07-04 10:16:51 +1000 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2025-04-02 16:16:51 +1100 |
| commit | 4c0cbaeb9e799362dd081ff8514f75e23ab8c2f5 (patch) | |
| tree | 68527462ead5fae11c0bf3bf5398b915b999e2ff /compiler/rustc_ast/src/token.rs | |
| parent | 4d8f7577b5f2f7c72d1e258c07b882d0afcf0956 (diff) | |
| download | rust-4c0cbaeb9e799362dd081ff8514f75e23ab8c2f5.tar.gz rust-4c0cbaeb9e799362dd081ff8514f75e23ab8c2f5.zip | |
Remove `TokenStream::flattened` and `InvisibleOrigin::FlattenToken`.
They are no longer needed. This does slightly worsen the error message for a single test, but that test contains code that is so badly broken that I'm not worried about it.
Diffstat (limited to 'compiler/rustc_ast/src/token.rs')
| -rw-r--r-- | compiler/rustc_ast/src/token.rs | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/compiler/rustc_ast/src/token.rs b/compiler/rustc_ast/src/token.rs index 9d56cc83ac8..055481f5d87 100644 --- a/compiler/rustc_ast/src/token.rs +++ b/compiler/rustc_ast/src/token.rs @@ -30,10 +30,6 @@ pub enum InvisibleOrigin { // Converted from `proc_macro::Delimiter` in // `proc_macro::Delimiter::to_internal`, i.e. returned by a proc macro. ProcMacro, - - // Converted from `TokenKind::NtLifetime` in `TokenStream::flatten_token`. - // Treated similarly to `ProcMacro`. - FlattenToken, } impl PartialEq for InvisibleOrigin { @@ -130,9 +126,7 @@ impl Delimiter { match self { Delimiter::Parenthesis | Delimiter::Bracket | Delimiter::Brace => false, Delimiter::Invisible(InvisibleOrigin::MetaVar(_)) => false, - Delimiter::Invisible(InvisibleOrigin::FlattenToken | InvisibleOrigin::ProcMacro) => { - true - } + Delimiter::Invisible(InvisibleOrigin::ProcMacro) => true, } } |
