rust/tests/target/impl.rs

44 lines
740 B
Rust
Raw Normal View History

// 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-27 02:03:22 +09:00
impl<V> Test<V>
2017-06-12 16:01:41 +12:00
where
V: Clone, // This comment is NOT removed by formating!
2017-05-27 02:03:22 +09:00
{
pub fn new(value: V) -> Self {
Test {
cloned_value: value.clone(),
value: value,
}
}
}
2017-08-28 00:18:17 +09:00
impl X<T> /* comment */ {}
impl Y<T> // comment
{
}
impl<T> Foo for T
// comment1
where
// comment2
// blah
T: Clone,
{
}
2017-07-27 09:43:35 +09:00
// #1823
default impl Trait for X {}
default unsafe impl Trait for Y {}
pub default unsafe impl Trait for Z {}
2017-11-30 19:37:53 +09:00
// #2212
impl ConstWithDefault {
default const CAN_RECONSTRUCT_QUERY_KEY: bool = false;
}