Skip to content

regression: could not evaluate static initializer #123277

Closed as not planned
Closed as not planned
@Mark-Simulacrum

Description

@Mark-Simulacrum
[INFO] [stdout] error[E0080]: could not evaluate static initializer
[INFO] [stdout]    --> /rustc/c1195518c8ad7f37d15ecb82f39dec3da97f9c2f/library/core/src/num/nonzero.rs:335:21
[INFO] [stdout]     |
[INFO] [stdout]     = note: entering unreachable code
[INFO] [stdout]     |
[INFO] [stdout] note: inside `NonZero::<u32>::new_unchecked`
[INFO] [stdout]    --> /rustc/c1195518c8ad7f37d15ecb82f39dec3da97f9c2f/library/core/src/num/nonzero.rs:335:21
[INFO] [stdout] note: inside `Entry::new`
[INFO] [stdout]    --> src/lib.rs:154:17
[INFO] [stdout]     |
[INFO] [stdout] 154 |                 NonZeroU32::new_unchecked(c as u32)
[INFO] [stdout]     |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout] note: inside `c`
[INFO] [stdout]    --> src/lib.rs:168:10
[INFO] [stdout]     |
[INFO] [stdout] 168 |     Some(Entry::new(c))
[INFO] [stdout]     |          ^^^^^^^^^^^^^
[INFO] [stdout] note: inside `MACROMAN`
[INFO] [stdout]    --> src/macroman.rs:2:2
[INFO] [stdout]     |
[INFO] [stdout] 2   |  c('\u{0000}'), c('\u{0001}'), c('\u{0002}'), c('\u{0003}'), c('\u{0004}'), c('\u{0005}'), c('\u{0006}'), c('\u{0007}'),
[INFO] [stdout]     |  ^^^^^^^^^^^^^

This looks like UB to me, so probably an expected regression from additional checking the compiler is performing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions