]> git.lizzy.rs Git - rust.git/blob - src/test/ui/infinite/infinite-struct.stderr
Auto merge of #84589 - In-line:zircon-thread-name, r=JohnTitor
[rust.git] / src / test / ui / infinite / infinite-struct.stderr
1 error[E0072]: recursive type `Take` has infinite size
2   --> $DIR/infinite-struct.rs:1:1
3    |
4 LL | struct Take(Take);
5    | ^^^^^^^^^^^^----^^
6    | |           |
7    | |           recursive without indirection
8    | recursive type has infinite size
9    |
10 help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `Take` representable
11    |
12 LL | struct Take(Box<Take>);
13    |             ^^^^    ^
14
15 error[E0391]: cycle detected when computing drop-check constraints for `Take`
16   --> $DIR/infinite-struct.rs:1:1
17    |
18 LL | struct Take(Take);
19    | ^^^^^^^^^^^^^^^^^^
20    |
21    = note: ...which again requires computing drop-check constraints for `Take`, completing the cycle
22    = note: cycle used when computing dropck types for `Canonical { max_universe: U0, variables: [], value: ParamEnvAnd { param_env: ParamEnv { caller_bounds: [], reveal: UserFacing }, value: Take } }`
23
24 error: aborting due to 2 previous errors
25
26 Some errors have detailed explanations: E0072, E0391.
27 For more information about an error, try `rustc --explain E0072`.