2021-11-26 23:03:16 +00:00
|
|
|
#![allow(incomplete_features)]
|
2021-08-30 08:59:53 +00:00
|
|
|
#![feature(adt_const_params)]
|
2019-05-28 21:53:36 +00:00
|
|
|
#![crate_name = "foo"]
|
2019-05-12 14:53:39 +00:00
|
|
|
|
2019-10-21 15:54:33 +00:00
|
|
|
#[derive(PartialEq, Eq)]
|
2019-05-12 14:53:39 +00:00
|
|
|
pub enum Order {
|
|
|
|
Sorted,
|
|
|
|
Unsorted,
|
|
|
|
}
|
|
|
|
|
2023-01-30 18:05:12 +00:00
|
|
|
// @has foo/struct.VSet.html '//pre[@class="rust item-decl"]' 'pub struct VSet<T, const ORDER: Order>'
|
2023-02-04 00:36:27 +00: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 14:53:39 +00:00
|
|
|
pub struct VSet<T, const ORDER: Order> {
|
|
|
|
inner: Vec<T>,
|
|
|
|
}
|
|
|
|
|
2023-02-04 00:36:27 +00: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 23:03:16 +00:00
|
|
|
impl<T> VSet<T, { Order::Sorted }> {
|
2019-05-12 14:53:39 +00:00
|
|
|
pub fn new() -> Self {
|
|
|
|
Self { inner: Vec::new() }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-02-04 00:36:27 +00: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 23:03:16 +00:00
|
|
|
impl<T> VSet<T, { Order::Unsorted }> {
|
2019-05-12 14:53:39 +00:00
|
|
|
pub fn new() -> Self {
|
|
|
|
Self { inner: Vec::new() }
|
|
|
|
}
|
|
|
|
}
|
2020-01-05 23:19:42 +00:00
|
|
|
|
|
|
|
pub struct Escape<const S: &'static str>;
|
|
|
|
|
2023-03-21 00:56:45 +00:00
|
|
|
// @has foo/struct.Escape.html '//*[@id="impl-Escape%3C%22%3Cscript%3Ealert(%5C%22Escape%5C%22);%3C/script%3E%22%3E"]/h3[@class="code-header"]' 'impl Escape<r#"<script>alert("Escape");</script>"#>'
|
2021-11-26 23:03:16 +00:00
|
|
|
impl Escape<r#"<script>alert("Escape");</script>"#> {
|
2020-01-05 23:19:42 +00:00
|
|
|
pub fn f() {}
|
|
|
|
}
|