diff options
| author | bors <bors@rust-lang.org> | 2024-02-15 17:00:55 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-02-15 17:00:55 +0000 |
| commit | cbddf31863495050e840571d2730c95b29dcc27f (patch) | |
| tree | 6316e411f126cfeefe1ef0e6de18b5147eeab96d /compiler/rustc_parse/src/parser | |
| parent | 62fb0db9a5a2a381f81ce0474c9bbd9ad385dd88 (diff) | |
| parent | 06f53dd3166f068435ee2f08e108d2d1e0d5db50 (diff) | |
| download | rust-cbddf31863495050e840571d2730c95b29dcc27f.tar.gz rust-cbddf31863495050e840571d2730c95b29dcc27f.zip | |
Auto merge of #121142 - GuillaumeGomez:rollup-5qmksjw, r=GuillaumeGomez
Rollup of 8 pull requests
Successful merges:
- #120449 (Document requirements for unsized {Rc,Arc}::from_raw)
- #120505 (Fix BTreeMap's Cursor::remove_{next,prev})
- #120672 (std::thread update freebsd stack guard handling.)
- #121088 (Implicitly enable evex512 if avx512 is enabled)
- #121104 (Ignore unsized types when trying to determine the size of the original type)
- #121107 (Fix msg for verbose suggestions with confusable capitalization)
- #121113 (Continue compilation even if inherent impl checks fail)
- #121120 (Add `ErrorGuaranteed` to `ast::LitKind::Err`, `token::LitKind::Err`.)
r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_parse/src/parser')
| -rw-r--r-- | compiler/rustc_parse/src/parser/expr.rs | 4 | ||||
| -rw-r--r-- | compiler/rustc_parse/src/parser/mod.rs | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_parse/src/parser/expr.rs b/compiler/rustc_parse/src/parser/expr.rs index 1a57474bac2..2424b6c130d 100644 --- a/compiler/rustc_parse/src/parser/expr.rs +++ b/compiler/rustc_parse/src/parser/expr.rs @@ -2140,12 +2140,12 @@ impl<'a> Parser<'a> { Err(err) => { let span = token.uninterpolated_span(); self.bump(); - report_lit_error(self.sess, err, lit, span); + let guar = report_lit_error(self.sess, err, lit, span); // Pack possible quotes and prefixes from the original literal into // the error literal's symbol so they can be pretty-printed faithfully. let suffixless_lit = token::Lit::new(lit.kind, lit.symbol, None); let symbol = Symbol::intern(&suffixless_lit.to_string()); - let lit = token::Lit::new(token::Err, symbol, lit.suffix); + let lit = token::Lit::new(token::Err(guar), symbol, lit.suffix); Some( MetaItemLit::from_token_lit(lit, span) .unwrap_or_else(|_| unreachable!()), diff --git a/compiler/rustc_parse/src/parser/mod.rs b/compiler/rustc_parse/src/parser/mod.rs index 623407eb380..dea2b9e6ca7 100644 --- a/compiler/rustc_parse/src/parser/mod.rs +++ b/compiler/rustc_parse/src/parser/mod.rs @@ -1459,7 +1459,7 @@ impl<'a> Parser<'a> { match self.parse_str_lit() { Ok(str_lit) => Some(str_lit), Err(Some(lit)) => match lit.kind { - ast::LitKind::Err => None, + ast::LitKind::Err(_) => None, _ => { self.dcx().emit_err(NonStringAbiLiteral { span: lit.span }); None |
