Open
Description
I think it could be related to #113818
Code
use core::ops::Range;
pub trait MyTrait {
type Iter<'a>: Iterator
where
<<Self as MyTrait>::Iter<'a> as Iterator>::Item: Clone,
Self: 'a;
}
pub struct MyStruct;
impl MyTrait for MyStruct {
type Iter<'a> = Range<usize>;
}
Meta
The error is the same in rust 1.73, 1.74, nightly, and beta.
Error output
Compiling playground v0.0.1 (/playground)
error[E0275]: overflow evaluating the requirement `<MyStruct as MyTrait>::Iter<'a> == _`
--> src/lib.rs:12:21
|
12 | type Iter<'a> = Range<usize>;
| ^^^^^^^^^^^^
For more information about this error, try `rustc --explain E0275`.
error: could not compile `playground` (lib) due to previous error