Skip to content

rustc fails to produce lifetime and closure related compiler error. #29793

Closed
@mitchmindtree

Description

@mitchmindtree

We ran into this in conrod, where one of the widgets would produce different behaviour depending on whether it was compiled in debug or release.

The related conrod issue is here.

This comment describes the strange behaviour more precisely.

This comment demonstrates the fix used.

@huonw and @Aatch helped to point out that the difference in behaviour seemed to be due to the fact that rustc was failing to produce an error relating to the lifetimes of the demo, col and row values.

@Aatch shared a simplified example of what error we should have received here.

Edit: I should mention, this bug was found in:

  • rustc 1.4.0 (8ab8581f6 2015-10-27)
  • rustc 1.6.0-nightly (5b4986fa5 2015-11-08)
  • rustc 1.5.0-beta.2 (b0f440163 2015-10-28)

on both windows and osx.

Metadata

Metadata

Assignees

Labels

A-lifetimesArea: Lifetimes / regionsI-unsoundIssue: A soundness hole (worst kind of bug), see: https://en.wikipedia.org/wiki/SoundnessP-highHigh priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions