Commit Graph

359 Commits

Author SHA1 Message Date
David Tolnay 2f093b5fbc
GitHub Workflows security hardening 2022-09-02 15:09:32 -07:00
David Tolnay 63420ea04e
Merge pull request #183 from dtolnay/deprecated
Re-enable deprecated variants test.
2022-08-30 19:23:17 -07:00
David Tolnay 8adf113f0a
Revert "Delete broken #[deprecated] test"
This reverts commit 8862629bcc.
2022-08-30 19:14:00 -07:00
David Tolnay fdb266af29
Release 1.0.33 2022-08-30 19:12:58 -07:00
David Tolnay 905680eee0
Merge pull request #182 from dtolnay/provider
Expose backtrace via generic member access
2022-08-30 19:12:36 -07:00
David Tolnay e11c97babf
Update backtrace test to provider API 2022-08-30 19:08:59 -07:00
David Tolnay 986e106172
Revert "Disable nightly backtrace testing until converted to provider API"
This reverts commit c1fb583043.
2022-08-30 19:04:12 -07:00
David Tolnay 985da4c7d9
Expose backtrace via generic member access 2022-08-30 19:04:12 -07:00
David Tolnay 034c6ecf10
Update ui test suite to nightly-2022-08-24 2022-08-24 02:15:12 -07:00
David Tolnay c81dc6731b
Make private module more clearly private 2022-08-12 21:53:47 -07:00
David Tolnay 1442e27eaf
Remove stabilized feature(backtrace) from ui test 2022-08-10 21:18:11 -07:00
David Tolnay 0ac645e896
Update ui test suite to nightly-2022-08-11 2022-08-10 21:17:07 -07:00
David Tolnay 8cb98afb74
Release 1.0.32 2022-08-02 20:47:05 -07:00
David Tolnay c1fb583043
Disable nightly backtrace testing until converted to provider API 2022-08-02 20:46:44 -07:00
David Tolnay 8b23fbb895
Update keywords in crates.io metadata 2022-08-02 10:38:57 -07:00
David Tolnay c79f5c9be5
Sort package entries in Cargo.toml 2022-07-31 19:19:06 -07:00
David Tolnay 24db929a56
Update ui test suite to nightly-2022-07-10 2022-07-09 19:50:13 -07:00
David Tolnay f09771ebba
Ignore manual_find clippy lint
error: manual implementation of `Iterator::find`
      --> impl/src/prop.rs:76:5
       |
    76 | /     for field in fields {
    77 | |         if field.attrs.from.is_some() {
    78 | |             return Some(field);
    79 | |         }
    80 | |     }
    81 | |     None
       | |________^ help: replace with an iterator: `fields.iter().find(|&field| field.attrs.from.is_some())`
       |
       = note: `-D clippy::manual-find` implied by `-D clippy::all`
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_find

    error: manual implementation of `Iterator::find`
       --> impl/src/prop.rs:105:5
        |
    105 | /     for field in fields {
    106 | |         if field.is_backtrace() {
    107 | |             return Some(field);
    108 | |         }
    109 | |     }
    110 | |     None
        | |________^ help: replace with an iterator: `fields.iter().find(|&field| field.is_backtrace())`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_find
