diff options
author | Chih-hung Hsieh <chh@google.com> | 2020-07-14 05:31:07 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2020-07-14 05:31:07 +0000 |
commit | 2eb51674c8da85ca5f825ad28bce8d0510bc1dc6 (patch) | |
tree | ed8cfcdcad0ae7a3cd31e88324683a09ef1215b3 | |
parent | b381877263ec810b3a13a985d47d976b60baa4ee (diff) | |
parent | 2c053c8a8744642894b63f57e5398706fc94aade (diff) | |
download | remain-2eb51674c8da85ca5f825ad28bce8d0510bc1dc6.tar.gz |
Merge "Upgrade rust/crates/remain to 0.2.2" am: ec82257245 am: 6489766486 am: 98e0f842a6 am: 2c053c8a87
Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/remain/+/1360894
Change-Id: Ie5da62e2ade5dfd985c89785329923284ad5750f
-rw-r--r-- | .cargo_vcs_info.json | 2 | ||||
-rw-r--r-- | .github/workflows/ci.yml | 39 | ||||
-rw-r--r-- | .travis.yml | 16 | ||||
-rw-r--r-- | Cargo.toml | 6 | ||||
-rw-r--r-- | Cargo.toml.orig | 8 | ||||
-rw-r--r-- | METADATA | 14 | ||||
-rw-r--r-- | README.md | 7 | ||||
-rw-r--r-- | src/lib.rs | 8 | ||||
-rw-r--r-- | tests/ui/let-unstable.stderr | 2 | ||||
-rw-r--r-- | tests/ui/match-unstable.stderr | 2 | ||||
-rw-r--r-- | tests/ui/unnamed-fields.stderr | 4 | ||||
-rw-r--r-- | tests/ui/unsorted-match-unstable.stderr | 2 |
12 files changed, 76 insertions, 34 deletions
diff --git a/.cargo_vcs_info.json b/.cargo_vcs_info.json index 82b08b7..1ddcd35 100644 --- a/.cargo_vcs_info.json +++ b/.cargo_vcs_info.json @@ -1,5 +1,5 @@ { "git": { - "sha1": "86791e6208128f29ac37a7a51a5657ab125efe59" + "sha1": "4d56185ca2c69113dc7815c2d268388c76d1aea4" } } diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..bf8f426 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,39 @@ +name: CI + +on: + push: + pull_request: + schedule: [cron: "40 1 * * *"] + +jobs: + nightly: + name: Rust nightly + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: dtolnay/rust-toolchain@nightly + - run: cargo test + + test: + name: Rust ${{matrix.rust}} + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + rust: [beta, stable, 1.36.0] + steps: + - uses: actions/checkout@v2 + - uses: dtolnay/rust-toolchain@master + with: + toolchain: ${{matrix.rust}} + - run: cargo test + env: + RUSTFLAGS: --cfg remain_stable_testing + + msrv: + name: Rust 1.31.0 + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: dtolnay/rust-toolchain@1.31.0 + - run: cargo check diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index f2d73f8..0000000 --- a/.travis.yml +++ /dev/null @@ -1,16 +0,0 @@ -language: rust - -script: - - cargo test - -matrix: - include: - - rust: nightly - - rust: beta - env: RUSTFLAGS='--cfg remain_stable_testing' - - rust: stable - env: RUSTFLAGS='--cfg remain_stable_testing' - - rust: 1.36.0 - env: RUSTFLAGS='--cfg remain_stable_testing' - - rust: 1.31.0 - script: cargo check @@ -13,13 +13,15 @@ [package] edition = "2018" name = "remain" -version = "0.2.1" +version = "0.2.2" authors = ["David Tolnay <dtolnay@gmail.com>"] description = "Compile-time checks that an enum, struct, or match is written in sorted order." documentation = "https://docs.rs/remain" readme = "README.md" license = "MIT OR Apache-2.0" repository = "https://github.com/dtolnay/remain" +[package.metadata.docs.rs] +targets = ["x86_64-unknown-linux-gnu"] [lib] proc-macro = true @@ -38,5 +40,3 @@ version = "1.0" [dev-dependencies.trybuild] version = "1.0.19" features = ["diff"] -[badges.travis-ci] -repository = "dtolnay/remain" diff --git a/Cargo.toml.orig b/Cargo.toml.orig index 8b16b07..b3328e0 100644 --- a/Cargo.toml.orig +++ b/Cargo.toml.orig @@ -1,6 +1,6 @@ [package] name = "remain" -version = "0.2.1" # remember to update number in readme for major versions +version = "0.2.2" # remember to update number in readme for major versions authors = ["David Tolnay <dtolnay@gmail.com>"] edition = "2018" license = "MIT OR Apache-2.0" @@ -12,9 +12,6 @@ readme = "README.md" [lib] proc-macro = true -[badges] -travis-ci = { repository = "dtolnay/remain" } - [dependencies] proc-macro2 = "1.0" quote = "1.0" @@ -23,3 +20,6 @@ syn = { version = "1.0", features = ["full", "visit-mut"] } [dev-dependencies] rustversion = "1.0" trybuild = { version = "1.0.19", features = ["diff"] } + +[package.metadata.docs.rs] +targets = ["x86_64-unknown-linux-gnu"] @@ -1,9 +1,5 @@ name: "remain" -description: - "This crate provides an attribute macro to check at compile time that the " - "variants of an enum or the arms of a match expression are written in " - "sorted order." - +description: "This crate provides an attribute macro to check at compile time that the variants of an enum or the arms of a match expression are written in sorted order." third_party { url { type: HOMEPAGE @@ -13,7 +9,11 @@ third_party { type: GIT value: "https://github.com/dtolnay/remain" } - version: "0.2.1" + version: "0.2.2" license_type: NOTICE - last_upgrade_date { year: 2020 month: 3 day: 5 } + last_upgrade_date { + year: 2020 + month: 7 + day: 10 + } } @@ -1,9 +1,10 @@ Remain sorted ============= -[![Build Status](https://api.travis-ci.com/dtolnay/remain.svg?branch=master)](https://travis-ci.com/dtolnay/remain) -[![Latest Version](https://img.shields.io/crates/v/remain.svg)](https://crates.io/crates/remain) -[![Rust Documentation](https://img.shields.io/badge/api-rustdoc-blue.svg)](https://docs.rs/remain) +[<img alt="github" src="https://img.shields.io/badge/github-dtolnay/remain-8da0cb?style=for-the-badge&labelColor=555555&logo=github" height="20">](https://github.com/dtolnay/remain) +[<img alt="crates.io" src="https://img.shields.io/crates/v/remain.svg?style=for-the-badge&color=fc8d62&logo=rust" height="20">](https://crates.io/crates/remain) +[<img alt="docs.rs" src="https://img.shields.io/badge/docs.rs-remain-66c2a5?style=for-the-badge&labelColor=555555&logoColor=white&logo=data:image/svg+xml;base64,PHN2ZyByb2xlPSJpbWciIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmlld0JveD0iMCAwIDUxMiA1MTIiPjxwYXRoIGZpbGw9IiNmNWY1ZjUiIGQ9Ik00ODguNiAyNTAuMkwzOTIgMjE0VjEwNS41YzAtMTUtOS4zLTI4LjQtMjMuNC0zMy43bC0xMDAtMzcuNWMtOC4xLTMuMS0xNy4xLTMuMS0yNS4zIDBsLTEwMCAzNy41Yy0xNC4xIDUuMy0yMy40IDE4LjctMjMuNCAzMy43VjIxNGwtOTYuNiAzNi4yQzkuMyAyNTUuNSAwIDI2OC45IDAgMjgzLjlWMzk0YzAgMTMuNiA3LjcgMjYuMSAxOS45IDMyLjJsMTAwIDUwYzEwLjEgNS4xIDIyLjEgNS4xIDMyLjIgMGwxMDMuOS01MiAxMDMuOSA1MmMxMC4xIDUuMSAyMi4xIDUuMSAzMi4yIDBsMTAwLTUwYzEyLjItNi4xIDE5LjktMTguNiAxOS45LTMyLjJWMjgzLjljMC0xNS05LjMtMjguNC0yMy40LTMzLjd6TTM1OCAyMTQuOGwtODUgMzEuOXYtNjguMmw4NS0zN3Y3My4zek0xNTQgMTA0LjFsMTAyLTM4LjIgMTAyIDM4LjJ2LjZsLTEwMiA0MS40LTEwMi00MS40di0uNnptODQgMjkxLjFsLTg1IDQyLjV2LTc5LjFsODUtMzguOHY3NS40em0wLTExMmwtMTAyIDQxLjQtMTAyLTQxLjR2LS42bDEwMi0zOC4yIDEwMiAzOC4ydi42em0yNDAgMTEybC04NSA0Mi41di03OS4xbDg1LTM4Ljh2NzUuNHptMC0xMTJsLTEwMiA0MS40LTEwMi00MS40di0uNmwxMDItMzguMiAxMDIgMzguMnYuNnoiPjwvcGF0aD48L3N2Zz4K" height="20">](https://docs.rs/remain) +[<img alt="build status" src="https://img.shields.io/github/workflow/status/dtolnay/remain/CI/master?style=for-the-badge" height="20">](https://github.com/dtolnay/remain/actions?query=branch%3Amaster) This crate provides an attribute macro to check at compile time that the variants of an enum or the arms of a match expression are written in sorted @@ -1,3 +1,11 @@ +//! [![github]](https://github.com/dtolnay/remain) [![crates-io]](https://crates.io/crates/remain) [![docs-rs]](https://docs.rs/remain) +//! +//! [github]: https://img.shields.io/badge/github-8da0cb?style=for-the-badge&labelColor=555555&logo=github +//! [crates-io]: https://img.shields.io/badge/crates.io-fc8d62?style=for-the-badge&labelColor=555555&logo=rust +//! [docs-rs]: https://img.shields.io/badge/docs.rs-66c2a5?style=for-the-badge&labelColor=555555&logoColor=white&logo=data:image/svg+xml;base64,PHN2ZyByb2xlPSJpbWciIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmlld0JveD0iMCAwIDUxMiA1MTIiPjxwYXRoIGZpbGw9IiNmNWY1ZjUiIGQ9Ik00ODguNiAyNTAuMkwzOTIgMjE0VjEwNS41YzAtMTUtOS4zLTI4LjQtMjMuNC0zMy43bC0xMDAtMzcuNWMtOC4xLTMuMS0xNy4xLTMuMS0yNS4zIDBsLTEwMCAzNy41Yy0xNC4xIDUuMy0yMy40IDE4LjctMjMuNCAzMy43VjIxNGwtOTYuNiAzNi4yQzkuMyAyNTUuNSAwIDI2OC45IDAgMjgzLjlWMzk0YzAgMTMuNiA3LjcgMjYuMSAxOS45IDMyLjJsMTAwIDUwYzEwLjEgNS4xIDIyLjEgNS4xIDMyLjIgMGwxMDMuOS01MiAxMDMuOSA1MmMxMC4xIDUuMSAyMi4xIDUuMSAzMi4yIDBsMTAwLTUwYzEyLjItNi4xIDE5LjktMTguNiAxOS45LTMyLjJWMjgzLjljMC0xNS05LjMtMjguNC0yMy40LTMzLjd6TTM1OCAyMTQuOGwtODUgMzEuOXYtNjguMmw4NS0zN3Y3My4zek0xNTQgMTA0LjFsMTAyLTM4LjIgMTAyIDM4LjJ2LjZsLTEwMiA0MS40LTEwMi00MS40di0uNnptODQgMjkxLjFsLTg1IDQyLjV2LTc5LjFsODUtMzguOHY3NS40em0wLTExMmwtMTAyIDQxLjQtMTAyLTQxLjR2LS42bDEwMi0zOC4yIDEwMiAzOC4ydi42em0yNDAgMTEybC04NSA0Mi41di03OS4xbDg1LTM4Ljh2NzUuNHptMC0xMTJsLTEwMiA0MS40LTEwMi00MS40di0uNmwxMDItMzguMiAxMDIgMzguMnYuNnoiPjwvcGF0aD48L3N2Zz4K +//! +//! <br> +//! //! This crate provides an attribute macro to check at compile time that the //! variants of an enum or the arms of a match expression are written in sorted //! order. diff --git a/tests/ui/let-unstable.stderr b/tests/ui/let-unstable.stderr index 97c5ba1..0960dba 100644 --- a/tests/ui/let-unstable.stderr +++ b/tests/ui/let-unstable.stderr @@ -3,3 +3,5 @@ error: E::Bbb should sort before E::Ccc | 15 | #[sorted] | ^^^^^^^^^ + | + = note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui/match-unstable.stderr b/tests/ui/match-unstable.stderr index b2bdea0..56872fb 100644 --- a/tests/ui/match-unstable.stderr +++ b/tests/ui/match-unstable.stderr @@ -3,3 +3,5 @@ error: E::Bbb should sort before E::Ccc | 15 | #[sorted] | ^^^^^^^^^ + | + = note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui/unnamed-fields.stderr b/tests/ui/unnamed-fields.stderr index b7e28f5..618fb22 100644 --- a/tests/ui/unnamed-fields.stderr +++ b/tests/ui/unnamed-fields.stderr @@ -3,9 +3,13 @@ error: expected enum, struct, or match expression | 1 | #[remain::sorted] | ^^^^^^^^^^^^^^^^^ + | + = note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info) error: expected enum, struct, or match expression --> $DIR/unnamed-fields.rs:4:1 | 4 | #[remain::sorted] | ^^^^^^^^^^^^^^^^^ + | + = note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui/unsorted-match-unstable.stderr b/tests/ui/unsorted-match-unstable.stderr index 6b4509e..386860b 100644 --- a/tests/ui/unsorted-match-unstable.stderr +++ b/tests/ui/unsorted-match-unstable.stderr @@ -3,3 +3,5 @@ error: E::Bbb should sort before E::Ddd | 15 | #[sorted] | ^^^^^^^^^ + | + = note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info) |