File tree Expand file tree Collapse file tree 4 files changed +38
-9
lines changed Expand file tree Collapse file tree 4 files changed +38
-9
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1- //@ known-bug: rust-lang/rust#126850
1+ //@ check-pass
2+
23fn bug < T > ( ) -> impl Iterator <
34 Item = [ ( ) ; {
45 |found : & String | Some ( false ) ;
Original file line number Diff line number Diff line change 1+ #![ allow( incomplete_features) ]
2+ #![ feature( return_type_notation) ]
3+
4+ trait IntFactory {
5+ fn stream ( & self ) -> impl IntFactory < stream ( ..) : IntFactory < stream ( ..) : Send > + Send > ;
6+ //~^ ERROR cycle detected when resolving lifetimes for `IntFactory::stream`
7+ }
8+
9+ pub fn main ( ) { }
Original file line number Diff line number Diff line change 1+ error[E0391]: cycle detected when resolving lifetimes for `IntFactory::stream`
2+ --> $DIR/return-type-notation.rs:5:5
3+ |
4+ LL | fn stream(&self) -> impl IntFactory<stream(..): IntFactory<stream(..): Send> + Send>;
5+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6+ |
7+ note: ...which requires computing function signature of `IntFactory::stream`...
8+ --> $DIR/return-type-notation.rs:5:5
9+ |
10+ LL | fn stream(&self) -> impl IntFactory<stream(..): IntFactory<stream(..): Send> + Send>;
11+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
12+ note: ...which requires looking up late bound vars inside `IntFactory::stream`...
13+ --> $DIR/return-type-notation.rs:5:5
14+ |
15+ LL | fn stream(&self) -> impl IntFactory<stream(..): IntFactory<stream(..): Send> + Send>;
16+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
17+ = note: ...which again requires resolving lifetimes for `IntFactory::stream`, completing the cycle
18+ note: cycle used when listing captured lifetimes for opaque `IntFactory::stream::{opaque#0}`
19+ --> $DIR/return-type-notation.rs:5:25
20+ |
21+ LL | fn stream(&self) -> impl IntFactory<stream(..): IntFactory<stream(..): Send> + Send>;
22+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
23+ = note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
24+
25+ error: aborting due to 1 previous error
26+
27+ For more information about this error, try `rustc --explain E0391`.
You can’t perform that action at this time.
0 commit comments