]> git.lizzy.rs Git - rust.git/blob - tests/ui/suggestions/suggest-dereferencing-index.rs
Rollup merge of #106798 - scottmcm:signum-via-cmp, r=Mark-Simulacrum
[rust.git] / tests / ui / suggestions / suggest-dereferencing-index.rs
1 // run-rustfix
2 #![allow(unused_variables)]
3
4 fn main() {
5     let i: &usize = &1;
6     let one_item_please: i32 = [1, 2, 3][i]; //~ ERROR the type `[{integer}]` cannot be indexed by `&usize`
7 }