Skip to content

Commit 8ba2458

Browse files
bors[bot]cuviper
andauthored
Merge #267
267: Allow `arithmetic_overflow` lint in a cast test r=cuviper a=cuviper The cast tests generate some code with branches that contain min/max operations that would overflow if they were reachable. Recent rustc changes have gotten more aggressive with const-propagation, causing that code to trigger the deny-by-default `arithmetic_overflow` lint, but we can explicitly allow it in this case. Co-authored-by: Josh Stone <cuviper@gmail.com>
2 parents b5906ee + 7cc8d46 commit 8ba2458

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

tests/cast.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,7 @@ fn cast_float_to_i128_edge_cases() {
241241

242242
macro_rules! int_test_edge {
243243
($f:ident -> { $($t:ident)+ } with $BigS:ident $BigU:ident ) => { $({
244+
#[allow(arithmetic_overflow)] // https://github.com/rust-lang/rust/issues/109731
244245
fn test_edge() {
245246
dbg!("testing cast edge cases for {} -> {}", stringify!($f), stringify!($t));
246247

0 commit comments

Comments
 (0)