Skip to content

-Z treat-err-as-bug panics even when no errors occur #35886

Description

@nagisa
echo 'fn test(){} fn main() {}' | rustc - -Z treat-err-as-bug
<anon>:1:1: 1:12 warning: function is never used: `test`, #[warn(dead_code)] on by default 
<anon>:1 fn test(){} fn main() {}
         ^~~~~~~~~~~
error: internal compiler error: unexpected panic 
note: the compiler unexpectedly panicked. this is a bug. 
note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports 
note: run with `RUST_BACKTRACE=1` for a backtrace 
thread 'rustc' panicked at 'encountered error with `-Z treat_err_as_bug', ../src/librustc_errors/lib.rs:546

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

    A-frontendArea: Compiler frontend (errors, parsing and HIR)E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions