Struct rustc_hir::hir::GenericArgs [−][src]
pub struct GenericArgs<'hir> {
pub args: &'hir [GenericArg<'hir>],
pub bindings: &'hir [TypeBinding<'hir>],
pub parenthesized: bool,
}Fields
args: &'hir [GenericArg<'hir>]Expand description
The generic arguments for this path segment.
bindings: &'hir [TypeBinding<'hir>]Expand description
Bindings (equality constraints) on associated types, if present.
E.g., Foo<A = Bar>.
parenthesized: boolExpand description
Were arguments written in parenthesized form Fn(T) -> U?
This is required mostly for pretty-printing and diagnostics,
but also for changing lifetime elision rules to be “function-like”.
Implementations
impl GenericArgs<'_>[src]
impl GenericArgs<'_>[src]pub const fn none() -> Self[src]
pub fn inputs(&self) -> &[Ty<'_>][src]
pub fn own_counts(&self) -> GenericParamCount[src]
pub fn span(&self) -> Option<Span>[src]
pub fn span_ext(&self, sm: &SourceMap) -> Option<Span>[src]
pub fn span_ext(&self, sm: &SourceMap) -> Option<Span>[src]Returns span encompassing arguments and their surrounding <> or ()
pub fn is_empty(&self) -> bool[src]
Trait Implementations
impl<'hir> Debug for GenericArgs<'hir>[src]
impl<'hir> Debug for GenericArgs<'hir>[src]impl<'hir, __CTX> HashStable<__CTX> for GenericArgs<'hir> where
__CTX: HashStableContext, [src]
impl<'hir, __CTX> HashStable<__CTX> for GenericArgs<'hir> where
__CTX: HashStableContext, [src]