diff options
| author | bors <bors@rust-lang.org> | 2017-05-07 13:57:36 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2017-05-07 13:57:36 +0000 |
| commit | a478e46eb76588a86edf8c01bdc58343652b5808 (patch) | |
| tree | 4f9719d6eac89dcd095a4d6daeed333c09a2d4ff /src/test/incremental/thinlto | |
| parent | ced823e267c132fab172b1890b24073995e79ffa (diff) | |
| parent | a4fc9251920260e1b0b3dff71c8da8b3af2c5453 (diff) | |
| download | rust-a478e46eb76588a86edf8c01bdc58343652b5808.tar.gz rust-a478e46eb76588a86edf8c01bdc58343652b5808.zip | |
Auto merge of #40857 - estebank:recursive, r=arielb1
Point at fields that make the type recursive
On recursive types of infinite size, point at all the fields that make
the type recursive.
```rust
struct Foo {
bar: Bar,
}
struct Bar {
foo: Foo,
}
```
outputs
```
error[E0072]: recursive type `Foo` has infinite size
--> file.rs:1:1
1 | struct Foo {
| ^^^^^^^^^^ recursive type has infinite size
2 | bar: Bar,
| -------- recursive here
|
= help: insert indirection (e.g., a `Box`, `Rc`, or `&`) at some point to make `Foo` representable
error[E0072]: recursive type `Bar` has infinite size
--> file.rs:5:1
|
5 | struct Bar {
| ^^^^^^^^^^ recursive type has infinite size
6 | foo: Foo,
| -------- recursive here
|
= help: insert indirection (e.g., a `Box`, `Rc`, or `&`) at some point to make `Bar` representable
```
Diffstat (limited to 'src/test/incremental/thinlto')
0 files changed, 0 insertions, 0 deletions
