You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would not expect this code to produce a warning:
fnmain(){let a:i8 = 0x20;assert!(a == 0xff);}
Although the following warnings are printed
foo.rs:3:12: 3:21 warning: comparison is useless due to type limits, #[warn(type_limits)] on by default
foo.rs:3 assert!(a == 0xff);
^~~~~~~~~
<std-macros>:36:4: 52:5 note: in expansion of assert!
foo.rs:3:4: 3:23 note: expansion site
foo.rs:3:17: 3:21 warning: literal out of range for its type, #[warn(type_overflow)] on by default
foo.rs:3 assert!(a == 0xff);
^~~~
<std-macros>:36:4: 52:5 note: in expansion of assert!
foo.rs:3:4: 3:23 note: expansion site