]> git.proxmox.com Git - rustc.git/blame - tests/ui/type-alias-impl-trait/inference-cycle.stderr
New upstream version 1.74.1+dfsg1
[rustc.git] / tests / ui / type-alias-impl-trait / inference-cycle.stderr
CommitLineData
781aab86 1error[E0391]: cycle detected when computing type of opaque `m::Foo::{opaque#0}`
fe692bf9 2 --> $DIR/inference-cycle.rs:5:20
94222f64 3 |
fe692bf9
FG
4LL | pub type Foo = impl std::fmt::Debug;
5 | ^^^^^^^^^^^^^^^^^^^^
94222f64
XL
6 |
7note: ...which requires type-checking `m::bar`...
fe692bf9 8 --> $DIR/inference-cycle.rs:16:9
94222f64 9 |
04454e1e
FG
10LL | 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
14note: cycle used when computing type of `m::Foo::{opaque#0}`
15 --> $DIR/inference-cycle.rs:5:20
94222f64 16 |
781aab86
FG
17LL | 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 21error[E0391]: cycle detected when computing type of opaque `m::Foo::{opaque#0}`
fe692bf9
FG
22 --> $DIR/inference-cycle.rs:5:20
23 |
24LL | pub type Foo = impl std::fmt::Debug;
25 | ^^^^^^^^^^^^^^^^^^^^
26 |
27note: ...which requires type-checking `m::bar`...
28 --> $DIR/inference-cycle.rs:15:5
29 |
30LL | pub fn bar() {
31 | ^^^^^^^^^^^^
781aab86
FG
32 = note: ...which again requires computing type of opaque `m::Foo::{opaque#0}`, completing the cycle
33note: cycle used when computing type of `m::Foo::{opaque#0}`
34 --> $DIR/inference-cycle.rs:5:20
fe692bf9 35 |
781aab86
FG
36LL | 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
40error: 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 |
43LL | is_send(foo()); // Today: error
44 | ------- ^^^^^
45 | |
46 | required by a bound introduced by this call
47 |
48note: opaque type is declared here
49 --> $DIR/inference-cycle.rs:5:20
50 |
51LL | pub type Foo = impl std::fmt::Debug;
52 | ^^^^^^^^^^^^^^^^^^^^
53note: 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 |
56LL | pub fn bar() {
57 | ^^^
58note: required by a bound in `is_send`
59 --> $DIR/inference-cycle.rs:24:19
60 |
61LL | fn is_send<T: Send>(_: T) {}
62 | ^^^^ required by this bound in `is_send`
63
64error: aborting due to 3 previous errors
94222f64 65
5e7ed085 66For more information about this error, try `rustc --explain E0391`.