about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2022-08-31 09:05:42 +1000
committerNicholas Nethercote <n.nethercote@gmail.com>2022-09-05 14:20:16 +1000
commit49b90573ac84d0f18ff1737e5f4fd4d0afc869f2 (patch)
treebb4eb00338ce7794cfe4bcaed007aa97e55d200b
parent0ebd3ab63aa08337bb4e4600358679262ce8d242 (diff)
downloadrust-49b90573ac84d0f18ff1737e5f4fd4d0afc869f2.tar.gz
rust-49b90573ac84d0f18ff1737e5f4fd4d0afc869f2.zip
Add some blank lines to the definition of `Res`.
To make the spacing consistent.

Also shorten an overly long comment line.
-rw-r--r--compiler/rustc_hir/src/def.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/compiler/rustc_hir/src/def.rs b/compiler/rustc_hir/src/def.rs
index 2d2648a8f35..d5ac07f1e63 100644
--- a/compiler/rustc_hir/src/def.rs
+++ b/compiler/rustc_hir/src/def.rs
@@ -308,6 +308,7 @@ pub enum Res<Id = hir::HirId> {
     ///
     /// **Belongs to the type namespace.**
     PrimTy(hir::PrimTy),
+
     /// The `Self` type, optionally with the [`DefId`] of the trait it belongs to and
     /// optionally with the [`DefId`] of the item introducing the `Self` type alias.
     ///
@@ -355,7 +356,8 @@ pub enum Res<Id = hir::HirId> {
     /// const fn baz<T>() -> usize { 10 }
     /// ```
     /// We do however allow `Self` in repeat expression even if it is generic to not break code
-    /// which already works on stable while causing the `const_evaluatable_unchecked` future compat lint:
+    /// which already works on stable while causing the `const_evaluatable_unchecked` future compat
+    /// lint:
     /// ```
     /// fn foo<T>() {
     ///     let _bar = [1_u8; std::mem::size_of::<*mut T>()];
@@ -370,6 +372,7 @@ pub enum Res<Id = hir::HirId> {
         /// from mentioning generics (i.e. when used in an anonymous constant).
         alias_to: Option<(DefId, bool)>,
     },
+
     /// A tool attribute module; e.g., the `rustfmt` in `#[rustfmt::skip]`.
     ///
     /// **Belongs to the type namespace.**
@@ -383,6 +386,7 @@ pub enum Res<Id = hir::HirId> {
     ///
     /// *See also [`Res::SelfTy`].*
     SelfCtor(DefId),
+
     /// A local variable or function parameter.
     ///
     /// **Belongs to the value namespace.**