aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-07-07 04:45:09 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-07-07 04:45:09 +0000
commitdaddd0328bd4822ab734b6b848f3f24db7cf5d85 (patch)
treecad62b9bab18d8c1e6cf00eb480de6dd7d3657c3
parent74964b0515435c8c33cf768125530156fb271a5d (diff)
parent78dfe4e7856b3fe47927c0739c9caa35adcceca6 (diff)
downloadremain-android14-mainline-appsearch-release.tar.gz
Snap for 10453563 from 78dfe4e7856b3fe47927c0739c9caa35adcceca6 to mainline-appsearch-releaseaml_ase_341510000aml_ase_341410000aml_ase_341310010aml_ase_341113000aml_ase_340913000android14-mainline-appsearch-release
Change-Id: Ibeee2d317e5e67a4e75392c5b2979fd84661a255
-rw-r--r--Android.bp41
-rw-r--r--Cargo.toml26
-rw-r--r--Cargo.toml.orig11
-rw-r--r--METADATA11
-rw-r--r--README.md4
-rw-r--r--TEST_MAPPING22
-rw-r--r--cargo2android.json11
-rw-r--r--src/check.rs2
-rw-r--r--src/emit.rs18
-rw-r--r--src/lib.rs17
-rw-r--r--src/parse.rs8
-rw-r--r--tests/compiletest.rs1
-rw-r--r--tests/order.rs1
-rw-r--r--tests/stable.rs5
-rw-r--r--tests/ui/enum.stderr2
-rw-r--r--tests/ui/let-stable.stderr2
-rw-r--r--tests/ui/let-unstable.stderr8
-rw-r--r--tests/ui/match-stable.stderr2
-rw-r--r--tests/ui/match-unstable.stderr8
-rw-r--r--tests/ui/repeat.stderr2
-rw-r--r--tests/ui/struct.stderr2
-rw-r--r--tests/ui/unnamed-fields.stderr8
-rw-r--r--tests/ui/unsorted-enum.stderr2
-rw-r--r--tests/ui/unsorted-match-stable.stderr2
-rw-r--r--tests/ui/unsorted-match-unstable.stderr8
-rw-r--r--tests/ui/unsorted-struct.stderr2
-rw-r--r--tests/ui/unsupported.stderr2
-rw-r--r--tests/unstable.rs1
28 files changed, 133 insertions, 96 deletions
diff --git a/Android.bp b/Android.bp
index fe3e3a5..26a3eff 100644
--- a/Android.bp
+++ b/Android.bp
@@ -41,7 +41,7 @@ rust_proc_macro {
name: "libremain",
crate_name: "remain",
cargo_env_compat: true,
- cargo_pkg_version: "0.2.2",
+ cargo_pkg_version: "0.2.6",
srcs: ["src/lib.rs"],
edition: "2018",
rustlibs: [
@@ -49,4 +49,43 @@ rust_proc_macro {
"libquote",
"libsyn",
],
+ product_available: true,
+ vendor_available: true,
+}
+
+rust_defaults {
+ name: "remain_test_defaults",
+ crate_name: "remain",
+ cargo_env_compat: true,
+ cargo_pkg_version: "0.2.6",
+ test_suites: ["general-tests"],
+ auto_gen_config: true,
+ edition: "2018",
+ rustlibs: [
+ "libproc_macro2",
+ "libquote",
+ "libsyn",
+ ],
+ proc_macros: [
+ "libremain",
+ "librustversion",
+ ],
+}
+
+rust_test_host {
+ name: "remain_test_tests_stable",
+ defaults: ["remain_test_defaults"],
+ srcs: ["tests/stable.rs"],
+ test_options: {
+ unit_test: true,
+ },
+}
+
+rust_test_host {
+ name: "remain_test_tests_unstable",
+ defaults: ["remain_test_defaults"],
+ srcs: ["tests/unstable.rs"],
+ test_options: {
+ unit_test: true,
+ },
}
diff --git a/Cargo.toml b/Cargo.toml
index 197d26d..39da45b 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -3,28 +3,34 @@
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
-# to registry (e.g., crates.io) dependencies
+# to registry (e.g., crates.io) dependencies.
#
-# If you believe there's an error in this file please file an
-# issue against the rust-lang/cargo repository. If you're
-# editing this file be aware that the upstream Cargo.toml
-# will likely look very different (and much more reasonable)
+# If you are reading this file be aware that the original Cargo.toml
+# will likely look very different (and much more reasonable).
+# See Cargo.toml.orig for the original contents.
[package]
edition = "2018"
+rust-version = "1.31"
name = "remain"
-version = "0.2.2"
+version = "0.2.6"
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"
+categories = [
+ "development-tools",
+ "no-std",
+]
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
+
[dependencies.proc-macro2]
version = "1.0"
@@ -33,10 +39,14 @@ version = "1.0"
[dependencies.syn]
version = "1.0"
-features = ["full", "visit-mut"]
+features = [
+ "full",
+ "visit-mut",
+]
+
[dev-dependencies.rustversion]
version = "1.0"
[dev-dependencies.trybuild]
-version = "1.0.19"
+version = "1.0.49"
features = ["diff"]
diff --git a/Cargo.toml.orig b/Cargo.toml.orig
index b3328e0..3b64082 100644
--- a/Cargo.toml.orig
+++ b/Cargo.toml.orig
@@ -1,13 +1,14 @@
[package]
name = "remain"
-version = "0.2.2" # remember to update number in readme for major versions
+version = "0.2.6"
authors = ["David Tolnay <dtolnay@gmail.com>"]
+categories = ["development-tools", "no-std"]
+description = "Compile-time checks that an enum, struct, or match is written in sorted order."
+documentation = "https://docs.rs/remain"
edition = "2018"
license = "MIT OR Apache-2.0"
-description = "Compile-time checks that an enum, struct, or match is written in sorted order."
repository = "https://github.com/dtolnay/remain"
-documentation = "https://docs.rs/remain"
-readme = "README.md"
+rust-version = "1.31"
[lib]
proc-macro = true
@@ -19,7 +20,7 @@ syn = { version = "1.0", features = ["full", "visit-mut"] }
[dev-dependencies]
rustversion = "1.0"
-trybuild = { version = "1.0.19", features = ["diff"] }
+trybuild = { version = "1.0.49", features = ["diff"] }
[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
diff --git a/METADATA b/METADATA
index 620b97b..7f97c56 100644
--- a/METADATA
+++ b/METADATA
@@ -7,13 +7,14 @@ third_party {
}
url {
type: ARCHIVE
- value: "https://static.crates.io/crates/remain/remain-0.2.2.crate"
+ value: "https://static.crates.io/crates/remain/remain-0.2.6.crate"
}
- version: "0.2.2"
+ version: "0.2.6"
+ # Dual-licensed, using the least restrictive per go/thirdpartylicenses#same.
license_type: NOTICE
last_upgrade_date {
- year: 2020
- month: 7
- day: 10
+ year: 2022
+ month: 12
+ day: 19
}
}
diff --git a/README.md b/README.md
index 2a1442f..145f558 100644
--- a/README.md
+++ b/README.md
@@ -3,8 +3,8 @@ Remain sorted
[<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)
+[<img alt="docs.rs" src="https://img.shields.io/badge/docs.rs-remain-66c2a5?style=for-the-badge&labelColor=555555&logo=docs.rs" height="20">](https://docs.rs/remain)
+[<img alt="build status" src="https://img.shields.io/github/actions/workflow/status/dtolnay/remain/ci.yml?branch=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/TEST_MAPPING b/TEST_MAPPING
index 129fb3b..582eb1e 100644
--- a/TEST_MAPPING
+++ b/TEST_MAPPING
@@ -1,31 +1,23 @@
// Generated by update_crate_tests.py for tests that depend on this crate.
{
- "presubmit": [
+ "imports": [
{
- "name": "ZipFuseTest"
+ "path": "packages/modules/Virtualization/apkdmverity"
},
{
- "name": "apkdmverity.test"
+ "path": "packages/modules/Virtualization/authfs"
},
{
- "name": "authfs_device_test_src_lib"
+ "path": "packages/modules/Virtualization/encryptedstore"
},
{
- "name": "virtualizationservice_device_test"
- }
- ],
- "presubmit-rust": [
- {
- "name": "ZipFuseTest"
- },
- {
- "name": "apkdmverity.test"
+ "path": "packages/modules/Virtualization/libs/devicemapper"
},
{
- "name": "authfs_device_test_src_lib"
+ "path": "packages/modules/Virtualization/virtualizationmanager"
},
{
- "name": "virtualizationservice_device_test"
+ "path": "packages/modules/Virtualization/zipfuse"
}
]
}
diff --git a/cargo2android.json b/cargo2android.json
index 958632b..f0fb860 100644
--- a/cargo2android.json
+++ b/cargo2android.json
@@ -1,3 +1,10 @@
{
- "run": true
-} \ No newline at end of file
+ "dependency-blocklist": [
+ "trybuild"
+ ],
+ "test-blocklist": [
+ "tests/compiletest.rs"
+ ],
+ "run": true,
+ "tests": true
+}
diff --git a/src/check.rs b/src/check.rs
index 0643f5f..39a23e5 100644
--- a/src/check.rs
+++ b/src/check.rs
@@ -109,7 +109,7 @@ impl Sortable for Arm {
};
let segments = match pat {
- Pat::Ident(pat) if is_just_ident(&pat) => vec![pat.ident.clone()],
+ Pat::Ident(pat) if is_just_ident(pat) => vec![pat.ident.clone()],
Pat::Path(pat) => idents_of_path(&pat.path),
Pat::Struct(pat) => idents_of_path(&pat.path),
Pat::TupleStruct(pat) => idents_of_path(&pat.path),
diff --git a/src/emit.rs b/src/emit.rs
index 4a051ba..c7717aa 100644
--- a/src/emit.rs
+++ b/src/emit.rs
@@ -1,5 +1,4 @@
use proc_macro::TokenStream;
-use proc_macro2::Span;
use quote::quote;
use syn::Error;
@@ -11,13 +10,7 @@ pub enum Kind {
Let,
}
-pub fn emit(err: Error, kind: Kind, output: TokenStream) -> TokenStream {
- let mut err = err;
- if !probably_has_spans(kind) {
- // Otherwise the error is printed without any line number.
- err = Error::new(Span::call_site(), &err.to_string());
- }
-
+pub fn emit(err: &Error, kind: Kind, output: TokenStream) -> TokenStream {
let err = err.to_compile_error();
let output = proc_macro2::TokenStream::from(output);
@@ -28,12 +21,3 @@ pub fn emit(err: Error, kind: Kind, output: TokenStream) -> TokenStream {
TokenStream::from(expanded)
}
-
-// Rustc is so bad at spans.
-// https://github.com/rust-lang/rust/issues/43081
-fn probably_has_spans(kind: Kind) -> bool {
- match kind {
- Kind::Enum | Kind::Struct => true,
- Kind::Match | Kind::Let => false,
- }
-}
diff --git a/src/lib.rs b/src/lib.rs
index c5c50bf..a043b1f 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -2,7 +2,7 @@
//!
//! [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
+//! [docs-rs]: https://img.shields.io/badge/docs.rs-66c2a5?style=for-the-badge&labelColor=555555&logo=docs.rs
//!
//! <br>
//!
@@ -143,7 +143,15 @@
//! # fn main() {}
//! ```
-#![allow(clippy::needless_doctest_main)]
+#![allow(
+ clippy::derive_partial_eq_without_eq,
+ clippy::enum_glob_use,
+ clippy::manual_find,
+ clippy::match_same_arms,
+ clippy::module_name_repetitions,
+ clippy::needless_doctest_main,
+ clippy::similar_names
+)]
extern crate proc_macro;
@@ -157,10 +165,11 @@ mod visit;
use proc_macro::TokenStream;
use quote::quote;
+use syn::parse::Nothing;
use syn::{parse_macro_input, ItemFn};
use crate::emit::emit;
-use crate::parse::{Input, Nothing};
+use crate::parse::Input;
#[proc_macro_attribute]
pub fn sorted(args: TokenStream, input: TokenStream) -> TokenStream {
@@ -173,7 +182,7 @@ pub fn sorted(args: TokenStream, input: TokenStream) -> TokenStream {
match result {
Ok(_) => output,
- Err(err) => emit(err, kind, output),
+ Err(err) => emit(&err, kind, output),
}
}
diff --git a/src/parse.rs b/src/parse.rs
index aff4972..66f80fe 100644
--- a/src/parse.rs
+++ b/src/parse.rs
@@ -5,14 +5,6 @@ use syn::{Attribute, Error, Expr, Fields, Result, Stmt, Token, Visibility};
use crate::emit::Kind;
-pub struct Nothing;
-
-impl Parse for Nothing {
- fn parse(_input: ParseStream) -> Result<Self> {
- Ok(Nothing)
- }
-}
-
pub enum Input {
Enum(syn::ItemEnum),
Match(syn::ExprMatch),
diff --git a/tests/compiletest.rs b/tests/compiletest.rs
index f9aea23..7974a62 100644
--- a/tests/compiletest.rs
+++ b/tests/compiletest.rs
@@ -1,4 +1,5 @@
#[rustversion::attr(not(nightly), ignore)]
+#[cfg_attr(miri, ignore)]
#[test]
fn ui() {
let t = trybuild::TestCases::new();
diff --git a/tests/order.rs b/tests/order.rs
index 4723f94..9020ef9 100644
--- a/tests/order.rs
+++ b/tests/order.rs
@@ -1,4 +1,5 @@
#![allow(dead_code, non_camel_case_types)]
+#![allow(clippy::enum_variant_names, clippy::upper_case_acronyms)]
#[remain::sorted]
enum UnderscoresFirst {
diff --git a/tests/stable.rs b/tests/stable.rs
index b1bcd65..6207079 100644
--- a/tests/stable.rs
+++ b/tests/stable.rs
@@ -1,4 +1,9 @@
#![allow(dead_code)]
+#![allow(
+ clippy::derive_partial_eq_without_eq,
+ clippy::let_unit_value,
+ clippy::match_same_arms
+)]
#[remain::sorted]
#[derive(PartialEq)]
diff --git a/tests/ui/enum.stderr b/tests/ui/enum.stderr
index 50ffa8c..0d23e00 100644
--- a/tests/ui/enum.stderr
+++ b/tests/ui/enum.stderr
@@ -1,5 +1,5 @@
error: Bbb should sort before Ccc
- --> $DIR/enum.rs:8:5
+ --> tests/ui/enum.rs:8:5
|
8 | Bbb(u8, u8),
| ^^^
diff --git a/tests/ui/let-stable.stderr b/tests/ui/let-stable.stderr
index 9073750..9c7a937 100644
--- a/tests/ui/let-stable.stderr
+++ b/tests/ui/let-stable.stderr
@@ -1,5 +1,5 @@
error: E::Bbb should sort before E::Ccc
- --> $DIR/let-stable.rs:17:9
+ --> tests/ui/let-stable.rs:17:9
|
17 | E::Bbb(_, _) => {}
| ^^^^^^
diff --git a/tests/ui/let-unstable.stderr b/tests/ui/let-unstable.stderr
index 0960dba..4f5e6ee 100644
--- a/tests/ui/let-unstable.stderr
+++ b/tests/ui/let-unstable.stderr
@@ -1,7 +1,5 @@
error: E::Bbb should sort before E::Ccc
- --> $DIR/let-unstable.rs:15:5
+ --> tests/ui/let-unstable.rs:20:9
|
-15 | #[sorted]
- | ^^^^^^^^^
- |
- = note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info)
+20 | E::Bbb(_, _) => {}
+ | ^^^^^^
diff --git a/tests/ui/match-stable.stderr b/tests/ui/match-stable.stderr
index 183daa9..ff18739 100644
--- a/tests/ui/match-stable.stderr
+++ b/tests/ui/match-stable.stderr
@@ -1,5 +1,5 @@
error: E::Bbb should sort before E::Ccc
- --> $DIR/match-stable.rs:17:9
+ --> tests/ui/match-stable.rs:17:9
|
17 | E::Bbb(_, _) => {}
| ^^^^^^
diff --git a/tests/ui/match-unstable.stderr b/tests/ui/match-unstable.stderr
index 56872fb..e406aab 100644
--- a/tests/ui/match-unstable.stderr
+++ b/tests/ui/match-unstable.stderr
@@ -1,7 +1,5 @@
error: E::Bbb should sort before E::Ccc
- --> $DIR/match-unstable.rs:15:5
+ --> tests/ui/match-unstable.rs:20:9
|
-15 | #[sorted]
- | ^^^^^^^^^
- |
- = note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info)
+20 | E::Bbb(_, _) => {}
+ | ^^^^^^
diff --git a/tests/ui/repeat.stderr b/tests/ui/repeat.stderr
index 4dbf277..37b3c86 100644
--- a/tests/ui/repeat.stderr
+++ b/tests/ui/repeat.stderr
@@ -1,5 +1,5 @@
error: E::Aaa should sort before E::Bbb
- --> $DIR/repeat.rs:12:9
+ --> tests/ui/repeat.rs:12:9
|
12 | E::Aaa(_) => {}
| ^^^^^^
diff --git a/tests/ui/struct.stderr b/tests/ui/struct.stderr
index 2ead15b..fa3dc4d 100644
--- a/tests/ui/struct.stderr
+++ b/tests/ui/struct.stderr
@@ -1,5 +1,5 @@
error: c should sort before d
- --> $DIR/struct.rs:6:5
+ --> tests/ui/struct.rs:6:5
|
6 | c: usize,
| ^
diff --git a/tests/ui/unnamed-fields.stderr b/tests/ui/unnamed-fields.stderr
index 618fb22..249b58c 100644
--- a/tests/ui/unnamed-fields.stderr
+++ b/tests/ui/unnamed-fields.stderr
@@ -1,15 +1,15 @@
error: expected enum, struct, or match expression
- --> $DIR/unnamed-fields.rs:1:1
+ --> tests/ui/unnamed-fields.rs:1:1
|
1 | #[remain::sorted]
| ^^^^^^^^^^^^^^^^^
|
- = note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info)
+ = note: this error originates in the attribute macro `remain::sorted` (in Nightly builds, run with -Z macro-backtrace for more info)
error: expected enum, struct, or match expression
- --> $DIR/unnamed-fields.rs:4:1
+ --> tests/ui/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)
+ = note: this error originates in the attribute macro `remain::sorted` (in Nightly builds, run with -Z macro-backtrace for more info)
diff --git a/tests/ui/unsorted-enum.stderr b/tests/ui/unsorted-enum.stderr
index 249d171..7ea243e 100644
--- a/tests/ui/unsorted-enum.stderr
+++ b/tests/ui/unsorted-enum.stderr
@@ -1,5 +1,5 @@
error: Bbb should sort before Ccc
- --> $DIR/unsorted-enum.rs:9:5
+ --> tests/ui/unsorted-enum.rs:9:5
|
9 | Bbb(u8, u8),
| ^^^
diff --git a/tests/ui/unsorted-match-stable.stderr b/tests/ui/unsorted-match-stable.stderr
index d04d317..623078e 100644
--- a/tests/ui/unsorted-match-stable.stderr
+++ b/tests/ui/unsorted-match-stable.stderr
@@ -1,5 +1,5 @@
error: E::Bbb should sort before E::Ccc
- --> $DIR/unsorted-match-stable.rs:18:9
+ --> tests/ui/unsorted-match-stable.rs:18:9
|
18 | E::Bbb(_, _) => {}
| ^^^^^^
diff --git a/tests/ui/unsorted-match-unstable.stderr b/tests/ui/unsorted-match-unstable.stderr
index 386860b..42daef5 100644
--- a/tests/ui/unsorted-match-unstable.stderr
+++ b/tests/ui/unsorted-match-unstable.stderr
@@ -1,7 +1,5 @@
error: E::Bbb should sort before E::Ddd
- --> $DIR/unsorted-match-unstable.rs:15:5
+ --> tests/ui/unsorted-match-unstable.rs:21:9
|
-15 | #[sorted]
- | ^^^^^^^^^
- |
- = note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info)
+21 | E::Bbb(_, _) => {}
+ | ^^^^^^
diff --git a/tests/ui/unsorted-struct.stderr b/tests/ui/unsorted-struct.stderr
index 84509d7..7b3b0ad 100644
--- a/tests/ui/unsorted-struct.stderr
+++ b/tests/ui/unsorted-struct.stderr
@@ -1,5 +1,5 @@
error: a should sort before d
- --> $DIR/unsorted-struct.rs:8:5
+ --> tests/ui/unsorted-struct.rs:8:5
|
8 | a: usize,
| ^
diff --git a/tests/ui/unsupported.stderr b/tests/ui/unsupported.stderr
index e471e1e..df47b9c 100644
--- a/tests/ui/unsupported.stderr
+++ b/tests/ui/unsupported.stderr
@@ -1,5 +1,5 @@
error: unsupported by #[remain::sorted]
- --> $DIR/unsupported.rs:7:9
+ --> tests/ui/unsupported.rs:7:9
|
7 | 0..=20 => {}
| ^^^^^^
diff --git a/tests/unstable.rs b/tests/unstable.rs
index 1c94950..c0a0c65 100644
--- a/tests/unstable.rs
+++ b/tests/unstable.rs
@@ -1,6 +1,7 @@
#![allow(dead_code)]
#![cfg(not(remain_stable_testing))]
#![feature(proc_macro_hygiene, stmt_expr_attributes)]
+#![allow(clippy::derive_partial_eq_without_eq, clippy::match_same_arms)]
#[remain::sorted]
#[derive(PartialEq)]