diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-03-04 16:26:51 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-03-04 16:26:51 +1100 |
| commit | 0d4ebe1c1bec2d147bf5b1411a30403d68f64c63 (patch) | |
| tree | e4813257827c2113e8d4e76f849a9472379511d9 /compiler/rustc_expand/src/parse | |
| parent | 3996447b37d5a061fba2f6009ec275f657467743 (diff) | |
| download | rust-0d4ebe1c1bec2d147bf5b1411a30403d68f64c63.tar.gz rust-0d4ebe1c1bec2d147bf5b1411a30403d68f64c63.zip | |
Move `sess` function and use it more.
Diffstat (limited to 'compiler/rustc_expand/src/parse')
| -rw-r--r-- | compiler/rustc_expand/src/parse/tests.rs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/compiler/rustc_expand/src/parse/tests.rs b/compiler/rustc_expand/src/parse/tests.rs index 997144e477f..5ffe8f3c73e 100644 --- a/compiler/rustc_expand/src/parse/tests.rs +++ b/compiler/rustc_expand/src/parse/tests.rs @@ -1,5 +1,6 @@ use crate::tests::{ - matches_codepattern, string_to_stream, with_error_checking_parse, with_expected_parse_error, + matches_codepattern, sess, string_to_stream, with_error_checking_parse, + with_expected_parse_error, }; use ast::token::IdentIsRaw; @@ -16,13 +17,8 @@ use rustc_session::parse::ParseSess; use rustc_span::create_default_session_globals_then; use rustc_span::symbol::{kw, sym, Symbol}; use rustc_span::{BytePos, FileName, Pos, Span}; - use std::path::PathBuf; -fn sess() -> ParseSess { - ParseSess::new(vec![crate::DEFAULT_LOCALE_RESOURCE, rustc_parse::DEFAULT_LOCALE_RESOURCE]) -} - /// Parses an item. /// /// Returns `Ok(Some(item))` when successful, `Ok(None)` when no item was found, and `Err` |
