blob: a0bbd2ce64add0adfe8ba440d30b47fade1407c8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
#![feature(array_value_iter)]
#![feature(trusted_len)]
use std::{
array::IntoIter,
fmt::Debug,
iter::{ExactSizeIterator, FusedIterator, TrustedLen},
};
pub fn no_iterator() -> impl Iterator<Item = i32> {
//~^ ERROR arrays only have std trait implementations for lengths 0..=32
IntoIter::new([0i32; 33])
//~^ ERROR arrays only have std trait implementations for lengths 0..=32
}
pub fn no_double_ended_iterator() -> impl DoubleEndedIterator {
//~^ ERROR arrays only have std trait implementations for lengths 0..=32
IntoIter::new([0i32; 33])
//~^ ERROR arrays only have std trait implementations for lengths 0..=32
}
pub fn no_exact_size_iterator() -> impl ExactSizeIterator {
//~^ ERROR arrays only have std trait implementations for lengths 0..=32
IntoIter::new([0i32; 33])
//~^ ERROR arrays only have std trait implementations for lengths 0..=32
}
pub fn no_fused_iterator() -> impl FusedIterator {
//~^ ERROR arrays only have std trait implementations for lengths 0..=32
IntoIter::new([0i32; 33])
//~^ ERROR arrays only have std trait implementations for lengths 0..=32
}
pub fn no_trusted_len() -> impl TrustedLen {
//~^ ERROR arrays only have std trait implementations for lengths 0..=32
IntoIter::new([0i32; 33])
//~^ ERROR arrays only have std trait implementations for lengths 0..=32
}
pub fn no_clone() -> impl Clone {
//~^ ERROR arrays only have std trait implementations for lengths 0..=32
IntoIter::new([0i32; 33])
//~^ ERROR arrays only have std trait implementations for lengths 0..=32
}
pub fn no_debug() -> impl Debug {
//~^ ERROR arrays only have std trait implementations for lengths 0..=32
IntoIter::new([0i32; 33])
//~^ ERROR arrays only have std trait implementations for lengths 0..=32
}
fn main() {}
|