diff options
| author | Yuri Astrakhan <YuriAstrakhan@gmail.com> | 2022-03-30 01:39:38 -0400 |
|---|---|---|
| committer | Yuri Astrakhan <YuriAstrakhan@gmail.com> | 2022-03-30 01:39:38 -0400 |
| commit | 7e8201ae0a57ef63b876cf2bf9ae388426f1dda5 (patch) | |
| tree | 5acf581815892fa97944a80a175c5f75070b5888 /compiler/rustc_parse/src | |
| parent | 600ec284838c52d1f6657c2cf0097b58970b133b (diff) | |
| download | rust-7e8201ae0a57ef63b876cf2bf9ae388426f1dda5.tar.gz rust-7e8201ae0a57ef63b876cf2bf9ae388426f1dda5.zip | |
Spellchecking some comments
This PR attempts to clean up some minor spelling mistakes in comments
Diffstat (limited to 'compiler/rustc_parse/src')
| -rw-r--r-- | compiler/rustc_parse/src/parser/attr.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_parse/src/parser/attr_wrapper.rs | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/compiler/rustc_parse/src/parser/attr.rs b/compiler/rustc_parse/src/parser/attr.rs index 754ae12bbea..9865588cff4 100644 --- a/compiler/rustc_parse/src/parser/attr.rs +++ b/compiler/rustc_parse/src/parser/attr.rs @@ -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 { diff --git a/compiler/rustc_parse/src/parser/attr_wrapper.rs b/compiler/rustc_parse/src/parser/attr_wrapper.rs index f0ec86ca64a..5ee9c339bb7 100644 --- a/compiler/rustc_parse/src/parser/attr_wrapper.rs +++ b/compiler/rustc_parse/src/parser/attr_wrapper.rs @@ -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 |
