2015-10-21 15:21:14 -05:00
|
|
|
// Test impls
|
|
|
|
|
|
|
|
impl<T> JSTraceable for SmallVec<[T; 1]> {}
|
2015-11-23 22:54:44 -06:00
|
|
|
|
|
|
|
impl<K, V, NodeRef: Deref<Target = Node<K, V>>> Handle<NodeRef, handle::Edge, handle::Internal> {
|
|
|
|
// Keep this.
|
|
|
|
}
|
2017-05-26 12:03:22 -05:00
|
|
|
|
|
|
|
impl<V> Test<V>
|
2017-06-11 23:01:41 -05:00
|
|
|
where
|
2018-10-18 17:44:14 -05:00
|
|
|
V: Clone, // This comment is NOT removed by formatting!
|
2017-05-26 12:03:22 -05:00
|
|
|
{
|
|
|
|
pub fn new(value: V) -> Self {
|
|
|
|
Test {
|
|
|
|
cloned_value: value.clone(),
|
2018-01-21 22:05:18 -06:00
|
|
|
value,
|
2017-05-26 12:03:22 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2017-07-10 00:35:50 -05:00
|
|
|
|
2017-08-27 10:18:17 -05:00
|
|
|
impl X<T> /* comment */ {}
|
|
|
|
impl Y<T> // comment
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2017-07-10 00:35:50 -05:00
|
|
|
impl<T> Foo for T
|
|
|
|
// comment1
|
|
|
|
where
|
|
|
|
// comment2
|
|
|
|
// blah
|
|
|
|
T: Clone,
|
|
|
|
{
|
|
|
|
}
|
2017-07-26 19:43:35 -05:00
|
|
|
|
2023-11-01 12:00:38 -05:00
|
|
|
// #5941
|
|
|
|
impl T where (): Clone // Should not add comma to comment
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2017-07-26 19:43:35 -05:00
|
|
|
// #1823
|
|
|
|
default impl Trait for X {}
|
|
|
|
default unsafe impl Trait for Y {}
|
|
|
|
pub default unsafe impl Trait for Z {}
|
2017-11-30 04:37:53 -06:00
|
|
|
|
|
|
|
// #2212
|
|
|
|
impl ConstWithDefault {
|
|
|
|
default const CAN_RECONSTRUCT_QUERY_KEY: bool = false;
|
|
|
|
}
|