Skip to content

internal error: entered unreachable code at src/visitor.rs #6177

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

Closed
cushionbadak opened this issue May 29, 2024 · 1 comment
Closed

internal error: entered unreachable code at src/visitor.rs #6177

cushionbadak opened this issue May 29, 2024 · 1 comment

Comments

@cushionbadak
Copy link

Code

trait Trait2 where Self: Trait {
    reuse Trait::{foo, bar};
}

pub trait Iterable {
    fn iter(&self) -> impl '_ + Iterator<Trait2 = Self::Item<'_>>;
}

Meta

rustfmt --version

rustfmt 1.7.0-nightly (da159eb3 2024-05-28)

Error Output

Command: rustfmt

thread 'main' panicked at src/tools/rustfmt/src/visitor.rs:668:18:
internal error: entered unreachable code
stack backtrace:
   0: _rust_begin_unwind
   1: core::panicking::panic_fmt
   2: core::panicking::panic
   3: <rustfmt_nightly::visitor::FmtVisitor>::visit_assoc_item
   4: <rustfmt_nightly::visitor::FmtVisitor>::with_context::<<rustfmt_nightly::visitor::FmtVisitor>::visit_item::{closure#1}>
   5: <rustfmt_nightly::visitor::FmtVisitor>::visit_item
   6: <rustfmt_nightly::visitor::FmtVisitor>::visit_items_with_reordering
   7: <rustfmt_nightly::visitor::FmtVisitor>::format_separate_mod
   8: <rustfmt_nightly::Session<std::io::stdio::Stdout>>::format_input_inner::{closure#0}
   9: rustfmt::format_and_emit_report::<std::io::stdio::Stdout>
  10: rustfmt::execute
  11: rustfmt::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

error: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rustfmt/issues/new?labels=bug

note: please make sure that you have updated to the latest nightly

note: please attach the file at `/Volumes/T7/workspace/placeholder_rustexec/0529_others/rustc-ice-2024-05-29T03_40_05-27732.txt` to your bug report

query stack during panic:
end of query stack
@cushionbadak
Copy link
Author

It's dup. of #6043

@cushionbadak cushionbadak closed this as not planned Won't fix, can't repro, duplicate, stale May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant