diff options
| author | bors <bors@rust-lang.org> | 2024-06-05 11:32:18 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-06-05 11:32:18 +0000 |
| commit | db8aca48129d86b2623e3ac8cbcf2902d4d313ad (patch) | |
| tree | 637294c8b1a43817f408a70a5da24d9b64d672a4 /compiler/rustc_builtin_macros/src/source_util.rs | |
| parent | 5ee2dfd2bcbb66a69a46aaa342204e0dfdb70516 (diff) | |
| parent | f12fe3a33e5e94f1f49cd6d4a785d1cf7a0a02b9 (diff) | |
| download | rust-db8aca48129d86b2623e3ac8cbcf2902d4d313ad.tar.gz rust-db8aca48129d86b2623e3ac8cbcf2902d4d313ad.zip | |
Auto merge of #126016 - workingjubilee:rollup-nh6ehbz, r=workingjubilee
Rollup of 12 pull requests Successful merges: - #123168 (Add `size_of` and `size_of_val` and `align_of` and `align_of_val` to the prelude) - #125273 (bootstrap: implement new feature `bootstrap-self-test`) - #125683 (Rewrite `suspicious-library`, `resolve-rename` and `incr-prev-body-beyond-eof` `run-make` tests in `rmake.rs` format) - #125815 (`rustc_parse` top-level cleanups) - #125903 (rustc_span: Inline some hot functions) - #125906 (Remove a bunch of redundant args from `report_method_error`) - #125920 (Allow static mut definitions with #[linkage]) - #125982 (Make deleting on LinkedList aware of the allocator) - #125995 (Use inline const blocks to create arrays of `MaybeUninit`.) - #125996 (Closures are recursively reachable) - #126003 (Add a co-maintainer for the two ARMv4T targets) - #126004 (Add another test for hidden types capturing lifetimes that outlive but arent mentioned in substs) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_builtin_macros/src/source_util.rs')
| -rw-r--r-- | compiler/rustc_builtin_macros/src/source_util.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_builtin_macros/src/source_util.rs b/compiler/rustc_builtin_macros/src/source_util.rs index 29e991525a9..dc1d82df0c3 100644 --- a/compiler/rustc_builtin_macros/src/source_util.rs +++ b/compiler/rustc_builtin_macros/src/source_util.rs @@ -12,8 +12,8 @@ use rustc_expand::base::{ }; use rustc_expand::module::DirOwnership; use rustc_lint_defs::BuiltinLintDiag; -use rustc_parse::new_parser_from_file; use rustc_parse::parser::{ForceCollect, Parser}; +use rustc_parse::{new_parser_from_file, unwrap_or_emit_fatal}; use rustc_session::lint::builtin::INCOMPLETE_INCLUDE; use rustc_span::source_map::SourceMap; use rustc_span::symbol::Symbol; @@ -126,7 +126,7 @@ pub(crate) fn expand_include<'cx>( return ExpandResult::Ready(DummyResult::any(sp, guar)); } }; - let p = new_parser_from_file(cx.psess(), &file, Some(sp)); + let p = unwrap_or_emit_fatal(new_parser_from_file(cx.psess(), &file, Some(sp))); // If in the included file we have e.g., `mod bar;`, // then the path of `bar.rs` should be relative to the directory of `file`. |
