I wrote some code for a rustc test which intentionally hits the recursion limit while trying to autoderef from &Top to &Bottom.
In nightly the error when autoderef hits the recursion limit is printed twice. The second time it is printed without a real span.
Stable and beta:
rustc 1.14.0 (e8a012324 2016-12-16)
error[E0055]: reached the recursion limit while auto-dereferencing I
--> <anon>:60:22
|
60 | let x: &Bottom = &t;
| ^^ deref recursion limit reached
error[E0308]: mismatched types
--> <anon>:60:22
|
60 | let x: &Bottom = &t;
| ^^ expected struct `Bottom`, found struct `Top`
|
= note: expected type `&Bottom`
= note: found type `&Top`
error: aborting due to 2 previous errors
Nightly:
error[E0055]: reached the recursion limit while auto-dereferencing I
--> xx.rs:60:22
|
60 | let x: &Bottom = &t;
| ^^ deref recursion limit reached
error[E0055]: reached the recursion limit while auto-dereferencing I
error[E0308]: mismatched types
--> xx.rs:60:22
|
60 | let x: &Bottom = &t;
| ^^ expected struct `Bottom`, found struct `Top`
|
= note: expected type `&Bottom`
= note: found type `&Top`
error: aborting due to 3 previous errors
It's clearer to see with --error-format=json that the second error has a dummy span attached: https://gist.github.com/durka/04031f5701b5740f0f413267fc913e87
cc @jseyfried @jonathandturner
I wrote some code for a rustc test which intentionally hits the recursion limit while trying to autoderef from
&Topto&Bottom.In nightly the error when autoderef hits the recursion limit is printed twice. The second time it is printed without a real span.
Stable and beta:
Nightly:
It's clearer to see with
--error-format=jsonthat the second error has a dummy span attached: https://gist.github.com/durka/04031f5701b5740f0f413267fc913e87cc @jseyfried @jonathandturner