Skip to content

dioxus hello world example causes compiler panic on windows #92537

Description

@anderslanglands

As title. Happens with both stable and nightly

Code

main.rs:

use dioxus::prelude::*;

fn main() {
    dioxus::desktop::launch(App);
}

fn App(cx: Scope) -> Element {
    cx.render(rsx! {
        div { "Hello, world!"}
    })
}

Cargo.toml:

[package]
name = "hello-dioxus"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
dioxus = { version = "0.1.4", features = ["desktop"] }

Meta

rustc --version --verbose:

rustc 1.57.0 (f1edd0429 2021-11-29)
binary: rustc
commit-hash: f1edd0429582dd29cccacaf50fd134b05593bd9c
commit-date: 2021-11-29
host: x86_64-pc-windows-msvc
release: 1.57.0
LLVM version: 13.0.0

rustc +nightly --version --verbose:

rustc 1.59.0-nightly (8f3238f89 2022-01-02)
binary: rustc
commit-hash: 8f3238f898163f09726c3d2b2cc9bafb09da26f3
commit-date: 2022-01-02
host: x86_64-pc-windows-msvc
release: 1.59.0-nightly
LLVM version: 13.0.0

Error output

thread 'rustc' panicked at 'assertion failed: !value.has_escaping_bound_vars()', /rustc/8f3238f898163f09726c3d2b2cc9bafb09da26f3\compiler\rustc_middle\src\ty\sty.rs:1036:9
note: run with `RUST_BACKTRACE=1` environment variable to display a 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.59.0-nightly (8f3238f89 2022-01-02) running on x86_64-pc-windows-msvc

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

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

query stack during panic:
#0 [is_sized_raw] computing whether `[nodes::VNode<'_>]` is `Sized`
#1 [layout_of] computing layout of `&[nodes::VNode<'_>]`
end of query stack
error: could not compile `dioxus-core`
warning: build failed, waiting for other jobs to finish...
error: build failed
Backtrace

thread 'rustc' panicked at 'assertion failed: !value.has_escaping_bound_vars()', /rustc/8f3238f898163f09726c3d2b2cc9bafb09da26f3\compiler\rustc_middle\src\ty\sty.rs:1036: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.59.0-nightly (8f3238f89 2022-01-02) running on x86_64-pc-windows-msvc

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

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

query stack during panic:
#0 [is_sized_raw] computing whether `[nodes::VNode<'_>]` is `Sized`
#1 [layout_of] computing layout of `&[nodes::VNode<'_>]`
#2 [layout_of] computing layout of `nodes::VFragment<'_>`
#3 [layout_of] computing layout of `nodes::VNode<'_>`
#4 [layout_of] computing layout of `core::option::Option<nodes::VNode<'_>>`
end of query stack
error: could not compile `dioxus-core`
warning: build failed, waiting for other jobs to finish...
error: build failed

No activity

Activity on this issue will appear here.

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-debuginfoArea: Debugging information in compiled programs (DWARF, PDB, etc.)C-bugCategory: This is a bug.E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️O-windowsOperating system: WindowsO-windows-msvcToolchain: MSVC, Operating system: WindowsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.glacierICE tracked in rust-lang/glacier.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions