blob: 81be8c8362e353d191cb05bcd53ce902eb59d350 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
|
error[E0283]: type annotations needed: cannot satisfy `Bar: Send`
--> $DIR/in-where-clause.rs:13:9
|
LL | [0; 1 + 2]
| ^^^^^
|
= note: cannot satisfy `Bar: Send`
note: required by a bound in `foo`
--> $DIR/in-where-clause.rs:11:10
|
LL | fn foo() -> Bar
| --- required by a bound in this function
LL | where
LL | Bar: Send,
| ^^^^ required by this bound in `foo`
error[E0391]: cycle detected when computing type of opaque `Bar::{opaque#0}`
--> $DIR/in-where-clause.rs:5:12
|
LL | type Bar = impl Sized;
| ^^^^^^^^^^
|
note: ...which requires borrow-checking `foo`...
--> $DIR/in-where-clause.rs:9:1
|
LL | / fn foo() -> Bar
LL | | where
LL | | Bar: Send,
| |______________^
note: ...which requires promoting constants in MIR for `foo`...
--> $DIR/in-where-clause.rs:9:1
|
LL | / fn foo() -> Bar
LL | | where
LL | | Bar: Send,
| |______________^
note: ...which requires checking if `foo` contains FFI-unwind calls...
--> $DIR/in-where-clause.rs:9:1
|
LL | / fn foo() -> Bar
LL | | where
LL | | Bar: Send,
| |______________^
note: ...which requires building MIR for `foo`...
--> $DIR/in-where-clause.rs:9:1
|
LL | / fn foo() -> Bar
LL | | where
LL | | Bar: Send,
| |______________^
note: ...which requires match-checking `foo`...
--> $DIR/in-where-clause.rs:9:1
|
LL | / fn foo() -> Bar
LL | | where
LL | | Bar: Send,
| |______________^
note: ...which requires type-checking `foo`...
--> $DIR/in-where-clause.rs:9:1
|
LL | / fn foo() -> Bar
LL | | where
LL | | Bar: Send,
| |______________^
note: ...which requires computing revealed normalized predicates of `foo::{constant#0}`...
--> $DIR/in-where-clause.rs:13:9
|
LL | [0; 1 + 2]
| ^^^^^
= note: ...which requires revealing opaque types in `[Binder { value: TraitPredicate(<Bar as core::marker::Send>, polarity:Positive), bound_vars: [] }]`...
note: ...which requires computing type of `Bar::{opaque#0}`...
--> $DIR/in-where-clause.rs:5:12
|
LL | type Bar = impl Sized;
| ^^^^^^^^^^
= note: ...which again requires computing type of opaque `Bar::{opaque#0}`, completing the cycle
= note: cycle used when evaluating trait selection obligation `Bar: core::marker::Send`
= 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
error: aborting due to 2 previous errors
Some errors have detailed explanations: E0283, E0391.
For more information about an error, try `rustc --explain E0283`.
|