about summary refs log tree commit diff
path: root/compiler/rustc_ast/src
diff options
context:
space:
mode:
authorNilstrieb <48135649+Nilstrieb@users.noreply.github.com>2022-12-18 21:47:28 +0100
committerNilstrieb <48135649+Nilstrieb@users.noreply.github.com>2022-12-18 21:47:28 +0100
commit8bfd6450c7b61ffee0fd7e21b538d00018a0e47e (patch)
tree5cfb2d138d7b9dbc83959890e2a3a56d725a1b2f /compiler/rustc_ast/src
parentd679764fb6b84a5cb72f6a9c9fefce4c6b41f16c (diff)
downloadrust-8bfd6450c7b61ffee0fd7e21b538d00018a0e47e.tar.gz
rust-8bfd6450c7b61ffee0fd7e21b538d00018a0e47e.zip
A few small cleanups for `newtype_index`
Remove the `..` from the body, only a few invocations used it and it's
inconsistent with rust syntax.

Use `;` instead of `,` between consts. As the Rust syntax gods inteded.
Diffstat (limited to 'compiler/rustc_ast/src')
-rw-r--r--compiler/rustc_ast/src/ast.rs3
-rw-r--r--compiler/rustc_ast/src/node_id.rs3
2 files changed, 2 insertions, 4 deletions
diff --git a/compiler/rustc_ast/src/ast.rs b/compiler/rustc_ast/src/ast.rs
index 4140bff6e29..31596a1e9bf 100644
--- a/compiler/rustc_ast/src/ast.rs
+++ b/compiler/rustc_ast/src/ast.rs
@@ -2556,8 +2556,7 @@ pub enum AttrStyle {
 rustc_index::newtype_index! {
     #[custom_encodable]
     #[debug_format = "AttrId({})]"]
-    pub struct AttrId {
-    }
+    pub struct AttrId {}
 }
 
 impl<S: Encoder> Encodable<S> for AttrId {
diff --git a/compiler/rustc_ast/src/node_id.rs b/compiler/rustc_ast/src/node_id.rs
index 8ba6b8c2c33..daa82996b3d 100644
--- a/compiler/rustc_ast/src/node_id.rs
+++ b/compiler/rustc_ast/src/node_id.rs
@@ -9,8 +9,7 @@ rustc_index::newtype_index! {
     ///
     /// [`DefId`]: rustc_span::def_id::DefId
     #[debug_format = "NodeId({})"]
-    pub struct NodeId {
-    }
+    pub struct NodeId {}
 }
 
 rustc_data_structures::define_id_collections!(NodeMap, NodeSet, NodeMapEntry, NodeId);