summaryrefslogtreecommitdiffstats
path: root/tests/ui/type-alias-impl-trait/reveal_local.stderr
blob: c62fd88f4e22bf3db562ffed47c62cca772ca80e (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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
error[E0391]: cycle detected when computing type of opaque `Foo::{opaque#0}`
  --> $DIR/reveal_local.rs:5:12
   |
LL | type Foo = impl Debug;
   |            ^^^^^^^^^^
   |
note: ...which requires type-checking `not_good`...
  --> $DIR/reveal_local.rs:15:5
   |
LL |     is_send::<Foo>();
   |     ^^^^^^^^^^^^^^
   = note: ...which requires evaluating trait selection obligation `Foo: core::marker::Send`...
   = note: ...which again requires computing type of opaque `Foo::{opaque#0}`, completing the cycle
note: cycle used when computing type of `Foo::{opaque#0}`
  --> $DIR/reveal_local.rs:5:12
   |
LL | type Foo = impl Debug;
   |            ^^^^^^^^^^
   = 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[E0391]: cycle detected when computing type of opaque `Foo::{opaque#0}`
  --> $DIR/reveal_local.rs:5:12
   |
LL | type Foo = impl Debug;
   |            ^^^^^^^^^^
   |
note: ...which requires type-checking `not_good`...
  --> $DIR/reveal_local.rs:12:1
   |
LL | fn not_good() {
   | ^^^^^^^^^^^^^
   = note: ...which again requires computing type of opaque `Foo::{opaque#0}`, completing the cycle
note: cycle used when computing type of `Foo::{opaque#0}`
  --> $DIR/reveal_local.rs:5:12
   |
LL | type Foo = impl Debug;
   |            ^^^^^^^^^^
   = 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: cannot check whether the hidden type of `reveal_local[9507]::Foo::{opaque#0}` satisfies auto traits
  --> $DIR/reveal_local.rs:15:15
   |
LL |     is_send::<Foo>();
   |               ^^^
   |
note: opaque type is declared here
  --> $DIR/reveal_local.rs:5:12
   |
LL | type Foo = impl Debug;
   |            ^^^^^^^^^^
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
  --> $DIR/reveal_local.rs:12:4
   |
LL | fn not_good() {
   |    ^^^^^^^^
note: required by a bound in `is_send`
  --> $DIR/reveal_local.rs:10:15
   |
LL | fn is_send<T: Send>() {}
   |               ^^^^ required by this bound in `is_send`

error[E0391]: cycle detected when computing type of opaque `Foo::{opaque#0}`
  --> $DIR/reveal_local.rs:5:12
   |
LL | type Foo = impl Debug;
   |            ^^^^^^^^^^
   |
note: ...which requires type-checking `not_gooder`...
  --> $DIR/reveal_local.rs:19:1
   |
LL | fn not_gooder() -> Foo {
   | ^^^^^^^^^^^^^^^^^^^^^^
   = note: ...which again requires computing type of opaque `Foo::{opaque#0}`, completing the cycle
note: cycle used when computing type of `Foo::{opaque#0}`
  --> $DIR/reveal_local.rs:5:12
   |
LL | type Foo = impl Debug;
   |            ^^^^^^^^^^
   = 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: cannot check whether the hidden type of `reveal_local[9507]::Foo::{opaque#0}` satisfies auto traits
  --> $DIR/reveal_local.rs:25:15
   |
LL |     is_send::<Foo>();
   |               ^^^
   |
note: opaque type is declared here
  --> $DIR/reveal_local.rs:5:12
   |
LL | type Foo = impl Debug;
   |            ^^^^^^^^^^
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
  --> $DIR/reveal_local.rs:19:4
   |
LL | fn not_gooder() -> Foo {
   |    ^^^^^^^^^^
note: required by a bound in `is_send`
  --> $DIR/reveal_local.rs:10:15
   |
LL | fn is_send<T: Send>() {}
   |               ^^^^ required by this bound in `is_send`

error: aborting due to 5 previous errors

For more information about this error, try `rustc --explain E0391`.