Rollup merge of #121120 - nnethercote:LitKind-Err-guar, r=fmease

Add `ErrorGuaranteed` to `ast::LitKind::Err`, `token::LitKind::Err`.

Similar to recent work doing the same for `ExprKind::Err` (#120586) and `TyKind::Err` (#121109).

r? `@oli-obk`
This commit is contained in:
Guillaume Gomez 2024-02-15 14:33:03 +01:00 committed by GitHub
commit d96aea860c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

View file

@ -72,7 +72,7 @@ impl server::FreeFunctions for RaSpanServer {
) -> Result<bridge::Literal<Self::Span, Self::Symbol>, ()> { ) -> Result<bridge::Literal<Self::Span, Self::Symbol>, ()> {
// FIXME: keep track of LitKind and Suffix // FIXME: keep track of LitKind and Suffix
Ok(bridge::Literal { Ok(bridge::Literal {
kind: bridge::LitKind::Err, kind: bridge::LitKind::Integer, // dummy
symbol: Symbol::intern(self.interner, s), symbol: Symbol::intern(self.interner, s),
suffix: None, suffix: None,
span: self.call_site, span: self.call_site,
@ -202,7 +202,7 @@ impl server::TokenStream for RaSpanServer {
tt::TokenTree::Leaf(tt::Leaf::Literal(lit)) => { tt::TokenTree::Leaf(tt::Leaf::Literal(lit)) => {
bridge::TokenTree::Literal(bridge::Literal { bridge::TokenTree::Literal(bridge::Literal {
// FIXME: handle literal kinds // FIXME: handle literal kinds
kind: bridge::LitKind::Err, kind: bridge::LitKind::Integer, // dummy
symbol: Symbol::intern(self.interner, &lit.text), symbol: Symbol::intern(self.interner, &lit.text),
// FIXME: handle suffixes // FIXME: handle suffixes
suffix: None, suffix: None,

View file

@ -64,7 +64,7 @@ impl server::FreeFunctions for TokenIdServer {
) -> Result<bridge::Literal<Self::Span, Self::Symbol>, ()> { ) -> Result<bridge::Literal<Self::Span, Self::Symbol>, ()> {
// FIXME: keep track of LitKind and Suffix // FIXME: keep track of LitKind and Suffix
Ok(bridge::Literal { Ok(bridge::Literal {
kind: bridge::LitKind::Err, kind: bridge::LitKind::Integer, // dummy
symbol: Symbol::intern(self.interner, s), symbol: Symbol::intern(self.interner, s),
suffix: None, suffix: None,
span: self.call_site, span: self.call_site,
@ -187,7 +187,7 @@ impl server::TokenStream for TokenIdServer {
tt::TokenTree::Leaf(tt::Leaf::Literal(lit)) => { tt::TokenTree::Leaf(tt::Leaf::Literal(lit)) => {
bridge::TokenTree::Literal(bridge::Literal { bridge::TokenTree::Literal(bridge::Literal {
// FIXME: handle literal kinds // FIXME: handle literal kinds
kind: bridge::LitKind::Err, kind: bridge::LitKind::Integer, // dummy
symbol: Symbol::intern(self.interner, &lit.text), symbol: Symbol::intern(self.interner, &lit.text),
// FIXME: handle suffixes // FIXME: handle suffixes
suffix: None, suffix: None,