]> git.lizzy.rs Git - rust.git/blob - src/test/ui/type-alias-impl-trait/inference-cycle.stderr
Rollup merge of #93885 - Badel2:error-download-ci-llvm, r=Mark-Simulacrum
[rust.git] / src / test / ui / type-alias-impl-trait / inference-cycle.stderr
1 error[E0391]: cycle detected when computing type of `m::Foo::{opaque#0}`
2   --> $DIR/inference-cycle.rs:5:16
3    |
4 LL |     type Foo = impl std::fmt::Debug;
5    |                ^^^^^^^^^^^^^^^^^^^^
6    |
7 note: ...which requires type-checking `m::bar`...
8   --> $DIR/inference-cycle.rs:15:9
9    |
10 LL |         is_send(foo()); // Today: error
11    |         ^^^^^^^
12    = note: ...which requires evaluating trait selection obligation `impl core::fmt::Debug: core::marker::Send`...
13    = note: ...which again requires computing type of `m::Foo::{opaque#0}`, completing the cycle
14 note: cycle used when checking item types in module `m`
15   --> $DIR/inference-cycle.rs:4:1
16    |
17 LL | mod m {
18    | ^^^^^
19
20 error[E0308]: mismatched types
21   --> $DIR/inference-cycle.rs:19:22
22    |
23 LL |     type Foo = impl std::fmt::Debug;
24    |                -------------------- the expected opaque type
25 ...
26 LL |         let f: Foo = 22_u32;
27    |                ---   ^^^^^^ expected opaque type, found `u32`
28    |                |
29    |                expected due to this
30    |
31    = note: expected opaque type `impl Debug`
32                      found type `u32`
33
34 error: aborting due to 2 previous errors
35
36 Some errors have detailed explanations: E0308, E0391.
37 For more information about an error, try `rustc --explain E0308`.