File: in-defining-scope.stderr

package info (click to toggle)
rustc 1.88.0%2Bdfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 934,128 kB
  • sloc: xml: 158,127; python: 36,062; javascript: 19,855; sh: 19,700; cpp: 18,947; ansic: 12,993; asm: 4,792; makefile: 690; lisp: 29; perl: 29; ruby: 19; sql: 11
file content (66 lines) | stat: -rw-r--r-- 2,360 bytes parent folder | download | duplicates (8)
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
error[E0391]: cycle detected when computing type of `foo::{opaque#0}`
  --> $DIR/in-defining-scope.rs:6:13
   |
LL | fn foo() -> impl Sized {
   |             ^^^^^^^^^^
   |
note: ...which requires computing type of opaque `foo::{opaque#0}`...
  --> $DIR/in-defining-scope.rs:6:13
   |
LL | fn foo() -> impl Sized {
   |             ^^^^^^^^^^
note: ...which requires borrow-checking `foo`...
  --> $DIR/in-defining-scope.rs:6:1
   |
LL | fn foo() -> impl Sized {
   | ^^^^^^^^^^^^^^^^^^^^^^
note: ...which requires promoting constants in MIR for `foo`...
  --> $DIR/in-defining-scope.rs:6:1
   |
LL | fn foo() -> impl Sized {
   | ^^^^^^^^^^^^^^^^^^^^^^
note: ...which requires checking if `foo` contains FFI-unwind calls...
  --> $DIR/in-defining-scope.rs:6:1
   |
LL | fn foo() -> impl Sized {
   | ^^^^^^^^^^^^^^^^^^^^^^
note: ...which requires building MIR for `foo`...
  --> $DIR/in-defining-scope.rs:6:1
   |
LL | fn foo() -> impl Sized {
   | ^^^^^^^^^^^^^^^^^^^^^^
note: ...which requires match-checking `foo`...
  --> $DIR/in-defining-scope.rs:6:1
   |
LL | fn foo() -> impl Sized {
   | ^^^^^^^^^^^^^^^^^^^^^^
note: ...which requires type-checking `foo`...
  --> $DIR/in-defining-scope.rs:6:1
   |
LL | fn foo() -> impl Sized {
   | ^^^^^^^^^^^^^^^^^^^^^^
   = note: ...which requires computing layout of `foo::{opaque#0}`...
   = note: ...which requires normalizing `foo::{opaque#0}`...
   = note: ...which again requires computing type of `foo::{opaque#0}`, completing the cycle
note: cycle used when checking that `foo::{opaque#0}` is well-formed
  --> $DIR/in-defining-scope.rs:6:13
   |
LL | fn foo() -> impl Sized {
   |             ^^^^^^^^^^
   = 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

warning: function cannot return without recursing
  --> $DIR/in-defining-scope.rs:6:1
   |
LL | fn foo() -> impl Sized {
   | ^^^^^^^^^^^^^^^^^^^^^^ cannot return without recursing
...
LL |         transmute::<_, u8>(foo());
   |                            ----- recursive call site
   |
   = help: a `loop` may express intention better if this is on purpose
   = note: `#[warn(unconditional_recursion)]` on by default

error: aborting due to 1 previous error; 1 warning emitted

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