@@ -7,12 +7,67 @@ LL | #![feature(dyn_star, pointer_like_trait)]
7
7
= note: see issue #102425 <https://github.com/rust-lang/rust/issues/102425> for more information
8
8
= note: `#[warn(incomplete_features)]` on by default
9
9
10
- error[E0282 ]: type annotations needed
11
- --> $DIR/param-env-infer.rs:12:10
10
+ error[E0391 ]: cycle detected when computing type of `make_dyn_star::{opaque#0}`
11
+ --> $DIR/param-env-infer.rs:11:60
12
12
|
13
- LL | t as _
14
- | ^ cannot infer type
13
+ LL | fn make_dyn_star<'a, T: PointerLike + Debug + 'a>(t: T) -> impl PointerLike + Debug + 'a {
14
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
15
+ |
16
+ note: ...which requires borrow-checking `make_dyn_star`...
17
+ --> $DIR/param-env-infer.rs:11:1
18
+ |
19
+ LL | fn make_dyn_star<'a, T: PointerLike + Debug + 'a>(t: T) -> impl PointerLike + Debug + 'a {
20
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
21
+ note: ...which requires promoting constants in MIR for `make_dyn_star`...
22
+ --> $DIR/param-env-infer.rs:11:1
23
+ |
24
+ LL | fn make_dyn_star<'a, T: PointerLike + Debug + 'a>(t: T) -> impl PointerLike + Debug + 'a {
25
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
26
+ note: ...which requires preparing `make_dyn_star` for borrow checking...
27
+ --> $DIR/param-env-infer.rs:11:1
28
+ |
29
+ LL | fn make_dyn_star<'a, T: PointerLike + Debug + 'a>(t: T) -> impl PointerLike + Debug + 'a {
30
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
31
+ note: ...which requires unsafety-checking `make_dyn_star`...
32
+ --> $DIR/param-env-infer.rs:11:1
33
+ |
34
+ LL | fn make_dyn_star<'a, T: PointerLike + Debug + 'a>(t: T) -> impl PointerLike + Debug + 'a {
35
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
36
+ note: ...which requires building MIR for `make_dyn_star`...
37
+ --> $DIR/param-env-infer.rs:11:1
38
+ |
39
+ LL | fn make_dyn_star<'a, T: PointerLike + Debug + 'a>(t: T) -> impl PointerLike + Debug + 'a {
40
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
41
+ note: ...which requires match-checking `make_dyn_star`...
42
+ --> $DIR/param-env-infer.rs:11:1
43
+ |
44
+ LL | fn make_dyn_star<'a, T: PointerLike + Debug + 'a>(t: T) -> impl PointerLike + Debug + 'a {
45
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
46
+ note: ...which requires building THIR for `make_dyn_star`...
47
+ --> $DIR/param-env-infer.rs:11:1
48
+ |
49
+ LL | fn make_dyn_star<'a, T: PointerLike + Debug + 'a>(t: T) -> impl PointerLike + Debug + 'a {
50
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
51
+ note: ...which requires type-checking `make_dyn_star`...
52
+ --> $DIR/param-env-infer.rs:11:1
53
+ |
54
+ LL | fn make_dyn_star<'a, T: PointerLike + Debug + 'a>(t: T) -> impl PointerLike + Debug + 'a {
55
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
56
+ = note: ...which requires computing layout of `make_dyn_star::{opaque#0}`...
57
+ = note: ...which requires normalizing `make_dyn_star::{opaque#0}`...
58
+ = note: ...which again requires computing type of `make_dyn_star::{opaque#0}`, completing the cycle
59
+ note: cycle used when checking item types in top-level module
60
+ --> $DIR/param-env-infer.rs:5:1
61
+ |
62
+ LL | / #![feature(dyn_star, pointer_like_trait)]
63
+ LL | |
64
+ LL | |
65
+ LL | | use std::fmt::Debug;
66
+ ... |
67
+ LL | |
68
+ LL | | fn main() {}
69
+ | |____________^
15
70
16
71
error: aborting due to previous error; 1 warning emitted
17
72
18
- For more information about this error, try `rustc --explain E0282 `.
73
+ For more information about this error, try `rustc --explain E0391 `.
0 commit comments