|
| 1 | +error: this assertion can use the stronger `static_assert!` form |
| 2 | + --> $DIR/assert_hierarchy.rs:56:5 |
| 3 | + | |
| 4 | +56 | build_assert!(1 < LIMIT); |
| 5 | + | ------------^^^^^^^^^^^^ |
| 6 | + | | |
| 7 | + | help: replace the macro name: `static_assert` |
| 8 | + | |
| 9 | +note: this asserted condition is closed over compile-time context, so `static_assert!` is the stronger form here |
| 10 | + --> $DIR/assert_hierarchy.rs:56:19 |
| 11 | + | |
| 12 | +56 | build_assert!(1 < LIMIT); |
| 13 | + | ^^^^^^^^^ |
| 14 | +note: the lint level is defined here |
| 15 | + --> $DIR/assert_hierarchy.rs:1:9 |
| 16 | + | |
| 17 | + 1 | #![deny(klint::assert_hierarchy)] |
| 18 | + | ^^^^^^^^^^^^^^^^^^^^^^^ |
| 19 | + |
| 20 | +error: this assertion can use the stronger `const_assert!` form |
| 21 | + --> $DIR/assert_hierarchy.rs:60:5 |
| 22 | + | |
| 23 | +60 | build_assert!(OFFSET < N, "offset must stay in bounds"); |
| 24 | + | ------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 25 | + | | |
| 26 | + | help: replace the macro name: `const_assert` |
| 27 | + | |
| 28 | +note: this asserted condition is valid in a generic-aware const context, so `build_assert!` is unnecessary here |
| 29 | + --> $DIR/assert_hierarchy.rs:60:19 |
| 30 | + | |
| 31 | +60 | build_assert!(OFFSET < N, "offset must stay in bounds"); |
| 32 | + | ^^^^^^^^^^ |
| 33 | + |
| 34 | +error: this assertion can use the stronger `static_assert!` form |
| 35 | + --> $DIR/assert_hierarchy.rs:64:5 |
| 36 | + | |
| 37 | +64 | forward_build_assert!(OFFSET < LIMIT); |
| 38 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 39 | + | |
| 40 | +note: this asserted condition is closed over compile-time context, so `static_assert!` is the stronger form here |
| 41 | + --> $DIR/assert_hierarchy.rs:64:27 |
| 42 | + | |
| 43 | +64 | forward_build_assert!(OFFSET < LIMIT); |
| 44 | + | ^^^^^^^^^^^^^^ |
| 45 | + |
| 46 | +error: this assertion can use the stronger `const_assert!` form |
| 47 | + --> $DIR/assert_hierarchy.rs:69:5 |
| 48 | + | |
| 49 | +69 | forward_const_check!(N > 0); |
| 50 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 51 | + | |
| 52 | +note: this asserted condition is valid in a generic-aware const context, so `build_assert!` is unnecessary here |
| 53 | + --> $DIR/assert_hierarchy.rs:69:26 |
| 54 | + | |
| 55 | +69 | forward_const_check!(N > 0); |
| 56 | + | ^^^^^ |
| 57 | + |
| 58 | +error: this assertion can use the stronger `const_assert!` form |
| 59 | + --> $DIR/assert_hierarchy.rs:77:5 |
| 60 | + | |
| 61 | +77 | build_assert!(const_helper::<N>() < N); |
| 62 | + | ------------^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 63 | + | | |
| 64 | + | help: replace the macro name: `const_assert` |
| 65 | + | |
| 66 | +note: this asserted condition is valid in a generic-aware const context, so `build_assert!` is unnecessary here |
| 67 | + --> $DIR/assert_hierarchy.rs:77:19 |
| 68 | + | |
| 69 | +77 | build_assert!(const_helper::<N>() < N); |
| 70 | + | ^^^^^^^^^^^^^^^^^^^^^^^ |
| 71 | + |
| 72 | +error: this assertion can use the stronger `static_assert!` form |
| 73 | + --> $DIR/assert_hierarchy.rs:89:5 |
| 74 | + | |
| 75 | +89 | build_assert!(match LIMIT { |
| 76 | + | ^----------- |
| 77 | + | | |
| 78 | + | _____help: replace the macro name: `static_assert` |
| 79 | + | | |
| 80 | +90 | | 4 => true, |
| 81 | +91 | | _ => false, |
| 82 | +92 | | }); |
| 83 | + | |______^ |
| 84 | + | |
| 85 | +note: this asserted condition is closed over compile-time context, so `static_assert!` is the stronger form here |
| 86 | + --> $DIR/assert_hierarchy.rs:89:19 |
| 87 | + | |
| 88 | +89 | build_assert!(match LIMIT { |
| 89 | + | ___________________^ |
| 90 | +90 | | 4 => true, |
| 91 | +91 | | _ => false, |
| 92 | +92 | | }); |
| 93 | + | |_____^ |
| 94 | + |
| 95 | +error: this assertion can use the stronger `static_assert!` form |
| 96 | + --> $DIR/assert_hierarchy.rs:96:5 |
| 97 | + | |
| 98 | +96 | build_assert!(1 /* , */ < LIMIT); |
| 99 | + | ------------^^^^^^^^^^^^^^^^^^^^ |
| 100 | + | | |
| 101 | + | help: replace the macro name: `static_assert` |
| 102 | + | |
| 103 | +note: this asserted condition is closed over compile-time context, so `static_assert!` is the stronger form here |
| 104 | + --> $DIR/assert_hierarchy.rs:96:19 |
| 105 | + | |
| 106 | +96 | build_assert!(1 /* , */ < LIMIT); |
| 107 | + | ^^^^^^^^^^^^^^^^^ |
| 108 | + |
| 109 | +error: this assertion can use the stronger `static_assert!` form |
| 110 | + --> $DIR/assert_hierarchy.rs:100:5 |
| 111 | + | |
| 112 | +100 | build_assert!(1 /* , */ < LIMIT, "still const"); |
| 113 | + | ------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 114 | + | | |
| 115 | + | help: replace the macro name: `static_assert` |
| 116 | + | |
| 117 | +note: this asserted condition is closed over compile-time context, so `static_assert!` is the stronger form here |
| 118 | + --> $DIR/assert_hierarchy.rs:100:19 |
| 119 | + | |
| 120 | +100 | build_assert!(1 /* , */ < LIMIT, "still const"); |
| 121 | + | ^^^^^^^^^^^^^^^^^ |
| 122 | + |
| 123 | +error: this assertion can use the stronger `const_assert!` form |
| 124 | + --> $DIR/assert_hierarchy.rs:109:5 |
| 125 | + | |
| 126 | +109 | build_assert!({ |
| 127 | + | ^----------- |
| 128 | + | | |
| 129 | + | _____help: replace the macro name: `const_assert` |
| 130 | + | | |
| 131 | +110 | | let offset = OFFSET; |
| 132 | +111 | | offset < LIMIT |
| 133 | +112 | | }); |
| 134 | + | |______^ |
| 135 | + | |
| 136 | +note: this asserted condition is valid in a generic-aware const context, so `build_assert!` is unnecessary here |
| 137 | + --> $DIR/assert_hierarchy.rs:109:19 |
| 138 | + | |
| 139 | +109 | build_assert!({ |
| 140 | + | ___________________^ |
| 141 | +110 | | let offset = OFFSET; |
| 142 | +111 | | offset < LIMIT |
| 143 | +112 | | }); |
| 144 | + | |_____^ |
| 145 | + |
| 146 | +error: aborting due to 9 previous errors |
| 147 | + |
0 commit comments