about summary refs log tree commit diff
path: root/tests/ui-fulldeps/mod_dir_path_canonicalized.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui-fulldeps/mod_dir_path_canonicalized.rs')
-rw-r--r--tests/ui-fulldeps/mod_dir_path_canonicalized.rs9
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/ui-fulldeps/mod_dir_path_canonicalized.rs b/tests/ui-fulldeps/mod_dir_path_canonicalized.rs
index 99cb5fc5aa1..df5f29e35fe 100644
--- a/tests/ui-fulldeps/mod_dir_path_canonicalized.rs
+++ b/tests/ui-fulldeps/mod_dir_path_canonicalized.rs
@@ -16,7 +16,7 @@ extern crate rustc_span;
 #[allow(unused_extern_crates)]
 extern crate rustc_driver;
 
-use rustc_parse::{new_parser_from_file, unwrap_or_emit_fatal};
+use rustc_parse::{lexer::StripTokens, new_parser_from_file, unwrap_or_emit_fatal};
 use rustc_session::parse::ParseSess;
 use std::path::Path;
 
@@ -34,6 +34,11 @@ fn parse() {
 
     let path = Path::new(file!());
     let path = path.canonicalize().unwrap();
-    let mut parser = unwrap_or_emit_fatal(new_parser_from_file(&psess, &path, None));
+    let mut parser = unwrap_or_emit_fatal(new_parser_from_file(
+        &psess,
+        &path,
+        StripTokens::ShebangAndFrontmatter,
+        None,
+    ));
     let _ = parser.parse_crate_mod();
 }