]>
Commit | Line | Data |
---|---|---|
781aab86 | 1 | error[E0391]: cycle detected when computing type of opaque `m::Foo::{opaque#0}` |
fe692bf9 | 2 | --> $DIR/inference-cycle.rs:5:20 |
94222f64 | 3 | | |
fe692bf9 FG |
4 | LL | pub type Foo = impl std::fmt::Debug; |
5 | | ^^^^^^^^^^^^^^^^^^^^ | |
94222f64 XL |
6 | | |
7 | note: ...which requires type-checking `m::bar`... | |
fe692bf9 | 8 | --> $DIR/inference-cycle.rs:16:9 |
94222f64 | 9 | | |
04454e1e FG |
10 | LL | is_send(foo()); // Today: error |
11 | | ^^^^^^^ | |
12 | = note: ...which requires evaluating trait selection obligation `m::Foo: core::marker::Send`... | |
781aab86 FG |
13 | = note: ...which again requires computing type of opaque `m::Foo::{opaque#0}`, completing the cycle |
14 | note: cycle used when computing type of `m::Foo::{opaque#0}` | |
15 | --> $DIR/inference-cycle.rs:5:20 | |
94222f64 | 16 | | |
781aab86 FG |
17 | LL | pub type Foo = impl std::fmt::Debug; |
18 | | ^^^^^^^^^^^^^^^^^^^^ | |
add651ee | 19 | = 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 |
94222f64 | 20 | |
781aab86 | 21 | error[E0391]: cycle detected when computing type of opaque `m::Foo::{opaque#0}` |
fe692bf9 FG |
22 | --> $DIR/inference-cycle.rs:5:20 |
23 | | | |
24 | LL | pub type Foo = impl std::fmt::Debug; | |
25 | | ^^^^^^^^^^^^^^^^^^^^ | |
26 | | | |
27 | note: ...which requires type-checking `m::bar`... | |
28 | --> $DIR/inference-cycle.rs:15:5 | |
29 | | | |
30 | LL | pub fn bar() { | |
31 | | ^^^^^^^^^^^^ | |
781aab86 FG |
32 | = note: ...which again requires computing type of opaque `m::Foo::{opaque#0}`, completing the cycle |
33 | note: cycle used when computing type of `m::Foo::{opaque#0}` | |
34 | --> $DIR/inference-cycle.rs:5:20 | |
fe692bf9 | 35 | | |
781aab86 FG |
36 | LL | pub type Foo = impl std::fmt::Debug; |
37 | | ^^^^^^^^^^^^^^^^^^^^ | |
add651ee | 38 | = 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 |
fe692bf9 FG |
39 | |
40 | error: cannot check whether the hidden type of `inference_cycle[4ecc]::m::Foo::{opaque#0}` satisfies auto traits | |
41 | --> $DIR/inference-cycle.rs:16:17 | |
42 | | | |
43 | LL | is_send(foo()); // Today: error | |
44 | | ------- ^^^^^ | |
45 | | | | |
46 | | required by a bound introduced by this call | |
47 | | | |
48 | note: opaque type is declared here | |
49 | --> $DIR/inference-cycle.rs:5:20 | |
50 | | | |
51 | LL | pub type Foo = impl std::fmt::Debug; | |
52 | | ^^^^^^^^^^^^^^^^^^^^ | |
53 | note: this item depends on auto traits of the hidden type, but may also be registering the hidden type. This is not supported right now. You can try moving the opaque type and the item that actually registers a hidden type into a new submodule | |
54 | --> $DIR/inference-cycle.rs:15:12 | |
55 | | | |
56 | LL | pub fn bar() { | |
57 | | ^^^ | |
58 | note: required by a bound in `is_send` | |
59 | --> $DIR/inference-cycle.rs:24:19 | |
60 | | | |
61 | LL | fn is_send<T: Send>(_: T) {} | |
62 | | ^^^^ required by this bound in `is_send` | |
63 | ||
64 | error: aborting due to 3 previous errors | |
94222f64 | 65 | |
5e7ed085 | 66 | For more information about this error, try `rustc --explain E0391`. |