Rollup merge of #100909 - nnethercote:minor-ast-LitKind-improvement, r=petrochenkov
Minor `ast::LitKind` improvements r? `@petrochenkov`
This commit is contained in:
commit
28ead17745
13 changed files with 21 additions and 21 deletions
|
@ -39,7 +39,7 @@ pub fn expand_concat(
|
|||
ast::LitKind::Byte(..) | ast::LitKind::ByteStr(..) => {
|
||||
cx.span_err(e.span, "cannot concatenate a byte string literal");
|
||||
}
|
||||
ast::LitKind::Err(_) => {
|
||||
ast::LitKind::Err => {
|
||||
has_errors = true;
|
||||
}
|
||||
},
|
||||
|
|
|
@ -42,7 +42,7 @@ fn invalid_type_err(cx: &mut base::ExtCtxt<'_>, expr: &P<rustc_ast::Expr>, is_ne
|
|||
ast::LitKind::Bool(_) => {
|
||||
cx.span_err(expr.span, "cannot concatenate boolean literals");
|
||||
}
|
||||
ast::LitKind::Err(_) => {}
|
||||
ast::LitKind::Err => {}
|
||||
ast::LitKind::Int(_, _) if !is_nested => {
|
||||
let mut err = cx.struct_span_err(expr.span, "cannot concatenate numeric literals");
|
||||
if let Ok(snippet) = cx.sess.source_map().span_to_snippet(expr.span) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue