diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-05-31 14:38:34 +1000 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-06-05 10:38:03 +1000 |
| commit | 264dbe4d8145c076557a95a93183b8c1d6e1f564 (patch) | |
| tree | 853b5afa57fddb549951a3042610b6067d3f3bb2 | |
| parent | ab192a0c97cd0d03d24e402640576474cb62c972 (diff) | |
| download | rust-264dbe4d8145c076557a95a93183b8c1d6e1f564.tar.gz rust-264dbe4d8145c076557a95a93183b8c1d6e1f564.zip | |
Inline and remove `source_file_to_stream`.
It has a single call site.
| -rw-r--r-- | compiler/rustc_parse/src/lib.rs | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/compiler/rustc_parse/src/lib.rs b/compiler/rustc_parse/src/lib.rs index 5ba6db3b262..8a061ce8f1b 100644 --- a/compiler/rustc_parse/src/lib.rs +++ b/compiler/rustc_parse/src/lib.rs @@ -100,15 +100,7 @@ pub fn source_str_to_stream( source: String, override_span: Option<Span>, ) -> TokenStream { - source_file_to_stream(psess, psess.source_map().new_source_file(name, source), override_span) -} - -/// Given a `source_file`, produces a sequence of token trees. -pub fn source_file_to_stream( - psess: &ParseSess, - source_file: Lrc<SourceFile>, - override_span: Option<Span>, -) -> TokenStream { + let source_file = psess.source_map().new_source_file(name, source); unwrap_or_emit_fatal(maybe_source_file_to_stream(psess, source_file, override_span)) } |
