case-studies icon indicating copy to clipboard operation
case-studies copied to clipboard

Outdated information in "unit-type-parameters" chapter?

Open Forsworns opened this issue 10 months ago • 1 comments

These posts are really interesting and helpful. But when I try to run the following snippet in playground, it seems outdated and reports and error:

thread 'main' panicked at src/main.rs:18:5: assertion left == right failed left: 8 right: 0

https://github.com/dtolnay/case-studies/blob/4c3517ad3124fd6c86ae9cfb89dee2d151d78ce5/unit-type-parameters/README.md?plain=1#L328-L348

I checked the implementation of https://github.com/dtolnay/ghost but did not find the difference.

Forsworns avatar Jan 27 '25 01:01 Forsworns

Yeah the layout algorithm changed in Rust 1.74 due to https://github.com/rust-lang/rust/pull/115277. Thanks for reporting.

dtolnay avatar Jan 27 '25 04:01 dtolnay