rust/src/test/rustdoc/const-generics/const-generic-slice.rs

13 lines
258 B
Rust
Raw Normal View History

2019-06-07 00:58:32 +02:00
#![crate_name = "foo"]
#![feature(const_generics)]
pub trait Array {
type Item;
}
// @has foo/trait.Array.html
// @has - '//div[@class="impl"]' 'impl<T, const N: usize> Array for [T; N]'
2019-06-07 00:58:32 +02:00
impl <T, const N: usize> Array for [T; N] {
type Item = T;
}