2022-07-01 19:32:32 -07:00
David Tolnay b338fe6ac1
Update ui test suite to nightly-2022-07-02 2022-07-01 19:30:59 -07:00
David Tolnay d2f761f0ea
Use dtolnay/rust-toolchain's miri toolchain
This defaults to components miri + rust-src.
2022-06-29 10:55:40 -07:00
David Tolnay e82ff362db
Update ui test suite to nightly-2022-06-26 2022-06-25 22:55:12 -07:00
David Tolnay 799b3d33c4
Use upstreamed docs.rs icon in docs.rs badge 2022-06-11 10:16:01 -07:00
David Tolnay 829ed494ef
Check all crates in workspace for outdated deps 2022-06-06 14:39:25 -07:00
David Tolnay 305b57af1c
Match components in CI to rust-toolchain.toml file 2022-05-06 20:52:53 -07:00
David Tolnay 6195232e2a
Run miri in stricter miri-strict-provenance mode 2022-05-06 04:01:35 -07:00
David Tolnay d5fa92940b
Ignore type_repetition_in_bounds/trait_duplication_in_bounds clippy false positive
https://github.com/rust-lang/rust-clippy/issues/8771

    error: this type has already been used as a bound predicate
      --> impl/src/generics.rs:60:61
       |
    60 |     pub fn insert(&mut self, ty: impl ToTokens, bound: impl ToTokens) {
       |                                                             ^^^^^^^^
       |
       = note: `-D clippy::type-repetition-in-bounds` implied by `-D clippy::pedantic`
       = help: consider combining the bounds: `impl ToTokens: ToTokens + ToTokens`
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_repetition_in_bounds

    error: this trait bound is already specified in the where clause
      --> impl/src/generics.rs:60:39
       |
    60 |     pub fn insert(&mut self, ty: impl ToTokens, bound: impl ToTokens) {
       |                                       ^^^^^^^^
       |
       = note: `-D clippy::trait-duplication-in-bounds` implied by `-D clippy::pedantic`
       = help: consider removing this trait bound
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trait_duplication_in_bounds
2022-04-30 20:26:10 -07:00
David Tolnay cbe8212495
Release 1.0.31 2022-04-30 14:23:31 -07:00
David Tolnay 2a29fda086
Add a miri test job in CI 2022-04-28 20:39:41 -07:00
David Tolnay 244edc83d5
Update workflows to actions/checkout@v3 2022-04-24 19:04:04 -07:00
David Tolnay dd9206cfd0
Remove clippy deny attributes from test suite
These were superseded by the clippy invocation made in our CI workflow:

    run: cargo clippy --tests -- -Dclippy::all -Dclippy::pedantic
2022-04-24 15:22:58 -07:00
David Tolnay 625d349ffb
Disable ui test on miri 2022-04-24 15:20:06 -07:00
David Tolnay 21c26903e2
Ignore wrong_self_convention clippy lint
error: methods called `from_*` usually take no `self`
     --> impl/src/prop.rs:5:30
      |
    5 |     pub(crate) fn from_field(&self) -> Option<&Field> {
      |                              ^^^^^
      |
      = note: `-D clippy::wrong-self-convention` implied by `-D clippy::all`
      = help: consider choosing a less ambiguous name
      = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention

    error: methods called `from_*` usually take no `self`
      --> impl/src/prop.rs:51:30
       |
    51 |     pub(crate) fn from_field(&self) -> Option<&Field> {
       |                              ^^^^^
       |
       = help: consider choosing a less ambiguous name
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention
2022-01-14 19:27:43 -08:00
David Tolnay 91333fa18a
Include global rustflags in rustflags override 2022-01-01 00:26:29 -08:00
David Tolnay d2e2ad151c
Detect warnings in CI 2022-01-01 00:07:36 -08:00
David Tolnay 320d70f691
Merge pull request #164 from dtolnay/frombacktrace
Fix miscounting fields when from and backtrace are same field
2021-12-18 11:48:58 -08:00
David Tolnay c4d7c2b135
Fix miscounting fields when from and backtrace are same field 2021-12-18 11:41:17 -08:00
David Tolnay 8602ca3dd2
Add ui test reproducing issue 163 2021-12-18 11:36:51 -08:00
David Tolnay 7966eb3e12
Ignore return_self_not_must_use clippy lint
error: missing `#[must_use]` attribute on a method returning `Self`
     --> src/display.rs:5:5
      |
    5 |     fn as_display(&self) -> Self;
      |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      |
      = note: `-D clippy::return-self-not-must-use` implied by `-D clippy::all`
      = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#return_self_not_must_use
2021-12-17 18:17:43 -08:00
David Tolnay 604e47ccbd
Ignore needless_late_init Clippy lint in test
error: unneeded late initalization
      --> tests/test_generics.rs:90:5
       |
    90 |     let mut instance: EnumCompound<DisplayOnly, DebugOnly, NoFormat>;
       |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init
    help: declare `instance` here
       |
    92 |     let mut instance: EnumCompound<DisplayOnly, DebugOnly, NoFormat> = EnumCompound::DisplayDebug(DisplayOnly, DebugOnly);
       |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2021-12-07 18:36:06 -08:00
David Tolnay 5a03b0a56b
Ignore iter_cloned_collect Clippy lint in test
error: called `iter().copied().collect()` on a slice to create a `Vec`. Calling `to_vec()` is both faster and more readable
      --> tests/test_expr.rs:18:30
       |
    18 |     #[error("#error {}", (.0).iter().copied().collect::<Vec<_>>().join(" "))]
       |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `.to_vec()`
2021-12-07 18:35:29 -08:00
David Tolnay d7664d5475
Ignore cast_lossless Clippy pedantic lint
error: casting `bool` to `usize` is more cleanly stated with `usize::from(_)`
       --> impl/src/valid.rs:183:31
        |
    183 |         if fields.len() > 1 + has_backtrace as usize {
        |                               ^^^^^^^^^^^^^^^^^^^^^^ help: try: `usize::from(has_backtrace)`
        |
        = note: `-D clippy::cast-lossless` implied by `-D clippy::pedantic`
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless
2021-12-07 18:32:37 -08:00
David Tolnay 48bbdff4a4
Update minimum compiler for tests to 1.38 2021-11-19 19:13:11 -08:00
David Tolnay e86c024cdf
Install newest build of cargo-outdated
The old version available by default in the GitHub Actions image fails
with:

    thread 'main' panicked at 'package cache lock is not currently held, Cargo forgot to call `acquire_package_cache_lock` before we got to this stack frame', /usr/share/rust/.cargo/registry/src/github.com-1ecc6299db9ec823/cargo-0.57.0/src/cargo/util/config/mod.rs:1542:9
    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
2021-11-17 13:31:13 -08:00
David Tolnay b743d8f4ee
Update ui test suite to nightly-2021-10-17 2021-10-16 19:20:11 -07:00
David Tolnay 672e9525bb
Release 1.0.30 2021-10-09 01:53:11 +01:00
David Tolnay 5c62f5ed44
Merge pull request #155 from cosmicexplorer/derive-unwindsafe
add UnwindSafe impl for AsDynError
2021-10-08 20:52:48 -04:00
Danny McClanahan 2fd08ccb50
add UnwindSafe impl for AsDynError 2021-10-08 13:27:21 -04:00
David Tolnay 00956f1f8c
Ui test changes for trybuild 1.0.49 2021-10-08 03:02:01 -04:00
David Tolnay 035abbd652
Add actions job to notice outdated dependencies 2021-10-08 01:47:26 -04:00
David Tolnay f072c626ef
Update ui test files 2021-10-07 00:32:11 -04:00