Skip to content

Type inference regression and ICE in nightly 2020-10-06 #77638

Closed
@mattico

Description

@mattico

I tried this code:

FluenTech/embedded-time@521569d

I expected to see this happen:

Successful compilation. This works with stable, and nightly 2020-10-05.

Instead, this happened:

https://github.com/FluenTech/embedded-time/pull/77/checks?check_run_id=1218050695

error[E0284]: type annotations needed: cannot satisfy `<<Clock as Clock>::T as Div<_>>::Output == <Clock as Clock>::T`
Error:    --> src/instant.rs:183:66
    |
183 |         if add_ticks <= (<Clock::T as num::Bounded>::max_value() / 2.into()) {
    |                                                                  ^ cannot satisfy `<<Clock as Clock>::T as Div<_>>::Output == <Clock as Clock>::T`

Meta

rustc --version --verbose:

rustc 1.49.0-nightly (98edd1fbf 2020-10-06)
binary: rustc
commit-hash: 98edd1fbf8a68977a2a7c1312eb1ebff80515a92
commit-date: 2020-10-06
host: x86_64-pc-windows-msvc
release: 1.49.0-nightly
LLVM version: 11.0

Metadata

Metadata

Assignees

Labels

A-associated-itemsArea: Associated items (types, constants & functions)A-inferenceArea: Type inferenceC-bugCategory: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️P-criticalCritical priorityT-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