Skip to content

Commit 436eb22

Browse files
committed
Update test suite to nightly-2021-07-09
1 parent 1296bac commit 436eb22

File tree

5 files changed

+8
-4
lines changed

5 files changed

+8
-4
lines changed

benches/file.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ use std::fs;
1919
use std::str::FromStr;
2020
use test::Bencher;
2121

22-
const FILE: &str = "tests/rust/src/libcore/str/mod.rs";
22+
const FILE: &str = "tests/rust/library/core/src/str/mod.rs";
2323

2424
#[bench]
2525
fn parse_file(b: &mut Bencher) {

benches/rust.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ mod librustc_parse {
5858
}
5959
}
6060

61-
rustc_span::with_session_globals(Edition::Edition2018, || {
61+
rustc_span::create_session_if_not_set_then(Edition::Edition2018, |_| {
6262
let cm = Lrc::new(SourceMap::new(FilePathMapping::empty()));
6363
let emitter = Box::new(SilentEmitter);
6464
let handler = Handler::with_emitter(false, None, emitter);

tests/repo/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ static EXCLUDE: &[&str] = &[
2626
"src/test/ui/issues/issue-34074.rs",
2727
"src/test/ui/proc-macro/trait-fn-args-2015.rs",
2828

29+
// Excessive nesting
30+
"src/test/ui/issues/issue-74564-if-expr-stack-overflow.rs",
31+
2932
// Not actually test cases
3033
"src/test/rustdoc-ui/test-compile-fail2.rs",
3134
"src/test/rustdoc-ui/test-compile-fail3.rs",

tests/test_precedence.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ fn test_expressions(edition: Edition, exprs: Vec<syn::Expr>) -> (usize, usize) {
151151
let mut passed = 0;
152152
let mut failed = 0;
153153

154-
rustc_span::with_session_globals(edition, || {
154+
rustc_span::create_session_if_not_set_then(edition, |_| {
155155
for expr in exprs {
156156
let raw = quote!(#expr).to_string();
157157

@@ -246,6 +246,7 @@ fn librustc_brackets(mut librustc_expr: P<ast::Expr>) -> Option<P<ast::Expr>> {
246246
fields,
247247
rest,
248248
} = expr.deref_mut();
249+
vis.visit_qself(qself);
249250
vis.visit_path(path);
250251
fields.flat_map_in_place(|field| flat_map_field(field, vis));
251252
if let StructRest::Base(rest) = rest {

tests/test_round_trip.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ fn test(path: &Path, failed: &AtomicUsize, abort_after: usize) {
8585
let back = quote!(#krate).to_string();
8686
let edition = repo::edition(path).parse().unwrap();
8787

88-
rustc_span::with_session_globals(edition, || {
88+
rustc_span::create_session_if_not_set_then(edition, |_| {
8989
let equal = match panic::catch_unwind(|| {
9090
let sess = ParseSess::new(FilePathMapping::empty());
9191
let before = match librustc_parse(content, &sess) {

0 commit comments

Comments
 (0)