Skip to content

ICE: expect >1 RPITITs in call to collect_return_position_impl_trait_in_trait_tys #119857

@matthiaskrgr

Description

@matthiaskrgr

auto-reduced (treereduce-rust):

pub trait Iter { type Item<'a>: 'a; fn next<'a>(&'a mut self) -> Option<Self::Item<As1: Copy>>; } pub struct Windows<T> {} impl<T> Iter for Windows<T> { type Item<'a> = &'a mut [T]; fn next<'a>(&'a mut self) -> Option<Self::Item<'a>> {} } 

original:

pub trait Iter { type Item<'a> where Self: 'a; fn next<'a>(&'a mut self) -> Option<Self::Item<As1: Copy>>; } pub struct Windows<T> {} impl<T> Iter for Windows<T> { type Item<'a> = &'a mut [T]; fn next<'a>(&'a mut self) -> Option<Self::Item<'a>> {} }

Version information

rustc 1.77.0-dev binary: rustc commit-hash: unknown commit-date: unknown host: x86_64-unknown-linux-gnu release: 1.77.0-dev LLVM version: 17.0.6 

Metadata

Metadata

Labels

C-bugCategory: This is a bug.F-associated_type_bounds`#![feature(associated_type_bounds)]`I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.requires-debug-assertionsThis issue requires a build of rustc or tooling with debug-assertions in some wayrequires-nightlyThis issue requires a nightly compiler in some way.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions