diff options
| author | est31 <MTest31@outlook.com> | 2020-10-09 11:23:40 +0200 |
|---|---|---|
| committer | est31 <MTest31@outlook.com> | 2020-10-14 04:14:32 +0200 |
| commit | 215cd36e1cff1806429806cb5be81f6d1a5f98b0 (patch) | |
| tree | 9c6b9c881228f080c9f932d2561d98a06c6c394b /compiler/rustc_parse/src | |
| parent | 58b3923ad377e79a0517ec15a672e3f8f90b10b4 (diff) | |
| download | rust-215cd36e1cff1806429806cb5be81f6d1a5f98b0.tar.gz rust-215cd36e1cff1806429806cb5be81f6d1a5f98b0.zip | |
Remove unused code from remaining compiler crates
Diffstat (limited to 'compiler/rustc_parse/src')
| -rw-r--r-- | compiler/rustc_parse/src/lib.rs | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/compiler/rustc_parse/src/lib.rs b/compiler/rustc_parse/src/lib.rs index b68d36c9a8e..e952d5d7bfc 100644 --- a/compiler/rustc_parse/src/lib.rs +++ b/compiler/rustc_parse/src/lib.rs @@ -114,16 +114,6 @@ pub fn new_parser_from_file<'a>(sess: &'a ParseSess, path: &Path, sp: Option<Spa source_file_to_parser(sess, file_to_source_file(sess, path, sp)) } -/// Creates a new parser, returning buffered diagnostics if the file doesn't exist, -/// or from lexing the initial token stream. -pub fn maybe_new_parser_from_file<'a>( - sess: &'a ParseSess, - path: &Path, -) -> Result<Parser<'a>, Vec<Diagnostic>> { - let file = try_file_to_source_file(sess, path, None).map_err(|db| vec![db])?; - maybe_source_file_to_parser(sess, file) -} - /// Given a `source_file` and config, returns a parser. fn source_file_to_parser(sess: &ParseSess, source_file: Lrc<SourceFile>) -> Parser<'_> { panictry_buffer!(&sess.span_diagnostic, maybe_source_file_to_parser(sess, source_file)) @@ -146,12 +136,6 @@ fn maybe_source_file_to_parser( Ok(parser) } -// Must preserve old name for now, because `quote!` from the *existing* -// compiler expands into it. -pub fn new_parser_from_tts(sess: &ParseSess, tts: Vec<TokenTree>) -> Parser<'_> { - stream_to_parser(sess, tts.into_iter().collect(), crate::MACRO_ARGUMENTS) -} - // Base abstractions /// Given a session and a path and an optional span (for error reporting), |
