about summary refs log tree commit diff
path: root/src/test/incremental/thinlto
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2017-05-07 13:57:36 +0000
committerbors <bors@rust-lang.org>2017-05-07 13:57:36 +0000
commita478e46eb76588a86edf8c01bdc58343652b5808 (patch)
tree4f9719d6eac89dcd095a4d6daeed333c09a2d4ff /src/test/incremental/thinlto
parentced823e267c132fab172b1890b24073995e79ffa (diff)
parenta4fc9251920260e1b0b3dff71c8da8b3af2c5453 (diff)
downloadrust-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