Skip to content

Commit

Permalink
Inline and remove source_file_to_stream.
Browse files Browse the repository at this point in the history
It has a single call site.
  • Loading branch information
nnethercote committed May 31, 2024
1 parent 2b9f414 commit 3b61803
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions compiler/rustc_parse/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}

Expand Down

0 comments on commit 3b61803

Please sign in to comment.