2021-08-30 10:59:53 +02:00
|
|
|
#![feature(adt_const_params)]
|
2019-05-12 16:53:39 +02:00
|
|
|
|
2019-05-28 22:53:36 +01:00
|
|
|
#![crate_name = "foo"]
|
2019-05-12 16:53:39 +02:00
|
|
|
|
2019-10-21 16:54:33 +01:00
|
|
|
#[derive(PartialEq, Eq)]
|
2019-05-12 16:53:39 +02: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 21:41:57 +00: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 16:53:39 +02:00
|
|
|
pub struct VSet<T, const ORDER: Order> {
|
|
|
|
inner: Vec<T>,
|
|
|
|
}
|
|
|
|
|
2021-07-25 21:41:57 +00:00
|
|
|
// @has foo/struct.VSet.html '//div[@id="impl"]/h3[@class="code-header in-band"]' 'impl<T> VSet<T, {Order::Sorted}>'
|
2019-05-12 16:53:39 +02:00
|
|
|
impl <T> VSet<T, {Order::Sorted}> {
|
|
|
|
pub fn new() -> Self {
|
|
|
|
Self { inner: Vec::new() }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-07-25 21:41:57 +00: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 16:53:39 +02:00
|
|
|
impl <T> VSet<T, {Order::Unsorted}> {
|
|
|
|
pub fn new() -> Self {
|
|
|
|
Self { inner: Vec::new() }
|
|
|
|
}
|
|
|
|
}
|
2020-01-05 23:19:42 +00:00
|
|
|
|
|
|
|
pub struct Escape<const S: &'static str>;
|
|
|
|
|
2021-07-25 21:41:57 +00: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 23:19:42 +00:00
|
|
|
impl Escape<{ r#"<script>alert("Escape");</script>"# }> {
|
|
|
|
pub fn f() {}
|
|
|
|
}
|