]> git.proxmox.com Git - rustc.git/blame - src/test/ui/const-generics/array-impls/core-traits-no-impls-length-33.rs
New upstream version 1.43.0+dfsg1
[rustc.git] / src / test / ui / const-generics / array-impls / core-traits-no-impls-length-33.rs
CommitLineData
416331ca
XL
1pub fn no_debug() {
2 println!("{:?}", [0_usize; 33]);
3 //~^ ERROR arrays only have std trait implementations for lengths 0..=32
4}
5
6pub 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
13pub 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
18pub 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
23pub 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
29fn main() {}