Rollup merge of #152235 - JonathanBrouwer:convert_parse, r=JonathanBrouwer
Convert to inline diagnostics in `rustc_parse` This was the most annoying one by far, had to make a few changes to the representation of two errors (no user-facing changes tho), these changes are in separate commits for clarity :) For https://github.com/rust-lang/rust/issues/151366 r? @jdonszelmann
This commit is contained in:
commit
828b9c2cdf
18 changed files with 1448 additions and 1796 deletions
|
|
@ -10,6 +10,9 @@
|
|||
//@ needs-symlink
|
||||
//@ needs-subprocess
|
||||
|
||||
// FIXME(151366) Currently `-Ztranslate-additional-ftl` is currently broken
|
||||
//@ ignore-test
|
||||
|
||||
#![deny(warnings)]
|
||||
|
||||
use std::path::{Path, PathBuf};
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ pub fn main() {
|
|||
}
|
||||
|
||||
fn parse() {
|
||||
let psess = ParseSess::new(vec![rustc_parse::DEFAULT_LOCALE_RESOURCE]);
|
||||
let psess = ParseSess::new(vec![]);
|
||||
|
||||
let path = Path::new(file!());
|
||||
let path = path.canonicalize().unwrap();
|
||||
|
|
|
|||
|
|
@ -219,7 +219,7 @@ fn main() {
|
|||
}
|
||||
|
||||
fn run() {
|
||||
let psess = ParseSess::new(vec![rustc_parse::DEFAULT_LOCALE_RESOURCE]);
|
||||
let psess = ParseSess::new(vec![]);
|
||||
|
||||
iter_exprs(2, &mut |mut e| {
|
||||
// If the pretty printer is correct, then `parse(print(e))` should be identical to `e`,
|
||||
|
|
|
|||
|
|
@ -196,7 +196,7 @@ fn main() -> ExitCode {
|
|||
};
|
||||
|
||||
rustc_span::create_default_session_globals_then(|| {
|
||||
let psess = &ParseSess::new(vec![rustc_parse::DEFAULT_LOCALE_RESOURCE]);
|
||||
let psess = &ParseSess::new(vec![]);
|
||||
|
||||
for &source_code in EXPRS {
|
||||
let Some(expr) = parse_expr(psess, source_code) else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue