Rollup merge of #95461 - nyurik:spelling, r=lcnr
Spellchecking some comments This PR attempts to clean up some minor spelling mistakes in comments
This commit is contained in:
commit
03b3993ae8
48 changed files with 61 additions and 61 deletions
|
@ -304,7 +304,7 @@ impl<'a> Parser<'a> {
|
|||
// this replace range with it, removing the inner attribute from the final
|
||||
// `AttrAnnotatedTokenStream`. Inner attributes are stored in the parsed AST note.
|
||||
// During macro expansion, they are selectively inserted back into the
|
||||
// token stream (the first inner attribute is remoevd each time we invoke the
|
||||
// token stream (the first inner attribute is removed each time we invoke the
|
||||
// corresponding macro).
|
||||
let range = start_pos..end_pos;
|
||||
if let Capturing::Yes = self.capture_state.capturing {
|
||||
|
|
|
@ -188,7 +188,7 @@ impl<'a> Parser<'a> {
|
|||
///
|
||||
/// Note: If your callback consumes an opening delimiter
|
||||
/// (including the case where you call `collect_tokens`
|
||||
/// when the current token is an opening delimeter),
|
||||
/// when the current token is an opening delimiter),
|
||||
/// you must also consume the corresponding closing delimiter.
|
||||
///
|
||||
/// That is, you can consume
|
||||
|
@ -260,7 +260,7 @@ impl<'a> Parser<'a> {
|
|||
// We also call `has_cfg_or_cfg_attr` at the beginning of this function,
|
||||
// but we only bail out if there's no possibility of inner attributes
|
||||
// (!R::SUPPORTS_CUSTOM_INNER_ATTRS)
|
||||
// We only catpure about `#[cfg]` or `#[cfg_attr]` in `capture_cfg`
|
||||
// We only capture about `#[cfg]` or `#[cfg_attr]` in `capture_cfg`
|
||||
// mode - during normal parsing, we don't need any special capturing
|
||||
// for those attributes, since they're builtin.
|
||||
&& !(self.capture_cfg && has_cfg_or_cfg_attr(ret.attrs()))
|
||||
|
@ -382,7 +382,7 @@ impl<'a> Parser<'a> {
|
|||
if matches!(self.capture_state.capturing, Capturing::No) {
|
||||
self.capture_state.replace_ranges.clear();
|
||||
// We don't clear `inner_attr_ranges`, as doing so repeatedly
|
||||
// had a measureable performance impact. Most inner attributes that
|
||||
// had a measurable performance impact. Most inner attributes that
|
||||
// we insert will get removed - when we drop the parser, we'll free
|
||||
// up the memory used by any attributes that we didn't remove from the map.
|
||||
}
|
||||
|
@ -418,7 +418,7 @@ fn make_token_stream(
|
|||
stack.push(FrameData { open: span, open_delim: delim, inner: vec![] });
|
||||
}
|
||||
FlatToken::Token(Token { kind: TokenKind::CloseDelim(delim), span }) => {
|
||||
// HACK: If we enconter a mismatched `None` delimiter at the top
|
||||
// HACK: If we encounter a mismatched `None` delimiter at the top
|
||||
// level, just ignore it.
|
||||
if matches!(delim, DelimToken::NoDelim)
|
||||
&& (stack.len() == 1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue