@@ -42,7 +42,7 @@ fn string_to_parser(psess: &ParseSess, source_str: String) -> Parser<'_> {
4242fn create_test_handler ( theme : OutputTheme ) -> ( DiagCtxt , Arc < SourceMap > , Arc < Mutex < Vec < u8 > > > ) {
4343 let output = Arc :: new ( Mutex :: new ( Vec :: new ( ) ) ) ;
4444 let source_map = Arc :: new ( SourceMap :: new ( FilePathMapping :: empty ( ) ) ) ;
45- let translator = Translator :: with_fallback_bundle ( vec ! [ ] , false ) ;
45+ let translator = Translator :: new ( ) ;
4646 let shared: Box < dyn Write + Send > = Box :: new ( Shared { data : output. clone ( ) } ) ;
4747 let auto_stream = AutoStream :: never ( shared) ;
4848 let dcx = DiagCtxt :: new ( Box :: new (
8989
9090/// Maps a string to tts, using a made-up filename.
9191pub ( crate ) fn string_to_stream ( source_str : String ) -> TokenStream {
92- let psess = ParseSess :: new ( vec ! [ ] ) ;
92+ let psess = ParseSess :: new ( ) ;
9393 unwrap_or_emit_fatal ( source_str_to_stream (
9494 & psess,
9595 filename ( psess. source_map ( ) , "bogofile" ) ,
@@ -2239,12 +2239,12 @@ fn sp(a: u32, b: u32) -> Span {
22392239
22402240/// Parses a string, return an expression.
22412241fn string_to_expr ( source_str : String ) -> Box < ast:: Expr > {
2242- with_error_checking_parse ( source_str, & ParseSess :: new ( vec ! [ ] ) , |p| p. parse_expr ( ) )
2242+ with_error_checking_parse ( source_str, & ParseSess :: new ( ) , |p| p. parse_expr ( ) )
22432243}
22442244
22452245/// Parses a string, returns an item.
22462246fn string_to_item ( source_str : String ) -> Option < Box < ast:: Item > > {
2247- with_error_checking_parse ( source_str, & ParseSess :: new ( vec ! [ ] ) , |p| {
2247+ with_error_checking_parse ( source_str, & ParseSess :: new ( ) , |p| {
22482248 p. parse_item ( ForceCollect :: No , AllowConstBlockItems :: Yes )
22492249 } )
22502250}
@@ -2480,7 +2480,7 @@ let mut fflags: c_int = wb();
24802480#[ test]
24812481fn crlf_doc_comments ( ) {
24822482 create_default_session_globals_then ( || {
2483- let psess = ParseSess :: new ( vec ! [ ] ) ;
2483+ let psess = ParseSess :: new ( ) ;
24842484
24852485 let name_1 = FileName :: Custom ( "crlf_source_1" . to_string ( ) ) ;
24862486 let source = "/// doc comment\r \n fn foo() {}" . to_string ( ) ;
@@ -2515,7 +2515,7 @@ fn ttdelim_span() {
25152515 }
25162516
25172517 create_default_session_globals_then ( || {
2518- let psess = ParseSess :: new ( vec ! [ ] ) ;
2518+ let psess = ParseSess :: new ( ) ;
25192519 let expr = parse_expr_from_source_str (
25202520 filename ( psess. source_map ( ) , "foo" ) ,
25212521 "foo!( fn main() { body } )" . to_string ( ) ,
@@ -2551,7 +2551,7 @@ fn look_ahead() {
25512551 let sym_S = Symbol :: intern ( "S" ) ;
25522552 let raw_no = IdentIsRaw :: No ;
25532553
2554- let psess = ParseSess :: new ( vec ! [ ] ) ;
2554+ let psess = ParseSess :: new ( ) ;
25552555 let mut p = string_to_parser ( & psess, "fn f(x: u32) { x } struct S;" . to_string ( ) ) ;
25562556
25572557 // Current position is the `fn`.
@@ -2626,7 +2626,7 @@ fn look_ahead_non_outermost_stream() {
26262626 let sym_S = Symbol :: intern ( "S" ) ;
26272627 let raw_no = IdentIsRaw :: No ;
26282628
2629- let psess = ParseSess :: new ( vec ! [ ] ) ;
2629+ let psess = ParseSess :: new ( ) ;
26302630 let mut p = string_to_parser ( & psess, "mod m { fn f(x: u32) { x } struct S; }" . to_string ( ) ) ;
26312631
26322632 // Move forward to the `fn`, which is not within the outermost token
@@ -2658,7 +2658,7 @@ fn look_ahead_non_outermost_stream() {
26582658#[ test]
26592659fn debug_lookahead ( ) {
26602660 create_default_session_globals_then ( || {
2661- let psess = ParseSess :: new ( vec ! [ ] ) ;
2661+ let psess = ParseSess :: new ( ) ;
26622662 let mut p = string_to_parser ( & psess, "fn f(x: u32) { x } struct S;" . to_string ( ) ) ;
26632663
26642664 // Current position is the `fn`.
@@ -2879,7 +2879,7 @@ fn debug_lookahead() {
28792879#[ test]
28802880fn out_of_line_mod ( ) {
28812881 create_default_session_globals_then ( || {
2882- let psess = ParseSess :: new ( vec ! [ ] ) ;
2882+ let psess = ParseSess :: new ( ) ;
28832883 let item = parse_item_from_source_str (
28842884 filename ( psess. source_map ( ) , "foo" ) ,
28852885 "mod foo { struct S; mod this_does_not_exist; }" . to_owned ( ) ,
0 commit comments