Skip to content

rustc endless loop on some constant casts #67539

Closed
@antifuchs

Description

@antifuchs

I bisected nightlies to figure out when my pull request's tests started breaking on nightly. The following is the template cargo-bisect-rustc gave me.

Regression found in the compiler

searched nightlies: from nightly-2019-10-01 to nightly-2019-12-22
regressed nightly: nightly-2019-11-20
searched commits: from 3e525e3 to 618b01f
regressed commit: d1da802
source code: antifuchs/nonzero_ext#7

Instructions

I tried the following on macOS and linux (in CI):

  1. Check out the repo & branch of that pull request
  2. Run cargo +nightly test --test=compiletest with a nightly version later than d1da802, that is >= nightly-2019-11-20

Error

The compile test (provided by trybuild) does not terminate - rustc seems to be running forever, consuming 99% of my CPU all the while.

Since the instructions to repro are a bit convoluted (and massive), I'll try and boil down the repro case a little bit.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-const-evalArea: Constant evaluation, covers all const contexts (static, const fn, ...)C-bugCategory: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions