+33
| use std::env; | ||
| use std::process::Command; | ||
| use std::str; | ||
| fn main() { | ||
| println!("cargo:rerun-if-changed=build.rs"); | ||
| let minor = match rustc_minor_version() { | ||
| Some(minor) => minor, | ||
| None => return, | ||
| }; | ||
| if minor >= 77 { | ||
| println!("cargo:rustc-check-cfg=cfg(no_diagnostic_namespace)"); | ||
| } | ||
| // Support for the `#[diagnostic]` tool attribute namespace | ||
| // https://blog.rust-lang.org/2024/05/02/Rust-1.78.0.html#diagnostic-attributes | ||
| if minor < 78 { | ||
| println!("cargo:rustc-cfg=no_diagnostic_namespace"); | ||
| } | ||
| } | ||
| fn rustc_minor_version() -> Option<u32> { | ||
| let rustc = env::var_os("RUSTC")?; | ||
| let output = Command::new(rustc).arg("--version").output().ok()?; | ||
| let version = str::from_utf8(&output.stdout).ok()?; | ||
| let mut pieces = version.split('.'); | ||
| if pieces.next() != Some("rustc 1") { | ||
| return None; | ||
| } | ||
| pieces.next()?.parse().ok() | ||
| } |
| { | ||
| "git": { | ||
| "sha1": "ab1e92c27a492e6077e203a6f85496bb4b1522e8" | ||
| "sha1": "594c865ce817b4adb5863713e4fa3749fbf47f0a" | ||
| }, | ||
| "path_in_vcs": "" | ||
| } |
@@ -27,6 +27,6 @@ name: CI | ||
| matrix: | ||
| rust: [nightly, stable, beta, 1.56.0] | ||
| rust: [nightly, stable, beta, 1.76.0, 1.60.0] | ||
| timeout-minutes: 45 | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: actions/checkout@v5 | ||
| - uses: dtolnay/rust-toolchain@master | ||
@@ -39,3 +39,5 @@ with: | ||
| if: matrix.rust == 'nightly' | ||
| - run: cargo check | ||
| - run: cargo test | ||
| if: matrix.rust != '1.60.0' | ||
| - run: cargo run --manifest-path benches/Cargo.toml | ||
@@ -56,3 +58,3 @@ - uses: actions/upload-artifact@v4 | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: actions/checkout@v5 | ||
| - uses: dtolnay/rust-toolchain@nightly | ||
@@ -71,3 +73,3 @@ - run: cargo generate-lockfile -Z minimal-versions | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: actions/checkout@v5 | ||
| - uses: dtolnay/rust-toolchain@nightly | ||
@@ -85,3 +87,3 @@ with: | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: actions/checkout@v5 | ||
| - uses: dtolnay/rust-toolchain@nightly | ||
@@ -99,3 +101,3 @@ with: | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: actions/checkout@v5 | ||
| - uses: dtolnay/rust-toolchain@miri | ||
@@ -113,5 +115,5 @@ - run: cargo miri setup | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: actions/checkout@v5 | ||
| - uses: dtolnay/rust-toolchain@stable | ||
| - uses: dtolnay/install@cargo-outdated | ||
| - run: cargo outdated --workspace --exit-code 1 |
+72
-118
@@ -19,17 +19,17 @@ # This file is automatically @generated by Cargo. | ||
| name = "glob" | ||
| version = "0.3.2" | ||
| version = "0.3.3" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "a8d1add55171497b4705a648c6b583acafb01d58050a51727785f0b2c8e0a2b2" | ||
| checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280" | ||
| [[package]] | ||
| name = "hashbrown" | ||
| version = "0.15.2" | ||
| version = "0.16.0" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" | ||
| checksum = "5419bdc4f6a9207fbeba6d11b604d481addf78ecd10c11ad51e76c2f6482748d" | ||
| [[package]] | ||
| name = "indexmap" | ||
| version = "2.8.0" | ||
| version = "2.11.4" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "3954d50fe15b02142bf25d3b8bdadb634ec3948f103d04ffe3031bc8fe9d7058" | ||
| checksum = "4b0f83760fb341a774ed326568e19f5a863af4a952def8c39f9ab92fd95b88e5" | ||
| dependencies = [ | ||
@@ -48,11 +48,11 @@ "equivalent", | ||
| name = "memchr" | ||
| version = "2.7.4" | ||
| version = "2.7.6" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" | ||
| checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273" | ||
| [[package]] | ||
| name = "proc-macro2" | ||
| version = "1.0.94" | ||
| version = "1.0.101" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "a31971752e70b8b2686d7e46ec17fb38dad4051d94024c88df49b667caea9c84" | ||
| checksum = "89ae43fd86e4158d6db51ad8e2b80f313af9cc74f5c0e03ccb87de09998732de" | ||
| dependencies = [ | ||
@@ -64,5 +64,5 @@ "unicode-ident", | ||
| name = "quote" | ||
| version = "1.0.39" | ||
| version = "1.0.40" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "c1f1914ce909e1658d9907913b4b91947430c7d9be598b15a1912935b8c04801" | ||
| checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" | ||
| dependencies = [ | ||
@@ -74,3 +74,3 @@ "proc-macro2", | ||
| name = "quote" | ||
| version = "1.0.40" | ||
| version = "1.0.41" | ||
| dependencies = [ | ||
@@ -84,5 +84,5 @@ "proc-macro2", | ||
| name = "rustversion" | ||
| version = "1.0.20" | ||
| version = "1.0.22" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "eded382c5f5f786b989652c49544c4877d9f015cc22e145a5ea8ea66c2921cd2" | ||
| checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" | ||
@@ -97,6 +97,15 @@ [[package]] | ||
| name = "serde" | ||
| version = "1.0.219" | ||
| version = "1.0.228" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6" | ||
| checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" | ||
| dependencies = [ | ||
| "serde_core", | ||
| ] | ||
| [[package]] | ||
| name = "serde_core" | ||
| version = "1.0.228" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" | ||
| dependencies = [ | ||
| "serde_derive", | ||
@@ -107,8 +116,8 @@ ] | ||
| name = "serde_derive" | ||
| version = "1.0.219" | ||
| version = "1.0.228" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" | ||
| checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" | ||
| dependencies = [ | ||
| "proc-macro2", | ||
| "quote 1.0.39", | ||
| "quote 1.0.40", | ||
| "syn", | ||
@@ -119,5 +128,5 @@ ] | ||
| name = "serde_json" | ||
| version = "1.0.140" | ||
| version = "1.0.145" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373" | ||
| checksum = "402a6f66d8c709116cf22f558eab210f5a50187f702eb4d7e5ef38d9a7f1c79c" | ||
| dependencies = [ | ||
@@ -128,2 +137,3 @@ "itoa", | ||
| "serde", | ||
| "serde_core", | ||
| ] | ||
@@ -133,7 +143,7 @@ | ||
| name = "serde_spanned" | ||
| version = "0.6.8" | ||
| version = "1.0.2" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1" | ||
| checksum = "5417783452c2be558477e104686f7de5dae53dba813c28435e0e70f82d9b04ee" | ||
| dependencies = [ | ||
| "serde", | ||
| "serde_core", | ||
| ] | ||
@@ -143,8 +153,8 @@ | ||
| name = "syn" | ||
| version = "2.0.100" | ||
| version = "2.0.106" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "b09a44accad81e1ba1cd74a32461ba89dee89095ba17b32f5d03683b1b1fc2a0" | ||
| checksum = "ede7c438028d4436d71104916910f5bb611972c5cfd7f89b8300a8186e6fada6" | ||
| dependencies = [ | ||
| "proc-macro2", | ||
| "quote 1.0.39", | ||
| "quote 1.0.40", | ||
| "unicode-ident", | ||
@@ -170,10 +180,13 @@ ] | ||
| name = "toml" | ||
| version = "0.8.20" | ||
| version = "0.9.7" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "cd87a5cdd6ffab733b2f74bc4fd7ee5fff6634124999ac278c35fc78c6120148" | ||
| checksum = "00e5e5d9bf2475ac9d4f0d9edab68cc573dc2fd644b0dba36b0c30a92dd9eaa0" | ||
| dependencies = [ | ||
| "serde", | ||
| "indexmap", | ||
| "serde_core", | ||
| "serde_spanned", | ||
| "toml_datetime", | ||
| "toml_edit", | ||
| "toml_parser", | ||
| "toml_writer", | ||
| "winnow", | ||
| ] | ||
@@ -183,19 +196,15 @@ | ||
| name = "toml_datetime" | ||
| version = "0.6.8" | ||
| version = "0.7.2" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" | ||
| checksum = "32f1085dec27c2b6632b04c80b3bb1b4300d6495d1e129693bdda7d91e72eec1" | ||
| dependencies = [ | ||
| "serde", | ||
| "serde_core", | ||
| ] | ||
| [[package]] | ||
| name = "toml_edit" | ||
| version = "0.22.24" | ||
| name = "toml_parser" | ||
| version = "1.0.3" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "17b4795ff5edd201c7cd6dca065ae59972ce77d1b80fa0a84d94950ece7d1474" | ||
| checksum = "4cf893c33be71572e0e9aa6dd15e6677937abd686b066eac3f8cd3531688a627" | ||
| dependencies = [ | ||
| "indexmap", | ||
| "serde", | ||
| "serde_spanned", | ||
| "toml_datetime", | ||
| "winnow", | ||
@@ -205,6 +214,12 @@ ] | ||
| [[package]] | ||
| name = "toml_writer" | ||
| version = "1.0.3" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "d163a63c116ce562a22cda521fcc4d79152e7aba014456fb5eb442f6d6a10109" | ||
| [[package]] | ||
| name = "trybuild" | ||
| version = "1.0.104" | ||
| version = "1.0.111" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "6ae08be68c056db96f0e6c6dd820727cca756ced9e1f4cc7fdd20e2a55e23898" | ||
| checksum = "0ded9fdb81f30a5708920310bfcd9ea7482ff9cba5f54601f7a19a877d5c2392" | ||
| dependencies = [ | ||
@@ -223,11 +238,11 @@ "dissimilar", | ||
| name = "unicode-ident" | ||
| version = "1.0.18" | ||
| version = "1.0.19" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" | ||
| checksum = "f63a545481291138910575129486daeaf8ac54aee4387fe7906919f7830c7d9d" | ||
| [[package]] | ||
| name = "winapi-util" | ||
| version = "0.1.9" | ||
| version = "0.1.11" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" | ||
| checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" | ||
| dependencies = [ | ||
@@ -238,81 +253,20 @@ "windows-sys", | ||
| [[package]] | ||
| name = "windows-sys" | ||
| version = "0.59.0" | ||
| name = "windows-link" | ||
| version = "0.2.0" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" | ||
| dependencies = [ | ||
| "windows-targets", | ||
| ] | ||
| checksum = "45e46c0661abb7180e7b9c281db115305d49ca1709ab8242adf09666d2173c65" | ||
| [[package]] | ||
| name = "windows-targets" | ||
| version = "0.52.6" | ||
| name = "windows-sys" | ||
| version = "0.61.1" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" | ||
| checksum = "6f109e41dd4a3c848907eb83d5a42ea98b3769495597450cf6d153507b166f0f" | ||
| dependencies = [ | ||
| "windows_aarch64_gnullvm", | ||
| "windows_aarch64_msvc", | ||
| "windows_i686_gnu", | ||
| "windows_i686_gnullvm", | ||
| "windows_i686_msvc", | ||
| "windows_x86_64_gnu", | ||
| "windows_x86_64_gnullvm", | ||
| "windows_x86_64_msvc", | ||
| "windows-link", | ||
| ] | ||
| [[package]] | ||
| name = "windows_aarch64_gnullvm" | ||
| version = "0.52.6" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" | ||
| [[package]] | ||
| name = "windows_aarch64_msvc" | ||
| version = "0.52.6" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" | ||
| [[package]] | ||
| name = "windows_i686_gnu" | ||
| version = "0.52.6" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" | ||
| [[package]] | ||
| name = "windows_i686_gnullvm" | ||
| version = "0.52.6" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" | ||
| [[package]] | ||
| name = "windows_i686_msvc" | ||
| version = "0.52.6" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" | ||
| [[package]] | ||
| name = "windows_x86_64_gnu" | ||
| version = "0.52.6" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" | ||
| [[package]] | ||
| name = "windows_x86_64_gnullvm" | ||
| version = "0.52.6" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" | ||
| [[package]] | ||
| name = "windows_x86_64_msvc" | ||
| version = "0.52.6" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" | ||
| [[package]] | ||
| name = "winnow" | ||
| version = "0.7.3" | ||
| version = "0.7.13" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "0e7f4ea97f6f78012141bcdb6a216b2609f0979ada50b20ca5b52dde2eac2bb1" | ||
| dependencies = [ | ||
| "memchr", | ||
| ] | ||
| checksum = "21a0236b59786fed61e2a80582dd500fe61f18b5dca67a4a067d0bc9039339cf" |
+6
-5
@@ -14,7 +14,7 @@ # THIS FILE IS AUTOMATICALLY GENERATED BY CARGO | ||
| edition = "2018" | ||
| rust-version = "1.56" | ||
| rust-version = "1.60" | ||
| name = "quote" | ||
| version = "1.0.40" | ||
| version = "1.0.41" | ||
| authors = ["David Tolnay <dtolnay@gmail.com>"] | ||
| build = false | ||
| build = "build.rs" | ||
| autolib = false | ||
@@ -37,4 +37,6 @@ autobins = false | ||
| [package.metadata.docs.rs] | ||
| targets = ["x86_64-unknown-linux-gnu"] | ||
| rustdoc-args = [ | ||
| "--generate-link-to-definition", | ||
| "--generate-macro-expansion", | ||
| "--extern-html-root-url=core=https://doc.rust-lang.org", | ||
@@ -44,3 +46,2 @@ "--extern-html-root-url=alloc=https://doc.rust-lang.org", | ||
| ] | ||
| targets = ["x86_64-unknown-linux-gnu"] | ||
@@ -71,3 +72,3 @@ [features] | ||
| [dev-dependencies.trybuild] | ||
| version = "1.0.66" | ||
| version = "1.0.108" | ||
| features = ["diff"] |
+1
-1
@@ -37,3 +37,3 @@ Rust Quasi-Quoting | ||
| *Version requirement: Quote supports rustc 1.56 and up.*<br> | ||
| *Version requirement: Quote supports rustc 1.60 and up.*<br> | ||
| [*Release notes*](https://github.com/dtolnay/quote/releases) | ||
@@ -40,0 +40,0 @@ |
+9
-9
@@ -92,3 +92,3 @@ //! [![github]](https://github.com/dtolnay/quote) [![crates-io]](https://crates.io/crates/quote) [![docs-rs]](https://docs.rs/quote) | ||
| // Quote types in rustdoc of other crates get linked to here. | ||
| #![doc(html_root_url = "https://docs.rs/quote/1.0.40")] | ||
| #![doc(html_root_url = "https://docs.rs/quote/1.0.41")] | ||
| #![allow( | ||
@@ -892,5 +892,5 @@ clippy::doc_markdown, | ||
| use $crate::__private::ext::*; | ||
| let has_iter = $crate::__private::ThereIsNoIteratorInRepetition; | ||
| let has_iter = $crate::__private::HasIterator::<false>; | ||
| $crate::pounded_var_names!{quote_bind_into_iter!(has_iter) () $($inner)*} | ||
| let _: $crate::__private::HasIterator = has_iter; | ||
| <_ as $crate::__private::CheckHasIterator<true>>::check(has_iter); | ||
| // This is `while true` instead of `loop` because if there are no | ||
@@ -916,5 +916,5 @@ // iterators used inside of this repetition then the body would not | ||
| let mut _i = 0usize; | ||
| let has_iter = $crate::__private::ThereIsNoIteratorInRepetition; | ||
| let has_iter = $crate::__private::HasIterator::<false>; | ||
| $crate::pounded_var_names!{quote_bind_into_iter!(has_iter) () $($inner)*} | ||
| let _: $crate::__private::HasIterator = has_iter; | ||
| <_ as $crate::__private::CheckHasIterator<true>>::check(has_iter); | ||
| while true { | ||
@@ -964,5 +964,5 @@ $crate::pounded_var_names!{quote_bind_next_or_break!() () $($inner)*} | ||
| use $crate::__private::ext::*; | ||
| let has_iter = $crate::__private::ThereIsNoIteratorInRepetition; | ||
| let has_iter = $crate::__private::HasIterator::<false>; | ||
| $crate::pounded_var_names!{quote_bind_into_iter!(has_iter) () $($inner)*} | ||
| let _: $crate::__private::HasIterator = has_iter; | ||
| <_ as $crate::__private::CheckHasIterator<true>>::check(has_iter); | ||
| while true { | ||
@@ -979,5 +979,5 @@ $crate::pounded_var_names!{quote_bind_next_or_break!() () $($inner)*} | ||
| let mut _i = 0usize; | ||
| let has_iter = $crate::__private::ThereIsNoIteratorInRepetition; | ||
| let has_iter = $crate::__private::HasIterator::<false>; | ||
| $crate::pounded_var_names!{quote_bind_into_iter!(has_iter) () $($inner)*} | ||
| let _: $crate::__private::HasIterator = has_iter; | ||
| <_ as $crate::__private::CheckHasIterator<true>>::check(has_iter); | ||
| while true { | ||
@@ -984,0 +984,0 @@ $crate::pounded_var_names!{quote_bind_next_or_break!() () $($inner)*} |
+49
-38
@@ -21,34 +21,46 @@ use self::get_span::{GetSpan, GetSpanBase, GetSpanInner}; | ||
| #[doc(hidden)] | ||
| pub struct HasIterator; // True | ||
| #[doc(hidden)] | ||
| pub struct ThereIsNoIteratorInRepetition; // False | ||
| pub struct HasIterator<const B: bool>; | ||
| impl BitOr<ThereIsNoIteratorInRepetition> for ThereIsNoIteratorInRepetition { | ||
| type Output = ThereIsNoIteratorInRepetition; | ||
| fn bitor(self, _rhs: ThereIsNoIteratorInRepetition) -> ThereIsNoIteratorInRepetition { | ||
| ThereIsNoIteratorInRepetition | ||
| impl BitOr<HasIterator<false>> for HasIterator<false> { | ||
| type Output = HasIterator<false>; | ||
| fn bitor(self, _rhs: HasIterator<false>) -> HasIterator<false> { | ||
| HasIterator::<false> | ||
| } | ||
| } | ||
| impl BitOr<ThereIsNoIteratorInRepetition> for HasIterator { | ||
| type Output = HasIterator; | ||
| fn bitor(self, _rhs: ThereIsNoIteratorInRepetition) -> HasIterator { | ||
| HasIterator | ||
| impl BitOr<HasIterator<false>> for HasIterator<true> { | ||
| type Output = HasIterator<true>; | ||
| fn bitor(self, _rhs: HasIterator<false>) -> HasIterator<true> { | ||
| HasIterator::<true> | ||
| } | ||
| } | ||
| impl BitOr<HasIterator> for ThereIsNoIteratorInRepetition { | ||
| type Output = HasIterator; | ||
| fn bitor(self, _rhs: HasIterator) -> HasIterator { | ||
| HasIterator | ||
| impl BitOr<HasIterator<true>> for HasIterator<false> { | ||
| type Output = HasIterator<true>; | ||
| fn bitor(self, _rhs: HasIterator<true>) -> HasIterator<true> { | ||
| HasIterator::<true> | ||
| } | ||
| } | ||
| impl BitOr<HasIterator> for HasIterator { | ||
| type Output = HasIterator; | ||
| fn bitor(self, _rhs: HasIterator) -> HasIterator { | ||
| HasIterator | ||
| impl BitOr<HasIterator<true>> for HasIterator<true> { | ||
| type Output = HasIterator<true>; | ||
| fn bitor(self, _rhs: HasIterator<true>) -> HasIterator<true> { | ||
| HasIterator::<true> | ||
| } | ||
| } | ||
| #[doc(hidden)] | ||
| #[cfg_attr( | ||
| not(no_diagnostic_namespace), | ||
| diagnostic::on_unimplemented( | ||
| message = "repetition contains no interpolated value that is an iterator", | ||
| label = "none of the values interpolated inside this repetition are iterable" | ||
| ) | ||
| )] | ||
| pub trait CheckHasIterator<const B: bool>: Sized { | ||
| fn check(self) {} | ||
| } | ||
| impl CheckHasIterator<true> for HasIterator<true> {} | ||
| /// Extension traits used by the implementation of `quote!`. These are defined | ||
@@ -62,4 +74,3 @@ /// in separate traits, rather than as a single trait due to ambiguity issues. | ||
| pub mod ext { | ||
| use super::RepInterp; | ||
| use super::{HasIterator as HasIter, ThereIsNoIteratorInRepetition as DoesNotHaveIter}; | ||
| use super::{HasIterator, RepInterp}; | ||
| use crate::ToTokens; | ||
@@ -72,4 +83,4 @@ use alloc::collections::btree_set::{self, BTreeSet}; | ||
| pub trait RepIteratorExt: Iterator + Sized { | ||
| fn quote_into_iter(self) -> (Self, HasIter) { | ||
| (self, HasIter) | ||
| fn quote_into_iter(self) -> (Self, HasIterator<true>) { | ||
| (self, HasIterator::<true>) | ||
| } | ||
@@ -87,3 +98,3 @@ } | ||
| /// This allows repeated calls to `quote_into_iter` to continue | ||
| /// correctly returning DoesNotHaveIter. | ||
| /// correctly returning HasIterator<false>. | ||
| fn next(&self) -> Option<&Self> { | ||
@@ -93,4 +104,4 @@ Some(self) | ||
| fn quote_into_iter(&self) -> (&Self, DoesNotHaveIter) { | ||
| (self, DoesNotHaveIter) | ||
| fn quote_into_iter(&self) -> (&Self, HasIterator<false>) { | ||
| (self, HasIterator::<false>) | ||
| } | ||
@@ -107,3 +118,3 @@ } | ||
| fn quote_into_iter(&'q self) -> (Self::Iter, HasIter); | ||
| fn quote_into_iter(&'q self) -> (Self::Iter, HasIterator<true>); | ||
| } | ||
@@ -114,3 +125,3 @@ | ||
| fn quote_into_iter(&'q self) -> (Self::Iter, HasIter) { | ||
| fn quote_into_iter(&'q self) -> (Self::Iter, HasIterator<true>) { | ||
| <T as RepAsIteratorExt>::quote_into_iter(*self) | ||
@@ -123,3 +134,3 @@ } | ||
| fn quote_into_iter(&'q self) -> (Self::Iter, HasIter) { | ||
| fn quote_into_iter(&'q self) -> (Self::Iter, HasIterator<true>) { | ||
| <T as RepAsIteratorExt>::quote_into_iter(*self) | ||
@@ -132,4 +143,4 @@ } | ||
| fn quote_into_iter(&'q self) -> (Self::Iter, HasIter) { | ||
| (self.iter(), HasIter) | ||
| fn quote_into_iter(&'q self) -> (Self::Iter, HasIterator<true>) { | ||
| (self.iter(), HasIterator::<true>) | ||
| } | ||
@@ -141,4 +152,4 @@ } | ||
| fn quote_into_iter(&'q self) -> (Self::Iter, HasIter) { | ||
| (self.iter(), HasIter) | ||
| fn quote_into_iter(&'q self) -> (Self::Iter, HasIterator<true>) { | ||
| (self.iter(), HasIterator::<true>) | ||
| } | ||
@@ -150,4 +161,4 @@ } | ||
| fn quote_into_iter(&'q self) -> (Self::Iter, HasIter) { | ||
| (self.iter(), HasIter) | ||
| fn quote_into_iter(&'q self) -> (Self::Iter, HasIterator<true>) { | ||
| (self.iter(), HasIterator::<true>) | ||
| } | ||
@@ -159,4 +170,4 @@ } | ||
| fn quote_into_iter(&'q self) -> (Self::Iter, HasIter) { | ||
| (self.iter(), HasIter) | ||
| fn quote_into_iter(&'q self) -> (Self::Iter, HasIterator<true>) { | ||
| (self.iter(), HasIterator::<true>) | ||
| } | ||
@@ -168,3 +179,3 @@ } | ||
| fn quote_into_iter(&'q self) -> (Self::Iter, HasIter) { | ||
| fn quote_into_iter(&'q self) -> (Self::Iter, HasIterator<true>) { | ||
| self.0.quote_into_iter() | ||
@@ -171,0 +182,0 @@ } |
+1
-1
@@ -203,3 +203,3 @@ #![allow( | ||
| }; | ||
| let expected = concat!("2.345f32 2.345f64"); | ||
| let expected = "2.345f32 2.345f64"; | ||
| assert_eq!(expected, tokens.to_string()); | ||
@@ -206,0 +206,0 @@ } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet