Skip to content

internal compiler error: no errors encountered even though delay_span_bug issued #111148

Description

@dwrensha

rustc crashes on the following input, found by fuzz_rustc:

fn a<<i<Y<w<>#
error: internal compiler error: no errors encountered even though `delay_span_bug` issued

error: internal compiler error: expected one of `,` or `>`, found `#`
 --> bug.rs:1:14
  |
1 | fn a<<i<Y<w<>#
  |              ^ expected one of `,` or `>`
  |
  = note: delayed at    0: <rustc_errors::HandlerInner>::emit_diagnostic
             1: <rustc_errors::Handler>::emit_diagnostic
             2: <rustc_span::ErrorGuaranteed as rustc_errors::diagnostic_builder::EmissionGuarantee>::diagnostic_builder_emit_producing_guarantee
             3: <rustc_parse::parser::Parser>::handle_ambiguous_unbraced_const_arg
             4: <rustc_parse::parser::Parser>::parse_angle_args
             5: <rustc_parse::parser::Parser>::parse_path_inner
             6: <rustc_parse::parser::Parser>::parse_ty_common
             7: <rustc_parse::parser::Parser>::parse_angle_args
             8: <rustc_parse::parser::Parser>::parse_path_inner
             9: <rustc_parse::parser::Parser>::parse_ty_common
            10: <rustc_parse::parser::Parser>::parse_ty_common
            11: <rustc_parse::parser::Parser>::parse_ty_where_predicate
            12: <rustc_parse::parser::Parser>::parse_generic_params::{closure#0}
            13: <rustc_parse::parser::Parser>::parse_generic_params
            14: <rustc_parse::parser::Parser>::parse_item_kind
            15: <rustc_parse::parser::Parser>::parse_item_common
            16: <rustc_parse::parser::Parser>::parse_mod
            17: rustc_interface::passes::parse
            18: <rustc_interface::queries::Queries>::parse
            19: <rustc_interface::interface::Compiler>::enter::<rustc_driver_impl::run_compiler::{closure#1}::{closure#2}, core::result::Result<core::option::Option<rustc_interface::queries::Linker>, rustc_span::ErrorGuaranteed>>
            20: std::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>
            21: <<std::thread::Builder>::spawn_unchecked_<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
            22: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
                       at /rustc/a368898de758e1b8def6c9060044a5b40eb79e84/library/alloc/src/boxed.rs:1985:9
            23: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
                       at /rustc/a368898de758e1b8def6c9060044a5b40eb79e84/library/alloc/src/boxed.rs:1985:9
            24: std::sys::unix::thread::Thread::new::thread_start
                       at /rustc/a368898de758e1b8def6c9060044a5b40eb79e84/library/std/src/sys/unix/thread.rs:108:17
            25: start_thread
                       at ./nptl/pthread_create.c:442:8
            26: clone3
                       at ./misc/../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
          

note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: rustc 1.71.0-nightly (a368898de 2023-05-02) running on x86_64-unknown-linux-gnu

query stack during panic:
end of query stack
thread panicked while panicking. aborting.
Aborted (core dumped)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions