diff options
| author | bors <bors@rust-lang.org> | 2020-06-12 13:10:57 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-06-12 13:10:57 +0000 |
| commit | 7c78a5f97de07a185eebae5a5de436c80d8ba9d4 (patch) | |
| tree | e5475f282387bca43e2085d44537fdfbe69ef98d /src/test/ui/iterators/iter-sum-overflow-overflow-checks.rs | |
| parent | 59493917be3e87e1dfb44a9ccb66a9f9b17228e6 (diff) | |
| parent | 77ede48ada25295cb90e520f52c1cbe653982f8a (diff) | |
| download | rust-7c78a5f97de07a185eebae5a5de436c80d8ba9d4.tar.gz rust-7c78a5f97de07a185eebae5a5de436c80d8ba9d4.zip | |
Auto merge of #73276 - Dylan-DPC:rollup-hfd81qw, r=Dylan-DPC
Rollup of 5 pull requests Successful merges: - #72906 (Migrate to numeric associated consts) - #73178 (expand: More precise locations for expansion-time lints) - #73225 (Allow inference regions when relating consts) - #73236 (Clean up E0666 explanation) - #73273 (Fix Zulip pings) Failed merges: r? @ghost
Diffstat (limited to 'src/test/ui/iterators/iter-sum-overflow-overflow-checks.rs')
| -rw-r--r-- | src/test/ui/iterators/iter-sum-overflow-overflow-checks.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/test/ui/iterators/iter-sum-overflow-overflow-checks.rs b/src/test/ui/iterators/iter-sum-overflow-overflow-checks.rs index 429f8e0bc96..04ca7f8a315 100644 --- a/src/test/ui/iterators/iter-sum-overflow-overflow-checks.rs +++ b/src/test/ui/iterators/iter-sum-overflow-overflow-checks.rs @@ -6,22 +6,22 @@ use std::panic; fn main() { let r = panic::catch_unwind(|| { - [1, i32::max_value()].iter().sum::<i32>(); + [1, i32::MAX].iter().sum::<i32>(); }); assert!(r.is_err()); let r = panic::catch_unwind(|| { - [2, i32::max_value()].iter().product::<i32>(); + [2, i32::MAX].iter().product::<i32>(); }); assert!(r.is_err()); let r = panic::catch_unwind(|| { - [1, i32::max_value()].iter().cloned().sum::<i32>(); + [1, i32::MAX].iter().cloned().sum::<i32>(); }); assert!(r.is_err()); let r = panic::catch_unwind(|| { - [2, i32::max_value()].iter().cloned().product::<i32>(); + [2, i32::MAX].iter().cloned().product::<i32>(); }); assert!(r.is_err()); } |
