]>
Commit | Line | Data |
---|---|---|
416331ca XL |
1 | pub fn no_debug() { |
2 | println!("{:?}", [0_usize; 33]); | |
3 | //~^ ERROR arrays only have std trait implementations for lengths 0..=32 | |
4 | } | |
5 | ||
6 | pub fn no_hash() { | |
7 | use std::collections::HashSet; | |
8 | let mut set = HashSet::new(); | |
9 | set.insert([0_usize; 33]); | |
10 | //~^ ERROR arrays only have std trait implementations for lengths 0..=32 | |
11 | } | |
12 | ||
13 | pub fn no_partial_eq() -> bool { | |
14 | [0_usize; 33] == [1_usize; 33] | |
15 | //~^ ERROR binary operation `==` cannot be applied to type `[usize; 33]` | |
16 | } | |
17 | ||
18 | pub fn no_partial_ord() -> bool { | |
19 | [0_usize; 33] < [1_usize; 33] | |
20 | //~^ ERROR binary operation `<` cannot be applied to type `[usize; 33]` | |
21 | } | |
22 | ||
23 | pub fn no_into_iterator() { | |
24 | for _ in &[0_usize; 33] { | |
25 | //~^ ERROR the trait bound `&[usize; 33]: std::iter::IntoIterator` is not satisfied | |
26 | } | |
27 | } | |
28 | ||
29 | fn main() {} |