Add scaffolding for assigning alpha-numeric codes to rustc diagnostics
This commit is contained in:
parent
7ab9bfab4e
commit
9b9cce2316
25 changed files with 468 additions and 86 deletions
|
@ -148,6 +148,8 @@ pub trait AstBuilder {
|
|||
fn expr_some(&self, sp: Span, expr: Gc<ast::Expr>) -> Gc<ast::Expr>;
|
||||
fn expr_none(&self, sp: Span) -> Gc<ast::Expr>;
|
||||
|
||||
fn expr_tuple(&self, sp: Span, exprs: Vec<Gc<ast::Expr>>) -> Gc<ast::Expr>;
|
||||
|
||||
fn expr_fail(&self, span: Span, msg: InternedString) -> Gc<ast::Expr>;
|
||||
fn expr_unreachable(&self, span: Span) -> Gc<ast::Expr>;
|
||||
|
||||
|
@ -674,6 +676,10 @@ impl<'a> AstBuilder for ExtCtxt<'a> {
|
|||
self.expr_path(none)
|
||||
}
|
||||
|
||||
fn expr_tuple(&self, sp: Span, exprs: Vec<Gc<ast::Expr>>) -> Gc<ast::Expr> {
|
||||
self.expr(sp, ast::ExprTup(exprs))
|
||||
}
|
||||
|
||||
fn expr_fail(&self, span: Span, msg: InternedString) -> Gc<ast::Expr> {
|
||||
let loc = self.codemap().lookup_char_pos(span.lo);
|
||||
self.expr_call_global(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue