2019-05-28 16:53:36 -05:00
|
|
|
// ignore-tidy-linelength
|
|
|
|
|
2019-05-12 09:53:39 -05:00
|
|
|
#![feature(const_generics)]
|
|
|
|
|
2019-05-28 16:53:36 -05:00
|
|
|
#![crate_name = "foo"]
|
2019-05-12 09:53:39 -05:00
|
|
|
|
2019-10-21 10:54:33 -05:00
|
|
|
#[derive(PartialEq, Eq)]
|
2019-05-12 09:53:39 -05:00
|
|
|
pub enum Order {
|
|
|
|
Sorted,
|
|
|
|
Unsorted,
|
|
|
|
}
|
|
|
|
|
|
|
|
// @has foo/struct.VSet.html '//pre[@class="rust struct"]' 'pub struct VSet<T, const ORDER: Order>'
|
|
|
|
// @has foo/struct.VSet.html '//h3[@id="impl-Send"]/code' 'impl<const ORDER: Order, T> Send for VSet<T, ORDER>'
|
|
|
|
// @has foo/struct.VSet.html '//h3[@id="impl-Sync"]/code' 'impl<const ORDER: Order, T> Sync for VSet<T, ORDER>'
|
|
|
|
pub struct VSet<T, const ORDER: Order> {
|
|
|
|
inner: Vec<T>,
|
|
|
|
}
|
|
|
|
|
2019-12-11 07:50:19 -06:00
|
|
|
// @has foo/struct.VSet.html '//h3[@id="impl"]/code' 'impl<T> VSet<T, {Order::Sorted}>'
|
2019-05-12 09:53:39 -05:00
|
|
|
impl <T> VSet<T, {Order::Sorted}> {
|
|
|
|
pub fn new() -> Self {
|
|
|
|
Self { inner: Vec::new() }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-12-11 07:50:19 -06:00
|
|
|
// @has foo/struct.VSet.html '//h3[@id="impl-1"]/code' 'impl<T> VSet<T, {Order::Unsorted}>'
|
2019-05-12 09:53:39 -05:00
|
|
|
impl <T> VSet<T, {Order::Unsorted}> {
|
|
|
|
pub fn new() -> Self {
|
|
|
|
Self { inner: Vec::new() }
|
|
|
|
}
|
|
|
|
}
|