Logo
Explore Help
Register Sign In
rust-lang/rust
1
0
Fork 0
You've already forked rust
Code Issues Pull Requests Actions 1 Packages Projects Releases Wiki Activity
Files
a27f3e3fd1e4d16160f8885b6b06665b5319f56c
rust/tests/ui/iterators/iter-count-overflow-ndebug.rs

9 lines
248 B
Rust
Raw Normal View History

[AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives
2024-02-16 20:02:50 +00:00
//@ run-pass
//@ only-32bit too impatient for 2⁶⁴ items
//@ compile-flags: -C debug_assertions=no -C opt-level=3
Explicitly test Iterator::count overflows
2019-07-08 12:03:21 -07:00
fn main() {
Update tests to remove old numeric constants Part of #68490. Care has been taken to leave the old consts where appropriate, for testing backcompat regressions, module shadowing, etc. The intrinsics docs were accidentally referring to some methods on f64 as std::f64, which I changed due to being contrary with how we normally disambiguate the shadow module from the primitive. In one other place I changed std::u8 to std::ops since it was just testing path handling in macros. For places which have legitimate uses of the old consts, deprecated attributes have been optimistically inserted. Although currently unnecessary, they exist to emphasize to any future deprecation effort the necessity of these specific symbols and prevent them from being accidentally removed.
2020-10-24 19:21:40 -04:00
assert_eq!((0..usize::MAX).by_ref().count(), usize::MAX);
assert_eq!((0..=usize::MAX).by_ref().count(), 0);
Explicitly test Iterator::count overflows
2019-07-08 12:03:21 -07:00
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 1921ms Template: 2ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API