about summary refs log tree commit diff
path: root/src/test/incremental/thinlto
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2017-03-27 09:35:27 -0700
committerEsteban Küber <esteban@kuber.com.ar>2017-05-04 19:11:58 -0700
commited6ad0952f980285c671277a9fd0559ab9d125d3 (patch)
tree2048a3fddfde3849c5775c79053deed8118a3f0b /src/test/incremental/thinlto
parent96e2c34286099eea4f51daaadbb82a8fbe99e0f6 (diff)
downloadrust-ed6ad0952f980285c671277a9fd0559ab9d125d3.tar.gz
rust-ed6ad0952f980285c671277a9fd0559ab9d125d3.zip
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 {
  |  _^ starting here...
2 | |     bar: Bar,
  | |     -------- recursive here
3 | | }
  | |_^ ...ending here: recursive type has infinite size
  |
  = 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 {
  |  _^ starting here...
6 | |     foo: Foo,
  | |     -------- recursive here
7 | | }
  | |_^ ...ending here: recursive type has infinite size
  |
  = 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