diff options
author | Jeff Vander Stoep <jeffv@google.com> | 2023-02-07 13:27:03 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2023-02-07 13:27:03 +0000 |
commit | 48ccfbb85517afc38ef276f5b62726b747665ac2 (patch) | |
tree | 7d7c30c6a123bdeb64b1a553b5bd13f25766d7d2 | |
parent | a5131cd4602e9b41cc6a10a1302e8a7dc87e455b (diff) | |
parent | 16039f4d558e6730123dca1b7fd20b977d7b8b2f (diff) | |
download | quote-48ccfbb85517afc38ef276f5b62726b747665ac2.tar.gz |
Upgrade quote to 1.0.23 am: 90d300d775 am: 47124424aa am: 16039f4d55
Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/quote/+/2421505
Change-Id: I5e5f3e4d752db98a3bc2dc841151c805c3ae647b
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-- | .github/workflows/ci.yml | 11 | ||||
-rw-r--r-- | Android.bp | 6 | ||||
-rw-r--r-- | Cargo.toml | 7 | ||||
-rw-r--r-- | Cargo.toml.orig | 8 | ||||
-rw-r--r-- | LICENSE-MIT | 2 | ||||
-rw-r--r-- | METADATA | 10 | ||||
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | src/lib.rs | 2 | ||||
-rw-r--r-- | tests/test.rs | 3 | ||||
-rw-r--r-- | tests/ui/not-quotable.rs | 2 | ||||
-rw-r--r-- | tests/ui/not-quotable.stderr | 9 | ||||
-rw-r--r-- | tests/ui/not-repeatable.rs | 2 | ||||
-rw-r--r-- | tests/ui/not-repeatable.stderr | 66 |
14 files changed, 71 insertions, 61 deletions
diff --git a/.cargo_vcs_info.json b/.cargo_vcs_info.json index 46dfbdf..88ac651 100644 --- a/.cargo_vcs_info.json +++ b/.cargo_vcs_info.json @@ -1,6 +1,6 @@ { "git": { - "sha1": "34d94b4980d17bff07f5cdf256225773cad9bd9f" + "sha1": "550af67f9e0be89897902031f153fb3d40360017" }, "path_in_vcs": "" }
\ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cbe6585..5e67515 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,6 +5,9 @@ on: pull_request: schedule: [cron: "40 1 * * *"] +permissions: + contents: read + env: RUSTFLAGS: -Dwarnings @@ -15,7 +18,8 @@ jobs: strategy: fail-fast: false matrix: - rust: [stable, beta, 1.36.0] + rust: [stable, beta, 1.56.0] + timeout-minutes: 45 steps: - uses: actions/checkout@v3 - uses: dtolnay/rust-toolchain@master @@ -27,6 +31,7 @@ jobs: nightly: name: Rust nightly runs-on: ubuntu-latest + timeout-minutes: 45 steps: - uses: actions/checkout@v3 - uses: dtolnay/rust-toolchain@nightly @@ -39,6 +44,7 @@ jobs: 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 @@ -50,6 +56,7 @@ jobs: name: Clippy runs-on: ubuntu-latest if: github.event_name != 'pull_request' + timeout-minutes: 45 steps: - uses: actions/checkout@v3 - uses: dtolnay/rust-toolchain@nightly @@ -60,6 +67,7 @@ jobs: miri: name: Miri runs-on: ubuntu-latest + timeout-minutes: 45 steps: - uses: actions/checkout@v3 - uses: dtolnay/rust-toolchain@miri @@ -71,6 +79,7 @@ jobs: name: Outdated runs-on: ubuntu-latest if: github.event_name != 'pull_request' + timeout-minutes: 45 steps: - uses: actions/checkout@v3 - uses: dtolnay/install@cargo-outdated @@ -41,7 +41,7 @@ rust_library_host { name: "libquote", crate_name: "quote", cargo_env_compat: true, - cargo_pkg_version: "1.0.21", + cargo_pkg_version: "1.0.23", srcs: ["src/lib.rs"], edition: "2018", features: [ @@ -52,8 +52,4 @@ rust_library_host { "libproc_macro2", ], compile_multilib: "first", - apex_available: [ - "//apex_available:platform", - "//apex_available:anyapex", - ], } @@ -13,7 +13,7 @@ edition = "2018" rust-version = "1.31" name = "quote" -version = "1.0.21" +version = "1.0.23" authors = ["David Tolnay <dtolnay@gmail.com>"] autobenches = false description = "Quasi-quoting macro quote!(...)" @@ -30,6 +30,9 @@ repository = "https://github.com/dtolnay/quote" [package.metadata.docs.rs] targets = ["x86_64-unknown-linux-gnu"] +[lib] +doc-scrape-examples = false + [dependencies.proc-macro2] version = "1.0.40" default-features = false @@ -38,7 +41,7 @@ default-features = false version = "1.0" [dev-dependencies.trybuild] -version = "1.0.52" +version = "1.0.66" features = ["diff"] [features] diff --git a/Cargo.toml.orig b/Cargo.toml.orig index dcd01bb..f99b48f 100644 --- a/Cargo.toml.orig +++ b/Cargo.toml.orig @@ -1,6 +1,6 @@ [package] name = "quote" -version = "1.0.21" # don't forget to update html_root_url, version in readme for breaking changes +version = "1.0.23" # don't forget to update html_root_url, version in readme for breaking changes authors = ["David Tolnay <dtolnay@gmail.com>"] autobenches = false categories = ["development-tools::procedural-macro-helpers"] @@ -9,7 +9,6 @@ documentation = "https://docs.rs/quote/" edition = "2018" keywords = ["macros", "syn"] license = "MIT OR Apache-2.0" -readme = "README.md" repository = "https://github.com/dtolnay/quote" rust-version = "1.31" @@ -18,7 +17,7 @@ proc-macro2 = { version = "1.0.40", default-features = false } [dev-dependencies] rustversion = "1.0" -trybuild = { version = "1.0.52", features = ["diff"] } +trybuild = { version = "1.0.66", features = ["diff"] } [features] default = ["proc-macro"] @@ -26,6 +25,9 @@ default = ["proc-macro"] # libproc_macro in the rustc compiler. proc-macro = ["proc-macro2/proc-macro"] +[lib] +doc-scrape-examples = false + [workspace] members = ["benches"] diff --git a/LICENSE-MIT b/LICENSE-MIT index 40b8817..31aa793 100644 --- a/LICENSE-MIT +++ b/LICENSE-MIT @@ -1,5 +1,3 @@ -Copyright (c) 2016 The Rust Project Developers - Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the @@ -11,13 +11,13 @@ third_party { } url { type: ARCHIVE - value: "https://static.crates.io/crates/quote/quote-1.0.21.crate" + value: "https://static.crates.io/crates/quote/quote-1.0.23.crate" } - version: "1.0.21" + version: "1.0.23" license_type: NOTICE last_upgrade_date { - year: 2022 - month: 12 - day: 13 + year: 2023 + month: 2 + day: 6 } } @@ -4,7 +4,7 @@ Rust Quasi-Quoting [<img alt="github" src="https://img.shields.io/badge/github-dtolnay/quote-8da0cb?style=for-the-badge&labelColor=555555&logo=github" height="20">](https://github.com/dtolnay/quote) [<img alt="crates.io" src="https://img.shields.io/crates/v/quote.svg?style=for-the-badge&color=fc8d62&logo=rust" height="20">](https://crates.io/crates/quote) [<img alt="docs.rs" src="https://img.shields.io/badge/docs.rs-quote-66c2a5?style=for-the-badge&labelColor=555555&logo=docs.rs" height="20">](https://docs.rs/quote) -[<img alt="build status" src="https://img.shields.io/github/workflow/status/dtolnay/quote/CI/master?style=for-the-badge" height="20">](https://github.com/dtolnay/quote/actions?query=branch%3Amaster) +[<img alt="build status" src="https://img.shields.io/github/actions/workflow/status/dtolnay/quote/ci.yml?branch=master&style=for-the-badge" height="20">](https://github.com/dtolnay/quote/actions?query=branch%3Amaster) This crate provides the [`quote!`] macro for turning Rust syntax tree data structures into tokens of source code. @@ -81,7 +81,7 @@ //! ``` // Quote types in rustdoc of other crates get linked to here. -#![doc(html_root_url = "https://docs.rs/quote/1.0.21")] +#![doc(html_root_url = "https://docs.rs/quote/1.0.23")] #![allow( clippy::doc_markdown, clippy::missing_errors_doc, diff --git a/tests/test.rs b/tests/test.rs index 5bfcf4b..52ec7bc 100644 --- a/tests/test.rs +++ b/tests/test.rs @@ -1,6 +1,5 @@ #![allow( - clippy::blacklisted_name, - clippy::let_underscore_drop, + clippy::disallowed_names, clippy::shadow_unrelated, clippy::unseparated_literal_suffix, clippy::used_underscore_binding diff --git a/tests/ui/not-quotable.rs b/tests/ui/not-quotable.rs index f991c18..220542d 100644 --- a/tests/ui/not-quotable.rs +++ b/tests/ui/not-quotable.rs @@ -3,5 +3,5 @@ use std::net::Ipv4Addr; fn main() { let ip = Ipv4Addr::LOCALHOST; - let _ = quote! { #ip }; + _ = quote! { #ip }; } diff --git a/tests/ui/not-quotable.stderr b/tests/ui/not-quotable.stderr index 171cddd..c323d99 100644 --- a/tests/ui/not-quotable.stderr +++ b/tests/ui/not-quotable.stderr @@ -1,8 +1,11 @@ error[E0277]: the trait bound `Ipv4Addr: ToTokens` is not satisfied - --> tests/ui/not-quotable.rs:6:13 + --> tests/ui/not-quotable.rs:6:9 | -6 | let _ = quote! { #ip }; - | ^^^^^^^^^^^^^^ the trait `ToTokens` is not implemented for `Ipv4Addr` +6 | _ = quote! { #ip }; + | ^^^^^^^^^^^^^^ + | | + | the trait `ToTokens` is not implemented for `Ipv4Addr` + | required by a bound introduced by this call | = help: the following other types implement trait `ToTokens`: &'a T diff --git a/tests/ui/not-repeatable.rs b/tests/ui/not-repeatable.rs index a8f0fe7..c1debf5 100644 --- a/tests/ui/not-repeatable.rs +++ b/tests/ui/not-repeatable.rs @@ -4,5 +4,5 @@ struct Ipv4Addr; fn main() { let ip = Ipv4Addr; - let _ = quote! { #(#ip)* }; + _ = quote! { #(#ip)* }; } diff --git a/tests/ui/not-repeatable.stderr b/tests/ui/not-repeatable.stderr index f75351e..264a89f 100644 --- a/tests/ui/not-repeatable.stderr +++ b/tests/ui/not-repeatable.stderr @@ -1,35 +1,35 @@ error[E0599]: the method `quote_into_iter` exists for struct `Ipv4Addr`, but its trait bounds were not satisfied - --> tests/ui/not-repeatable.rs:7:13 - | -3 | struct Ipv4Addr; - | --------------- - | | - | method `quote_into_iter` not found for this struct - | doesn't satisfy `Ipv4Addr: Iterator` - | doesn't satisfy `Ipv4Addr: ToTokens` - | doesn't satisfy `Ipv4Addr: ext::RepIteratorExt` - | doesn't satisfy `Ipv4Addr: ext::RepToTokensExt` + --> tests/ui/not-repeatable.rs:7:9 + | +3 | struct Ipv4Addr; + | --------------- + | | + | method `quote_into_iter` not found for this struct + | doesn't satisfy `Ipv4Addr: Iterator` + | doesn't satisfy `Ipv4Addr: ToTokens` + | doesn't satisfy `Ipv4Addr: ext::RepIteratorExt` + | doesn't satisfy `Ipv4Addr: ext::RepToTokensExt` ... -7 | let _ = quote! { #(#ip)* }; - | ^^^^^^^^^^^^^^^^^^ method cannot be called on `Ipv4Addr` due to unsatisfied trait bounds - | - = note: the following trait bounds were not satisfied: - `Ipv4Addr: Iterator` - which is required by `Ipv4Addr: ext::RepIteratorExt` - `&Ipv4Addr: Iterator` - which is required by `&Ipv4Addr: ext::RepIteratorExt` - `Ipv4Addr: ToTokens` - which is required by `Ipv4Addr: ext::RepToTokensExt` - `&mut Ipv4Addr: Iterator` - which is required by `&mut Ipv4Addr: ext::RepIteratorExt` -note: the following traits must be implemented - --> $RUST/core/src/iter/traits/iterator.rs - | - | pub trait Iterator { - | ^^^^^^^^^^^^^^^^^^ - | - ::: src/to_tokens.rs - | - | pub trait ToTokens { - | ^^^^^^^^^^^^^^^^^^ - = note: this error originates in the macro `$crate::quote_bind_into_iter` which comes from the expansion of the macro `quote` (in Nightly builds, run with -Z macro-backtrace for more info) +7 | _ = quote! { #(#ip)* }; + | ^^^^^^^^^^^^^^^^^^ method cannot be called on `Ipv4Addr` due to unsatisfied trait bounds + | + = note: the following trait bounds were not satisfied: + `Ipv4Addr: Iterator` + which is required by `Ipv4Addr: ext::RepIteratorExt` + `&Ipv4Addr: Iterator` + which is required by `&Ipv4Addr: ext::RepIteratorExt` + `Ipv4Addr: ToTokens` + which is required by `Ipv4Addr: ext::RepToTokensExt` + `&mut Ipv4Addr: Iterator` + which is required by `&mut Ipv4Addr: ext::RepIteratorExt` +note: the traits `ToTokens` and `Iterator` must be implemented + --> src/to_tokens.rs + | + | pub trait ToTokens { + | ^^^^^^^^^^^^^^^^^^ + | + ::: $RUST/core/src/iter/traits/iterator.rs + | + | pub trait Iterator { + | ^^^^^^^^^^^^^^^^^^ + = note: this error originates in the macro `$crate::quote_bind_into_iter` which comes from the expansion of the macro `quote` (in Nightly builds, run with -Z macro-backtrace for more info) |