Skip to content

Commit

Permalink
Improve Docs for hir::Impl and hir::ImplItem
Browse files Browse the repository at this point in the history
  • Loading branch information
veera-sivarajan committed Jun 6, 2024
1 parent e1ac0fa commit 2185d3f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion compiler/rustc_hir/src/hir.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2345,7 +2345,8 @@ 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 +3328,9 @@ pub enum ItemKind<'hir> {
Impl(&'hir Impl<'hir>),
}

/// Represents an impl block declaration.
/// E.g `impl $Type { .. }` or `impl $Type for $Trait { .. }`
/// 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 2185d3f

Please sign in to comment.