Skip to content

Commit

Permalink
Unrolled build for rust-lang#126103
Browse files Browse the repository at this point in the history
Rollup merge of rust-lang#126103 - veera-sivarajan:improve-docs-hir-impl, r=fmease

Improve Docs for `hir::Impl` and `hir::ImplItem`

Based on https://rust-lang.zulipchat.com/#narrow/stream/182449-t-compiler.2Fhelp/topic/.E2.9C.94.20Difference.20between.20.60hir.3A.3AImplItem.60.20and.20.60hir.3A.3AImpl.60.3F/near/442650915

r​? fmease
  • Loading branch information
rust-timer authored Jun 7, 2024
2 parents b74702f + cddf291 commit a4c9701
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion compiler/rustc_hir/src/hir.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2345,7 +2345,9 @@ impl ImplItemId {
}
}

/// Represents anything within an `impl` block.
/// Represents an associated item within an impl block.
///
/// Refer to [`Impl`] for an impl block declaration.
#[derive(Debug, Clone, Copy, HashStable_Generic)]
pub struct ImplItem<'hir> {
pub ident: Ident,
Expand Down Expand Up @@ -3327,6 +3329,10 @@ pub enum ItemKind<'hir> {
Impl(&'hir Impl<'hir>),
}

/// Represents an impl block declaration.
///
/// E.g., `impl $Type { .. }` or `impl $Trait for $Type { .. }`
/// Refer to [`ImplItem`] for an associated item within an impl block.
#[derive(Debug, Clone, Copy, HashStable_Generic)]
pub struct Impl<'hir> {
pub safety: Safety,
Expand Down

0 comments on commit a4c9701

Please sign in to comment.