2021-08-30 03:59:53 -05:00
|
|
|
#![feature(adt_const_params)]
|
2019-05-12 09:53:39 -05:00
|
|
|
|
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>'
|
2021-07-25 16:41:57 -05:00
|
|
|
// @has foo/struct.VSet.html '//div[@id="impl-Send"]/h3[@class="code-header in-band"]' 'impl<T, const ORDER: Order> Send for VSet<T, ORDER>'
|
|
|
|
// @has foo/struct.VSet.html '//div[@id="impl-Sync"]/h3[@class="code-header in-band"]' 'impl<T, const ORDER: Order> Sync for VSet<T, ORDER>'
|
2019-05-12 09:53:39 -05:00
|
|
|
pub struct VSet<T, const ORDER: Order> {
|
|
|
|
inner: Vec<T>,
|
|
|
|
}
|
|
|
|
|
2021-07-25 16:41:57 -05:00
|
|
|
// @has foo/struct.VSet.html '//div[@id="impl"]/h3[@class="code-header in-band"]' '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() }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-07-25 16:41:57 -05:00
|
|
|
// @has foo/struct.VSet.html '//div[@id="impl-1"]/h3[@class="code-header in-band"]' '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() }
|
|
|
|
}
|
|
|
|
}
|
2020-01-05 17:19:42 -06:00
|
|
|
|
|
|
|
pub struct Escape<const S: &'static str>;
|
|
|
|
|
2021-07-25 16:41:57 -05:00
|
|
|
// @has foo/struct.Escape.html '//div[@id="impl"]/h3[@class="code-header in-band"]' 'impl Escape<{ r#"<script>alert("Escape");</script>"# }>'
|
2020-01-05 17:19:42 -06:00
|
|
|
impl Escape<{ r#"<script>alert("Escape");</script>"# }> {
|
|
|
|
pub fn f() {}
|
|
|
|
}
|