mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-29 11:37:39 +00:00
Rollup merge of #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
This commit is contained in:
commit
9436304871
@ -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)]
|
#[derive(Debug, Clone, Copy, HashStable_Generic)]
|
||||||
pub struct ImplItem<'hir> {
|
pub struct ImplItem<'hir> {
|
||||||
pub ident: Ident,
|
pub ident: Ident,
|
||||||
@ -3327,6 +3329,10 @@ pub enum ItemKind<'hir> {
|
|||||||
Impl(&'hir Impl<'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)]
|
#[derive(Debug, Clone, Copy, HashStable_Generic)]
|
||||||
pub struct Impl<'hir> {
|
pub struct Impl<'hir> {
|
||||||
pub safety: Safety,
|
pub safety: Safety,
|
||||||
|
Loading…
Reference in New Issue
Block a user