Skip to content

Compile regression "cannot infer an appropriate lifetime for lifetime parameter" #70917

Closed
@gz

Description

@gz

On linux, the following works:

git clone https://github.com/AltSysrq/proptest.git
cd proptest
rustup update nightly-2020-04-06
rustup default nightly-2020-04-06
source ~/.cargo/env
rustc --version
cargo build

(rustc version is rustc 1.44.0-nightly (b543afc 2020-04-05))

The following does not work:

rustup update nightly
rustup default nightly
source ~/.cargo/env
rustc --version
cargo build

Build fails with:

error[E0495]: cannot infer an appropriate lifetime for lifetime parameter `'a` due to conflicting requirements
  --> proptest/src/arbitrary/_core/iter.rs:47:23
   |
47 |         base.prop_map(Iterator::cloned).boxed()
   |                       ^^^^^^^^^^^^^^^^
   |
note: first, the lifetime cannot outlive the lifetime `'a` as defined on the impl at 36:9...

(rustc version is: rustc 1.44.0-nightly (42abbd8 2020-04-07))

Metadata

Metadata

Assignees

Labels

A-borrow-checkerArea: The borrow checkerA-inferenceArea: Type inferenceA-lifetimesArea: Lifetimes / regionsP-criticalCritical priorityS-waiting-on-reviewStatus: Awaiting review from the assignee but also interested parties.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