Skip to content

Commit c2ad831

Browse files
committed
Promote crashes tests to ui.
1 parent 19c29bb commit c2ad831

File tree

4 files changed

+38
-9
lines changed

4 files changed

+38
-9
lines changed

tests/crashes/125249.rs

-8
This file was deleted.

tests/crashes/126850.rs renamed to tests/ui/impl-trait/closure-in-type.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
//@ known-bug: rust-lang/rust#126850
1+
//@ check-pass
2+
23
fn bug<T>() -> impl Iterator<
34
Item = [(); {
45
|found: &String| Some(false);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
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 numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
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`.

0 commit comments

Comments
 (0)