fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error[E0689]: can't call method `rev` on type `usize` 2 --> $DIR/issue-90315.rs:4:28 3 | 4LL | for _i in 0..arr.len().rev() { 5 | ^^^ can't call method `rev` on type `usize` 6 | 7help: you must surround the range in parentheses to call its `rev` function 8 | 9LL | for _i in (0..arr.len()).rev() { 10 | + + 11 12error[E0689]: can't call method `rev` on type `{integer}` 13 --> $DIR/issue-90315.rs:12:20 14 | 15LL | for i in 1..11.rev() { 16 | ^^^ can't call method `rev` on type `{integer}` 17 | 18help: you must surround the range in parentheses to call its `rev` function 19 | 20LL | for i in (1..11).rev() { 21 | + + 22 23error[E0689]: can't call method `rev` on type `usize` 24 --> $DIR/issue-90315.rs:18:21 25 | 26LL | for i in 1..end.rev() { 27 | ^^^ can't call method `rev` on type `usize` 28 | 29help: you must surround the range in parentheses to call its `rev` function 30 | 31LL | for i in (1..end).rev() { 32 | + + 33 34error[E0689]: can't call method `rev` on type `usize` 35 --> $DIR/issue-90315.rs:23:27 36 | 37LL | for i in 1..(end + 1).rev() { 38 | ^^^ can't call method `rev` on type `usize` 39 | 40help: you must surround the range in parentheses to call its `rev` function 41 | 42LL | for i in (1..(end + 1)).rev() { 43 | + + 44 45error[E0689]: can't call method `is_empty` on type `usize` 46 --> $DIR/issue-90315.rs:28:21 47 | 48LL | if 1..(end + 1).is_empty() { 49 | ^^^^^^^^ can't call method `is_empty` on type `usize` 50 | 51help: you must surround the range in parentheses to call its `is_empty` function 52 | 53LL | if (1..(end + 1)).is_empty() { 54 | + + 55 56error[E0308]: mismatched types 57 --> $DIR/issue-90315.rs:28:8 58 | 59LL | if 1..(end + 1).is_empty() { 60 | ^^^^^^^^^^^^^^^^^^^^^^^ expected `bool`, found `Range<{integer}>` 61 | 62 = note: expected type `bool` 63 found struct `std::ops::Range<{integer}>` 64 65error[E0689]: can't call method `is_sorted` on type `usize` 66 --> $DIR/issue-90315.rs:34:21 67 | 68LL | if 1..(end + 1).is_sorted() { 69 | ^^^^^^^^^ can't call method `is_sorted` on type `usize` 70 | 71help: you must surround the range in parentheses to call its `is_sorted` function 72 | 73LL | if (1..(end + 1)).is_sorted() { 74 | + + 75 76error[E0308]: mismatched types 77 --> $DIR/issue-90315.rs:34:8 78 | 79LL | if 1..(end + 1).is_sorted() { 80 | ^^^^^^^^^^^^^^^^^^^^^^^^ expected `bool`, found `Range<{integer}>` 81 | 82 = note: expected type `bool` 83 found struct `std::ops::Range<{integer}>` 84 85error[E0689]: can't call method `take` on type `{integer}` 86 --> $DIR/issue-90315.rs:40:26 87 | 88LL | let _res: i32 = 3..6.take(2).sum(); 89 | ^^^^ can't call method `take` on type `{integer}` 90 | 91help: you must surround the range in parentheses to call its `take` function 92 | 93LL | let _res: i32 = (3..6).take(2).sum(); 94 | + + 95 96error[E0308]: mismatched types 97 --> $DIR/issue-90315.rs:40:21 98 | 99LL | let _res: i32 = 3..6.take(2).sum(); 100 | --- ^^^^^^^^^^^^^^^^^^ expected `i32`, found `Range<{integer}>` 101 | | 102 | expected due to this 103 | 104 = note: expected type `i32` 105 found struct `std::ops::Range<{integer}>` 106 107error[E0689]: can't call method `sum` on type `{integer}` 108 --> $DIR/issue-90315.rs:45:26 109 | 110LL | let _sum: i32 = 3..6.sum(); 111 | ^^^ can't call method `sum` on type `{integer}` 112 | 113help: you must surround the range in parentheses to call its `sum` function 114 | 115LL | let _sum: i32 = (3..6).sum(); 116 | + + 117 118error[E0308]: mismatched types 119 --> $DIR/issue-90315.rs:45:21 120 | 121LL | let _sum: i32 = 3..6.sum(); 122 | --- ^^^^^^^^^^ expected `i32`, found `Range<{integer}>` 123 | | 124 | expected due to this 125 | 126 = note: expected type `i32` 127 found struct `std::ops::Range<{integer}>` 128 129error[E0689]: can't call method `rev` on type `usize` 130 --> $DIR/issue-90315.rs:53:21 131 | 132LL | for _a in a..=b.rev() { 133 | ^^^ can't call method `rev` on type `usize` 134 | 135help: you must surround the range in parentheses to call its `rev` function 136 | 137LL | for _a in (a..=b).rev() { 138 | + + 139 140error[E0689]: can't call method `contains` on type `{integer}` 141 --> $DIR/issue-90315.rs:58:21 142 | 143LL | let _res = ..10.contains(3); 144 | ^^^^^^^^ can't call method `contains` on type `{integer}` 145 | 146help: you must surround the range in parentheses to call its `contains` function 147 | 148LL | let _res = (..10).contains(3); 149 | + + 150 151error[E0599]: no method named `error_method` found for type `usize` in the current scope 152 --> $DIR/issue-90315.rs:62:15 153 | 154LL | if 1..end.error_method() { 155 | ^^^^^^^^^^^^ method not found in `usize` 156 157error[E0308]: mismatched types 158 --> $DIR/issue-90315.rs:62:8 159 | 160LL | if 1..end.error_method() { 161 | ^^^^^^^^^^^^^^^^^^^^^ expected `bool`, found `Range<{integer}>` 162 | 163 = note: expected type `bool` 164 found struct `std::ops::Range<{integer}>` 165 166error[E0599]: `usize` is not an iterator 167 --> $DIR/issue-90315.rs:68:18 168 | 169LL | let _res = b.take(1)..a; 170 | ^^^^ `usize` is not an iterator 171 | 172 = note: the following trait bounds were not satisfied: 173 `usize: Iterator` 174 which is required by `&mut usize: Iterator` 175 176error[E0689]: can't call method `take` on ambiguous numeric type `{integer}` 177 --> $DIR/issue-90315.rs:71:25 178 | 179LL | let _res: i32 = ..6.take(2).sum(); 180 | ^^^^ 181 | 182help: you must specify a concrete type for this numeric value, like `i32` 183 | 184LL | let _res: i32 = ..6_i32.take(2).sum(); 185 | ~~~~~ 186 187error: aborting due to 18 previous errors 188 189Some errors have detailed explanations: E0308, E0599, E0689. 190For more information about an error, try `rustc --explain E0308`.