Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ICE: None in compiler/rustc_parse/src/parser/attr_wrapper.rs, Zunpretty=ast-tree #105273

Closed
matthiaskrgr opened this issue Dec 4, 2022 · 6 comments
Labels
C-bug Category: This is a bug. E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. glacier ICE tracked in rust-lang/glacier. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ requires-nightly This issue requires a nightly compiler in some way. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@matthiaskrgr
Copy link
Member

matthiaskrgr commented Dec 4, 2022

Code

#![c = ({(while ""))();

Meta

rustc --version --verbose:

rustc 1.67.0-nightly (234151769 2022-12-03)
binary: rustc
commit-hash: 23415176968e81e0aac92d0218612a89c4e68a82
commit-date: 2022-12-03
host: x86_64-unknown-linux-gnu
release: 1.67.0-nightly
LLVM version: 15.0.4

Error output

rustc -Zunpretty=ast-tree

 --> 601109e5755a0079ced5ae51a466eeeddb90f965.rs:6:2
  |
1 | #![c = ({(while ""))();
  |   - unclosed delimiter
...
6 |
  |  ^

error: expected `{`, found `)`
 --> 601109e5755a0079ced5ae51a466eeeddb90f965.rs:1:19
  |
1 | #![c = ({(while ""))();
  |           ----- --^ expected `{`
  |           |     |
  |           |     this `while` condition successfully parsed
  |           while parsing the body of this `while` expression

error: expected expression, found `]`
 --> 601109e5755a0079ced5ae51a466eeeddb90f965.rs:6:2
  |
6 |
  |  ^ expected expression

error: expected one of `)`, `.`, `?`, `]`, `}`, or an operator, found `<eof>`
 --> 601109e5755a0079ced5ae51a466eeeddb90f965.rs:1:9
  |
1 | #![c = ({(while ""))();
  |         ^ unclosed delimiter
...
6 |
  |  ^ help: `}` may belong here
Backtrace

