Struct rustc_ap_rustc_span::symbol::Ident [−][src]
Fields
name: Symbol
span: Span
Implementations
impl Ident
[src]
impl Ident
[src]pub const fn new(name: Symbol, span: Span) -> Ident
[src]
pub const fn new(name: Symbol, span: Span) -> Ident
[src]Constructs a new identifier from a symbol and a span.
pub const fn with_dummy_span(name: Symbol) -> Ident
[src]
pub const fn with_dummy_span(name: Symbol) -> Ident
[src]Constructs a new identifier with a dummy span.
pub fn invalid() -> Ident
[src]
pub fn from_str_and_span(string: &str, span: Span) -> Ident
[src]
pub fn from_str_and_span(string: &str, span: Span) -> Ident
[src]Maps a string and a span to an identifier.
pub fn with_span_pos(self, span: Span) -> Ident
[src]
pub fn with_span_pos(self, span: Span) -> Ident
[src]Replaces lo
and hi
with those from span
, but keep hygiene context.
pub fn without_first_quote(self) -> Ident
[src]
pub fn normalize_to_macros_2_0(self) -> Ident
[src]
pub fn normalize_to_macros_2_0(self) -> Ident
[src]“Normalize” ident for use in comparisons using “item hygiene”.
Identifiers with same string value become same if they came from the same macro 2.0 macro
(e.g., macro
item, but not macro_rules
item) and stay different if they came from
different macro 2.0 macros.
Technically, this operation strips all non-opaque marks from ident’s syntactic context.
pub fn normalize_to_macro_rules(self) -> Ident
[src]
pub fn normalize_to_macro_rules(self) -> Ident
[src]“Normalize” ident for use in comparisons using “local variable hygiene”.
Identifiers with same string value become same if they came from the same non-transparent
macro (e.g., macro
or macro_rules!
items) and stay different if they came from different
non-transparent macros.
Technically, this operation strips all transparent marks from ident’s syntactic context.
impl Ident
[src]
impl Ident
[src]pub fn is_special(self) -> bool
[src]
pub fn is_used_keyword(self) -> bool
[src]
pub fn is_used_keyword(self) -> bool
[src]Returns true
if the token is a keyword used in the language.
pub fn is_unused_keyword(self) -> bool
[src]
pub fn is_unused_keyword(self) -> bool
[src]Returns true
if the token is a keyword reserved for possible future use.
pub fn is_reserved(self) -> bool
[src]
pub fn is_reserved(self) -> bool
[src]Returns true
if the token is either a special identifier or a keyword.
pub fn is_path_segment_keyword(self) -> bool
[src]
pub fn is_path_segment_keyword(self) -> bool
[src]A keyword or reserved identifier that can be used as a path segment.
pub fn is_raw_guess(self) -> bool
[src]
pub fn is_raw_guess(self) -> bool
[src]We see this identifier in a normal identifier position, like variable name or a type. How was it written originally? Did it use the raw form? Let’s try to guess.
Trait Implementations
impl Display for Ident
[src]
impl Display for Ident
[src]This implementation is supposed to be used in error messages, so it’s expected to be identical
to printing the original identifier token written in source code (token_to_string
),
except that AST identifiers don’t keep the rawness flag, so we have to guess it.
impl<__CTX> HashStable<__CTX> for Ident where
__CTX: HashStableContext,
[src]
impl<__CTX> HashStable<__CTX> for Ident where
__CTX: HashStableContext,
[src]fn hash_stable(&self, __hcx: &mut __CTX, __hasher: &mut StableHasher)
[src]
impl Copy for Ident
[src]
impl Eq for Ident
[src]
impl StructuralEq for Ident
[src]
Auto Trait Implementations
impl RefUnwindSafe for Ident
impl !Send for Ident
impl !Sync for Ident
impl Unpin for Ident
impl UnwindSafe for Ident
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]pub fn equivalent(&self, key: &K) -> bool
[src]
pub fn equivalent(&self, key: &K) -> bool
[src]Compare self to key
and return true
if they are equal.
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
fn in_current_span(self) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
pub fn vzip(self) -> V
impl<'a, T> Captures<'a> for T where
T: ?Sized,
[src]
T: ?Sized,