diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 8c3aa92..48fadac 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -38,7 +38,7 @@ jobs: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@v1 with: - toolchain: 1.74.0 + toolchain: 1.78.0 components: rust-src - run: cargo test --release - run: cargo install cargo-expand diff --git a/Cargo.toml b/Cargo.toml index f2d2c6b..6eee26a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,7 +17,7 @@ repository = "https://github.com/regexident/tryexpand" license = "MIT OR Apache-2.0" readme = "README.md" edition = "2021" -rust-version = "1.74" +rust-version = "1.78" version = "0.9.2" [dependencies] diff --git a/src/test_suite.rs b/src/test_suite.rs index 639a029..647a394 100644 --- a/src/test_suite.rs +++ b/src/test_suite.rs @@ -223,7 +223,7 @@ impl TestSuite { .packages .iter() .find(|package| package.name == crate_name) - .ok_or_else(|| Error::CargoPackageNotFound)?; + .ok_or(Error::CargoPackageNotFound)?; let target_dir = env::var("CARGO_TARGET_DIR") .map(PathBuf::from) diff --git a/tests/macro-tests/tests/expand/fail/non_existent_attr_macro.err.txt b/tests/macro-tests/tests/expand/fail/non_existent_attr_macro.err.txt index cfb2b67..086c8a7 100644 --- a/tests/macro-tests/tests/expand/fail/non_existent_attr_macro.err.txt +++ b/tests/macro-tests/tests/expand/fail/non_existent_attr_macro.err.txt @@ -3,3 +3,4 @@ error: cannot find attribute `non_existent_macro` in this scope | 1 | #[non_existent_macro] | ^^^^^^^^^^^^^^^^^^ +error: could not compile `` (bin "") due to 1 previous error diff --git a/tests/macro-tests/tests/expand/fail/non_existent_derive_macro.err.txt b/tests/macro-tests/tests/expand/fail/non_existent_derive_macro.err.txt index 1a0ec1d..243538f 100644 --- a/tests/macro-tests/tests/expand/fail/non_existent_derive_macro.err.txt +++ b/tests/macro-tests/tests/expand/fail/non_existent_derive_macro.err.txt @@ -3,3 +3,4 @@ error: cannot find derive macro `NonExistentMacro` in this scope | 1 | #[derive(NonExistentMacro)] | ^^^^^^^^^^^^^^^^ +error: could not compile `` (bin "") due to 1 previous error diff --git a/tests/macro-tests/tests/expand/fail/non_existent_macro.err.txt b/tests/macro-tests/tests/expand/fail/non_existent_macro.err.txt index c9e10bf..3e7f17e 100644 --- a/tests/macro-tests/tests/expand/fail/non_existent_macro.err.txt +++ b/tests/macro-tests/tests/expand/fail/non_existent_macro.err.txt @@ -3,3 +3,4 @@ error: cannot find macro `non_existent_macro` in this scope | 2 | non_existent_macro!(); | ^^^^^^^^^^^^^^^^^^ +error: could not compile `` (bin "") due to 1 previous error diff --git a/tests/other-tests/tests/and_check/fail/invalid_macro_output.err.txt b/tests/other-tests/tests/and_check/fail/invalid_macro_output.err.txt index 4a2992a..931e153 100644 --- a/tests/other-tests/tests/and_check/fail/invalid_macro_output.err.txt +++ b/tests/other-tests/tests/and_check/fail/invalid_macro_output.err.txt @@ -21,3 +21,4 @@ error[E0277]: cannot add `&str` to `{integer}` = note: this error originates in the macro `produce_invalid_code` (in Nightly builds, run with -Z macro-backtrace for more info) For more information about this error, try `rustc --explain E0277`. +error: could not compile `` (bin "") due to 1 previous error diff --git a/tests/other-tests/tests/and_run_tests/fail/failing_test.out.txt b/tests/other-tests/tests/and_run_tests/fail/failing_test.out.txt index 2299859..345549c 100644 --- a/tests/other-tests/tests/and_run_tests/fail/failing_test.out.txt +++ b/tests/other-tests/tests/and_run_tests/fail/failing_test.out.txt @@ -1,5 +1,6 @@ running 1 test -F +failing_test --- FAILED + failures: ---- failing_test stdout ---- diff --git a/tests/other-tests/tests/and_run_tests/fail/invalid_test_body.err.txt b/tests/other-tests/tests/and_run_tests/fail/invalid_test_body.err.txt index 709b033..6b18c05 100644 --- a/tests/other-tests/tests/and_run_tests/fail/invalid_test_body.err.txt +++ b/tests/other-tests/tests/and_run_tests/fail/invalid_test_body.err.txt @@ -5,4 +5,4 @@ error[E0425]: cannot find value `asdf` in this scope | ^^^^ not found in this scope For more information about this error, try `rustc --explain E0425`. -error: could not compile `` (bin "" test) due to previous error +error: could not compile `` (bin "" test) due to 1 previous error diff --git a/tests/other-tests/tests/check/fail/invalid_macro_output.err.txt b/tests/other-tests/tests/check/fail/invalid_macro_output.err.txt index aad9544..e53410d 100644 --- a/tests/other-tests/tests/check/fail/invalid_macro_output.err.txt +++ b/tests/other-tests/tests/check/fail/invalid_macro_output.err.txt @@ -21,3 +21,4 @@ error[E0277]: cannot add `&str` to `{integer}` = note: this error originates in the macro `produce_invalid_code` (in Nightly builds, run with -Z macro-backtrace for more info) For more information about this error, try `rustc --explain E0277`. +error: could not compile `` (bin "") due to 1 previous error diff --git a/tests/other-tests/tests/envs/fail/env_var.err.txt b/tests/other-tests/tests/envs/fail/env_var.err.txt index c225836..e35bd7b 100644 --- a/tests/other-tests/tests/envs/fail/env_var.err.txt +++ b/tests/other-tests/tests/envs/fail/env_var.err.txt @@ -5,3 +5,4 @@ error: env var required | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: this error originates in the macro `env` (in Nightly builds, run with -Z macro-backtrace for more info) +error: could not compile `` (bin "") due to 1 previous error diff --git a/tests/other-tests/tests/expand/fail/invalid_dependency.err.txt b/tests/other-tests/tests/expand/fail/invalid_dependency.err.txt index 3b141a8..5d67821 100644 --- a/tests/other-tests/tests/expand/fail/invalid_dependency.err.txt +++ b/tests/other-tests/tests/expand/fail/invalid_dependency.err.txt @@ -4,3 +4,4 @@ error[E0432]: unresolved import `http` 5 | use http::Request; | ^^^^ use of undeclared crate or module `http` For more information about this error, try `rustc --explain E0432`. +error: could not compile `` (bin "") due to 1 previous error diff --git a/tests/other-tests/tests/expand/fail/invalid_syntax.err.txt b/tests/other-tests/tests/expand/fail/invalid_syntax.err.txt index b305ca6..d69c87c 100644 --- a/tests/other-tests/tests/expand/fail/invalid_syntax.err.txt +++ b/tests/other-tests/tests/expand/fail/invalid_syntax.err.txt @@ -3,3 +3,4 @@ error: expected one of `!` or `::`, found `ipsum` | 1 | lorem ipsum dolor sit amet. | ^^^^^ expected one of `!` or `::` +error: could not compile `` (bin "") due to 1 previous error diff --git a/tests/other-tests/tests/expand/fail/unknown_fn.err.txt b/tests/other-tests/tests/expand/fail/unknown_fn.err.txt index 974ce49..03558ba 100644 --- a/tests/other-tests/tests/expand/fail/unknown_fn.err.txt +++ b/tests/other-tests/tests/expand/fail/unknown_fn.err.txt @@ -4,3 +4,4 @@ error[E0425]: cannot find function `non_existent_fn` in this scope 2 | non_existent_fn(); | ^^^^^^^^^^^^^^^ not found in this scope For more information about this error, try `rustc --explain E0425`. +error: could not compile `` (bin "") due to 1 previous error diff --git a/tests/other-tests/tests/expand/fail/unknown_macro.err.txt b/tests/other-tests/tests/expand/fail/unknown_macro.err.txt index 071eee9..4fe4868 100644 --- a/tests/other-tests/tests/expand/fail/unknown_macro.err.txt +++ b/tests/other-tests/tests/expand/fail/unknown_macro.err.txt @@ -3,3 +3,4 @@ error: cannot find macro `non_existent_macro` in this scope | 2 | non_existent_macro!(); | ^^^^^^^^^^^^^^^^^^ +error: could not compile `` (bin "") due to 1 previous error diff --git a/tests/other-tests/tests/expand/fail/unresolved_import.err.txt b/tests/other-tests/tests/expand/fail/unresolved_import.err.txt index bc9b9ed..dd7ee1e 100644 --- a/tests/other-tests/tests/expand/fail/unresolved_import.err.txt +++ b/tests/other-tests/tests/expand/fail/unresolved_import.err.txt @@ -4,3 +4,4 @@ error[E0432]: unresolved import `non_existent_crate` 1 | use non_existent_crate; | ^^^^^^^^^^^^^^^^^^ no external crate `non_existent_crate` For more information about this error, try `rustc --explain E0432`. +error: could not compile `` (bin "") due to 1 previous error diff --git a/tests/other-tests/tests/run_tests/fail/failing_test.out.txt b/tests/other-tests/tests/run_tests/fail/failing_test.out.txt index cd0c46d..766da26 100644 --- a/tests/other-tests/tests/run_tests/fail/failing_test.out.txt +++ b/tests/other-tests/tests/run_tests/fail/failing_test.out.txt @@ -1,5 +1,6 @@ running 1 test -F +failing_test --- FAILED + failures: ---- failing_test stdout ---- diff --git a/tests/other-tests/tests/run_tests/fail/invalid_test_body.err.txt b/tests/other-tests/tests/run_tests/fail/invalid_test_body.err.txt index b199e49..4c30cc7 100644 --- a/tests/other-tests/tests/run_tests/fail/invalid_test_body.err.txt +++ b/tests/other-tests/tests/run_tests/fail/invalid_test_body.err.txt @@ -5,4 +5,4 @@ error[E0425]: cannot find value `asdf` in this scope | ^^^^ not found in this scope For more information about this error, try `rustc --explain E0425`. -error: could not compile `` (bin "" test) due to previous error +error: could not compile `` (bin "" test) due to 1 previous error diff --git a/tests/proc-macro-tests/tests/expand/fail/panicking_attribute_macro.err.txt b/tests/proc-macro-tests/tests/expand/fail/panicking_attribute_macro.err.txt index 0dfb397..e9fb4e8 100644 --- a/tests/proc-macro-tests/tests/expand/fail/panicking_attribute_macro.err.txt +++ b/tests/proc-macro-tests/tests/expand/fail/panicking_attribute_macro.err.txt @@ -5,3 +5,4 @@ error: custom attribute panicked | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: message: test +error: could not compile `` (bin "") due to 1 previous error diff --git a/tests/proc-macro-tests/tests/expand/fail/panicking_derive_macro.err.txt b/tests/proc-macro-tests/tests/expand/fail/panicking_derive_macro.err.txt index 6c377b7..01085be 100644 --- a/tests/proc-macro-tests/tests/expand/fail/panicking_derive_macro.err.txt +++ b/tests/proc-macro-tests/tests/expand/fail/panicking_derive_macro.err.txt @@ -5,3 +5,4 @@ error: proc-macro derive panicked | ^^^^^^^^^^^^^^ | = help: message: test +error: could not compile `` (bin "") due to 1 previous error diff --git a/tests/proc-macro-tests/tests/expand/fail/panicking_macro.err.txt b/tests/proc-macro-tests/tests/expand/fail/panicking_macro.err.txt index 98d4082..eaf7ae5 100644 --- a/tests/proc-macro-tests/tests/expand/fail/panicking_macro.err.txt +++ b/tests/proc-macro-tests/tests/expand/fail/panicking_macro.err.txt @@ -5,3 +5,4 @@ error: proc macro panicked | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: message: test +error: could not compile `` (bin "") due to 1 previous error