thread '<unnamed>' panicked at 'called `Option::unwrap()` on a `None` value', compiler/rustc_parse/src/parser/attr_wrapper.rs:415:45
stack backtrace:
   0:     0x7f6584f6625a - std::backtrace_rs::backtrace::libunwind::trace::h39c51bcedb139b44
                               at /rustc/23415176968e81e0aac92d0218612a89c4e68a82/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x7f6584f6625a - std::backtrace_rs::backtrace::trace_unsynchronized::h9cf890f6f509d0c3
                               at /rustc/23415176968e81e0aac92d0218612a89c4e68a82/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7f6584f6625a - std::sys_common::backtrace::_print_fmt::h4a0d7673c4689a86
                               at /rustc/23415176968e81e0aac92d0218612a89c4e68a82/library/std/src/sys_common/backtrace.rs:65:5
   3:     0x7f6584f6625a - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hed99d8097fd95926
                               at /rustc/23415176968e81e0aac92d0218612a89c4e68a82/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x7f6584fc8e4e - core::fmt::write::hdab16ae0136a16af
                               at /rustc/23415176968e81e0aac92d0218612a89c4e68a82/library/core/src/fmt/mod.rs:1208:17
   5:     0x7f6584f56675 - std::io::Write::write_fmt::h9619f0289bf5af21
                               at /rustc/23415176968e81e0aac92d0218612a89c4e68a82/library/std/src/io/mod.rs:1682:15
   6:     0x7f6584f66025 - std::sys_common::backtrace::_print::h2fbe09348ca97657
                               at /rustc/23415176968e81e0aac92d0218612a89c4e68a82/library/std/src/sys_common/backtrace.rs:47:5
   7:     0x7f6584f66025 - std::sys_common::backtrace::print::h72058f5ceb813403
                               at /rustc/23415176968e81e0aac92d0218612a89c4e68a82/library/std/src/sys_common/backtrace.rs:34:9
   8:     0x7f6584f68d6f - std::panicking::default_hook::{{closure}}::h1542b395e584376b
                               at /rustc/23415176968e81e0aac92d0218612a89c4e68a82/library/std/src/panicking.rs:267:22
   9:     0x7f6584f68aab - std::panicking::default_hook::hf92492522bb6bc51
                               at /rustc/23415176968e81e0aac92d0218612a89c4e68a82/library/std/src/panicking.rs:286:9
  10:     0x7f6584f6958c - std::panicking::rust_panic_with_hook::h8e3ba576266d6126
                               at /rustc/23415176968e81e0aac92d0218612a89c4e68a82/library/std/src/panicking.rs:688:13
  11:     0x7f6584f692e2 - std::panicking::begin_panic_handler::{{closure}}::h5718d689762256a1
                               at /rustc/23415176968e81e0aac92d0218612a89c4e68a82/library/std/src/panicking.rs:577:13
  12:     0x7f6584f6670c - std::sys_common::backtrace::__rust_end_short_backtrace::hb4469c61f2390e29
                               at /rustc/23415176968e81e0aac92d0218612a89c4e68a82/library/std/src/sys_common/backtrace.rs:137:18
  13:     0x7f6584f69032 - rust_begin_unwind
                               at /rustc/23415176968e81e0aac92d0218612a89c4e68a82/library/std/src/panicking.rs:575:5
  14:     0x7f6584fc5863 - core::panicking::panic_fmt::h4dafe9d2577d7060
                               at /rustc/23415176968e81e0aac92d0218612a89c4e68a82/library/core/src/panicking.rs:64:14
  15:     0x7f6584fc593d - core::panicking::panic::h9c1c5c325ce19e28
                               at /rustc/23415176968e81e0aac92d0218612a89c4e68a82/library/core/src/panicking.rs:111:5
  16:     0x7f65877a8f8c - <rustc_parse[ca2e37bb52d9ff08]::parser::attr_wrapper::LazyAttrTokenStreamImpl as rustc_ast[56a23deec7d2f949]::tokenstream::ToAttrTokenStream>::to_attr_token_stream
  17:     0x7f6587f0a926 - <rustc_ast[56a23deec7d2f949]::tokenstream::LazyAttrTokenStream as core[ec9ef0a26f3cf28]::fmt::Debug>::fmt
  18:     0x7f6584fc63b5 - core::fmt::builders::DebugTuple::field::{{closure}}::h37a216a421c6a64f
                               at /rustc/23415176968e81e0aac92d0218612a89c4e68a82/library/core/src/fmt/builders.rs:317:17
  19:     0x7f6584fc63b5 - core::result::Result<T,E>::and_then::ha646669375a7cc05
                               at /rustc/23415176968e81e0aac92d0218612a89c4e68a82/library/core/src/result.rs:1372:22
  20:     0x7f6584fc63b5 - core::fmt::builders::DebugTuple::field::h3f0dc90ef92ed759
                               at /rustc/23415176968e81e0aac92d0218612a89c4e68a82/library/core/src/fmt/builders.rs:309:23
  21:     0x7f6584fca439 - core::fmt::Formatter::debug_tuple_field1_finish::ha3d740adf26beb14
                               at /rustc/23415176968e81e0aac92d0218612a89c4e68a82/library/core/src/fmt/mod.rs:2139:9
  22:     0x7f6587efbbaf - <&core[ec9ef0a26f3cf28]::option::Option<rustc_ast[56a23deec7d2f949]::tokenstream::LazyAttrTokenStream> as core[ec9ef0a26f3cf28]::fmt::Debug>::fmt
  23:     0x7f6584fc615f - core::fmt::builders::DebugStruct::field::{{closure}}::h57980c21e691a114
                               at /rustc/23415176968e81e0aac92d0218612a89c4e68a82/library/core/src/fmt/builders.rs:134:17
  24:     0x7f6584fc615f - core::result::Result<T,E>::and_then::h9421d61926c79c01
                               at /rustc/23415176968e81e0aac92d0218612a89c4e68a82/library/core/src/result.rs:1372:22
  25:     0x7f6584fc615f - core::fmt::builders::DebugStruct::field::h30227c010224fcf4
                               at /rustc/23415176968e81e0aac92d0218612a89c4e68a82/library/core/src/fmt/builders.rs:124:23
  26:     0x7f6584fca249 - core::fmt::Formatter::debug_struct_field5_finish::h76f021d50af8fbf6
                               at /rustc/23415176968e81e0aac92d0218612a89c4e68a82/library/core/src/fmt/mod.rs:2080:9
  27:     0x7f6587ef1f2c - <rustc_ast[56a23deec7d2f949]::ast::Expr as core[ec9ef0a26f3cf28]::fmt::Debug>::fmt
  28:     0x7f6584fc63b5 - core::fmt::builders::DebugTuple::field::{{closure}}::h37a216a421c6a64f
                               at /rustc/23415176968e81e0aac92d0218612a89c4e68a82/library/core/src/fmt/builders.rs:317:17
  29:     0x7f6584fc63b5 - core::result::Result<T,E>::and_then::ha646669375a7cc05
                               at /rustc/23415176968e81e0aac92d0218612a89c4e68a82/library/core/src/result.rs:1372:22
  30:     0x7f6584fc63b5 - core::fmt::builders::DebugTuple::field::h3f0dc90ef92ed759
                               at /rustc/23415176968e81e0aac92d0218612a89c4e68a82/library/core/src/fmt/builders.rs:309:23
  31:     0x7f6584fca439 - core::fmt::Formatter::debug_tuple_field1_finish::ha3d740adf26beb14
                               at /rustc/23415176968e81e0aac92d0218612a89c4e68a82/library/core/src/fmt/mod.rs:2139:9
  32:     0x7f6587ef2e45 - <rustc_ast[56a23deec7d2f949]::ast::AttrArgsEq as core[ec9ef0a26f3cf28]::fmt::Debug>::fmt
  33:     0x7f6584fc63b5 - core::fmt::builders::DebugTuple::field::{{closure}}::h37a216a421c6a64f
                               at /rustc/23415176968e81e0aac92d0218612a89c4e68a82/library/core/src/fmt/builders.rs:317:17
  34:     0x7f6584fc63b5 - core::result::Result<T,E>::and_then::ha646669375a7cc05
                               at /rustc/23415176968e81e0aac92d0218612a89c4e68a82/library/core/src/result.rs:1372:22
  35:     0x7f6584fc63b5 - core::fmt::builders::DebugTuple::field::h3f0dc90ef92ed759
                               at /rustc/23415176968e81e0aac92d0218612a89c4e68a82/library/core/src/fmt/builders.rs:309:23
  36:     0x7f6584fca512 - core::fmt::Formatter::debug_tuple_field2_finish::habd6ca74075a4a8f
                               at /rustc/23415176968e81e0aac92d0218612a89c4e68a82/library/core/src/fmt/mod.rs:2155:9
  37:     0x7f6587ef2dee - <rustc_ast[56a23deec7d2f949]::ast::AttrArgs as core[ec9ef0a26f3cf28]::fmt::Debug>::fmt
  38:     0x7f6584fc615f - core::fmt::builders::DebugStruct::field::{{closure}}::h57980c21e691a114
                               at /rustc/23415176968e81e0aac92d0218612a89c4e68a82/library/core/src/fmt/builders.rs:134:17
  39:     0x7f6584fc615f - core::result::Result<T,E>::and_then::h9421d61926c79c01
                               at /rustc/23415176968e81e0aac92d0218612a89c4e68a82/library/core/src/result.rs:1372:22
  40:     0x7f6584fc615f - core::fmt::builders::DebugStruct::field::h30227c010224fcf4
                               at /rustc/23415176968e81e0aac92d0218612a89c4e68a82/library/core/src/fmt/builders.rs:124:23
  41:     0x7f6584fc9fda - core::fmt::Formatter::debug_struct_field3_finish::h0b088461cc839e4a
                               at /rustc/23415176968e81e0aac92d0218612a89c4e68a82/library/core/src/fmt/mod.rs:2028:9
  42:     0x7f6587eed50d - <&rustc_ast[56a23deec7d2f949]::ast::AttrItem as core[ec9ef0a26f3cf28]::fmt::Debug>::fmt
  43:     0x7f6584fc615f - core::fmt::builders::DebugStruct::field::{{closure}}::h57980c21e691a114
                               at /rustc/23415176968e81e0aac92d0218612a89c4e68a82/library/core/src/fmt/builders.rs:134:17
  44:     0x7f6584fc615f - core::result::Result<T,E>::and_then::h9421d61926c79c01
                               at /rustc/23415176968e81e0aac92d0218612a89c4e68a82/library/core/src/result.rs:1372:22
  45:     0x7f6584fc615f - core::fmt::builders::DebugStruct::field::h30227c010224fcf4
                               at /rustc/23415176968e81e0aac92d0218612a89c4e68a82/library/core/src/fmt/builders.rs:124:23
  46:     0x7f6584fc9ef4 - core::fmt::Formatter::debug_struct_field2_finish::he73c086eb7141c7a
                               at /rustc/23415176968e81e0aac92d0218612a89c4e68a82/library/core/src/fmt/mod.rs:2007:9
  47:     0x7f6587ef4f12 - <rustc_ast[56a23deec7d2f949]::ast::NormalAttr as core[ec9ef0a26f3cf28]::fmt::Debug>::fmt
  48:     0x7f6584fc63b5 - core::fmt::builders::DebugTuple::field::{{closure}}::h37a216a421c6a64f
                               at /rustc/23415176968e81e0aac92d0218612a89c4e68a82/library/core/src/fmt/builders.rs:317:17
  49:     0x7f6584fc63b5 - core::result::Result<T,E>::and_then::ha646669375a7cc05
                               at /rustc/23415176968e81e0aac92d0218612a89c4e68a82/library/core/src/result.rs:1372:22
  50:     0x7f6584fc63b5 - core::fmt::builders::DebugTuple::field::h3f0dc90ef92ed759
                               at /rustc/23415176968e81e0aac92d0218612a89c4e68a82/library/core/src/fmt/builders.rs:309:23
  51:     0x7f6584fca439 - core::fmt::Formatter::debug_tuple_field1_finish::ha3d740adf26beb14
                               at /rustc/23415176968e81e0aac92d0218612a89c4e68a82/library/core/src/fmt/mod.rs:2139:9
  52:     0x7f6587ef4ea8 - <rustc_ast[56a23deec7d2f949]::ast::AttrKind as core[ec9ef0a26f3cf28]::fmt::Debug>::fmt
  53:     0x7f6584fc615f - core::fmt::builders::DebugStruct::field::{{closure}}::h57980c21e691a114
                               at /rustc/23415176968e81e0aac92d0218612a89c4e68a82/library/core/src/fmt/builders.rs:134:17
  54:     0x7f6584fc615f - core::result::Result<T,E>::and_then::h9421d61926c79c01
                               at /rustc/23415176968e81e0aac92d0218612a89c4e68a82/library/core/src/result.rs:1372:22
  55:     0x7f6584fc615f - core::fmt::builders::DebugStruct::field::h30227c010224fcf4
                               at /rustc/23415176968e81e0aac92d0218612a89c4e68a82/library/core/src/fmt/builders.rs:124:23
  56:     0x7f6584fca0b1 - core::fmt::Formatter::debug_struct_field4_finish::h6299e00de25fac79
                               at /rustc/23415176968e81e0aac92d0218612a89c4e68a82/library/core/src/fmt/mod.rs:2050:9
  57:     0x7f6587ef4e1a - <rustc_ast[56a23deec7d2f949]::ast::Attribute as core[ec9ef0a26f3cf28]::fmt::Debug>::fmt
  58:     0x7f6584fc6550 - core::fmt::builders::DebugInner::entry::{{closure}}::h770fe7d30810a1aa
                               at /rustc/23415176968e81e0aac92d0218612a89c4e68a82/library/core/src/fmt/builders.rs:388:17
  59:     0x7f6584fc6550 - core::result::Result<T,E>::and_then::h89ad0f5adbf63705
                               at /rustc/23415176968e81e0aac92d0218612a89c4e68a82/library/core/src/result.rs:1372:22
  60:     0x7f6584fc6550 - core::fmt::builders::DebugInner::entry::h89e8f2f2f4f9debb
                               at /rustc/23415176968e81e0aac92d0218612a89c4e68a82/library/core/src/fmt/builders.rs:380:23
  61:     0x7f6584fc6589 - core::fmt::builders::DebugSet::entry::h495dd716c19b682e
                               at /rustc/23415176968e81e0aac92d0218612a89c4e68a82/library/core/src/fmt/builders.rs:469:9
  62:     0x7f6587f0d50d - <core[ec9ef0a26f3cf28]::fmt::builders::DebugList>::entries::<&rustc_ast[56a23deec7d2f949]::ast::Attribute, core[ec9ef0a26f3cf28]::slice::iter::Iter<rustc_ast[56a23deec7d2f949]::ast::Attribute>>
  63:     0x7f6587eee2f3 - <[rustc_ast[56a23deec7d2f949]::ast::Attribute] as core[ec9ef0a26f3cf28]::fmt::Debug>::fmt
  64:     0x7f6584fc615f - core::fmt::builders::DebugStruct::field::{{closure}}::h57980c21e691a114
                               at /rustc/23415176968e81e0aac92d0218612a89c4e68a82/library/core/src/fmt/builders.rs:134:17
  65:     0x7f6584fc615f - core::result::Result<T,E>::and_then::h9421d61926c79c01
                               at /rustc/23415176968e81e0aac92d0218612a89c4e68a82/library/core/src/result.rs:1372:22
  66:     0x7f6584fc615f - core::fmt::builders::DebugStruct::field::h30227c010224fcf4
                               at /rustc/23415176968e81e0aac92d0218612a89c4e68a82/library/core/src/fmt/builders.rs:124:23
  67:     0x7f6584fca1c4 - core::fmt::Formatter::debug_struct_field5_finish::h76f021d50af8fbf6
                               at /rustc/23415176968e81e0aac92d0218612a89c4e68a82/library/core/src/fmt/mod.rs:2076:9
  68:     0x7f6587ef0d3c - <rustc_ast[56a23deec7d2f949]::ast::Crate as core[ec9ef0a26f3cf28]::fmt::Debug>::fmt
  69:     0x7f6584fc8de2 - core::fmt::run::he4931553894777da
                               at /rustc/23415176968e81e0aac92d0218612a89c4e68a82/library/core/src/fmt/mod.rs:1256:5
  70:     0x7f6584fc8de2 - core::fmt::write::hdab16ae0136a16af
                               at /rustc/23415176968e81e0aac92d0218612a89c4e68a82/library/core/src/fmt/mod.rs:1224:26
  71:     0x7f6584fbae6f - core::fmt::Write::write_fmt::hbbb7900d3b190c17
                               at /rustc/23415176968e81e0aac92d0218612a89c4e68a82/library/core/src/fmt/mod.rs:192:9
  72:     0x7f6584fbae6f - alloc::fmt::format::format_inner::hfe803e253f8127ed
                               at /rustc/23415176968e81e0aac92d0218612a89c4e68a82/library/alloc/src/fmt.rs:612:9
  73:     0x7f65882ec74d - rustc_driver[d87acf87108c2deb]::pretty::print_after_parsing
  74:     0x7f6587443ea0 - <rustc_interface[c57545daadc3fa09]::interface::Compiler>::enter::<rustc_driver[d87acf87108c2deb]::run_compiler::{closure#1}::{closure#2}, core[ec9ef0a26f3cf28]::result::Result<core[ec9ef0a26f3cf28]::option::Option<rustc_interface[c57545daadc3fa09]::queries::Linker>, rustc_errors[57b9e96b8e7428c]::ErrorGuaranteed>>
  75:     0x7f658743e978 - rustc_span[653636119034ca50]::with_source_map::<core[ec9ef0a26f3cf28]::result::Result<(), rustc_errors[57b9e96b8e7428c]::ErrorGuaranteed>, rustc_interface[c57545daadc3fa09]::interface::run_compiler<core[ec9ef0a26f3cf28]::result::Result<(), rustc_errors[57b9e96b8e7428c]::ErrorGuaranteed>, rustc_driver[d87acf87108c2deb]::run_compiler::{closure#1}>::{closure#0}::{closure#0}>
  76:     0x7f658743e465 - <scoped_tls[2510ce566f7fd87d]::ScopedKey<rustc_span[653636119034ca50]::SessionGlobals>>::set::<rustc_interface[c57545daadc3fa09]::interface::run_compiler<core[ec9ef0a26f3cf28]::result::Result<(), rustc_errors[57b9e96b8e7428c]::ErrorGuaranteed>, rustc_driver[d87acf87108c2deb]::run_compiler::{closure#1}>::{closure#0}, core[ec9ef0a26f3cf28]::result::Result<(), rustc_errors[57b9e96b8e7428c]::ErrorGuaranteed>>
  77:     0x7f658743da52 - std[b988c8daa9554a2a]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[c57545daadc3fa09]::util::run_in_thread_pool_with_globals<rustc_interface[c57545daadc3fa09]::interface::run_compiler<core[ec9ef0a26f3cf28]::result::Result<(), rustc_errors[57b9e96b8e7428c]::ErrorGuaranteed>, rustc_driver[d87acf87108c2deb]::run_compiler::{closure#1}>::{closure#0}, core[ec9ef0a26f3cf28]::result::Result<(), rustc_errors[57b9e96b8e7428c]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[ec9ef0a26f3cf28]::result::Result<(), rustc_errors[57b9e96b8e7428c]::ErrorGuaranteed>>
  78:     0x7f6587ba6848 - <<std[b988c8daa9554a2a]::thread::Builder>::spawn_unchecked_<rustc_interface[c57545daadc3fa09]::util::run_in_thread_pool_with_globals<rustc_interface[c57545daadc3fa09]::interface::run_compiler<core[ec9ef0a26f3cf28]::result::Result<(), rustc_errors[57b9e96b8e7428c]::ErrorGuaranteed>, rustc_driver[d87acf87108c2deb]::run_compiler::{closure#1}>::{closure#0}, core[ec9ef0a26f3cf28]::result::Result<(), rustc_errors[57b9e96b8e7428c]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[ec9ef0a26f3cf28]::result::Result<(), rustc_errors[57b9e96b8e7428c]::ErrorGuaranteed>>::{closure#1} as core[ec9ef0a26f3cf28]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  79:     0x7f65890b07f3 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hd24e4095bea58fc3
                               at /rustc/23415176968e81e0aac92d0218612a89c4e68a82/library/alloc/src/boxed.rs:2000:9
  80:     0x7f65890b07f3 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h7c7f47af88aff778
                               at /rustc/23415176968e81e0aac92d0218612a89c4e68a82/library/alloc/src/boxed.rs:2000:9
  81:     0x7f65890b07f3 - std::sys::unix::thread::Thread::new::thread_start::h8d5de08b8b3f2cac
                               at /rustc/23415176968e81e0aac92d0218612a89c4e68a82/library/std/src/sys/unix/thread.rs:108:17
  82:     0x7f6584d068fd - <unknown>
  83:     0x7f6584d88a60 - <unknown>
  84:                0x0 - <unknown>
error: aborting due to 4 previous errors

@matthiaskrgr matthiaskrgr added I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. C-bug Category: This is a bug. requires-nightly This issue requires a nightly compiler in some way. labels Dec 4, 2022
@ThePuzzlemaker
Copy link
Contributor

@rustbot claim
Gonna try to look into this, will release assignment if I can't find anything that can help me make a PR (but I'll share anything interesting, ofc)

@ThePuzzlemaker
Copy link
Contributor

This problem appears to occur because when -Zunpretty=ast-tree is enabled, make_token_stream is called.
For a valid parse, such as #![no_std], all the tokens are included in the iterator passed to make_token_stream
However, for some invalid parses, such as #![c = {(while ""}); (I minimized this just so there's not so much debug input), the only tokens included are {(while ""});

@ThePuzzlemaker
Copy link
Contributor

I'm unsure if the root of this problem occurs in the operation of parsing this input (e.g. error recovery?) or within the code that eventually calls this function with -Zunpretty=ast-tree. I'll look more into this tomorrow.

@ThePuzzlemaker
Copy link
Contributor

ThePuzzlemaker commented Dec 6, 2022

@rustbot release-assignment
I don't have enough knowledge of the parser to solve this.

@JohnTitor
Copy link
Member

Triage: Fixed on the latest nightly (possibly related to #108297), marking as E-needs-test.

@JohnTitor JohnTitor added the E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. label Mar 3, 2023
@chenyukang
Copy link
Member

Fixed by #108297, and we already have similar UI for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. glacier ICE tracked in rust-lang/glacier. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ requires-nightly This issue requires a nightly compiler in some way. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

5 participants