Skip to content

ICE: has_escaping_bound_vars in tracing-subscriber #95087

Closed
@foresterre

Description

@foresterre

I didn't have time yet to find a minimal code sample. I originally encountered the ICE in a github actions build.

NB: cargo check passes, while cargo build does not. The beta and stable Rust releases also are able to build.

Code

<code>

Meta

rustc --version --verbose:

❯ rustup run nightly rustc --version --verbose
rustc 1.61.0-nightly (58f11791a 2022-03-17)
binary: rustc
commit-hash: 58f11791af4f97572e7afd83f11cffe04bbbd12f
commit-date: 2022-03-17
host: x86_64-pc-windows-msvc
release: 1.61.0-nightly
LLVM version: 14.0.0

Error output

❯ $env:RUST_BACKTRACE
1
❯ rustup run nightly cargo build
   Compiling tracing-subscriber v0.3.0 (C:\Marwen\ws\tracing\tracing-subscriber)
warning: unreachable `pub` item
   --> tracing-subscriber\src\prelude.rs:6:24
    |
6   | pub use crate::field::{MakeExt as _, RecordFields as _};
    | ---                    ^^^^^^^^^^^^
    | |
    | help: consider restricting its visibility: `pub(crate)`
    |
note: the lint level is defined here
   --> tracing-subscriber\src\lib.rs:117:5
    |
117 |     unreachable_pub,
    |     ^^^^^^^^^^^^^^^
    = help: or consider exporting it for use by other crates

warning: unreachable `pub` item
 --> tracing-subscriber\src\prelude.rs:6:38
  |
6 | pub use crate::field::{MakeExt as _, RecordFields as _};
  | ---                                  ^^^^^^^^^^^^^^^^^
  | |
  | help: consider restricting its visibility: `pub(crate)`
  |
  = help: or consider exporting it for use by other crates

warning: unreachable `pub` item
 --> tracing-subscriber\src\prelude.rs:7:28
  |
7 | pub use crate::subscribe::{CollectExt as _, Subscribe as _};
  | ---                        ^^^^^^^^^^^^^^^
  | |
  | help: consider restricting its visibility: `pub(crate)`
  |
  = help: or consider exporting it for use by other crates

warning: unreachable `pub` item
 --> tracing-subscriber\src\prelude.rs:7:45
  |
7 | pub use crate::subscribe::{CollectExt as _, Subscribe as _};
  | ---                                         ^^^^^^^^^^^^^^
  | |
  | help: consider restricting its visibility: `pub(crate)`
  |
  = help: or consider exporting it for use by other crates

thread 'rustc' panicked at 'assertion failed: !value.has_escaping_bound_vars()', /rustc/58f11791af4f97572e7afd83f11cffe04bbbd12f\compiler\rustc_middle\src\ty\sty.rs:1089:9
stack backtrace:
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

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/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: rustc 1.61.0-nightly (58f11791a 2022-03-17) running on x86_64-pc-windows-msvc

note: compiler flags: --crate-type lib -C embed-bitcode=no -C debuginfo=2 -C incremental

note: some of the compiler flags provided by cargo are hidden

query stack during panic:
#0 [is_sized_raw] computing whether `dyn std::io::Write` is `Sized`
#1 [layout_of] computing layout of `*const dyn std::io::Write`
#2 [layout_of] computing layout of `core::ptr::unique::Unique<dyn std::io::Write>`
#3 [layout_of] computing layout of `alloc::boxed::Box<dyn std::io::Write>`
end of query stack
warning: `tracing-subscriber` (lib) generated 4 warnings
error: could not compile `tracing-subscriber`; 4 warnings emitted

<backtrace>

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