mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-16 21:15:18 +03:00
delegation: Implement list delegation
```rust
reuse prefix::{a, b, c}
```
This commit is contained in:
+2
-2
@@ -739,8 +739,8 @@ fn visit_impl_items(&mut self, items: &[ptr::P<ast::AssocItem>]) {
|
||||
(_, Const(..)) => Ordering::Greater,
|
||||
(MacCall(..), _) => Ordering::Less,
|
||||
(_, MacCall(..)) => Ordering::Greater,
|
||||
(Delegation(..), _) => Ordering::Less,
|
||||
(_, Delegation(..)) => Ordering::Greater,
|
||||
(Delegation(..), _) | (DelegationMac(..), _) => Ordering::Less,
|
||||
(_, Delegation(..)) | (_, DelegationMac(..)) => Ordering::Greater,
|
||||
});
|
||||
let mut prev_kind = None;
|
||||
for (buf, item) in buffer {
|
||||
|
||||
+1
-1
@@ -586,7 +586,7 @@ pub(crate) fn visit_item(&mut self, item: &ast::Item) {
|
||||
);
|
||||
self.push_rewrite(item.span, rewrite);
|
||||
}
|
||||
ast::ItemKind::Delegation(..) => {
|
||||
ast::ItemKind::Delegation(..) | ast::ItemKind::DelegationMac(..) => {
|
||||
// TODO: rewrite delegation items once syntax is established.
|
||||
// For now, leave the contents of the Span unformatted.
|
||||
self.push_rewrite(item.span, None)
|
||||
|
||||
Reference in New Issue
Block a user