diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2017-03-27 14:21:27 -0700 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2017-05-04 19:11:59 -0700 |
| commit | f7108e18cd4c88b971c6d548387fe2eeb5403c45 (patch) | |
| tree | 08f00c6de6578d7bc63b9f03e247e0c72dd38f43 /src/test/ui/span | |
| parent | ed6ad0952f980285c671277a9fd0559ab9d125d3 (diff) | |
Only point at the fields that cause infinite size
* clean up code * point only fields that cause the type to be of infinite size * fix unittests
Diffstat (limited to 'src/test/ui/span')
| -rw-r--r-- | src/test/ui/span/recursive-type-field.stderr | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/test/ui/span/recursive-type-field.stderr b/src/test/ui/span/recursive-type-field.stderr index 69d88f3a277..d8219cbc220 100644 --- a/src/test/ui/span/recursive-type-field.stderr +++ b/src/test/ui/span/recursive-type-field.stderr @@ -4,9 +4,8 @@ error[E0072]: recursive type `Foo` has infinite size 13 | struct Foo<'a> { | _^ starting here... 14 | | bar: Bar<'a>, - | | ------------ recursive here + | | ------------ recursive without indirection 15 | | b: Rc<Bar<'a>>, - | | -------------- recursive here 16 | | } | |_^ ...ending here: recursive type has infinite size | @@ -18,22 +17,20 @@ error[E0072]: recursive type `Bar` has infinite size 18 | struct Bar<'a> { | _^ starting here... 19 | | y: (Foo<'a>, Foo<'a>), - | | --------------------- recursive here + | | --------------------- recursive without indirection 20 | | z: Option<Bar<'a>>, - | | ------------------ recursive here 21 | | a: &'a Foo<'a>, - | | -------------- recursive here 22 | | c: &'a [Bar<'a>], - | | ---------------- recursive here 23 | | d: [Bar<'a>; 1], - | | --------------- recursive here + | | --------------- recursive without indirection 24 | | e: Foo<'a>, - | | ---------- recursive here + | | ---------- recursive without indirection 25 | | x: Bar<'a>, - | | ---------- recursive here + | | ---------- recursive without indirection 26 | | } | |_^ ...ending here: recursive type has infinite size | = help: insert indirection (e.g., a `Box`, `Rc`, or `&`) at some point to make `Bar` representable error: aborting due to 2 previous errors + |
