diff options
| author | Dylan MacKenzie <ecstaticmorse@gmail.com> | 2018-06-29 13:32:54 -0700 |
|---|---|---|
| committer | Dylan MacKenzie <ecstaticmorse@gmail.com> | 2018-07-04 14:36:07 -0700 |
| commit | c395044a5002a9c275b92bc8e0bc54da245fa8b1 (patch) | |
| tree | f983910f918a403f8464e3be375bfccf30d618a3 /src/test/ui/const-eval | |
| parent | 0d0e021b1cf9ecc48b4e164e7de14226cff5d3ab (diff) | |
Shorten error message and add link to test
Implements @bjorn3's suggestions.
Diffstat (limited to 'src/test/ui/const-eval')
| -rw-r--r-- | src/test/ui/const-eval/infinite_loop.rs | 2 | ||||
| -rw-r--r-- | src/test/ui/const-eval/infinite_loop.stderr | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/test/ui/const-eval/infinite_loop.rs b/src/test/ui/const-eval/infinite_loop.rs index 8011cf83eed..a1f8ab7f878 100644 --- a/src/test/ui/const-eval/infinite_loop.rs +++ b/src/test/ui/const-eval/infinite_loop.rs @@ -16,7 +16,7 @@ fn main() { let _ = [(); { //~^ WARNING Constant evaluating a complex constant, this might take some time //~| ERROR could not evaluate repeat length - let mut n = 113383; // #20 in A006884 + let mut n = 113383; // #20 in https://oeis.org/A006884 while n != 0 { //~ ERROR constant contains unimplemented expression type n = if n % 2 == 0 { n/2 } else { 3*n + 1 }; } diff --git a/src/test/ui/const-eval/infinite_loop.stderr b/src/test/ui/const-eval/infinite_loop.stderr index 95c15c3e4e2..f69aae29203 100644 --- a/src/test/ui/const-eval/infinite_loop.stderr +++ b/src/test/ui/const-eval/infinite_loop.stderr @@ -13,7 +13,7 @@ LL | let _ = [(); { | __________________^ LL | | //~^ WARNING Constant evaluating a complex constant, this might take some time LL | | //~| ERROR could not evaluate repeat length -LL | | let mut n = 113383; // #20 in A006884 +LL | | let mut n = 113383; // #20 in https://oeis.org/A006884 ... | LL | | n LL | | }]; @@ -26,10 +26,10 @@ LL | let _ = [(); { | __________________^ LL | | //~^ WARNING Constant evaluating a complex constant, this might take some time LL | | //~| ERROR could not evaluate repeat length -LL | | let mut n = 113383; // #20 in A006884 +LL | | let mut n = 113383; // #20 in https://oeis.org/A006884 LL | | while n != 0 { //~ ERROR constant contains unimplemented expression type LL | | n = if n % 2 == 0 { n/2 } else { 3*n + 1 }; - | | ---------- duplicate interpreter state observed while executing this expression, const evaluation will never terminate + | | ---------- duplicate interpreter state observed here, const evaluation will never terminate LL | | } LL | | n LL | | }]; |
