Closed
Description
Code
https://github.com/Geal/nom/blob/4.1.1/src/macros.rs#L1005
#[macro_export]
macro_rules! opt(
($i:expr, $submac:ident!( $($args:tt)* )) => (
{
use $crate::lib::std::result::Result::*;
use $crate::lib::std::option::Option::*;
use $crate::Err;
let i_ = $i.clone();
match $submac!(i_, $($args)*) {
Ok((i,o)) => Ok((i, Some(o))),
Err(Err::Error(_)) => Ok(($i, None)),
Err(e) => Err(e),
}
}
);
($i:expr, $f:expr) => (
opt!($i, call!($f));
);
);
Meta
rustc --version --verbose
:
1.55.0-nightly (014026d1a 2021-07-19)
compiler flags: -C embed-bitcode=no -C debuginfo=2 -C target-cpu=skylake --crate-type lib
Error output
error: internal compiler error: failed to process buffered lint here (dummy = false)
--> /home/runner/.cargo/registry/src/github.tiyicn.workers.dev-1ecc6299db9ec823/nom-4.1.1/src/macros.rs:1005:24
|
1005 | opt!($i, call!($f));
| ^
|
::: /home/runner/.cargo/registry/src/github.tiyicn.workers.dev-1ecc6299db9ec823/nom-4.1.1/src/nom.rs:811:3
|
811 | / recognize!(input,
812 | | tuple!(
813 | | opt!(alt!(char!('+') | char!('-'))),
814 | | alt!(
... |
824 | | )
825 | | )
| |___- in this macro invocation
|
= note: delayed at /rustc/014026d1a7ca991f82f12efa95ef4dffb29dc8af/compiler/rustc_lint/src/early.rs:402:18
= note: this error: internal compiler error originates in the macro `opt` (in Nightly builds, run with -Z macro-backtrace for more info)
Backtrace
thread 'rustc' panicked at 'no errors encountered even though `delay_span_bug` issued', compiler/rustc_errors/src/lib.rs:1050:13
stack backtrace:
0: rust_begin_unwind
at /rustc/014026d1a7ca991f82f12efa95ef4dffb29dc8af/library/std/src/panicking.rs:515:5
1: std::panicking::begin_panic_fmt
at /rustc/014026d1a7ca991f82f12efa95ef4dffb29dc8af/library/std/src/panicking.rs:457:5
2: rustc_errors::HandlerInner::flush_delayed
3: <rustc_errors::HandlerInner as core::ops::drop::Drop>::drop
4: core::ptr::drop_in_place<rustc_session::parse::ParseSess>
5: <alloc::rc::Rc<T> as core::ops::drop::Drop>::drop
6: core::ptr::drop_in_place<rustc_interface::interface::Compiler>
7: rustc_span::with_source_map
8: rustc_interface::interface::create_compiler_and_run
9: scoped_tls::ScopedKey<T>::set