Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update test suite to nightly-2024-04-18 #1633

Merged
merged 4 commits into from Apr 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
94 changes: 93 additions & 1 deletion tests/repo/mod.rs
Expand Up @@ -13,12 +13,13 @@ use std::path::{Path, PathBuf};
use tar::Archive;
use walkdir::{DirEntry, WalkDir};

const REVISION: &str = "b10cfcd65fd7f7b1ab9beb34798b2108de003452";
const REVISION: &str = "becebb3158149a115cad8a402612e25436a7e37b";

#[rustfmt::skip]
static EXCLUDE_FILES: &[&str] = &[
// TODO: explicit tail calls: `become _g()`
// https://github.com/dtolnay/syn/issues/1501
"src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0209_become_expr.rs",
"tests/ui/explicit-tail-calls/return-lifetime-sub.rs",

// TODO: non-lifetime binders: `where for<'a, T> &'a Struct<T>: Trait`
Expand All @@ -35,6 +36,7 @@ static EXCLUDE_FILES: &[&str] = &[
// https://github.com/dtolnay/syn/issues/1434
"src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0208_associated_return_type_bounds.rs",
"tests/ui/associated-type-bounds/return-type-notation/basic.rs",
"tests/ui/associated-type-bounds/return-type-notation/unpretty-parenthesized.rs",
"tests/ui/feature-gates/feature-gate-return_type_notation.rs",

// TODO: lazy type alias syntax with where-clause in trailing position
Expand All @@ -44,13 +46,92 @@ static EXCLUDE_FILES: &[&str] = &[
// TODO: gen blocks and functions
// https://github.com/dtolnay/syn/issues/1526
"compiler/rustc_codegen_cranelift/example/gen_block_iterate.rs",
"tests/ui/coroutine/async-gen-deduce-yield.rs",
"tests/ui/coroutine/async-gen-yield-ty-is-unit.rs",
"tests/ui/coroutine/async_gen_fn_iter.rs",
"tests/ui/coroutine/gen_block_is_fused_iter.rs",
"tests/ui/coroutine/gen_block_is_iter.rs",
"tests/ui/coroutine/gen_block_iterate.rs",
"tests/ui/coroutine/gen_fn_iter.rs",
"tests/ui/coroutine/gen_fn_lifetime_capture.rs",
"tests/ui/coroutine/return-types-diverge.rs",
"tests/ui/higher-ranked/builtin-closure-like-bounds.rs",
"tests/ui/sanitizer/cfi-coroutine.rs",

// TODO: struct literal in match guard
// https://github.com/dtolnay/syn/issues/1527
"tests/ui/parser/struct-literal-in-match-guard.rs",

// TODO: `!` as a pattern
// https://github.com/dtolnay/syn/issues/1546
"tests/ui/rfcs/rfc-0000-never_patterns/diverges.rs",

// TODO: async trait bounds: `impl async Fn()`
// https://github.com/dtolnay/syn/issues/1628
"src/tools/miri/tests/pass/async-closure-captures.rs",
"src/tools/miri/tests/pass/async-closure-drop.rs",
"src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0211_async_trait_bound.rs",
"src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0212_const_trait_bound.rs",
"src/tools/rustfmt/tests/target/asyncness.rs",
"tests/codegen/async-closure-debug.rs",
"tests/ui/async-await/async-closures/async-fn-mut-for-async-fn.rs",
"tests/ui/async-await/async-closures/async-fn-once-for-async-fn.rs",
"tests/ui/async-await/async-closures/auxiliary/foreign.rs",
"tests/ui/async-await/async-closures/brand.rs",
"tests/ui/async-await/async-closures/captures.rs",
"tests/ui/async-await/async-closures/constrained-but-no-upvars-yet.rs",
"tests/ui/async-await/async-closures/drop.rs",
"tests/ui/async-await/async-closures/mangle.rs",
"tests/ui/async-await/async-closures/moro-example.rs",
"tests/ui/async-await/async-closures/move-is-async-fn.rs",
"tests/ui/async-await/async-closures/mut-ref-reborrow.rs",
"tests/ui/async-await/async-closures/no-borrow-from-env.rs",
"tests/ui/async-await/async-closures/overlapping-projs.rs",
"tests/ui/async-await/async-closures/precise-captures.rs",
"tests/ui/async-await/async-closures/refd.rs",
"tests/ui/async-await/async-closures/signature-deduction.rs",
"tests/ui/async-await/async-fn/edition-2015-not-async-bound.rs",
"tests/ui/async-await/async-fn/higher-ranked-async-fn.rs",
"tests/ui/async-await/async-fn/impl-trait.rs",
"tests/ui/async-await/async-fn/project.rs",
"tests/ui/async-await/async-fn/sugar.rs",

// TODO: mutable by-reference bindings (mut ref)
// https://github.com/dtolnay/syn/issues/1629
"src/tools/rustfmt/tests/source/mut_ref.rs",
"src/tools/rustfmt/tests/target/mut_ref.rs",
"tests/ui/mut/mut-ref.rs",

// TODO: postfix match
// https://github.com/dtolnay/syn/issues/1630
"src/tools/rustfmt/tests/source/postfix-match/pf-match.rs",
"src/tools/rustfmt/tests/target/postfix-match/pf-match.rs",
"tests/pretty/postfix-match.rs",
"tests/ui/match/postfix-match/no-unused-parens.rs",
"tests/ui/match/postfix-match/pf-match-chain.rs",
"tests/ui/match/postfix-match/postfix-match.rs",

// TODO: delegation
// https://github.com/dtolnay/syn/issues/1580
"tests/pretty/delegation.rs",
"tests/ui/delegation/explicit-paths-in-traits-pass.rs",
"tests/ui/delegation/explicit-paths-pass.rs",
"tests/ui/delegation/explicit-paths-signature-pass.rs",
"tests/ui/delegation/parse.rs",

// TODO: for await
// https://github.com/dtolnay/syn/issues/1631
"tests/ui/async-await/for-await-2015.rs",
"tests/ui/async-await/for-await-passthrough.rs",
"tests/ui/async-await/for-await.rs",

// TODO: const trait bound: `T: const Trait`
// https://github.com/dtolnay/syn/issues/1632
"tests/ui/generic-const-items/const-trait-impl.rs",
"tests/ui/rfcs/rfc-2632-const-trait-impl/const-fns-are-early-bound.rs",
"tests/ui/rfcs/rfc-2632-const-trait-impl/const-trait-bounds.rs",
"tests/ui/rfcs/rfc-2632-const-trait-impl/effects/minicore.rs",

// Compile-fail expr parameter in const generic position: f::<1 + 2>()
"tests/ui/const-generics/early/closing-args-token.rs",
"tests/ui/const-generics/early/const-expression-parameter.rs",
Expand All @@ -63,13 +144,17 @@ static EXCLUDE_FILES: &[&str] = &[

// Negative polarity trait bound: `where T: !Copy`
"src/tools/rustfmt/tests/target/negative-bounds.rs",
"tests/ui/traits/negative-bounds/supertrait.rs",

// Lifetime bound inside for<>: `T: ~const ?for<'a: 'b> Trait<'a>`
"tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-syntax.rs",

// Const impl that is not a trait impl: `impl ~const T {}`
"tests/ui/rfcs/rfc-2632-const-trait-impl/syntax.rs",

// Lifetimes and types out of order in angle bracketed path arguments
"tests/ui/parser/constraints-before-generic-args-syntactic-pass.rs",

// Deprecated anonymous parameter syntax in traits
"src/tools/rustfmt/tests/source/trait.rs",
"src/tools/rustfmt/tests/target/trait.rs",
Expand Down Expand Up @@ -146,6 +231,8 @@ static EXCLUDE_FILES: &[&str] = &[

// Placeholder syntax for "throw expressions"
"compiler/rustc_errors/src/translation.rs",
"compiler/rustc_expand/src/module.rs",
"compiler/rustc_infer/src/infer/error_reporting/need_type_info.rs",
"src/tools/clippy/tests/ui/needless_return.rs",
"src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0204_yeet_expr.rs",
"tests/pretty/yeet-expr.rs",
Expand Down Expand Up @@ -181,6 +268,8 @@ static EXCLUDE_FILES: &[&str] = &[
"src/tools/rustfmt/tests/coverage/target/comments.rs",
"src/tools/rustfmt/tests/parser/issue-4126/invalid.rs",
"src/tools/rustfmt/tests/parser/issue_4418.rs",
"src/tools/rustfmt/tests/parser/stashed-diag.rs",
"src/tools/rustfmt/tests/parser/stashed-diag2.rs",
"src/tools/rustfmt/tests/parser/unclosed-delims/issue_4466.rs",
"src/tools/rustfmt/tests/source/configs/disable_all_formatting/true.rs",
"src/tools/rustfmt/tests/source/configs/spaces_around_ranges/false.rs",
Expand Down Expand Up @@ -219,6 +308,9 @@ static EXCLUDE_DIRS: &[&str] = &[
// Inputs that used to crash rust-analyzer, but aren't necessarily supposed to parse
"src/tools/rust-analyzer/crates/syntax/test_data/parser/fuzz-failures",
"src/tools/rust-analyzer/crates/syntax/test_data/reparse/fuzz-failures",

// Inputs that crash rustc, making no claim about whether they are valid Rust
"tests/crashes",
];

// Directories in which a .stderr implies the corresponding .rs is not expected
Expand Down