Provide a proper span when demanding for the return type of box x.
This commit is contained in:
parent
c08480fce0
commit
1731bf8049
3 changed files with 7 additions and 13 deletions
|
|
@ -8,8 +8,6 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
//~^^^^^^^^^^ ERROR reached the recursion limit
|
||||
|
||||
// Test that the recursion limit can be changed and that the compiler
|
||||
// suggests a fix. In this case, we have a long chain of Deref impls
|
||||
// which will cause an overflow during the autoderef loop.
|
||||
|
|
|
|||
|
|
@ -1,17 +1,13 @@
|
|||
error[E0055]: reached the recursion limit while auto-dereferencing I
|
||||
--> $DIR/recursion_limit_deref.rs:62:22
|
||||
--> $DIR/recursion_limit_deref.rs:60:22
|
||||
|
|
||||
LL | let x: &Bottom = &t; //~ ERROR mismatched types
|
||||
| ^^ deref recursion limit reached
|
||||
|
|
||||
= help: consider adding a `#![recursion_limit="20"]` attribute to your crate
|
||||
|
||||
error[E0055]: reached the recursion limit while auto-dereferencing I
|
||||
|
|
||||
= help: consider adding a `#![recursion_limit="20"]` attribute to your crate
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/recursion_limit_deref.rs:62:22
|
||||
--> $DIR/recursion_limit_deref.rs:60:22
|
||||
|
|
||||
LL | let x: &Bottom = &t; //~ ERROR mismatched types
|
||||
| ^^ expected struct `Bottom`, found struct `Top`
|
||||
|
|
@ -19,7 +15,7 @@ LL | let x: &Bottom = &t; //~ ERROR mismatched types
|
|||
= note: expected type `&Bottom`
|
||||
found type `&Top`
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
Some errors occurred: E0055, E0308.
|
||||
For more information about an error, try `rustc --explain E0055`.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue