Skip to content

Structure mismatch in "Generics - Phantom type parameters" example #560

@adpaco-aws

Description

@adpaco-aws

The example in Rust by Example/Generics/Phantom type parameters/Testcase: unit clarification/24.rs, which can be accessed from https://doc.rust-lang.org/rust-by-example/generics/phantom/testcase_units.html fails to codegen with

thread 'rustc' panicked at 'assertion failed: `(left == right)`
left: `2`,
right: `1`: Error in struct_expr; mismatch in number of fields and values.
StructTag("tag-_14457343961392166270")
[Expr { value: DoubleConstant(12.0), typ: Double, location: None }]', compiler/cbmc/src/goto_program/expr.rs:703:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

error: internal compiler error: unexpected panic

Metadata

Metadata

Assignees

Labels

[C] BugThis is a bug. Something isn't working.[F] CrashKani crashed

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions