diff options
| author | bors <bors@rust-lang.org> | 2020-06-26 14:08:46 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-06-26 14:08:46 +0000 |
| commit | 7750c3d46bc19784adb1ee6e37a5ec7e4cd7e772 (patch) | |
| tree | e395669f205e3b46ff20c3eaa11b02b07f52528d /src/test/ui/array-slice-vec | |
| parent | 9672b5e95c520774cc17bffc7031c80a1bcf4b4c (diff) | |
| parent | 819cde5dabd90dab1fb462cd713457421d0ebd36 (diff) | |
| download | rust-7750c3d46bc19784adb1ee6e37a5ec7e4cd7e772.tar.gz rust-7750c3d46bc19784adb1ee6e37a5ec7e4cd7e772.zip | |
Auto merge of #73513 - oli-obk:const_binop_overflow, r=estebank
Show the values and computation that would overflow a const evaluation or propagation Fixes #71134 In contrast to the example in the issue it doesn't use individual spans for each operand. The effort required to implement that is quite high compared to the little (if at all) benefit it would bring to diagnostics. cc @shepmaster The way this is implemented it is also fairly easy to do the same for overflow panics at runtime, but that should be done in a separate PR since it may have runtime performance implications.
Diffstat (limited to 'src/test/ui/array-slice-vec')
| -rw-r--r-- | src/test/ui/array-slice-vec/match_arr_unknown_len.stderr | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/ui/array-slice-vec/match_arr_unknown_len.stderr b/src/test/ui/array-slice-vec/match_arr_unknown_len.stderr index 4fe8572c2d5..0ad05b3adeb 100644 --- a/src/test/ui/array-slice-vec/match_arr_unknown_len.stderr +++ b/src/test/ui/array-slice-vec/match_arr_unknown_len.stderr @@ -11,7 +11,7 @@ error[E0308]: mismatched types --> $DIR/match_arr_unknown_len.rs:6:9 | LL | [1, 2] => true, - | ^^^^^^ expected `2usize`, found `N` + | ^^^^^^ expected `2_usize`, found `N` | = note: expected array `[u32; 2]` found array `[u32; N]` |
