]> git.proxmox.com Git - rustc.git/blob - tests/ui/type-alias-impl-trait/auto-trait-leakage3.stderr
New upstream version 1.74.1+dfsg1
[rustc.git] / tests / ui / type-alias-impl-trait / auto-trait-leakage3.stderr
1 error[E0391]: cycle detected when computing type of opaque `m::Foo::{opaque#0}`
2 --> $DIR/auto-trait-leakage3.rs:7:20
3 |
4 LL | pub type Foo = impl std::fmt::Debug;
5 | ^^^^^^^^^^^^^^^^^^^^
6 |
7 note: ...which requires type-checking `m::bar`...
8 --> $DIR/auto-trait-leakage3.rs:16:9
9 |
10 LL | is_send(foo());
11 | ^^^^^^^
12 = note: ...which requires evaluating trait selection obligation `m::Foo: core::marker::Send`...
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/auto-trait-leakage3.rs:7:20
16 |
17 LL | pub type Foo = impl std::fmt::Debug;
18 | ^^^^^^^^^^^^^^^^^^^^
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
20
21 error[E0391]: cycle detected when computing type of opaque `m::Foo::{opaque#0}`
22 --> $DIR/auto-trait-leakage3.rs:7:20
23 |
24 LL | pub type Foo = impl std::fmt::Debug;
25 | ^^^^^^^^^^^^^^^^^^^^
26 |
27 note: ...which requires type-checking `m::bar`...
28 --> $DIR/auto-trait-leakage3.rs:15:5
29 |
30 LL | pub fn bar() {
31 | ^^^^^^^^^^^^
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/auto-trait-leakage3.rs:7:20
35 |
36 LL | pub type Foo = impl std::fmt::Debug;
37 | ^^^^^^^^^^^^^^^^^^^^
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
39
40 error: cannot check whether the hidden type of `auto_trait_leakage3[211d]::m::Foo::{opaque#0}` satisfies auto traits
41 --> $DIR/auto-trait-leakage3.rs:16:17
42 |
43 LL | is_send(foo());
44 | ------- ^^^^^
45 | |
46 | required by a bound introduced by this call
47 |
48 note: opaque type is declared here
49 --> $DIR/auto-trait-leakage3.rs:7: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/auto-trait-leakage3.rs:15:12
55 |
56 LL | pub fn bar() {
57 | ^^^
58 note: required by a bound in `is_send`
59 --> $DIR/auto-trait-leakage3.rs:20: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
65
66 For more information about this error, try `rustc --explain E0391`.