aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChih-hung Hsieh <chh@google.com>2020-07-14 04:22:01 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2020-07-14 04:22:01 +0000
commitec82257245980c58c38039f1d16cbb57be860442 (patch)
treeed8cfcdcad0ae7a3cd31e88324683a09ef1215b3
parent4d287fe9bf3f49ab4ec174b4eb817b11d8216386 (diff)
parent16e11beaa28884abb35f33cd9849bad491d6bd4d (diff)
downloadremain-ec82257245980c58c38039f1d16cbb57be860442.tar.gz
Merge "Upgrade rust/crates/remain to 0.2.2"android-r-beta-3android-r-beta-2
-rw-r--r--.cargo_vcs_info.json2
-rw-r--r--.github/workflows/ci.yml39
-rw-r--r--.travis.yml16
-rw-r--r--Cargo.toml6
-rw-r--r--Cargo.toml.orig8
-rw-r--r--METADATA14
-rw-r--r--README.md7
-rw-r--r--src/lib.rs8
-rw-r--r--tests/ui/let-unstable.stderr2
-rw-r--r--tests/ui/match-unstable.stderr2
-rw-r--r--tests/ui/unnamed-fields.stderr4
-rw-r--r--tests/ui/unsorted-match-unstable.stderr2
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
diff --git a/Cargo.toml b/Cargo.toml
index 46d9a8f..197d26d 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -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"]
diff --git a/METADATA b/METADATA
index e716c0b..b31e492 100644
--- a/METADATA
+++ b/METADATA
@@ -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
+ }
}
diff --git a/README.md b/README.md
index 3e3d553..2a1442f 100644
--- a/README.md
+++ b/README.md
@@ -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
diff --git a/src/lib.rs b/src/lib.rs
index 5648e28..c5c50bf 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -1,3 +1,11 @@
+//! [![github]](https://github.com/dtolnay/remain)&ensp;[![crates-io]](https://crates.io/crates/remain)&ensp;[![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)