The mismatched types were not detected, and a segmentation fault occurred at runtime. #139792
Labels
A-type-system
Area: Type system
C-bug
Category: This is a bug.
E-needs-bisection
Call for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustc
I-unsound
Issue: A soundness hole (worst kind of bug), see: https://en.wikipedia.org/wiki/Soundness
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
T-types
Relevant to the types team, which will review and decide on the PR/issue.
I tried this code:
I expected to see this happen: mismatched types:expected “Box<dyn Display>”, found “&str”.
Instead, this happened: The code compiles successfully but encounters a segmentation fault at runtime.
Demo: godbolt permalink
Demo: on current playground
Meta
rustc --version --verbose
:The text was updated successfully, but these errors were encountered: