Skip to content

1.98 beta regression: "cannot deduce the lifetime bound for this trait object type from context" #159430

Description

@theemathas

This regression was found by the 1.98 beta crater run.

[INFO] [stdout] error[E0228]: cannot deduce the lifetime bound for this trait object type from context
[INFO] [stdout]    --> src/experiment/mod.rs:255:41
[INFO] [stdout]     |
[INFO] [stdout] 255 |         type IntoIter<'a> = T::Iter<'a, dyn Example>
[INFO] [stdout]     |                                         ^^^^^^^^^^^
[INFO] [stdout]     |
[INFO] [stdout] help: please supply an explicit bound
[INFO] [stdout]     |
[INFO] [stdout] 255 |         type IntoIter<'a> = T::Iter<'a, dyn Example + /* 'a */>
[INFO] [stdout]     |                                                     ++++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] For more information about this error, try `rustc --explain E0228`.

Metadata

Metadata

Assignees

Labels

A-associated-itemsArea: Associated items (types, constants & functions)A-dyn-traitArea: trait objects, vtable layoutA-lifetimesArea: Lifetimes / regionsS-has-bisectionStatus: A bisection has been found for this issueS-has-mcveStatus: A Minimal Complete and Verifiable Example has been found for this issueT-typesRelevant to the types team, which will review and decide on the PR/issue.regression-from-stable-to-betaPerformance or correctness regression from stable to beta.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions