diff options
author | Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> | 2023-05-27 00:57:43 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2023-05-27 00:57:43 +0000 |
commit | a38a6fcce1844b447f70a2879b3dfc67e1fcf53d (patch) | |
tree | ccdc6afe4e640374c52c48e0deb8081616d1f538 | |
parent | 9f7cfa54785da7e0b3bd8256147b7e11ddacf551 (diff) | |
parent | 34b93378f7eb8dd2141103ba124fadc3dd33dd47 (diff) | |
download | thiserror-a38a6fcce1844b447f70a2879b3dfc67e1fcf53d.tar.gz |
Merge "Upgrade thiserror to 1.0.40" am: 82a1b41a70 am: 25b8420904 am: be598c911b am: 34b93378f7
Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/thiserror/+/2520400
Change-Id: I184e23ea117fd2048ed28f375ed794ab8495941f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r-- | .cargo_vcs_info.json | 2 | ||||
-rw-r--r-- | .clippy.toml | 2 | ||||
-rw-r--r-- | .github/workflows/ci.yml | 32 | ||||
-rw-r--r-- | Android.bp | 2 | ||||
-rw-r--r-- | Cargo.toml | 6 | ||||
-rw-r--r-- | Cargo.toml.orig | 6 | ||||
-rw-r--r-- | LICENSE-APACHE | 25 | ||||
-rw-r--r-- | METADATA | 10 | ||||
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | src/lib.rs | 1 | ||||
-rw-r--r-- | tests/test_from.rs | 2 |
11 files changed, 33 insertions, 57 deletions
diff --git a/.cargo_vcs_info.json b/.cargo_vcs_info.json index 302d141..06b904a 100644 --- a/.cargo_vcs_info.json +++ b/.cargo_vcs_info.json @@ -1,6 +1,6 @@ { "git": { - "sha1": "74bfe75eb25ba9d39b0ae5b570d611855cbc5086" + "sha1": "3cec8c487953298acd00c61ef9a81d0461517974" }, "path_in_vcs": "" }
\ No newline at end of file diff --git a/.clippy.toml b/.clippy.toml index 3d30690..0d369b5 100644 --- a/.clippy.toml +++ b/.clippy.toml @@ -1 +1 @@ -msrv = "1.31.0" +msrv = "1.56.0" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e1db2ed..2c00fde 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,6 +3,7 @@ name: CI on: push: pull_request: + workflow_dispatch: schedule: [cron: "40 1 * * *"] permissions: @@ -12,16 +13,18 @@ env: RUSTFLAGS: -Dwarnings jobs: + pre_ci: + uses: dtolnay/.github/.github/workflows/pre_ci.yml@master + test: name: Rust ${{matrix.rust}} + needs: pre_ci + if: needs.pre_ci.outputs.continue runs-on: ubuntu-latest strategy: fail-fast: false matrix: - rust: [beta, stable, 1.56.0] - include: - - rust: nightly - rustflags: --cfg thiserror_nightly_testing + rust: [nightly, beta, stable, 1.56.0] timeout-minutes: 45 steps: - uses: actions/checkout@v3 @@ -29,20 +32,13 @@ jobs: with: toolchain: ${{matrix.rust}} components: rust-src + - name: Enable type layout randomization + run: echo RUSTFLAGS=${RUSTFLAGS}\ -Zrandomize-layout >> $GITHUB_ENV + if: matrix.rust == 'nightly' + - name: Enable nightly-only tests + run: echo RUSTFLAGS=${RUSTFLAGS}\ --cfg=thiserror_nightly_testing >> $GITHUB_ENV + if: matrix.rust == 'nightly' - run: cargo test --all - env: - RUSTFLAGS: ${{matrix.rustflags}} ${{env.RUSTFLAGS}} - - msrv: - name: Rust 1.31.0 - runs-on: ubuntu-latest - timeout-minutes: 45 - steps: - - uses: actions/checkout@v3 - - uses: dtolnay/rust-toolchain@1.31.0 - with: - components: rust-src - - run: cargo check clippy: name: Clippy @@ -58,6 +54,8 @@ jobs: miri: name: Miri + needs: pre_ci + if: needs.pre_ci.outputs.continue runs-on: ubuntu-latest timeout-minutes: 45 steps: @@ -42,7 +42,7 @@ rust_library { host_supported: true, crate_name: "thiserror", cargo_env_compat: true, - cargo_pkg_version: "1.0.38", + cargo_pkg_version: "1.0.40", srcs: ["src/lib.rs"], edition: "2018", cfgs: ["provide_any"], @@ -11,9 +11,9 @@ [package] edition = "2018" -rust-version = "1.31" +rust-version = "1.56" name = "thiserror" -version = "1.0.38" +version = "1.0.40" authors = ["David Tolnay <dtolnay@gmail.com>"] description = "derive(Error)" documentation = "https://docs.rs/thiserror" @@ -31,7 +31,7 @@ repository = "https://github.com/dtolnay/thiserror" targets = ["x86_64-unknown-linux-gnu"] [dependencies.thiserror-impl] -version = "=1.0.38" +version = "=1.0.40" [dev-dependencies.anyhow] version = "1.0.65" diff --git a/Cargo.toml.orig b/Cargo.toml.orig index 82ef03d..355f48d 100644 --- a/Cargo.toml.orig +++ b/Cargo.toml.orig @@ -1,6 +1,6 @@ [package] name = "thiserror" -version = "1.0.38" +version = "1.0.40" authors = ["David Tolnay <dtolnay@gmail.com>"] categories = ["rust-patterns"] description = "derive(Error)" @@ -9,10 +9,10 @@ edition = "2018" keywords = ["error", "error-handling", "derive"] license = "MIT OR Apache-2.0" repository = "https://github.com/dtolnay/thiserror" -rust-version = "1.31" +rust-version = "1.56" [dependencies] -thiserror-impl = { version = "=1.0.38", path = "impl" } +thiserror-impl = { version = "=1.0.40", path = "impl" } [dev-dependencies] anyhow = "1.0.65" diff --git a/LICENSE-APACHE b/LICENSE-APACHE index 16fe87b..1b5ec8b 100644 --- a/LICENSE-APACHE +++ b/LICENSE-APACHE @@ -174,28 +174,3 @@ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS - -APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - -Copyright [yyyy] [name of copyright owner] - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. @@ -11,13 +11,13 @@ third_party { } url { type: ARCHIVE - value: "https://static.crates.io/crates/thiserror/thiserror-1.0.38.crate" + value: "https://static.crates.io/crates/thiserror/thiserror-1.0.40.crate" } - version: "1.0.38" + version: "1.0.40" license_type: NOTICE last_upgrade_date { - year: 2022 - month: 12 - day: 19 + year: 2023 + month: 3 + day: 23 } } @@ -16,7 +16,7 @@ This library provides a convenient derive macro for the standard library's thiserror = "1.0" ``` -*Compiler support: requires rustc 1.31+* +*Compiler support: requires rustc 1.56+* <br> @@ -228,6 +228,7 @@ //! //! [`anyhow`]: https://github.com/dtolnay/anyhow +#![doc(html_root_url = "https://docs.rs/thiserror/1.0.40")] #![allow( // Clippy bug: https://github.com/rust-lang/rust-clippy/issues/7421 clippy::doc_markdown, diff --git a/tests/test_from.rs b/tests/test_from.rs index 1f38705..51af40b 100644 --- a/tests/test_from.rs +++ b/tests/test_from.rs @@ -1,3 +1,5 @@ +#![allow(clippy::extra_unused_type_parameters)] + use std::io; use thiserror::Error; |