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/liballoc/tests | |
| 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/liballoc/tests')
| -rw-r--r-- | src/liballoc/tests/str.rs | 4 | ||||
| -rw-r--r-- | src/liballoc/tests/vec.rs | 18 |
2 files changed, 11 insertions, 11 deletions
diff --git a/src/liballoc/tests/str.rs b/src/liballoc/tests/str.rs index b703df6f3cb..eee98d45340 100644 --- a/src/liballoc/tests/str.rs +++ b/src/liballoc/tests/str.rs @@ -566,13 +566,13 @@ mod slice_index { data: "hello"; // note: using 0 specifically ensures that the result of overflowing is 0..0, // so that `get` doesn't simply return None for the wrong reason. - bad: data[0..=usize::max_value()]; + bad: data[0..=usize::MAX]; message: "maximum usize"; } in mod rangetoinclusive { data: "hello"; - bad: data[..=usize::max_value()]; + bad: data[..=usize::MAX]; message: "maximum usize"; } } diff --git a/src/liballoc/tests/vec.rs b/src/liballoc/tests/vec.rs index b73fd95ab6a..a9813a8704f 100644 --- a/src/liballoc/tests/vec.rs +++ b/src/liballoc/tests/vec.rs @@ -68,7 +68,7 @@ fn test_reserve() { #[test] fn test_zst_capacity() { - assert_eq!(Vec::<()>::new().capacity(), usize::max_value()); + assert_eq!(Vec::<()>::new().capacity(), usize::MAX); } #[test] @@ -563,19 +563,19 @@ fn test_drain_inclusive_range() { #[test] fn test_drain_max_vec_size() { - let mut v = Vec::<()>::with_capacity(usize::max_value()); + let mut v = Vec::<()>::with_capacity(usize::MAX); unsafe { - v.set_len(usize::max_value()); + v.set_len(usize::MAX); } - for _ in v.drain(usize::max_value() - 1..) {} - assert_eq!(v.len(), usize::max_value() - 1); + for _ in v.drain(usize::MAX - 1..) {} + assert_eq!(v.len(), usize::MAX - 1); - let mut v = Vec::<()>::with_capacity(usize::max_value()); + let mut v = Vec::<()>::with_capacity(usize::MAX); unsafe { - v.set_len(usize::max_value()); + v.set_len(usize::MAX); } - for _ in v.drain(usize::max_value() - 1..=usize::max_value() - 1) {} - assert_eq!(v.len(), usize::max_value() - 1); + for _ in v.drain(usize::MAX - 1..=usize::MAX - 1) {} + assert_eq!(v.len(), usize::MAX - 1); } #[test] |
