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-30 12:05:12 -06:00
|
|
|
// @has foo/struct.VSet.html '//pre[@class="rust item-decl"]' 'pub struct VSet<T, const ORDER: Order>'
|
2023-02-03 18:36:27 -06:00
|
|
|
// @has foo/struct.VSet.html '//*[@id="impl-Send-for-VSet%3CT,+ORDER%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,+ORDER%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>,
|
|
|
|
}
|
|
|
|
|
2023-02-03 18:36:27 -06:00
|
|
|
// @has foo/struct.VSet.html '//*[@id="impl-VSet%3CT,+%7B+Order::Sorted+%7D%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() }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-02-03 18:36:27 -06:00
|
|
|
// @has foo/struct.VSet.html '//*[@id="impl-VSet%3CT,+%7B+Order::Unsorted+%7D%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>;
|
|
|
|
|
2023-02-03 18:36:27 -06:00
|
|
|
// @has foo/struct.Escape.html '//*[@id="impl-Escape%3Cr%23%22%3Cscript%3Ealert(%22Escape%22);%3C/script%3E%22%23%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() {}
|
|
|
|
}
|