|
| 1 | +Building stage0 library artifacts (x86_64-unknown-linux-gnu) |
| 2 | +Building compiler artifacts (stage0 -> stage1, x86_64-unknown-linux-gnu) |
| 3 | +Creating a sysroot for stage1 compiler (use `rustup toolchain link 'name' build/host/stage1`) |
| 4 | +WARNING: Using a potentially old libstd. This may not behave well. |
| 5 | +WARNING: Using a potentially old librustc. This may not behave well. |
| 6 | +WARNING: Use `--keep-stage-std` if you want to rebuild the compiler when it changes |
| 7 | +Creating a sysroot for stage2 compiler (use `rustup toolchain link 'name' build/host/stage2`) |
| 8 | +Uplifting library (stage1 -> stage2) |
| 9 | +Uplifting rustc (stage1 -> stage3) |
| 10 | +Building tool clippy-driver (stage2 -> stage3, x86_64-unknown-linux-gnu) |
| 11 | +Building tool rustdoc (stage1 -> stage2, x86_64-unknown-linux-gnu) |
| 12 | +Testing clippy (stage2 -> stage3, x86_64-unknown-linux-gnu) |
| 13 | + |
| 14 | +running 1 test |
| 15 | +. |
| 16 | +test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s |
| 17 | + |
| 18 | + |
| 19 | +running 1 test |
| 20 | +. |
| 21 | +test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s |
| 22 | + |
| 23 | + |
| 24 | +FAILED TEST: tests/ui/indexing_slicing_index.rs |
| 25 | +command: CLIPPY_CONF_DIR="tests" RUSTC_ICE="0" "/home/meow/git/rust/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/clippy-driver" "--error-format=json" "--emit=metadata" "-Aunused" "-Ainternal_features" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Dwarnings" "-Ldependency=/home/meow/git/rust/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps" "--extern=clippy_config=/home/meow/git/rust/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_config-0cd35ebd41eb72f1.rlib" "--extern=clippy_lints=/home/meow/git/rust/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_lints-c96f175cccb2d539.rlib" "--extern=clippy_utils=/home/meow/git/rust/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_utils-fd859a3ecf6f55ed.rlib" "--extern=futures=/home/meow/git/rust/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libfutures-0b71f644e2bc8726.rlib" "--extern=if_chain=/home/meow/git/rust/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libif_chain-0ea1dd1509ea0022.rlib" "--extern=itertools=/home/meow/git/rust/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libitertools-bac5d36c307485ee.rlib" "--extern=parking_lot=/home/meow/git/rust/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libparking_lot-859ce241e5f0659a.rlib" "--extern=quote=/home/meow/git/rust/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libquote-eb8380dd0960802e.rlib" "--extern=regex=/home/meow/git/rust/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libregex-6719df5da40cd34c.rlib" "--extern=serde=/home/meow/git/rust/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libserde-2030fb584e4f27dc.rlib" "--extern=serde_derive=/home/meow/git/rust/build/x86_64-unknown-linux-gnu/stage2-tools/release/deps/libserde_derive-5716afe404137539.so" "--extern=syn=/home/meow/git/rust/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libsyn-152f3ca11d174b39.rlib" "--extern=tokio=/home/meow/git/rust/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libtokio-77f2f32d01011546.rlib" "-Ldependency=/home/meow/git/rust/build/x86_64-unknown-linux-gnu/stage2-tools/release/deps" "--out-dir" "/home/meow/git/rust/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/tests/ui" "tests/ui/indexing_slicing_index.rs" "-Zdeduplicate-diagnostics=yes" "--edition" "2021" |
| 26 | + |
| 27 | +error: actual output differed from expected |
| 28 | +Execute `cargo uibless` to update `tests/ui/indexing_slicing_index.stderr` to the actual output |
| 29 | +--- tests/ui/indexing_slicing_index.stderr |
| 30 | ++++ <stderr output> |
| 31 | + error: indexing may panic |
| 32 | + --> tests/ui/indexing_slicing_index.rs:15:20 |
| 33 | +... 7 lines skipped ... |
| 34 | + = help: to override `-D warnings` add `#[allow(clippy::indexing_slicing)]` |
| 35 | + |
| 36 | +-error[E0080]: evaluation of `main::{constant#3}` failed |
| 37 | +- --> tests/ui/indexing_slicing_index.rs:47:14 |
| 38 | +- | |
| 39 | +-LL | const { &ARR[idx4()] }; |
| 40 | +- | ^^^^^^^^^^^ index out of bounds: the length is 2 but the index is 4 |
| 41 | +- |
| 42 | +-note: erroneous constant encountered |
| 43 | +- --> tests/ui/indexing_slicing_index.rs:47:5 |
| 44 | +- | |
| 45 | +-LL | const { &ARR[idx4()] }; |
| 46 | +- | ^^^^^^^^^^^^^^^^^^^^^^ |
| 47 | +- |
| 48 | + error: indexing may panic |
| 49 | + --> tests/ui/indexing_slicing_index.rs:28:5 |
| 50 | +... 95 lines skipped ... |
| 51 | + | ^^^^ |
| 52 | + |
| 53 | +-error: aborting due to 15 previous errors |
| 54 | ++error: aborting due to 14 previous errors |
| 55 | + |
| 56 | +-For more information about this error, try `rustc --explain E0080`. |
| 57 | + |
| 58 | + |
| 59 | +full stderr: |
| 60 | +error: indexing may panic |
| 61 | + --> tests/ui/indexing_slicing_index.rs:15:20 |
| 62 | + | |
| 63 | +LL | const REF: &i32 = &ARR[idx()]; // This should be linted, since `suppress-restriction-lint-in-const` default is false. |
| 64 | + | ^^^^^^^^^^ |
| 65 | + | |
| 66 | + = help: consider using `.get(n)` or `.get_mut(n)` instead |
| 67 | + = note: the suggestion might not be applicable in constant blocks |
| 68 | + = note: `-D clippy::indexing-slicing` implied by `-D warnings` |
| 69 | + = help: to override `-D warnings` add `#[allow(clippy::indexing_slicing)]` |
| 70 | + |
| 71 | +error: indexing may panic |
| 72 | + --> tests/ui/indexing_slicing_index.rs:28:5 |
| 73 | + | |
| 74 | +LL | x[index]; |
| 75 | + | ^^^^^^^^ |
| 76 | + | |
| 77 | + = help: consider using `.get(n)` or `.get_mut(n)` instead |
| 78 | + |
| 79 | +error: index is out of bounds |
| 80 | + --> tests/ui/indexing_slicing_index.rs:31:5 |
| 81 | + | |
| 82 | +LL | x[4]; |
| 83 | + | ^^^^ |
| 84 | + | |
| 85 | + = note: `-D clippy::out-of-bounds-indexing` implied by `-D warnings` |
| 86 | + = help: to override `-D warnings` add `#[allow(clippy::out_of_bounds_indexing)]` |
| 87 | + |
| 88 | +error: index is out of bounds |
| 89 | + --> tests/ui/indexing_slicing_index.rs:33:5 |
| 90 | + | |
| 91 | +LL | x[1 << 3]; |
| 92 | + | ^^^^^^^^^ |
| 93 | + |
| 94 | +error: indexing may panic |
| 95 | + --> tests/ui/indexing_slicing_index.rs:44:14 |
| 96 | + | |
| 97 | +LL | const { &ARR[idx()] }; |
| 98 | + | ^^^^^^^^^^ |
| 99 | + | |
| 100 | + = help: consider using `.get(n)` or `.get_mut(n)` instead |
| 101 | + = note: the suggestion might not be applicable in constant blocks |
| 102 | + |
| 103 | +error: indexing may panic |
| 104 | + --> tests/ui/indexing_slicing_index.rs:47:14 |
| 105 | + | |
| 106 | +LL | const { &ARR[idx4()] }; |
| 107 | + | ^^^^^^^^^^^ |
| 108 | + | |
| 109 | + = help: consider using `.get(n)` or `.get_mut(n)` instead |
| 110 | + = note: the suggestion might not be applicable in constant blocks |
| 111 | + |
| 112 | +error: index is out of bounds |
| 113 | + --> tests/ui/indexing_slicing_index.rs:54:5 |
| 114 | + | |
| 115 | +LL | y[4]; |
| 116 | + | ^^^^ |
| 117 | + |
| 118 | +error: indexing may panic |
| 119 | + --> tests/ui/indexing_slicing_index.rs:57:5 |
| 120 | + | |
| 121 | +LL | v[0]; |
| 122 | + | ^^^^ |
| 123 | + | |
| 124 | + = help: consider using `.get(n)` or `.get_mut(n)` instead |
| 125 | + |
| 126 | +error: indexing may panic |
| 127 | + --> tests/ui/indexing_slicing_index.rs:59:5 |
| 128 | + | |
| 129 | +LL | v[10]; |
| 130 | + | ^^^^^ |
| 131 | + | |
| 132 | + = help: consider using `.get(n)` or `.get_mut(n)` instead |
| 133 | + |
| 134 | +error: indexing may panic |
| 135 | + --> tests/ui/indexing_slicing_index.rs:61:5 |
| 136 | + | |
| 137 | +LL | v[1 << 3]; |
| 138 | + | ^^^^^^^^^ |
| 139 | + | |
| 140 | + = help: consider using `.get(n)` or `.get_mut(n)` instead |
| 141 | + |
| 142 | +error: index is out of bounds |
| 143 | + --> tests/ui/indexing_slicing_index.rs:69:5 |
| 144 | + | |
| 145 | +LL | x[N]; |
| 146 | + | ^^^^ |
| 147 | + |
| 148 | +error: indexing may panic |
| 149 | + --> tests/ui/indexing_slicing_index.rs:72:5 |
| 150 | + | |
| 151 | +LL | v[N]; |
| 152 | + | ^^^^ |
| 153 | + | |
| 154 | + = help: consider using `.get(n)` or `.get_mut(n)` instead |
| 155 | + |
| 156 | +error: indexing may panic |
| 157 | + --> tests/ui/indexing_slicing_index.rs:74:5 |
| 158 | + | |
| 159 | +LL | v[M]; |
| 160 | + | ^^^^ |
| 161 | + | |
| 162 | + = help: consider using `.get(n)` or `.get_mut(n)` instead |
| 163 | + |
| 164 | +error: index is out of bounds |
| 165 | + --> tests/ui/indexing_slicing_index.rs:78:13 |
| 166 | + | |
| 167 | +LL | let _ = x[4]; |
| 168 | + | ^^^^ |
| 169 | + |
| 170 | +error: aborting due to 14 previous errors |
| 171 | + |
| 172 | + |
| 173 | +full stdout: |
| 174 | + |
| 175 | + |
| 176 | +FAILURES: |
| 177 | + tests/ui/indexing_slicing_index.rs |
| 178 | + |
| 179 | +test result: FAIL. 1 failed; 972 filtered out; |
| 180 | + |
| 181 | + |
| 182 | + |
| 183 | +Command did not execute successfully. |
| 184 | +Expected success, got: exit status: 101 |
| 185 | +Add `-v` to see more details. |
| 186 | + |
0 commit comments