2021-11-26 17:03:16 -06:00
|
|
|
#![allow(incomplete_features)]
|
2021-08-30 03:59:53 -05:00
|
|
|
#![feature(adt_const_params)]
|
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,
|
|
|
|
}
|
|
|
|
|
2023-01-14 11:58:55 -06:00
|
|
|
// @has foo/struct.VSet.html '//div[@class="item-decl"]/pre[@class="rust"]' 'pub struct VSet<T, const ORDER: Order>'
|
2022-09-25 15:52:26 -05:00
|
|
|
// @has foo/struct.VSet.html '//*[@id="impl-Send-for-VSet%3CT%2C%20ORDER%3E"]/h3[@class="code-header"]' 'impl<T, const ORDER: Order> Send for VSet<T, ORDER>'
|
|
|
|
// @has foo/struct.VSet.html '//*[@id="impl-Sync-for-VSet%3CT%2C%20ORDER%3E"]/h3[@class="code-header"]' '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>,
|
|
|
|
}
|
|
|
|
|
2022-09-25 15:52:26 -05:00
|
|
|
// @has foo/struct.VSet.html '//*[@id="impl-VSet%3CT%2C%20{%20Order%3A%3ASorted%20}%3E"]/h3[@class="code-header"]' 'impl<T> VSet<T, { Order::Sorted }>'
|
2021-11-26 17:03:16 -06:00
|
|
|
impl<T> VSet<T, { Order::Sorted }> {
|
2019-05-12 09:53:39 -05:00
|
|
|
pub fn new() -> Self {
|
|
|
|
Self { inner: Vec::new() }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-09-25 15:52:26 -05:00
|
|
|
// @has foo/struct.VSet.html '//*[@id="impl-VSet%3CT%2C%20{%20Order%3A%3AUnsorted%20}%3E"]/h3[@class="code-header"]' 'impl<T> VSet<T, { Order::Unsorted }>'
|
2021-11-26 17:03:16 -06:00
|
|
|
impl<T> VSet<T, { Order::Unsorted }> {
|
2019-05-12 09:53:39 -05:00
|
|
|
pub fn new() -> Self {
|
|
|
|
Self { inner: Vec::new() }
|
|
|
|
}
|
|
|
|
}
|
2020-01-05 17:19:42 -06:00
|
|
|
|
|
|
|
pub struct Escape<const S: &'static str>;
|
|
|
|
|
2022-09-25 15:52:26 -05:00
|
|
|
// @has foo/struct.Escape.html '//*[@id="impl-Escape%3Cr#%22%3Cscript%3Ealert(%22Escape%22)%3B%3C/script%3E%22#%3E"]/h3[@class="code-header"]' 'impl Escape<r#"<script>alert("Escape");</script>"#>'
|
2021-11-26 17:03:16 -06:00
|
|
|
impl Escape<r#"<script>alert("Escape");</script>"#> {
|
2020-01-05 17:19:42 -06:00
|
|
|
pub fn f() {}
|
|
|
|
}
|