From 7ea7e9e40a20cc53a7a16e3af5274fa2b4ed87a2 Mon Sep 17 00:00:00 2001 From: v8-ci-autoroll-builder Date: Mon, 29 Jun 2026 21:03:58 -0700 Subject: [PATCH 1/2] deps: V8: cherry-pick third_party/rust update from cce7146a7a2a Original commit message: Update V8 DEPS (trusted) Rolling agents/internal: https://chrome-internal.googlesource.com/chrome/agents-internal/+log/31b193a..d9f3ed2 Rolling build: https://chromium.googlesource.com/chromium/src/build/+log/6bb98d0..209acdc Rolling buildtools/linux64: git_revision:e331ddb6e93389abfc75c611690bb82f5274029e..git_revision:1d86777e7f2562a86ecea77d1809ac4f82bb5bfe Rolling buildtools/mac: git_revision:e331ddb6e93389abfc75c611690bb82f5274029e..git_revision:1d86777e7f2562a86ecea77d1809ac4f82bb5bfe Rolling buildtools/win: git_revision:e331ddb6e93389abfc75c611690bb82f5274029e..git_revision:1d86777e7f2562a86ecea77d1809ac4f82bb5bfe Rolling third_party/libunwind/src: https://chromium.googlesource.com/external/github.com/llvm/llvm-project/libunwind/+log/9fe0a38..6de9f6e Rolling third_party/llvm-libc/src: https://chromium.googlesource.com/external/github.com/llvm/llvm-project/libc/+log/265cc6a..9a821f4 Rolling third_party/perfetto: https://chromium.googlesource.com/external/github.com/google/perfetto/+log/c6375c0..ec4b996 Rolling third_party/rust: https://chromium.googlesource.com/chromium/src/third_party/rust/+log/403633f..ea940b7 Rolling third_party/siso/cipd: git_revision:7ea15ed68d4aa12fc4aaa50f5446e8549e8f1ce0..git_revision:24b80aff540b202a88417f9f93b0dc86229eca7a Rolling tools/win: https://chromium.googlesource.com/chromium/src/tools/win/+log/faefd1b..45843c2 Roll created at https://cr-buildbucket.appspot.com/build/8677600804642094433 Change-Id: I90eeebbecba5a32e5cf90889d3011772361021d0 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/8022503 Commit-Queue: v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com Bot-Commit: v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com Cr-Commit-Position: refs/heads/main@{#108316} Refs: https://github.com/v8/v8/commit/cce7146a7a2a2081d8751ce1fd07e3391d842b6f Co-authored-by: Renegade334 --- deps/v8/DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deps/v8/DEPS b/deps/v8/DEPS index 8787d03124f2..ee9800b5ed8a 100644 --- a/deps/v8/DEPS +++ b/deps/v8/DEPS @@ -486,7 +486,7 @@ deps = { 'tools/win': Var('chromium_url') + '/chromium/src/tools/win' + '@' + 'baacfc6d5986b07abe0503216b491e234b94ba79', 'third_party/rust': - Var('chromium_url') + '/chromium/src/third_party/rust' + '@' + '975d090feeca96ede3442405f8d55a841c4652b6', + Var('chromium_url') + '/chromium/src/third_party/rust' + '@' + 'ea940b730222702313c9bd4f5081e3adbc4c1070', 'third_party/rust-toolchain': { 'dep_type': 'gcs', 'bucket': 'chromium-browser-clang', From b663cff385327420c1aec77ca1e5780d8928a761 Mon Sep 17 00:00:00 2001 From: Renegade334 Date: Sat, 14 Nov 2026 14:57:17 +0100 Subject: [PATCH 2/2] deps: update Rust crates for V8 14.6.202.34-node.40 --- deps/crates/Cargo.lock | 31 +- deps/crates/Cargo.toml | 9 +- .../vendor/autocfg-v1/.cargo_vcs_info.json | 2 +- deps/crates/vendor/autocfg-v1/Cargo.lock | 2 +- deps/crates/vendor/autocfg-v1/Cargo.toml | 5 +- deps/crates/vendor/autocfg-v1/Cargo.toml.orig | 15 +- deps/crates/vendor/autocfg-v1/README.md | 4 + .../vendor/autocfg-v1/tests/wrap_ignored | 12 - .../vendor/autocfg-v1/tests/wrappers.rs | 35 +- .../.cargo_vcs_info.json | 2 +- .../vendor/diplomat-runtime-v0_15/Cargo.lock | 2 +- .../vendor/diplomat-runtime-v0_15/Cargo.toml | 2 +- .../diplomat-runtime-v0_15/Cargo.toml.orig | 2 +- .../diplomat-runtime-v0_15/src/wasm_glue.rs | 56 +- .../displaydoc-v0_2/.cargo_vcs_info.json | 2 +- .../displaydoc-v0_2/.github/workflows/ci.yml | 120 ---- deps/crates/vendor/displaydoc-v0_2/.gitignore | 3 - .../vendor/displaydoc-v0_2/CHANGELOG.md | 17 +- deps/crates/vendor/displaydoc-v0_2/Cargo.lock | 295 +++------ deps/crates/vendor/displaydoc-v0_2/Cargo.toml | 68 +- .../vendor/displaydoc-v0_2/Cargo.toml.orig | 5 +- deps/crates/vendor/displaydoc-v0_2/README.md | 6 +- deps/crates/vendor/displaydoc-v0_2/README.tpl | 23 - .../vendor/displaydoc-v0_2/examples/simple.rs | 36 - .../crates/vendor/displaydoc-v0_2/src/attr.rs | 82 +-- .../vendor/displaydoc-v0_2/src/expand.rs | 19 +- deps/crates/vendor/displaydoc-v0_2/src/lib.rs | 8 +- .../displaydoc-v0_2/tests/compile_tests.rs | 31 +- .../vendor/displaydoc-v0_2/tests/happy.rs | 69 +- .../vendor/displaydoc-v0_2/tests/no_std.rs | 44 ++ .../tests/no_std/enum_prefix.rs | 36 - .../tests/no_std/enum_prefix_missing.rs | 35 - .../tests/no_std/enum_prefix_missing.stderr | 22 - .../tests/no_std/multi_line.rs | 37 -- .../tests/no_std/multi_line.stderr | 22 - .../tests/no_std/multi_line_allow.rs | 38 -- .../displaydoc-v0_2/tests/no_std/with.rs | 32 - .../displaydoc-v0_2/tests/no_std/without.rs | 28 - .../tests/no_std/without.stderr | 22 - .../displaydoc-v0_2/tests/std/enum_prefix.rs | 36 - .../tests/std/enum_prefix_missing.rs | 35 - .../tests/std/enum_prefix_missing.stderr | 22 - .../displaydoc-v0_2/tests/std/multi_line.rs | 37 -- .../tests/std/multi_line.stderr | 22 - .../tests/std/multi_line_allow.rs | 38 -- .../displaydoc-v0_2/tests/std/multiple.rs | 38 -- .../displaydoc-v0_2/tests/std/without.rs | 28 - .../displaydoc-v0_2/tests/std/without.stderr | 22 - .../displaydoc-v0_2/tests/ui/enum_prefix.rs | 16 + .../tests/ui/enum_prefix_missing.rs | 15 + .../displaydoc-v0_2/tests/ui/multi_line.rs | 20 + .../tests/ui/multi_line_allow.rs | 27 + .../tests/ui/multi_line_line_break.rs | 20 + .../tests/ui/multi_line_line_break_block.rs | 14 + .../displaydoc-v0_2/tests/ui/multiple.rs | 15 + .../displaydoc-v0_2/tests/ui/without.rs | 8 + .../vendor/displaydoc-v0_2/update-readme.sh | 5 - .../vendor/either-v1/.cargo_vcs_info.json | 2 +- .../vendor/either-v1/.github/workflows/ci.yml | 7 + deps/crates/vendor/either-v1/Cargo.lock | 45 +- deps/crates/vendor/either-v1/Cargo.toml | 13 +- deps/crates/vendor/either-v1/Cargo.toml.orig | 3 +- deps/crates/vendor/either-v1/README.rst | 16 + deps/crates/vendor/either-v1/src/iterator.rs | 12 +- deps/crates/vendor/either-v1/src/lib.rs | 341 ++++++++-- .../vendor/either-v1/src/serde_untagged.rs | 6 +- .../either-v1/src/serde_untagged_optional.rs | 6 +- .../icu_locale_core-v2/src/extensions/mod.rs | 12 +- .../src/extensions/other/mod.rs | 9 +- .../tests/fixtures/locale.json | 33 + .../icu_locale_core-v2/tests/fixtures/mod.rs | 11 +- .../vendor/icu_locale_core-v2/tests/locale.rs | 15 + .../vendor/ixdtf-v0_6/.cargo_vcs_info.json | 2 +- deps/crates/vendor/ixdtf-v0_6/Cargo.lock | 120 ++-- deps/crates/vendor/ixdtf-v0_6/Cargo.toml | 62 +- deps/crates/vendor/ixdtf-v0_6/Cargo.toml.orig | 8 +- deps/crates/vendor/ixdtf-v0_6/src/core.rs | 79 +-- deps/crates/vendor/ixdtf-v0_6/src/encoding.rs | 85 +++ deps/crates/vendor/ixdtf-v0_6/src/error.rs | 4 - deps/crates/vendor/ixdtf-v0_6/src/lib.rs | 36 +- .../ixdtf-v0_6/src/parsers/annotations.rs | 2 +- .../vendor/ixdtf-v0_6/src/parsers/datetime.rs | 20 +- .../vendor/ixdtf-v0_6/src/parsers/duration.rs | 46 +- .../vendor/ixdtf-v0_6/src/parsers/mod.rs | 12 +- .../vendor/ixdtf-v0_6/src/parsers/tests.rs | 4 +- .../vendor/ixdtf-v0_6/src/parsers/time.rs | 2 +- .../vendor/ixdtf-v0_6/src/parsers/timezone.rs | 31 +- deps/crates/vendor/ixdtf-v0_6/src/records.rs | 12 +- .../vendor/litemap-v0_8/.cargo_vcs_info.json | 2 +- deps/crates/vendor/litemap-v0_8/Cargo.lock | 202 +++--- deps/crates/vendor/litemap-v0_8/Cargo.toml | 60 +- .../vendor/litemap-v0_8/Cargo.toml.orig | 10 +- .../vendor/litemap-v0_8/src/databake.rs | 2 +- deps/crates/vendor/litemap-v0_8/src/lib.rs | 29 +- deps/crates/vendor/litemap-v0_8/src/map.rs | 4 +- deps/crates/vendor/litemap-v0_8/src/serde.rs | 4 +- .../vendor/litemap-v0_8/src/store/mod.rs | 16 +- .../vendor/litemap-v0_8/src/store/vec_impl.rs | 2 +- .../crates/vendor/litemap-v0_8/src/testing.rs | 4 +- .../crates/vendor/litemap-v0_8/tests/store.rs | 2 +- .../potential_utf-v0_1/.cargo_vcs_info.json | 2 +- .../vendor/potential_utf-v0_1/Cargo.lock | 56 +- .../vendor/potential_utf-v0_1/Cargo.toml | 66 +- .../vendor/potential_utf-v0_1/Cargo.toml.orig | 6 +- .../vendor/potential_utf-v0_1/src/lib.rs | 6 +- .../vendor/potential_utf-v0_1/src/uchar.rs | 2 +- .../vendor/potential_utf-v0_1/src/ustr.rs | 14 +- .../vendor/quote-v1/.cargo_vcs_info.json | 2 +- .../vendor/quote-v1/.github/workflows/ci.yml | 14 +- deps/crates/vendor/quote-v1/Cargo.lock | 66 +- deps/crates/vendor/quote-v1/Cargo.toml | 2 +- deps/crates/vendor/quote-v1/Cargo.toml.orig | 2 +- deps/crates/vendor/quote-v1/src/lib.rs | 294 ++++----- deps/crates/vendor/quote-v1/src/to_tokens.rs | 2 +- .../vendor/smallvec-v1/.cargo_vcs_info.json | 2 +- .../smallvec-v1/.github/workflows/main.yml | 114 ---- deps/crates/vendor/smallvec-v1/.gitignore | 4 - deps/crates/vendor/smallvec-v1/Cargo.lock | 77 +-- deps/crates/vendor/smallvec-v1/Cargo.toml | 23 +- .../crates/vendor/smallvec-v1/Cargo.toml.orig | 3 +- .../vendor/smallvec-v1/benches/bench.rs | 312 --------- .../debug_metadata/smallvec.natvis | 35 - .../vendor/smallvec-v1/scripts/run_miri.sh | 24 - deps/crates/vendor/smallvec-v1/src/lib.rs | 32 +- deps/crates/vendor/smallvec-v1/src/tests.rs | 23 + .../smallvec-v1/tests/debugger_visualizer.rs | 68 -- deps/crates/vendor/smallvec-v1/tests/macro.rs | 24 - .../crates/vendor/syn-v2/.cargo_vcs_info.json | 2 +- deps/crates/vendor/syn-v2/Cargo.lock | 622 ++++++++---------- deps/crates/vendor/syn-v2/Cargo.toml | 2 +- deps/crates/vendor/syn-v2/Cargo.toml.orig | 2 +- deps/crates/vendor/syn-v2/README.md | 2 +- deps/crates/vendor/syn-v2/benches/rust.rs | 4 - deps/crates/vendor/syn-v2/src/expr.rs | 4 +- deps/crates/vendor/syn-v2/src/lib.rs | 4 +- deps/crates/vendor/syn-v2/src/lit.rs | 12 +- deps/crates/vendor/syn-v2/src/token.rs | 14 +- deps/crates/vendor/syn-v2/tests/common/eq.rs | 42 +- deps/crates/vendor/syn-v2/tests/debug/gen.rs | 5 +- deps/crates/vendor/syn-v2/tests/test_item.rs | 1 + .../temporal_capi-v0_2/.cargo_vcs_info.json | 2 +- .../vendor/temporal_capi-v0_2/Cargo.lock | 26 +- .../vendor/temporal_capi-v0_2/Cargo.toml | 2 +- .../temporal_rs-v0_2/.cargo_vcs_info.json | 2 +- .../vendor/temporal_rs-v0_2/CHANGELOG.md | 6 + .../crates/vendor/temporal_rs-v0_2/Cargo.lock | 30 +- .../crates/vendor/temporal_rs-v0_2/Cargo.toml | 2 +- .../vendor/temporal_rs-v0_2/Cargo.toml.orig | 2 +- .../src/builtins/core/duration/normalized.rs | 2 +- .../src/builtins/core/duration/tests.rs | 38 ++ .../src/builtins/core/zoned_date_time.rs | 17 +- .../builtins/core/zoned_date_time/tests.rs | 101 +++ .../crates/vendor/temporal_rs-v0_2/src/iso.rs | 2 +- .../writeable-v0_6/.cargo_vcs_info.json | 2 +- deps/crates/vendor/writeable-v0_6/Cargo.lock | 134 ++-- deps/crates/vendor/writeable-v0_6/Cargo.toml | 57 +- .../vendor/writeable-v0_6/Cargo.toml.orig | 7 +- .../writeable-v0_6/benches/writeable.rs | 8 +- .../examples/writeable_message.rs | 3 +- deps/crates/vendor/writeable-v0_6/src/cmp.rs | 20 + .../vendor/writeable-v0_6/src/concat.rs | 146 ++++ .../crates/vendor/writeable-v0_6/src/impls.rs | 9 +- deps/crates/vendor/writeable-v0_6/src/lib.rs | 15 +- .../writeable-v0_6/src/parts_write_adapter.rs | 2 + .../vendor/writeable-v0_6/src/testing.rs | 2 + .../writeable-v0_6/src/try_writeable.rs | 1 + .../vendor/yoke-v0_8/.cargo_vcs_info.json | 2 +- deps/crates/vendor/yoke-v0_8/Cargo.lock | 6 +- deps/crates/vendor/yoke-v0_8/Cargo.toml | 3 +- deps/crates/vendor/yoke-v0_8/Cargo.toml.orig | 4 +- .../vendor/yoke-v0_8/src/cartable_ptr.rs | 33 +- .../zerofrom-derive-v0_1/.cargo_vcs_info.json | 2 +- .../vendor/zerofrom-derive-v0_1/Cargo.lock | 22 +- .../vendor/zerofrom-derive-v0_1/Cargo.toml | 60 +- .../zerofrom-derive-v0_1/Cargo.toml.orig | 7 +- .../examples/zf_derive.rs | 36 +- .../vendor/zerofrom-derive-v0_1/src/lib.rs | 15 +- .../zerofrom-derive-v0_1/src/visitor.rs | 2 +- .../vendor/zerofrom-v0_1/.cargo_vcs_info.json | 2 +- deps/crates/vendor/zerofrom-v0_1/Cargo.lock | 26 +- deps/crates/vendor/zerofrom-v0_1/Cargo.toml | 71 +- .../vendor/zerofrom-v0_1/Cargo.toml.orig | 16 +- deps/crates/vendor/zerofrom-v0_1/src/lib.rs | 14 +- 183 files changed, 2952 insertions(+), 3088 deletions(-) delete mode 100755 deps/crates/vendor/autocfg-v1/tests/wrap_ignored delete mode 100644 deps/crates/vendor/displaydoc-v0_2/.github/workflows/ci.yml delete mode 100644 deps/crates/vendor/displaydoc-v0_2/.gitignore delete mode 100644 deps/crates/vendor/displaydoc-v0_2/README.tpl delete mode 100644 deps/crates/vendor/displaydoc-v0_2/examples/simple.rs create mode 100644 deps/crates/vendor/displaydoc-v0_2/tests/no_std.rs delete mode 100644 deps/crates/vendor/displaydoc-v0_2/tests/no_std/enum_prefix.rs delete mode 100644 deps/crates/vendor/displaydoc-v0_2/tests/no_std/enum_prefix_missing.rs delete mode 100644 deps/crates/vendor/displaydoc-v0_2/tests/no_std/enum_prefix_missing.stderr delete mode 100644 deps/crates/vendor/displaydoc-v0_2/tests/no_std/multi_line.rs delete mode 100644 deps/crates/vendor/displaydoc-v0_2/tests/no_std/multi_line.stderr delete mode 100644 deps/crates/vendor/displaydoc-v0_2/tests/no_std/multi_line_allow.rs delete mode 100644 deps/crates/vendor/displaydoc-v0_2/tests/no_std/with.rs delete mode 100644 deps/crates/vendor/displaydoc-v0_2/tests/no_std/without.rs delete mode 100644 deps/crates/vendor/displaydoc-v0_2/tests/no_std/without.stderr delete mode 100644 deps/crates/vendor/displaydoc-v0_2/tests/std/enum_prefix.rs delete mode 100644 deps/crates/vendor/displaydoc-v0_2/tests/std/enum_prefix_missing.rs delete mode 100644 deps/crates/vendor/displaydoc-v0_2/tests/std/enum_prefix_missing.stderr delete mode 100644 deps/crates/vendor/displaydoc-v0_2/tests/std/multi_line.rs delete mode 100644 deps/crates/vendor/displaydoc-v0_2/tests/std/multi_line.stderr delete mode 100644 deps/crates/vendor/displaydoc-v0_2/tests/std/multi_line_allow.rs delete mode 100644 deps/crates/vendor/displaydoc-v0_2/tests/std/multiple.rs delete mode 100644 deps/crates/vendor/displaydoc-v0_2/tests/std/without.rs delete mode 100644 deps/crates/vendor/displaydoc-v0_2/tests/std/without.stderr create mode 100644 deps/crates/vendor/displaydoc-v0_2/tests/ui/enum_prefix.rs create mode 100644 deps/crates/vendor/displaydoc-v0_2/tests/ui/enum_prefix_missing.rs create mode 100644 deps/crates/vendor/displaydoc-v0_2/tests/ui/multi_line.rs create mode 100644 deps/crates/vendor/displaydoc-v0_2/tests/ui/multi_line_allow.rs create mode 100644 deps/crates/vendor/displaydoc-v0_2/tests/ui/multi_line_line_break.rs create mode 100644 deps/crates/vendor/displaydoc-v0_2/tests/ui/multi_line_line_break_block.rs create mode 100644 deps/crates/vendor/displaydoc-v0_2/tests/ui/multiple.rs create mode 100644 deps/crates/vendor/displaydoc-v0_2/tests/ui/without.rs delete mode 100755 deps/crates/vendor/displaydoc-v0_2/update-readme.sh create mode 100644 deps/crates/vendor/ixdtf-v0_6/src/encoding.rs delete mode 100644 deps/crates/vendor/smallvec-v1/.github/workflows/main.yml delete mode 100644 deps/crates/vendor/smallvec-v1/.gitignore delete mode 100644 deps/crates/vendor/smallvec-v1/benches/bench.rs delete mode 100644 deps/crates/vendor/smallvec-v1/debug_metadata/smallvec.natvis delete mode 100644 deps/crates/vendor/smallvec-v1/scripts/run_miri.sh delete mode 100644 deps/crates/vendor/smallvec-v1/tests/debugger_visualizer.rs delete mode 100644 deps/crates/vendor/smallvec-v1/tests/macro.rs create mode 100644 deps/crates/vendor/writeable-v0_6/src/concat.rs diff --git a/deps/crates/Cargo.lock b/deps/crates/Cargo.lock index 1b7bb576ca09..3fa6312fb456 100644 --- a/deps/crates/Cargo.lock +++ b/deps/crates/Cargo.lock @@ -4,7 +4,7 @@ version = 4 [[package]] name = "autocfg" -version = "1.5.0" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -37,7 +37,7 @@ dependencies = [ [[package]] name = "diplomat-runtime" -version = "0.15.0" +version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -55,7 +55,7 @@ dependencies = [ [[package]] name = "displaydoc" -version = "0.2.5" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2", @@ -146,7 +146,7 @@ dependencies = [ [[package]] name = "ixdtf" -version = "0.6.4" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -156,13 +156,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "litemap" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "node_crates" version = "14.6.202" dependencies = [ + "icu_locale", "icu_locale_core", "icu_provider", "syn", @@ -180,7 +181,7 @@ dependencies = [ [[package]] name = "potential_utf" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "serde_core", @@ -198,7 +199,7 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.45" +version = "1.0.46" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2", @@ -242,7 +243,7 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.15.1" +version = "1.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -260,7 +261,7 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.117" +version = "2.0.118" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2", @@ -280,7 +281,7 @@ dependencies = [ [[package]] name = "temporal_capi" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "diplomat", @@ -296,7 +297,7 @@ dependencies = [ [[package]] name = "temporal_rs" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "calendrical_calculations", @@ -343,12 +344,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "writeable" -version = "0.6.2" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "yoke" -version = "0.8.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "stable_deref_trait", @@ -369,7 +370,7 @@ dependencies = [ [[package]] name = "zerofrom" -version = "0.1.6" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "zerofrom-derive", @@ -377,7 +378,7 @@ dependencies = [ [[package]] name = "zerofrom-derive" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2", diff --git a/deps/crates/Cargo.toml b/deps/crates/Cargo.toml index 6be8dcef7917..344abad7dcf9 100644 --- a/deps/crates/Cargo.toml +++ b/deps/crates/Cargo.toml @@ -9,6 +9,11 @@ rust-version = "1.86" [lib] crate-type = [ "staticlib" ] +[dependencies.icu_locale] +version = "2.2.0" +default-features = false +features = [ "compiled_data" ] + [dependencies.icu_locale_core] version = "2.2.0" default-features = false @@ -22,10 +27,10 @@ version = "2" features = [ "full" ] [dependencies.temporal_capi] -version = "0.2.3" +version = "0.2.4" features = [ "zoneinfo64" ] [dependencies.temporal_rs] -version = "0.2.3" +version = "0.2.4" default-features = false features = [ "float64_representable_durations" ] diff --git a/deps/crates/vendor/autocfg-v1/.cargo_vcs_info.json b/deps/crates/vendor/autocfg-v1/.cargo_vcs_info.json index 80087c707158..df94611dbe34 100644 --- a/deps/crates/vendor/autocfg-v1/.cargo_vcs_info.json +++ b/deps/crates/vendor/autocfg-v1/.cargo_vcs_info.json @@ -1,6 +1,6 @@ { "git": { - "sha1": "d912169ed67977efe5a465269b0e73cb66060c49" + "sha1": "2799b09c24e6632f8e653c5cd8fc303e85a906ba" }, "path_in_vcs": "" } \ No newline at end of file diff --git a/deps/crates/vendor/autocfg-v1/Cargo.lock b/deps/crates/vendor/autocfg-v1/Cargo.lock index 45f1f18ec94c..706e399fa6e2 100644 --- a/deps/crates/vendor/autocfg-v1/Cargo.lock +++ b/deps/crates/vendor/autocfg-v1/Cargo.lock @@ -2,5 +2,5 @@ # It is not intended for manual editing. [[package]] name = "autocfg" -version = "1.5.0" +version = "1.5.1" diff --git a/deps/crates/vendor/autocfg-v1/Cargo.toml b/deps/crates/vendor/autocfg-v1/Cargo.toml index 005f56dcdd77..2327046d9ecb 100644 --- a/deps/crates/vendor/autocfg-v1/Cargo.toml +++ b/deps/crates/vendor/autocfg-v1/Cargo.toml @@ -12,7 +12,7 @@ [package] rust-version = "1.0" name = "autocfg" -version = "1.5.0" +version = "1.5.1" authors = ["Josh Stone "] build = false exclude = ["/.github/**"] @@ -72,5 +72,4 @@ path = "tests/tests.rs" [[test]] name = "wrappers" path = "tests/wrappers.rs" - -[dependencies] +harness = false diff --git a/deps/crates/vendor/autocfg-v1/Cargo.toml.orig b/deps/crates/vendor/autocfg-v1/Cargo.toml.orig index 75b34ea60571..8e9bf95c9f7c 100644 --- a/deps/crates/vendor/autocfg-v1/Cargo.toml.orig +++ b/deps/crates/vendor/autocfg-v1/Cargo.toml.orig @@ -1,6 +1,6 @@ [package] name = "autocfg" -version = "1.5.0" +version = "1.5.1" authors = ["Josh Stone "] license = "Apache-2.0 OR MIT" repository = "https://github.com/cuviper/autocfg" @@ -12,4 +12,15 @@ categories = ["development-tools::build-utils"] exclude = ["/.github/**"] rust-version = "1.0" -[dependencies] +[[test]] +name = "no_std" + +[[test]] +name = "rustflags" + +[[test]] +name = "tests" + +[[test]] +name = "wrappers" +harness = false diff --git a/deps/crates/vendor/autocfg-v1/README.md b/deps/crates/vendor/autocfg-v1/README.md index a3d8ac4995c6..05dbfc6c3dd0 100644 --- a/deps/crates/vendor/autocfg-v1/README.md +++ b/deps/crates/vendor/autocfg-v1/README.md @@ -43,6 +43,10 @@ should only be used when the compiler supports it. ## Release Notes +- 1.5.1 (2026-05-22) + + - Refactor the `test_wrappers` test without any shell script. + - 1.5.0 (2025-06-17) - Add `edition` and `set_edition` to control the Rust edition used in probes. diff --git a/deps/crates/vendor/autocfg-v1/tests/wrap_ignored b/deps/crates/vendor/autocfg-v1/tests/wrap_ignored deleted file mode 100755 index 5e577d0b26bc..000000000000 --- a/deps/crates/vendor/autocfg-v1/tests/wrap_ignored +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash - -for arg in "$@"; do - case "$arg" in - # Add our own version so we can check that the wrapper is used for that. - "--version") echo "release: 12345.6789.0" ;; - # Read all input so the writer doesn't get EPIPE when we exit. - "-") read -d "" PROBE ;; - esac -done - -exit 0 diff --git a/deps/crates/vendor/autocfg-v1/tests/wrappers.rs b/deps/crates/vendor/autocfg-v1/tests/wrappers.rs index cacca71aaede..69a64ddb6d71 100644 --- a/deps/crates/vendor/autocfg-v1/tests/wrappers.rs +++ b/deps/crates/vendor/autocfg-v1/tests/wrappers.rs @@ -1,13 +1,39 @@ extern crate autocfg; use std::env; +use std::io; mod support; +fn main() { + let args: Vec<_> = env::args().skip(1).collect(); + if args.is_empty() { + // With no arguments, this must be a (harness-free) test run. + // (we're using system binaries as wrappers, so ignore other platforms) + if cfg!(unix) { + test_wrappers(); + } + } else { + // Otherwise we're acting like a no-op rustc wrapper, ignoring almost everything. + for arg in args { + match &*arg { + // Add our own version so we can check that the wrapper is used for that. + "--version" => println!("release: 12345.6789.0"), + + // Read all input so the writer doesn't get EPIPE when we exit. + "-" => { + let stdin = io::stdin(); + let _ = io::copy(&mut stdin.lock(), &mut io::sink()); + } + + _ => {} + } + } + } +} + /// Tests that autocfg uses the RUSTC_WRAPPER and/or RUSTC_WORKSPACE_WRAPPER /// environment variables when running rustc. -#[test] -#[cfg(unix)] // we're using system binaries as wrappers fn test_wrappers() { fn set(name: &str, value: Option) { match value { @@ -45,8 +71,9 @@ fn test_wrappers() { } // Finally, make sure that `RUSTC_WRAPPER` is applied outermost - // by using something that doesn't pass through at all. - env::set_var("RUSTC_WRAPPER", "./tests/wrap_ignored"); + // by using something (ourself) that doesn't pass through at all. + let wrap_ignored = env::current_exe().unwrap(); + env::set_var("RUSTC_WRAPPER", &wrap_ignored); env::set_var("RUSTC_WORKSPACE_WRAPPER", "/bin/false"); let ac = autocfg::AutoCfg::with_dir(out.as_ref()).unwrap(); assert!(ac.probe_type("mesize")); // anything goes! diff --git a/deps/crates/vendor/diplomat-runtime-v0_15/.cargo_vcs_info.json b/deps/crates/vendor/diplomat-runtime-v0_15/.cargo_vcs_info.json index 2a4a7f1dcac6..46a5493d866d 100644 --- a/deps/crates/vendor/diplomat-runtime-v0_15/.cargo_vcs_info.json +++ b/deps/crates/vendor/diplomat-runtime-v0_15/.cargo_vcs_info.json @@ -1,6 +1,6 @@ { "git": { - "sha1": "6559f95efa34658b9e801b45e39f1b306c32e249" + "sha1": "95557babd58cf90e65c6175e7b9433f41f686bd2" }, "path_in_vcs": "runtime" } \ No newline at end of file diff --git a/deps/crates/vendor/diplomat-runtime-v0_15/Cargo.lock b/deps/crates/vendor/diplomat-runtime-v0_15/Cargo.lock index 5f2b17401069..95dad6ffc7b4 100644 --- a/deps/crates/vendor/diplomat-runtime-v0_15/Cargo.lock +++ b/deps/crates/vendor/diplomat-runtime-v0_15/Cargo.lock @@ -26,7 +26,7 @@ dependencies = [ [[package]] name = "diplomat-runtime" -version = "0.15.0" +version = "0.15.1" dependencies = [ "jni", "log", diff --git a/deps/crates/vendor/diplomat-runtime-v0_15/Cargo.toml b/deps/crates/vendor/diplomat-runtime-v0_15/Cargo.toml index 49c1551c17e6..b0af4ca9bf0e 100644 --- a/deps/crates/vendor/diplomat-runtime-v0_15/Cargo.toml +++ b/deps/crates/vendor/diplomat-runtime-v0_15/Cargo.toml @@ -13,7 +13,7 @@ edition = "2021" rust-version = "1.81" name = "diplomat-runtime" -version = "0.15.0" +version = "0.15.1" authors = [ "Shadaj Laddad ", "Manish Goregaokar ", diff --git a/deps/crates/vendor/diplomat-runtime-v0_15/Cargo.toml.orig b/deps/crates/vendor/diplomat-runtime-v0_15/Cargo.toml.orig index df4dd9f2aa6e..bbff66f442d0 100644 --- a/deps/crates/vendor/diplomat-runtime-v0_15/Cargo.toml.orig +++ b/deps/crates/vendor/diplomat-runtime-v0_15/Cargo.toml.orig @@ -1,7 +1,7 @@ [package] name = "diplomat-runtime" description = "Common runtime utilities used by diplomat codegen" -version.workspace = true +version = "0.15.1" rust-version.workspace = true authors.workspace = true categories.workspace = true diff --git a/deps/crates/vendor/diplomat-runtime-v0_15/src/wasm_glue.rs b/deps/crates/vendor/diplomat-runtime-v0_15/src/wasm_glue.rs index eba51f973be8..d82063e44618 100644 --- a/deps/crates/vendor/diplomat-runtime-v0_15/src/wasm_glue.rs +++ b/deps/crates/vendor/diplomat-runtime-v0_15/src/wasm_glue.rs @@ -3,6 +3,23 @@ //! This is a private module use alloc::format; +// https://blog.rust-lang.org/2026/04/04/changes-to-webassembly-targets-and-handling-undefined-symbols/#what-is-going-to-break-and-how-to-fix +#[link(wasm_import_module = "env")] +extern "C" { + fn diplomat_throw_error_js(ptr: *const u8, len: usize); + + #[cfg(feature = "log")] + fn diplomat_console_error_js(ptr: *const u8, len: usize); + #[cfg(feature = "log")] + fn diplomat_console_warn_js(ptr: *const u8, len: usize); + #[cfg(feature = "log")] + fn diplomat_console_info_js(ptr: *const u8, len: usize); + #[cfg(feature = "log")] + fn diplomat_console_log_js(ptr: *const u8, len: usize); + #[cfg(feature = "log")] + fn diplomat_console_debug_js(ptr: *const u8, len: usize); +} + /// In theory, this function may be useful for other backends eventually, but /// currently it is only useful in WASM so it is in this module. #[no_mangle] @@ -34,10 +51,6 @@ fn panic_handler(info: &std::panic::PanicHookInfo) { None => format!("wasm panicked at :\n{msg}"), }; - extern "C" { - fn diplomat_throw_error_js(ptr: *const u8, len: usize); - } - unsafe { diplomat_throw_error_js(msg.as_ptr(), msg.len()) } } @@ -57,36 +70,11 @@ impl log::Log for ConsoleLogger { } let out = match record.level() { - log::Level::Error => { - extern "C" { - fn diplomat_console_error_js(ptr: *const u8, len: usize); - } - diplomat_console_error_js - } - log::Level::Warn => { - extern "C" { - fn diplomat_console_warn_js(ptr: *const u8, len: usize); - } - diplomat_console_warn_js - } - log::Level::Info => { - extern "C" { - fn diplomat_console_info_js(ptr: *const u8, len: usize); - } - diplomat_console_info_js - } - log::Level::Debug => { - extern "C" { - fn diplomat_console_log_js(ptr: *const u8, len: usize); - } - diplomat_console_log_js - } - log::Level::Trace => { - extern "C" { - fn diplomat_console_debug_js(ptr: *const u8, len: usize); - } - diplomat_console_debug_js - } + log::Level::Error => diplomat_console_error_js, + log::Level::Warn => diplomat_console_warn_js, + log::Level::Info => diplomat_console_info_js, + log::Level::Debug => diplomat_console_log_js, + log::Level::Trace => diplomat_console_debug_js, }; let msg = alloc::format!("{}", record.args()); diff --git a/deps/crates/vendor/displaydoc-v0_2/.cargo_vcs_info.json b/deps/crates/vendor/displaydoc-v0_2/.cargo_vcs_info.json index b961cfb7bb02..cfa70d611016 100644 --- a/deps/crates/vendor/displaydoc-v0_2/.cargo_vcs_info.json +++ b/deps/crates/vendor/displaydoc-v0_2/.cargo_vcs_info.json @@ -1,6 +1,6 @@ { "git": { - "sha1": "e4028851bfb82998300237f7568a45f589a19e40" + "sha1": "50d6f1fd371f61ef3b031d4f356420b7cbdf5d56" }, "path_in_vcs": "" } \ No newline at end of file diff --git a/deps/crates/vendor/displaydoc-v0_2/.github/workflows/ci.yml b/deps/crates/vendor/displaydoc-v0_2/.github/workflows/ci.yml deleted file mode 100644 index 1713afdf26cf..000000000000 --- a/deps/crates/vendor/displaydoc-v0_2/.github/workflows/ci.yml +++ /dev/null @@ -1,120 +0,0 @@ -on: - push: - pull_request: - schedule: - - cron: '0 0 * * *' - -name: Continuous integration - -jobs: - check: - name: Check - runs-on: ubuntu-latest - strategy: - matrix: - rust: - - stable - - 1.56.0 - steps: - - uses: actions/checkout@v1 - - uses: actions-rs/toolchain@v1 - with: - toolchain: ${{ matrix.rust }} - override: true - - uses: actions-rs/cargo@v1 - with: - command: check - - test: - name: Test Suite - runs-on: ubuntu-latest - strategy: - matrix: - rust: - - stable - - nightly - steps: - - uses: actions/checkout@v1 - - uses: actions-rs/toolchain@v1 - with: - toolchain: ${{ matrix.rust }} - override: true - - uses: Swatinem/rust-cache@v1 - - name: Install cargo-nextest - uses: baptiste0928/cargo-install@v1 - with: - crate: cargo-nextest - version: 0.9 - - uses: actions-rs/cargo@v1 - with: - command: nextest - args: run - - uses: actions-rs/cargo@v1 - with: - command: nextest - args: run --no-default-features - - uses: actions-rs/cargo@v1 - with: - command: test - args: --doc - - test-msrv: - name: msrv Test Suite - runs-on: ubuntu-latest - strategy: - matrix: - rust: - - 1.56.0 - steps: - - uses: actions/checkout@v1 - - uses: actions-rs/toolchain@v1 - with: - toolchain: ${{ matrix.rust }} - override: true - - uses: Swatinem/rust-cache@v1 - - uses: actions-rs/cargo@v1 - with: - command: test - - uses: actions-rs/cargo@v1 - with: - command: test - args: --no-default-features - - fmt: - name: Rustfmt - runs-on: ubuntu-latest - strategy: - matrix: - rust: - - stable - - 1.56.0 - steps: - - uses: actions/checkout@v1 - - uses: actions-rs/toolchain@v1 - with: - toolchain: ${{ matrix.rust }} - override: true - - run: rustup component add rustfmt - - uses: actions-rs/cargo@v1 - with: - command: fmt - args: --all -- --check - - clippy: - name: Clippy - runs-on: ubuntu-latest - strategy: - matrix: - rust: - - stable - steps: - - uses: actions/checkout@v1 - - uses: actions-rs/toolchain@v1 - with: - toolchain: ${{ matrix.rust }} - override: true - - run: rustup component add clippy - - uses: actions-rs/cargo@v1 - with: - command: clippy - args: -- -D warnings diff --git a/deps/crates/vendor/displaydoc-v0_2/.gitignore b/deps/crates/vendor/displaydoc-v0_2/.gitignore deleted file mode 100644 index 693699042b1a..000000000000 --- a/deps/crates/vendor/displaydoc-v0_2/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -/target -**/*.rs.bk -Cargo.lock diff --git a/deps/crates/vendor/displaydoc-v0_2/CHANGELOG.md b/deps/crates/vendor/displaydoc-v0_2/CHANGELOG.md index b4d6cad0a56f..d77ae23a5bcc 100644 --- a/deps/crates/vendor/displaydoc-v0_2/CHANGELOG.md +++ b/deps/crates/vendor/displaydoc-v0_2/CHANGELOG.md @@ -6,7 +6,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 -## [Unreleased] - ReleaseDate +# [Unreleased] - ReleaseDate + +# [0.2.6] - 2026-05-27 + +## Added +- Support for multi-line doc comments (#57, #62) + +## Changed +- Use `BTreeMap` for determinism in generated code (#52) +- Add `#[allow(unused_assignments)]` to generated code (#56) +- Exclude development scripts from published package (#60) +- Bump `pretty_assertions` dependency to 1.4.0 (#53) # [0.2.5] - 2024-06-20 @@ -50,7 +61,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 lines are needed. -[Unreleased]: https://github.com/yaahc/displaydoc/compare/v0.2.4...HEAD +[Unreleased]: https://github.com/yaahc/displaydoc/compare/v0.2.6...HEAD +[0.2.6]: https://github.com/yaahc/displaydoc/compare/v0.2.5...v0.2.6 +[0.2.5]: https://github.com/yaahc/displaydoc/compare/v0.2.4...v0.2.5 [0.2.4]: https://github.com/yaahc/displaydoc/compare/v0.2.3...v0.2.4 [0.2.3]: https://github.com/yaahc/displaydoc/compare/v0.2.2...v0.2.3 [0.2.2]: https://github.com/yaahc/displaydoc/compare/v0.2.1...v0.2.2 diff --git a/deps/crates/vendor/displaydoc-v0_2/Cargo.lock b/deps/crates/vendor/displaydoc-v0_2/Cargo.lock index 5e313d2eec10..2b166f6551e5 100644 --- a/deps/crates/vendor/displaydoc-v0_2/Cargo.lock +++ b/deps/crates/vendor/displaydoc-v0_2/Cargo.lock @@ -3,33 +3,14 @@ version = 3 [[package]] -name = "ansi_term" -version = "0.11.0" +name = "diff" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" -dependencies = [ - "winapi", -] - -[[package]] -name = "ctor" -version = "0.1.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d2301688392eb071b0bf1a37be05c469d3cc4dbbd95df672fe28ab021e6a096" -dependencies = [ - "quote", - "syn 1.0.109", -] - -[[package]] -name = "difference" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "524cbf6897b527295dff137cec09ecf3a05f4fddffd7dfcd1585403449e74198" +checksum = "56254986775e3233ffa9c4d7d3faaf6d36a2c09d30b20687e9f88bc8bafc16c8" [[package]] name = "displaydoc" -version = "0.2.5" +version = "0.2.6" dependencies = [ "libc", "pretty_assertions", @@ -37,34 +18,34 @@ dependencies = [ "quote", "rustversion", "static_assertions", - "syn 2.0.66", + "syn", "thiserror", "trybuild", ] [[package]] name = "equivalent" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" +checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" [[package]] name = "glob" -version = "0.3.1" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" +checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280" [[package]] name = "hashbrown" -version = "0.14.5" +version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" +checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" [[package]] name = "indexmap" -version = "2.2.6" +version = "2.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +checksum = "0ad4bb2b565bca0645f4d68c5c9af97fba094e9791da685bf83cb5f3ce74acf2" dependencies = [ "equivalent", "hashbrown", @@ -72,111 +53,111 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.11" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" +checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" [[package]] name = "libc" -version = "0.2.155" +version = "0.2.178" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" +checksum = "37c93d8daa9d8a012fd8ab92f088405fb202ea0b6ab73ee2482ae66af4f42091" [[package]] name = "memchr" -version = "2.7.4" +version = "2.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" - -[[package]] -name = "output_vt100" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "628223faebab4e3e40667ee0b2336d34a5b960ff60ea743ddfdbcf7770bcfb66" -dependencies = [ - "winapi", -] +checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273" [[package]] name = "pretty_assertions" -version = "0.6.1" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f81e1644e1b54f5a68959a29aa86cde704219254669da328ecfdf6a1f09d427" +checksum = "3ae130e2f271fbc2ac3a40fb1d07180839cdbbe443c7a27e1e3c13c5cac0116d" dependencies = [ - "ansi_term", - "ctor", - "difference", - "output_vt100", + "diff", + "yansi", ] [[package]] name = "proc-macro2" -version = "1.0.85" +version = "1.0.103" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22244ce15aa966053a896d1accb3a6e68469b97c7f33f284b99f0d576879fc23" +checksum = "5ee95bc4ef87b8d5ba32e8b7714ccc834865276eab0aed5c9958d00ec45f49e8" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.36" +version = "1.0.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" +checksum = "a338cc41d27e6cc6dce6cefc13a0729dfbb81c262b1f519331575dd80ef3067f" dependencies = [ "proc-macro2", ] [[package]] name = "rustversion" -version = "1.0.17" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" +checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" [[package]] name = "ryu" -version = "1.0.18" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" +checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" [[package]] name = "serde" -version = "1.0.203" +version = "1.0.228" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7253ab4de971e72fb7be983802300c30b5a7f0c2e56fab8abfc6a214307c0094" +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", ] [[package]] name = "serde_derive" -version = "1.0.203" +version = "1.0.228" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "500cbc0ebeb6f46627f50f3f5811ccf6bf00643be300b4c3eabc0ef55dc5b5ba" +checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn", ] [[package]] name = "serde_json" -version = "1.0.117" +version = "1.0.145" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "455182ea6142b14f93f4bc5320a2b31c1f266b66a4a5c858b013302a5d8cbfc3" +checksum = "402a6f66d8c709116cf22f558eab210f5a50187f702eb4d7e5ef38d9a7f1c79c" dependencies = [ "itoa", + "memchr", "ryu", "serde", + "serde_core", ] [[package]] name = "serde_spanned" -version = "0.6.6" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79e674e01f999af37c49f70a6ede167a8a60b2503e56c5599532a65baa5969a0" +checksum = "e24345aa0fe688594e73770a5f6d1b216508b4f93484c0026d521acd30134392" dependencies = [ - "serde", + "serde_core", ] [[package]] @@ -187,9 +168,9 @@ checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "syn" -version = "1.0.109" +version = "2.0.111" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +checksum = "390cc9a294ab71bdb1aa2e99d13be9c753cd2d7bd6560c77118597410c4d2e87" dependencies = [ "proc-macro2", "quote", @@ -197,15 +178,10 @@ dependencies = [ ] [[package]] -name = "syn" -version = "2.0.66" +name = "target-triple" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c42f3f41a2de00b01c0aaad383c5a45241efc8b2d1eda5661812fda5f3cdcff5" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] +checksum = "591ef38edfb78ca4771ee32cf494cb8771944bee237a9b91fc9c1424ac4b777b" [[package]] name = "termcolor" @@ -218,187 +194,116 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.61" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c546c80d6be4bc6a00c0f01730c08df82eaa7a7a61f11d656526506112cc1709" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.61" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn", ] [[package]] name = "toml" -version = "0.8.14" +version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f49eb2ab21d2f26bd6db7bf383edc527a7ebaee412d17af4d40fdccd442f335" +checksum = "f0dc8b1fb61449e27716ec0e1bdf0f6b8f3e8f6b05391e8497b8b6d7804ea6d8" dependencies = [ - "serde", + "indexmap", + "serde_core", "serde_spanned", "toml_datetime", - "toml_edit", + "toml_parser", + "toml_writer", + "winnow", ] [[package]] name = "toml_datetime" -version = "0.6.6" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4badfd56924ae69bcc9039335b2e017639ce3f9b001c393c1b2d1ef846ce2cbf" +checksum = "f2cdb639ebbc97961c51720f858597f7f24c4fc295327923af55b74c3c724533" dependencies = [ - "serde", + "serde_core", ] [[package]] -name = "toml_edit" -version = "0.22.14" +name = "toml_parser" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f21c7aaf97f1bd9ca9d4f9e73b0a6c74bd5afef56f2bc931943a6e1c37e04e38" +checksum = "c0cbe268d35bdb4bb5a56a2de88d0ad0eb70af5384a99d648cd4b3d04039800e" dependencies = [ - "indexmap", - "serde", - "serde_spanned", - "toml_datetime", "winnow", ] +[[package]] +name = "toml_writer" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df8b2b54733674ad286d16267dcfc7a71ed5c776e4ac7aa3c3e2561f7c637bf2" + [[package]] name = "trybuild" -version = "1.0.96" +version = "1.0.114" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33a5f13f11071020bb12de7a16b925d2d58636175c20c11dc5f96cb64bb6c9b3" +checksum = "3e17e807bff86d2a06b52bca4276746584a78375055b6e45843925ce2802b335" dependencies = [ "glob", "serde", "serde_derive", "serde_json", + "target-triple", "termcolor", "toml", ] [[package]] name = "unicode-ident" -version = "1.0.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" - -[[package]] -name = "winapi" -version = "0.3.9" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" +checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5" [[package]] name = "winapi-util" -version = "0.1.8" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b" +checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" dependencies = [ "windows-sys", ] [[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" +name = "windows-link" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" [[package]] name = "windows-sys" -version = "0.52.0" +version = "0.61.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" dependencies = [ - "windows-targets", + "windows-link", ] [[package]] -name = "windows-targets" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" -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", -] - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" - -[[package]] -name = "windows_i686_gnu" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" - -[[package]] -name = "windows_i686_gnullvm" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" - -[[package]] -name = "windows_i686_msvc" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.52.5" +name = "winnow" +version = "0.7.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" +checksum = "5a5364e9d77fcdeeaa6062ced926ee3381faa2ee02d3eb83a5c27a8825540829" [[package]] -name = "winnow" -version = "0.6.13" +name = "yansi" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59b5e5f6c299a3c7890b876a2a587f3115162487e704907d9b6cd29473052ba1" -dependencies = [ - "memchr", -] +checksum = "cfe53a6657fd280eaa890a3bc59152892ffa3e30101319d168b781ed6529b049" diff --git a/deps/crates/vendor/displaydoc-v0_2/Cargo.toml b/deps/crates/vendor/displaydoc-v0_2/Cargo.toml index 0202d998578e..1d1043e443ca 100644 --- a/deps/crates/vendor/displaydoc-v0_2/Cargo.toml +++ b/deps/crates/vendor/displaydoc-v0_2/Cargo.toml @@ -13,8 +13,23 @@ edition = "2021" rust-version = "1.56.0" name = "displaydoc" -version = "0.2.5" +version = "0.2.6" authors = ["Jane Lusby "] +build = false +include = [ + "Cargo.toml", + "README.md", + "LICENSE-MIT", + "LICENSE-APACHE", + "CHANGELOG.md", + "src/**/*.rs", + "tests/**/*.rs", +] +autolib = false +autobins = false +autoexamples = false +autotests = false +autobenches = false description = """ A derive macro for implementing the display Trait via a doc comment and string interpolation """ @@ -41,47 +56,72 @@ pre-release-hook = ["./update-readme.sh"] [[package.metadata.release.pre-release-replacements]] file = "CHANGELOG.md" -replace = "{{version}}" search = "Unreleased" +replace = "{{version}}" [[package.metadata.release.pre-release-replacements]] -exactly = 1 file = "src/lib.rs" -replace = "#![doc(html_root_url = \"https://docs.rs/{{crate_name}}/{{version}}\")]" search = '#!\[doc\(html_root_url.*' +replace = '#![doc(html_root_url = "https://docs.rs/{{crate_name}}/{{version}}")]' +exactly = 1 [[package.metadata.release.pre-release-replacements]] file = "CHANGELOG.md" -replace = "{{date}}" search = "ReleaseDate" +replace = "{{date}}" [[package.metadata.release.pre-release-replacements]] -exactly = 1 file = "CHANGELOG.md" +search = "" replace = """ # [Unreleased] - ReleaseDate""" -search = "" +exactly = 1 [[package.metadata.release.pre-release-replacements]] -exactly = 1 file = "CHANGELOG.md" -replace = "...{{tag_name}}" search = '\.\.\.HEAD' +replace = "...{{tag_name}}" +exactly = 1 [[package.metadata.release.pre-release-replacements]] -exactly = 1 file = "CHANGELOG.md" +search = "" replace = """ [Unreleased]: https://github.com/yaahc/{{crate_name}}/compare/{{tag_name}}...HEAD""" -search = "" +exactly = 1 + +[features] +default = ["std"] +std = [] [lib] +name = "displaydoc" path = "src/lib.rs" proc-macro = true +[[test]] +name = "compile_tests" +path = "tests/compile_tests.rs" + +[[test]] +name = "happy" +path = "tests/happy.rs" + +[[test]] +name = "no_std" +path = "tests/no_std.rs" + +[[test]] +name = "num_in_field" +path = "tests/num_in_field.rs" + +[[test]] +name = "variantless" +path = "tests/variantless.rs" + [dependencies.proc-macro2] version = "1.0" @@ -96,7 +136,7 @@ version = "0.2" default-features = false [dev-dependencies.pretty_assertions] -version = "0.6.1" +version = "1.4.0" [dev-dependencies.rustversion] version = "1.0.0" @@ -109,7 +149,3 @@ version = "1.0.24" [dev-dependencies.trybuild] version = "1.0" - -[features] -default = ["std"] -std = [] diff --git a/deps/crates/vendor/displaydoc-v0_2/Cargo.toml.orig b/deps/crates/vendor/displaydoc-v0_2/Cargo.toml.orig index c80116c26c5f..7015d71fc594 100644 --- a/deps/crates/vendor/displaydoc-v0_2/Cargo.toml.orig +++ b/deps/crates/vendor/displaydoc-v0_2/Cargo.toml.orig @@ -1,6 +1,6 @@ [package] name = "displaydoc" -version = "0.2.5" +version = "0.2.6" rust-version = "1.56.0" authors = ["Jane Lusby "] edition = "2021" @@ -13,6 +13,7 @@ keywords = ["display", "derive"] description = """ A derive macro for implementing the display Trait via a doc comment and string interpolation """ +include = ["Cargo.toml", "README.md", "LICENSE-MIT", "LICENSE-APACHE", "CHANGELOG.md", "src/**/*.rs", "tests/**/*.rs"] [lib] proc-macro = true @@ -32,7 +33,7 @@ trybuild = "1.0" static_assertions = "1.1" libc = { version = "0.2", default-features = false } rustversion = "1.0.0" -pretty_assertions = "0.6.1" +pretty_assertions = "1.4.0" thiserror = "1.0.24" [package.metadata.docs.rs] diff --git a/deps/crates/vendor/displaydoc-v0_2/README.md b/deps/crates/vendor/displaydoc-v0_2/README.md index a609b0f270ac..ef24e175231d 100644 --- a/deps/crates/vendor/displaydoc-v0_2/README.md +++ b/deps/crates/vendor/displaydoc-v0_2/README.md @@ -75,8 +75,8 @@ assert!("oh no, an error: muahaha i am an error" == &format!("{}", error)); - Two optional attributes can be added to your types next to the derive: - `#[ignore_extra_doc_attributes]` makes the macro ignore any doc - comment attributes (or `///` lines) after the first. Multi-line - comments using `///` are otherwise treated as an error, so use this + comment attributes (or `///` lines) after the last non-empty line. Multi-line + comments with line breaks using `///` are otherwise treated as an error, so use this attribute or consider switching to block doc comments (`/** */`). - `#[prefix_enum_doc_attributes]` combines the doc comment message on @@ -85,7 +85,7 @@ assert!("oh no, an error: muahaha i am an error" == &format!("{}", error)); becomes mandatory. When added to any other type, it has no effect. - In case you want to have an independent doc comment, the - `#[displaydoc("...")` atrribute may be used on the variant or struct to + `#[displaydoc("...")` attribute may be used on the variant or struct to override it.
diff --git a/deps/crates/vendor/displaydoc-v0_2/README.tpl b/deps/crates/vendor/displaydoc-v0_2/README.tpl deleted file mode 100644 index 6206a9e7e63e..000000000000 --- a/deps/crates/vendor/displaydoc-v0_2/README.tpl +++ /dev/null @@ -1,23 +0,0 @@ -derive(Display) /// `From` -=============== - -[![Latest Version](https://img.shields.io/crates/v/displaydoc.svg)](https://crates.io/crates/displaydoc) -[![Rust Documentation](https://img.shields.io/badge/api-rustdoc-blue.svg)](https://docs.rs/displaydoc) - -{{readme}} - - -#### License - - -Licensed under either of Apache License, Version -2.0 or MIT license at your option. - - -
- - -Unless you explicitly state otherwise, any contribution intentionally submitted -for inclusion in this crate by you, as defined in the Apache-2.0 license, shall -be dual licensed as above, without any additional terms or conditions. - diff --git a/deps/crates/vendor/displaydoc-v0_2/examples/simple.rs b/deps/crates/vendor/displaydoc-v0_2/examples/simple.rs deleted file mode 100644 index f4aad2131fd4..000000000000 --- a/deps/crates/vendor/displaydoc-v0_2/examples/simple.rs +++ /dev/null @@ -1,36 +0,0 @@ -use displaydoc::Display; - -#[derive(Debug, Display)] -pub enum DataStoreError { - /// data store disconnected - Disconnect, - /// the data for key `{0}` is not available - Redaction(String), - /// invalid header (expected {expected:?}, found {found:?}) - InvalidHeader { expected: String, found: String }, - /// unknown data store error - Unknown, -} - -fn main() { - let disconnect = DataStoreError::Disconnect; - println!( - "Enum value `Disconnect` should be printed as:\n\t{}", - disconnect - ); - - let redaction = DataStoreError::Redaction(String::from("Dummy")); - println!( - "Enum value `Redaction` should be printed as:\n\t{}", - redaction - ); - - let invalid_header = DataStoreError::InvalidHeader { - expected: String::from("https"), - found: String::from("http"), - }; - println!( - "Enum value `InvalidHeader` should be printed as:\n\t{}", - invalid_header - ); -} diff --git a/deps/crates/vendor/displaydoc-v0_2/src/attr.rs b/deps/crates/vendor/displaydoc-v0_2/src/attr.rs index afda4b90fa61..29f0d4964805 100644 --- a/deps/crates/vendor/displaydoc-v0_2/src/attr.rs +++ b/deps/crates/vendor/displaydoc-v0_2/src/attr.rs @@ -69,50 +69,54 @@ impl AttrsHelper { return Ok(Some(display)); } - let num_doc_attrs = attrs + let literals = attrs .iter() .filter(|attr| attr.path().is_ident("doc")) - .count(); + .map(|attr| match &attr.meta { + Meta::NameValue(syn::MetaNameValue { + value: + syn::Expr::Lit(syn::ExprLit { + lit: syn::Lit::Str(lit), + .. + }), + .. + }) => lit, + _ => unimplemented!(), + }); + + let span = match literals.clone().next() { + Some(lit) => lit.span(), + None => return Ok(None), + }; - if !self.ignore_extra_doc_attributes && num_doc_attrs > 1 { - panic!("Multi-line comments are disabled by default by displaydoc. Please consider using block doc comments (/** */) or adding the #[ignore_extra_doc_attributes] attribute to your type next to the derive."); - } + let strs = literals.map(|lit| { + // Make an attempt at cleaning up multiline doc comments. + let doc_str = lit + .value() + .lines() + .map(|line| line.trim().trim_start_matches('*').trim()) + .collect::>() + .join("\n") + .trim() + .to_string(); + (!doc_str.is_empty()).then(|| doc_str) + }); - for attr in attrs { - if attr.path().is_ident("doc") { - let lit = match &attr.meta { - Meta::NameValue(syn::MetaNameValue { - value: - syn::Expr::Lit(syn::ExprLit { - lit: syn::Lit::Str(lit), - .. - }), - .. - }) => lit, - _ => unimplemented!(), - }; - - // Make an attempt at cleaning up multiline doc comments. - let doc_str = lit - .value() - .lines() - .map(|line| line.trim().trim_start_matches('*').trim()) - .collect::>() - .join("\n"); - - let lit = LitStr::new(doc_str.trim(), lit.span()); - - let mut display = Display { - fmt: lit, - args: TokenStream::new(), - }; - - display.expand_shorthand(); - return Ok(Some(display)); - } - } + let joined = if self.ignore_extra_doc_attributes { + strs.take_while(|x| x.is_some()).collect::>>() + } else { + strs.collect::>>() + }.unwrap_or_else(|| { + panic!("Paragraph breaks in multi-line doc comments are disabled by default by displaydoc. Please consider using block doc comments (/** */) or adding the #[ignore_extra_doc_attributes] attribute to your type next to the derive"); + }).join(" "); + + let mut display = Display { + fmt: LitStr::new(&joined, span), + args: TokenStream::new(), + }; - Ok(None) + display.expand_shorthand(); + Ok(Some(display)) } pub(crate) fn display_with_input( diff --git a/deps/crates/vendor/displaydoc-v0_2/src/expand.rs b/deps/crates/vendor/displaydoc-v0_2/src/expand.rs index 3b146f81ecd1..69658266ad37 100644 --- a/deps/crates/vendor/displaydoc-v0_2/src/expand.rs +++ b/deps/crates/vendor/displaydoc-v0_2/src/expand.rs @@ -9,7 +9,7 @@ use syn::{ TypeParamBound, TypePath, WhereClause, WherePredicate, }; -use std::collections::HashMap; +use std::collections::BTreeMap; pub(crate) fn derive(input: &DeriveInput) -> Result { let impls = match &input.data { @@ -92,11 +92,12 @@ fn impl_struct(input: &DeriveInput, data: &DataStruct) -> Result { quote! { impl #impl_generics ::core::fmt::Display for #ty #ty_generics #where_clause { fn fmt(&self, formatter: &mut ::core::fmt::Formatter) -> ::core::fmt::Result { - // NB: This destructures the fields of `self` into named variables (for unnamed - // fields, it uses _0, _1, etc as above). The `#[allow(unused_variables)]` - // section means it doesn't have to parse the individual field references out of - // the docstring. - #[allow(unused_variables)] + // NB: This destructures the fields of `self` into named + // variables (for unnamed fields, it uses _0, _1, etc as + // above). The `#[allow(unused_variables, unused_assignments)]` + // section means it doesn't have to parse the individual field + // references out of the docstring. + #[allow(unused_variables, unused_assignments)] let #pat = self; #display } @@ -224,9 +225,9 @@ fn add_display_constraint_to_type_predicate( fn extract_trait_constraints_from_source( where_clause: &WhereClause, type_params: &[&TypeParam], -) -> HashMap> { +) -> BTreeMap> { // Add trait bounds provided at the declaration site of type parameters for the struct/enum. - let mut param_constraint_mapping: HashMap> = type_params + let mut param_constraint_mapping: BTreeMap> = type_params .iter() .map(|type_param| { let trait_bounds: Vec = type_param @@ -396,7 +397,7 @@ fn impl_enum(input: &DeriveInput, data: &DataEnum) -> Result { Ok(quote! { impl #impl_generics ::core::fmt::Display for #ty #ty_generics #where_clause { fn fmt(&self, formatter: &mut ::core::fmt::Formatter) -> ::core::fmt::Result { - #[allow(unused_variables)] + #[allow(unused_variables, unused_assignments)] match self { #(#arms,)* } diff --git a/deps/crates/vendor/displaydoc-v0_2/src/lib.rs b/deps/crates/vendor/displaydoc-v0_2/src/lib.rs index 8824ff05ba8c..5a93a7099779 100644 --- a/deps/crates/vendor/displaydoc-v0_2/src/lib.rs +++ b/deps/crates/vendor/displaydoc-v0_2/src/lib.rs @@ -70,8 +70,8 @@ //! - Two optional attributes can be added to your types next to the derive: //! //! - `#[ignore_extra_doc_attributes]` makes the macro ignore any doc -//! comment attributes (or `///` lines) after the first. Multi-line -//! comments using `///` are otherwise treated as an error, so use this +//! comment attributes (or `///` lines) after the last non-empty line. Multi-line +//! comments with line breaks using `///` are otherwise treated as an error, so use this //! attribute or consider switching to block doc comments (`/** */`). //! //! - `#[prefix_enum_doc_attributes]` combines the doc comment message on @@ -80,7 +80,7 @@ //! becomes mandatory. When added to any other type, it has no effect. //! //! - In case you want to have an independent doc comment, the -//! `#[displaydoc("...")` atrribute may be used on the variant or struct to +//! `#[displaydoc("...")` attribute may be used on the variant or struct to //! override it. //! //!
@@ -92,7 +92,7 @@ //! //! 2. **Does this crate work with `Path` and `PathBuf` via the `Display` trait?** //! * Yuuup. This crate uses @dtolnay's [autoref specialization technique](https://github.com/dtolnay/case-studies/blob/master/autoref-specialization/README.md) to add a special trait for types to get the display impl. It then specializes for `Path` and `PathBuf`, and when either of these types are found, it calls `self.display()` to get a `std::path::Display<'_>` type which can be used with the `Display` format specifier! -#![doc(html_root_url = "https://docs.rs/displaydoc/0.2.3")] +#![doc(html_root_url = "https://docs.rs/displaydoc/0.2.6")] #![cfg_attr(docsrs, feature(doc_cfg))] #![warn( rust_2018_idioms, diff --git a/deps/crates/vendor/displaydoc-v0_2/tests/compile_tests.rs b/deps/crates/vendor/displaydoc-v0_2/tests/compile_tests.rs index 29c72a862147..6513eb70e9fc 100644 --- a/deps/crates/vendor/displaydoc-v0_2/tests/compile_tests.rs +++ b/deps/crates/vendor/displaydoc-v0_2/tests/compile_tests.rs @@ -3,27 +3,12 @@ #[test] fn no_std() { let t = trybuild::TestCases::new(); - #[cfg(not(feature = "std"))] - t.compile_fail("tests/no_std/without.rs"); - #[cfg(not(feature = "std"))] - t.compile_fail("tests/no_std/multi_line.rs"); - #[cfg(not(feature = "std"))] - t.pass("tests/no_std/multi_line_allow.rs"); - #[cfg(not(feature = "std"))] - t.compile_fail("tests/no_std/enum_prefix_missing.rs"); - #[cfg(not(feature = "std"))] - t.pass("tests/no_std/enum_prefix.rs"); - #[cfg(feature = "std")] - t.compile_fail("tests/std/without.rs"); - #[cfg(feature = "std")] - t.compile_fail("tests/std/multi_line.rs"); - #[cfg(feature = "std")] - t.pass("tests/std/multi_line_allow.rs"); - #[cfg(feature = "std")] - t.compile_fail("tests/std/enum_prefix_missing.rs"); - #[cfg(feature = "std")] - t.pass("tests/std/enum_prefix.rs"); - #[cfg(feature = "std")] - t.pass("tests/std/multiple.rs"); - t.pass("tests/no_std/with.rs"); + t.compile_fail("tests/ui/without.rs"); + t.compile_fail("tests/ui/multi_line_line_break.rs"); + t.compile_fail("tests/ui/multi_line_line_break_block.rs"); + t.pass("tests/ui/multi_line.rs"); + t.pass("tests/ui/multi_line_allow.rs"); + t.compile_fail("tests/ui/enum_prefix_missing.rs"); + t.pass("tests/ui/enum_prefix.rs"); + t.pass("tests/ui/multiple.rs"); } diff --git a/deps/crates/vendor/displaydoc-v0_2/tests/happy.rs b/deps/crates/vendor/displaydoc-v0_2/tests/happy.rs index 85aa78f13797..7d94e1601eda 100644 --- a/deps/crates/vendor/displaydoc-v0_2/tests/happy.rs +++ b/deps/crates/vendor/displaydoc-v0_2/tests/happy.rs @@ -12,11 +12,53 @@ struct HappyStruct { #[derive(Display)] #[ignore_extra_doc_attributes] /// Just a basic struct {thing} -/// and this line should get ignored +/// and this line should not get ignored struct HappyStruct2 { thing: &'static str, } +#[derive(Display)] +/// Really fancy first line with thing: {thing} +/// Really cool second line +struct HappyMultiLine { + thing: &'static str, +} + +#[derive(Display)] +#[ignore_extra_doc_attributes] +/// multi +/// line +/// +/// new paragraph should be ignored +struct HappyMultilineWithIgnore; + +#[derive(Display)] +enum MixedBlockAndLineComments { + /** + * hello + * block + * comment + */ + /// line comment + BlockFirst, + /// line comment + /** + * hello + * block + * comment + */ + LineFirst, + /** + * block + * comment + */ + /** + * block + * comment2 + */ + DoubleBlock, +} + #[derive(Display)] enum Happy { /// I really like Variant1 @@ -109,7 +151,30 @@ fn does_it_print() { ); assert_display(HappyStruct { thing: "hi" }, "Just a basic struct hi"); - assert_display(HappyStruct2 { thing: "hi2" }, "Just a basic struct hi2"); + assert_display( + HappyStruct2 { thing: "hi2" }, + "Just a basic struct hi2 and this line should not get ignored", + ); + + assert_display( + HappyMultiLine { thing: "rust" }, + "Really fancy first line with thing: rust Really cool second line", + ); + + assert_display(HappyMultilineWithIgnore, "multi line"); + + assert_display( + MixedBlockAndLineComments::BlockFirst, + "hello\nblock\ncomment line comment", + ); + assert_display( + MixedBlockAndLineComments::LineFirst, + "line comment hello\nblock\ncomment", + ); + assert_display( + MixedBlockAndLineComments::DoubleBlock, + "block\ncomment block\ncomment2", + ); assert_display(inner_mod::InnerHappy::Variant1, "I really like Variant1"); assert_display( diff --git a/deps/crates/vendor/displaydoc-v0_2/tests/no_std.rs b/deps/crates/vendor/displaydoc-v0_2/tests/no_std.rs new file mode 100644 index 000000000000..e74727d5da0c --- /dev/null +++ b/deps/crates/vendor/displaydoc-v0_2/tests/no_std.rs @@ -0,0 +1,44 @@ +#![no_std] +#![allow(unused)] + +// This test ensures that the generated code doesn't reference any stdlib items. + +use displaydoc::Display; + +#[derive(Display)] +/// Just a basic struct {thing} +struct HappyStruct { + thing: &'static str, +} + +#[derive(Display)] +#[ignore_extra_doc_attributes] +/// Just a basic struct {thing} +/// and this line should get ignored +struct HappyStruct2 { + thing: &'static str, +} + +#[derive(Display)] +enum Happy { + /// I really like Variant1 + Variant1, + /// Variant2 is pretty swell 2 + Variant2, + /// Variant3 is okay {sometimes} + Variant3 { sometimes: &'static str }, + /** + * Variant4 wants to have a lot of lines + * + * Lets see how this works out for it + */ + Variant4, + /// Variant5 has a parameter {0} and some regular comments + // A regular comment that won't get picked + Variant5(u32), + + /// These docs are ignored + #[displaydoc("Variant7 has a parameter {0} and uses #[displaydoc]")] + /// These docs are also ignored + Variant7(u32), +} diff --git a/deps/crates/vendor/displaydoc-v0_2/tests/no_std/enum_prefix.rs b/deps/crates/vendor/displaydoc-v0_2/tests/no_std/enum_prefix.rs deleted file mode 100644 index 5538e2751aa3..000000000000 --- a/deps/crates/vendor/displaydoc-v0_2/tests/no_std/enum_prefix.rs +++ /dev/null @@ -1,36 +0,0 @@ -#![cfg_attr(not(feature = "std"), allow(internal_features), feature(lang_items, start))] -#![cfg_attr(not(feature = "std"), no_std)] - -#[cfg_attr(not(feature = "std"), start)] -fn start(_argc: isize, _argv: *const *const u8) -> isize { - 0 -} -#[lang = "eh_personality"] -#[no_mangle] -#[cfg(not(feature = "std"))] -pub extern "C" fn rust_eh_personality() {} -#[panic_handler] -#[cfg(not(feature = "std"))] -fn panic(_info: &core::panic::PanicInfo) -> ! { - unsafe { - libc::abort(); - } -} - -use displaydoc::Display; - -/// this type is pretty swell -#[derive(Display)] -#[prefix_enum_doc_attributes] -enum TestType { - /// this variant is too - Variant1, - - /// this variant is two - Variant2, -} - -static_assertions::assert_impl_all!(TestType: core::fmt::Display); - -#[cfg(feature = "std")] -fn main() {} diff --git a/deps/crates/vendor/displaydoc-v0_2/tests/no_std/enum_prefix_missing.rs b/deps/crates/vendor/displaydoc-v0_2/tests/no_std/enum_prefix_missing.rs deleted file mode 100644 index 71710726f3ba..000000000000 --- a/deps/crates/vendor/displaydoc-v0_2/tests/no_std/enum_prefix_missing.rs +++ /dev/null @@ -1,35 +0,0 @@ -#![cfg_attr(not(feature = "std"), allow(internal_features), feature(lang_items, start))] -#![cfg_attr(not(feature = "std"), no_std)] - -#[cfg_attr(not(feature = "std"), start)] -fn start(_argc: isize, _argv: *const *const u8) -> isize { - 0 -} -#[lang = "eh_personality"] -#[no_mangle] -#[cfg(not(feature = "std"))] -pub extern "C" fn rust_eh_personality() {} -#[panic_handler] -#[cfg(not(feature = "std"))] -fn panic(_info: &core::panic::PanicInfo) -> ! { - unsafe { - libc::abort(); - } -} - -use displaydoc::Display; - -#[derive(Display)] -#[prefix_enum_doc_attributes] -enum TestType { - /// this variant is too - Variant1, - - /// this variant is two - Variant2, -} - -static_assertions::assert_impl_all!(TestType: core::fmt::Display); - -#[cfg(feature = "std")] -fn main() {} diff --git a/deps/crates/vendor/displaydoc-v0_2/tests/no_std/enum_prefix_missing.stderr b/deps/crates/vendor/displaydoc-v0_2/tests/no_std/enum_prefix_missing.stderr deleted file mode 100644 index 8cf7993271bd..000000000000 --- a/deps/crates/vendor/displaydoc-v0_2/tests/no_std/enum_prefix_missing.stderr +++ /dev/null @@ -1,22 +0,0 @@ -error: proc-macro derive panicked - --> $DIR/enum_prefix_missing.rs:22:10 - | -22 | #[derive(Display)] - | ^^^^^^^ - | - = help: message: Missing doc comment on enum with #[prefix_enum_doc_attributes]. Please remove the attribute or add a doc comment to the enum itself. - -error[E0277]: `TestType` doesn't implement `Display` - --> $DIR/enum_prefix_missing.rs:32:37 - | -32 | static_assertions::assert_impl_all!(TestType: core::fmt::Display); - | ^^^^^^^^ `TestType` cannot be formatted with the default formatter - | - = help: the trait `Display` is not implemented for `TestType` - = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead -note: required by a bound in `assert_impl_all` - --> $DIR/enum_prefix_missing.rs:32:1 - | -32 | static_assertions::assert_impl_all!(TestType: core::fmt::Display); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `assert_impl_all` - = note: this error originates in the macro `static_assertions::assert_impl_all` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/deps/crates/vendor/displaydoc-v0_2/tests/no_std/multi_line.rs b/deps/crates/vendor/displaydoc-v0_2/tests/no_std/multi_line.rs deleted file mode 100644 index ca4215cdc3cb..000000000000 --- a/deps/crates/vendor/displaydoc-v0_2/tests/no_std/multi_line.rs +++ /dev/null @@ -1,37 +0,0 @@ -#![cfg_attr(not(feature = "std"), allow(internal_features), feature(lang_items, start))] -#![cfg_attr(not(feature = "std"), no_std)] - -#[cfg_attr(not(feature = "std"), start)] -fn start(_argc: isize, _argv: *const *const u8) -> isize { - 0 -} -#[lang = "eh_personality"] -#[no_mangle] -#[cfg(not(feature = "std"))] -pub extern "C" fn rust_eh_personality() {} -#[panic_handler] -#[cfg(not(feature = "std"))] -fn panic(_info: &core::panic::PanicInfo) -> ! { - unsafe { - libc::abort(); - } -} - -use displaydoc::Display; - -/// this type is pretty swell -#[derive(Display)] -enum TestType { - /// This one is okay - Variant1, - - /// Multi - /// line - /// doc. - Variant2, -} - -static_assertions::assert_impl_all!(TestType: core::fmt::Display); - -#[cfg(feature = "std")] -fn main() {} diff --git a/deps/crates/vendor/displaydoc-v0_2/tests/no_std/multi_line.stderr b/deps/crates/vendor/displaydoc-v0_2/tests/no_std/multi_line.stderr deleted file mode 100644 index f3d77b9e4b97..000000000000 --- a/deps/crates/vendor/displaydoc-v0_2/tests/no_std/multi_line.stderr +++ /dev/null @@ -1,22 +0,0 @@ -error: proc-macro derive panicked - --> $DIR/multi_line.rs:23:10 - | -23 | #[derive(Display)] - | ^^^^^^^ - | - = help: message: Multi-line comments are disabled by default by displaydoc. Please consider using block doc comments (/** */) or adding the #[ignore_extra_doc_attributes] attribute to your type next to the derive. - -error[E0277]: `TestType` doesn't implement `Display` - --> $DIR/multi_line.rs:34:37 - | -34 | static_assertions::assert_impl_all!(TestType: core::fmt::Display); - | ^^^^^^^^ `TestType` cannot be formatted with the default formatter - | - = help: the trait `Display` is not implemented for `TestType` - = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead -note: required by a bound in `assert_impl_all` - --> $DIR/multi_line.rs:34:1 - | -34 | static_assertions::assert_impl_all!(TestType: core::fmt::Display); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `assert_impl_all` - = note: this error originates in the macro `static_assertions::assert_impl_all` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/deps/crates/vendor/displaydoc-v0_2/tests/no_std/multi_line_allow.rs b/deps/crates/vendor/displaydoc-v0_2/tests/no_std/multi_line_allow.rs deleted file mode 100644 index 84676817ea72..000000000000 --- a/deps/crates/vendor/displaydoc-v0_2/tests/no_std/multi_line_allow.rs +++ /dev/null @@ -1,38 +0,0 @@ -#![cfg_attr(not(feature = "std"), allow(internal_features), feature(lang_items, start))] -#![cfg_attr(not(feature = "std"), no_std)] - -#[cfg_attr(not(feature = "std"), start)] -fn start(_argc: isize, _argv: *const *const u8) -> isize { - 0 -} -#[lang = "eh_personality"] -#[no_mangle] -#[cfg(not(feature = "std"))] -pub extern "C" fn rust_eh_personality() {} -#[panic_handler] -#[cfg(not(feature = "std"))] -fn panic(_info: &core::panic::PanicInfo) -> ! { - unsafe { - libc::abort(); - } -} - -use displaydoc::Display; - -/// this type is pretty swell -#[derive(Display)] -#[ignore_extra_doc_attributes] -enum TestType { - /// This one is okay - Variant1, - - /// Multi - /// line - /// doc. - Variant2, -} - -static_assertions::assert_impl_all!(TestType: core::fmt::Display); - -#[cfg(feature = "std")] -fn main() {} diff --git a/deps/crates/vendor/displaydoc-v0_2/tests/no_std/with.rs b/deps/crates/vendor/displaydoc-v0_2/tests/no_std/with.rs deleted file mode 100644 index 67aef473aa4c..000000000000 --- a/deps/crates/vendor/displaydoc-v0_2/tests/no_std/with.rs +++ /dev/null @@ -1,32 +0,0 @@ -#![feature(lang_items, start)] -#![no_std] - -#[start] -#[cfg(not(feature = "std"))] -fn start(_argc: isize, _argv: *const *const u8) -> isize { - 0 -} - -#[lang = "eh_personality"] -#[no_mangle] -#[cfg(not(feature = "std"))] -pub extern "C" fn rust_eh_personality() {} - -#[panic_handler] -#[cfg(not(feature = "std"))] -fn panic(_info: &core::panic::PanicInfo) -> ! { - unsafe { - libc::abort(); - } -} - -#[cfg(feature = "std")] -fn main() {} - -use displaydoc::Display; - -/// this type is pretty swell -#[derive(Display)] -struct FakeType; - -static_assertions::assert_impl_all!(FakeType: core::fmt::Display); diff --git a/deps/crates/vendor/displaydoc-v0_2/tests/no_std/without.rs b/deps/crates/vendor/displaydoc-v0_2/tests/no_std/without.rs deleted file mode 100644 index 04d4b8fa695e..000000000000 --- a/deps/crates/vendor/displaydoc-v0_2/tests/no_std/without.rs +++ /dev/null @@ -1,28 +0,0 @@ -#![cfg_attr(not(feature = "std"), allow(internal_features), feature(lang_items, start))] -#![cfg_attr(not(feature = "std"), no_std)] - -#[cfg_attr(not(feature = "std"), start)] -fn start(_argc: isize, _argv: *const *const u8) -> isize { - 0 -} -#[lang = "eh_personality"] -#[no_mangle] -#[cfg(not(feature = "std"))] -pub extern "C" fn rust_eh_personality() {} -#[panic_handler] -#[cfg(not(feature = "std"))] -fn panic(_info: &core::panic::PanicInfo) -> ! { - unsafe { - libc::abort(); - } -} - -use displaydoc::Display; - -/// this type is pretty swell -struct FakeType; - -static_assertions::assert_impl_all!(FakeType: core::fmt::Display); - -#[cfg(feature = "std")] -fn main() {} diff --git a/deps/crates/vendor/displaydoc-v0_2/tests/no_std/without.stderr b/deps/crates/vendor/displaydoc-v0_2/tests/no_std/without.stderr deleted file mode 100644 index a12edc4a3841..000000000000 --- a/deps/crates/vendor/displaydoc-v0_2/tests/no_std/without.stderr +++ /dev/null @@ -1,22 +0,0 @@ -warning: unused import: `displaydoc::Display` - --> $DIR/without.rs:20:5 - | -20 | use displaydoc::Display; - | ^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(unused_imports)]` on by default - -error[E0277]: `FakeType` doesn't implement `Display` - --> $DIR/without.rs:25:37 - | -25 | static_assertions::assert_impl_all!(FakeType: core::fmt::Display); - | ^^^^^^^^ `FakeType` cannot be formatted with the default formatter - | - = help: the trait `Display` is not implemented for `FakeType` - = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead -note: required by a bound in `assert_impl_all` - --> $DIR/without.rs:25:1 - | -25 | static_assertions::assert_impl_all!(FakeType: core::fmt::Display); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `assert_impl_all` - = note: this error originates in the macro `static_assertions::assert_impl_all` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/deps/crates/vendor/displaydoc-v0_2/tests/std/enum_prefix.rs b/deps/crates/vendor/displaydoc-v0_2/tests/std/enum_prefix.rs deleted file mode 100644 index 7e6abcce8f65..000000000000 --- a/deps/crates/vendor/displaydoc-v0_2/tests/std/enum_prefix.rs +++ /dev/null @@ -1,36 +0,0 @@ -#![cfg_attr(not(feature = "std"), feature(lang_items, start))] -#![cfg_attr(not(feature = "std"), no_std)] - -#[cfg_attr(not(feature = "std"), start)] -fn start(_argc: isize, _argv: *const *const u8) -> isize { - 0 -} -#[lang = "eh_personality"] -#[no_mangle] -#[cfg(not(feature = "std"))] -pub extern "C" fn rust_eh_personality() {} -#[panic_handler] -#[cfg(not(feature = "std"))] -fn panic(_info: &core::panic::PanicInfo) -> ! { - unsafe { - libc::abort(); - } -} - -use displaydoc::Display; - -/// this type is pretty swell -#[derive(Display)] -#[prefix_enum_doc_attributes] -enum TestType { - /// this variant is too - Variant1, - - /// this variant is two - Variant2, -} - -static_assertions::assert_impl_all!(TestType: core::fmt::Display); - -#[cfg(feature = "std")] -fn main() {} diff --git a/deps/crates/vendor/displaydoc-v0_2/tests/std/enum_prefix_missing.rs b/deps/crates/vendor/displaydoc-v0_2/tests/std/enum_prefix_missing.rs deleted file mode 100644 index 45c312b7e258..000000000000 --- a/deps/crates/vendor/displaydoc-v0_2/tests/std/enum_prefix_missing.rs +++ /dev/null @@ -1,35 +0,0 @@ -#![cfg_attr(not(feature = "std"), feature(lang_items, start))] -#![cfg_attr(not(feature = "std"), no_std)] - -#[cfg_attr(not(feature = "std"), start)] -fn start(_argc: isize, _argv: *const *const u8) -> isize { - 0 -} -#[lang = "eh_personality"] -#[no_mangle] -#[cfg(not(feature = "std"))] -pub extern "C" fn rust_eh_personality() {} -#[panic_handler] -#[cfg(not(feature = "std"))] -fn panic(_info: &core::panic::PanicInfo) -> ! { - unsafe { - libc::abort(); - } -} - -use displaydoc::Display; - -#[derive(Display)] -#[prefix_enum_doc_attributes] -enum TestType { - /// this variant is too - Variant1, - - /// this variant is two - Variant2, -} - -static_assertions::assert_impl_all!(TestType: core::fmt::Display); - -#[cfg(feature = "std")] -fn main() {} diff --git a/deps/crates/vendor/displaydoc-v0_2/tests/std/enum_prefix_missing.stderr b/deps/crates/vendor/displaydoc-v0_2/tests/std/enum_prefix_missing.stderr deleted file mode 100644 index 09e1db68b4e8..000000000000 --- a/deps/crates/vendor/displaydoc-v0_2/tests/std/enum_prefix_missing.stderr +++ /dev/null @@ -1,22 +0,0 @@ -error: proc-macro derive panicked - --> $DIR/enum_prefix_missing.rs:22:10 - | -22 | #[derive(Display)] - | ^^^^^^^ - | - = help: message: Missing doc comment on enum with #[prefix_enum_doc_attributes]. Please remove the attribute or add a doc comment to the enum itself. - -error[E0277]: `TestType` doesn't implement `std::fmt::Display` - --> $DIR/enum_prefix_missing.rs:32:37 - | -32 | static_assertions::assert_impl_all!(TestType: core::fmt::Display); - | ^^^^^^^^ `TestType` cannot be formatted with the default formatter - | - = help: the trait `std::fmt::Display` is not implemented for `TestType` - = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead -note: required by a bound in `assert_impl_all` - --> $DIR/enum_prefix_missing.rs:32:1 - | -32 | static_assertions::assert_impl_all!(TestType: core::fmt::Display); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `assert_impl_all` - = note: this error originates in the macro `static_assertions::assert_impl_all` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/deps/crates/vendor/displaydoc-v0_2/tests/std/multi_line.rs b/deps/crates/vendor/displaydoc-v0_2/tests/std/multi_line.rs deleted file mode 100644 index ca4215cdc3cb..000000000000 --- a/deps/crates/vendor/displaydoc-v0_2/tests/std/multi_line.rs +++ /dev/null @@ -1,37 +0,0 @@ -#![cfg_attr(not(feature = "std"), allow(internal_features), feature(lang_items, start))] -#![cfg_attr(not(feature = "std"), no_std)] - -#[cfg_attr(not(feature = "std"), start)] -fn start(_argc: isize, _argv: *const *const u8) -> isize { - 0 -} -#[lang = "eh_personality"] -#[no_mangle] -#[cfg(not(feature = "std"))] -pub extern "C" fn rust_eh_personality() {} -#[panic_handler] -#[cfg(not(feature = "std"))] -fn panic(_info: &core::panic::PanicInfo) -> ! { - unsafe { - libc::abort(); - } -} - -use displaydoc::Display; - -/// this type is pretty swell -#[derive(Display)] -enum TestType { - /// This one is okay - Variant1, - - /// Multi - /// line - /// doc. - Variant2, -} - -static_assertions::assert_impl_all!(TestType: core::fmt::Display); - -#[cfg(feature = "std")] -fn main() {} diff --git a/deps/crates/vendor/displaydoc-v0_2/tests/std/multi_line.stderr b/deps/crates/vendor/displaydoc-v0_2/tests/std/multi_line.stderr deleted file mode 100644 index c36a75db2a10..000000000000 --- a/deps/crates/vendor/displaydoc-v0_2/tests/std/multi_line.stderr +++ /dev/null @@ -1,22 +0,0 @@ -error: proc-macro derive panicked - --> $DIR/multi_line.rs:23:10 - | -23 | #[derive(Display)] - | ^^^^^^^ - | - = help: message: Multi-line comments are disabled by default by displaydoc. Please consider using block doc comments (/** */) or adding the #[ignore_extra_doc_attributes] attribute to your type next to the derive. - -error[E0277]: `TestType` doesn't implement `std::fmt::Display` - --> $DIR/multi_line.rs:34:37 - | -34 | static_assertions::assert_impl_all!(TestType: core::fmt::Display); - | ^^^^^^^^ `TestType` cannot be formatted with the default formatter - | - = help: the trait `std::fmt::Display` is not implemented for `TestType` - = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead -note: required by a bound in `assert_impl_all` - --> $DIR/multi_line.rs:34:1 - | -34 | static_assertions::assert_impl_all!(TestType: core::fmt::Display); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `assert_impl_all` - = note: this error originates in the macro `static_assertions::assert_impl_all` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/deps/crates/vendor/displaydoc-v0_2/tests/std/multi_line_allow.rs b/deps/crates/vendor/displaydoc-v0_2/tests/std/multi_line_allow.rs deleted file mode 100644 index e09e8fcf2cc9..000000000000 --- a/deps/crates/vendor/displaydoc-v0_2/tests/std/multi_line_allow.rs +++ /dev/null @@ -1,38 +0,0 @@ -#![cfg_attr(not(feature = "std"), feature(lang_items, start))] -#![cfg_attr(not(feature = "std"), no_std)] - -#[cfg_attr(not(feature = "std"), start)] -fn start(_argc: isize, _argv: *const *const u8) -> isize { - 0 -} -#[lang = "eh_personality"] -#[no_mangle] -#[cfg(not(feature = "std"))] -pub extern "C" fn rust_eh_personality() {} -#[panic_handler] -#[cfg(not(feature = "std"))] -fn panic(_info: &core::panic::PanicInfo) -> ! { - unsafe { - libc::abort(); - } -} - -use displaydoc::Display; - -/// this type is pretty swell -#[derive(Display)] -#[ignore_extra_doc_attributes] -enum TestType { - /// This one is okay - Variant1, - - /// Multi - /// line - /// doc. - Variant2, -} - -static_assertions::assert_impl_all!(TestType: core::fmt::Display); - -#[cfg(feature = "std")] -fn main() {} diff --git a/deps/crates/vendor/displaydoc-v0_2/tests/std/multiple.rs b/deps/crates/vendor/displaydoc-v0_2/tests/std/multiple.rs deleted file mode 100644 index 66d59b76903b..000000000000 --- a/deps/crates/vendor/displaydoc-v0_2/tests/std/multiple.rs +++ /dev/null @@ -1,38 +0,0 @@ -#![feature(lang_items, start)] -#![no_std] - -#[start] -#[cfg(not(feature = "std"))] -fn start(_argc: isize, _argv: *const *const u8) -> isize { - 0 -} - -#[lang = "eh_personality"] -#[no_mangle] -#[cfg(not(feature = "std"))] -pub extern "C" fn rust_eh_personality() {} - -#[panic_handler] -#[cfg(not(feature = "std"))] -fn panic(_info: &core::panic::PanicInfo) -> ! { - unsafe { - libc::abort(); - } -} - -#[cfg(feature = "std")] -fn main() {} - -use displaydoc::Display; - -/// this type is pretty swell -#[derive(Display)] -struct FakeType; - -static_assertions::assert_impl_all!(FakeType: core::fmt::Display); - -/// this type is pretty swell2 -#[derive(Display)] -struct FakeType2; - -static_assertions::assert_impl_all!(FakeType2: core::fmt::Display); diff --git a/deps/crates/vendor/displaydoc-v0_2/tests/std/without.rs b/deps/crates/vendor/displaydoc-v0_2/tests/std/without.rs deleted file mode 100644 index 04d4b8fa695e..000000000000 --- a/deps/crates/vendor/displaydoc-v0_2/tests/std/without.rs +++ /dev/null @@ -1,28 +0,0 @@ -#![cfg_attr(not(feature = "std"), allow(internal_features), feature(lang_items, start))] -#![cfg_attr(not(feature = "std"), no_std)] - -#[cfg_attr(not(feature = "std"), start)] -fn start(_argc: isize, _argv: *const *const u8) -> isize { - 0 -} -#[lang = "eh_personality"] -#[no_mangle] -#[cfg(not(feature = "std"))] -pub extern "C" fn rust_eh_personality() {} -#[panic_handler] -#[cfg(not(feature = "std"))] -fn panic(_info: &core::panic::PanicInfo) -> ! { - unsafe { - libc::abort(); - } -} - -use displaydoc::Display; - -/// this type is pretty swell -struct FakeType; - -static_assertions::assert_impl_all!(FakeType: core::fmt::Display); - -#[cfg(feature = "std")] -fn main() {} diff --git a/deps/crates/vendor/displaydoc-v0_2/tests/std/without.stderr b/deps/crates/vendor/displaydoc-v0_2/tests/std/without.stderr deleted file mode 100644 index 4f0d71316c95..000000000000 --- a/deps/crates/vendor/displaydoc-v0_2/tests/std/without.stderr +++ /dev/null @@ -1,22 +0,0 @@ -warning: unused import: `displaydoc::Display` - --> $DIR/without.rs:20:5 - | -20 | use displaydoc::Display; - | ^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(unused_imports)]` on by default - -error[E0277]: `FakeType` doesn't implement `std::fmt::Display` - --> $DIR/without.rs:25:37 - | -25 | static_assertions::assert_impl_all!(FakeType: core::fmt::Display); - | ^^^^^^^^ `FakeType` cannot be formatted with the default formatter - | - = help: the trait `std::fmt::Display` is not implemented for `FakeType` - = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead -note: required by a bound in `assert_impl_all` - --> $DIR/without.rs:25:1 - | -25 | static_assertions::assert_impl_all!(FakeType: core::fmt::Display); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `assert_impl_all` - = note: this error originates in the macro `static_assertions::assert_impl_all` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/deps/crates/vendor/displaydoc-v0_2/tests/ui/enum_prefix.rs b/deps/crates/vendor/displaydoc-v0_2/tests/ui/enum_prefix.rs new file mode 100644 index 000000000000..ba0dd702a46e --- /dev/null +++ b/deps/crates/vendor/displaydoc-v0_2/tests/ui/enum_prefix.rs @@ -0,0 +1,16 @@ +use displaydoc::Display; + +/// this type is pretty swell +#[derive(Display)] +#[prefix_enum_doc_attributes] +enum TestType { + /// this variant is too + Variant1, + + /// this variant is two + Variant2, +} + +static_assertions::assert_impl_all!(TestType: core::fmt::Display); + +fn main() {} \ No newline at end of file diff --git a/deps/crates/vendor/displaydoc-v0_2/tests/ui/enum_prefix_missing.rs b/deps/crates/vendor/displaydoc-v0_2/tests/ui/enum_prefix_missing.rs new file mode 100644 index 000000000000..78301f97671c --- /dev/null +++ b/deps/crates/vendor/displaydoc-v0_2/tests/ui/enum_prefix_missing.rs @@ -0,0 +1,15 @@ +use displaydoc::Display; + +#[derive(Display)] +#[prefix_enum_doc_attributes] +enum TestType { + /// this variant is too + Variant1, + + /// this variant is two + Variant2, +} + +static_assertions::assert_impl_all!(TestType: core::fmt::Display); + +fn main() {} \ No newline at end of file diff --git a/deps/crates/vendor/displaydoc-v0_2/tests/ui/multi_line.rs b/deps/crates/vendor/displaydoc-v0_2/tests/ui/multi_line.rs new file mode 100644 index 000000000000..dcb5ba5e8235 --- /dev/null +++ b/deps/crates/vendor/displaydoc-v0_2/tests/ui/multi_line.rs @@ -0,0 +1,20 @@ +use displaydoc::Display; + +/// this type is pretty swell +#[derive(Display)] +enum TestType { + /// This one is okay + Variant1, + + /// Multi + /// line + /// doc + /// is + /// pretty + /// swell + Variant2, +} + +static_assertions::assert_impl_all!(TestType: core::fmt::Display); + +fn main() {} diff --git a/deps/crates/vendor/displaydoc-v0_2/tests/ui/multi_line_allow.rs b/deps/crates/vendor/displaydoc-v0_2/tests/ui/multi_line_allow.rs new file mode 100644 index 000000000000..fb544cf9960c --- /dev/null +++ b/deps/crates/vendor/displaydoc-v0_2/tests/ui/multi_line_allow.rs @@ -0,0 +1,27 @@ +use displaydoc::Display; + +/// this type is pretty swell +#[derive(Display)] +#[ignore_extra_doc_attributes] +enum TestType { + /// This one is okay + Variant1, + + /// Multi + /// line + /// doc. + Variant2, + + /// Multi + /// line + /// doc + /// + /// with + /// line + /// breaks + Variant3, +} + +static_assertions::assert_impl_all!(TestType: core::fmt::Display); + +fn main() {} diff --git a/deps/crates/vendor/displaydoc-v0_2/tests/ui/multi_line_line_break.rs b/deps/crates/vendor/displaydoc-v0_2/tests/ui/multi_line_line_break.rs new file mode 100644 index 000000000000..503a2db7b666 --- /dev/null +++ b/deps/crates/vendor/displaydoc-v0_2/tests/ui/multi_line_line_break.rs @@ -0,0 +1,20 @@ +use displaydoc::Display; + +#[derive(Display)] +/// Multi +/// line +/// doc +/// with +/// line +/// break +/// +/// is +/// pretty +/// not +/// swell +/// 😞👊 +struct TestType; + +static_assertions::assert_impl_all!(TestType: core::fmt::Display); + +fn main() {} diff --git a/deps/crates/vendor/displaydoc-v0_2/tests/ui/multi_line_line_break_block.rs b/deps/crates/vendor/displaydoc-v0_2/tests/ui/multi_line_line_break_block.rs new file mode 100644 index 000000000000..a79d96bd285d --- /dev/null +++ b/deps/crates/vendor/displaydoc-v0_2/tests/ui/multi_line_line_break_block.rs @@ -0,0 +1,14 @@ +use displaydoc::Display; + +#[derive(Display)] +/** + * block + */ +/** + * + */ +struct TestType; + +static_assertions::assert_impl_all!(TestType: core::fmt::Display); + +fn main() {} diff --git a/deps/crates/vendor/displaydoc-v0_2/tests/ui/multiple.rs b/deps/crates/vendor/displaydoc-v0_2/tests/ui/multiple.rs new file mode 100644 index 000000000000..d0489064010d --- /dev/null +++ b/deps/crates/vendor/displaydoc-v0_2/tests/ui/multiple.rs @@ -0,0 +1,15 @@ +use displaydoc::Display; + +/// this type is pretty swell +#[derive(Display)] +struct FakeType; + +static_assertions::assert_impl_all!(FakeType: core::fmt::Display); + +/// this type is pretty swell2 +#[derive(Display)] +struct FakeType2; + +static_assertions::assert_impl_all!(FakeType2: core::fmt::Display); + +fn main() {} \ No newline at end of file diff --git a/deps/crates/vendor/displaydoc-v0_2/tests/ui/without.rs b/deps/crates/vendor/displaydoc-v0_2/tests/ui/without.rs new file mode 100644 index 000000000000..1aa85e13467a --- /dev/null +++ b/deps/crates/vendor/displaydoc-v0_2/tests/ui/without.rs @@ -0,0 +1,8 @@ +use displaydoc::Display; + +/// this type is pretty swell +struct FakeType; + +static_assertions::assert_impl_all!(FakeType: core::fmt::Display); + +fn main() {} diff --git a/deps/crates/vendor/displaydoc-v0_2/update-readme.sh b/deps/crates/vendor/displaydoc-v0_2/update-readme.sh deleted file mode 100755 index f67bfd566b60..000000000000 --- a/deps/crates/vendor/displaydoc-v0_2/update-readme.sh +++ /dev/null @@ -1,5 +0,0 @@ -#! /usr/bin/env bash - -cargo readme > ./README.md -git add ./README.md -git commit -m "Update readme" || true diff --git a/deps/crates/vendor/either-v1/.cargo_vcs_info.json b/deps/crates/vendor/either-v1/.cargo_vcs_info.json index 1cca00e93685..148bd94dd5b0 100644 --- a/deps/crates/vendor/either-v1/.cargo_vcs_info.json +++ b/deps/crates/vendor/either-v1/.cargo_vcs_info.json @@ -1,6 +1,6 @@ { "git": { - "sha1": "59ae1fce0cec62c886fcd486e06b7e219bc7ce48" + "sha1": "8f4ecd9964ea909a7f989a3668a2710310a0e62f" }, "path_in_vcs": "" } \ No newline at end of file diff --git a/deps/crates/vendor/either-v1/.github/workflows/ci.yml b/deps/crates/vendor/either-v1/.github/workflows/ci.yml index 2f3843b7a2ec..1c6dbb0a5e35 100644 --- a/deps/crates/vendor/either-v1/.github/workflows/ci.yml +++ b/deps/crates/vendor/either-v1/.github/workflows/ci.yml @@ -32,6 +32,13 @@ jobs: path: ~/.cargo/registry/index key: cargo-${{ matrix.rust }}-git-index + - name: Lock MSRV-compatible dependencies + if: startsWith(matrix.rust, '1') + env: + CARGO_RESOLVER_INCOMPATIBLE_RUST_VERSIONS: fallback + # Note that this uses the runner's pre-installed stable cargo + run: cargo generate-lockfile + - name: Set up Rust uses: dtolnay/rust-toolchain@master with: diff --git a/deps/crates/vendor/either-v1/Cargo.lock b/deps/crates/vendor/either-v1/Cargo.lock index 3c336a9a934e..3064f8b7e5ca 100644 --- a/deps/crates/vendor/either-v1/Cargo.lock +++ b/deps/crates/vendor/either-v1/Cargo.lock @@ -4,7 +4,7 @@ version = 3 [[package]] name = "either" -version = "1.15.0" +version = "1.16.0" dependencies = [ "serde", "serde_json", @@ -12,54 +12,48 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.15" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" - -[[package]] -name = "memchr" -version = "2.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" +checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" [[package]] name = "proc-macro2" -version = "1.0.94" +version = "1.0.71" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a31971752e70b8b2686d7e46ec17fb38dad4051d94024c88df49b667caea9c84" +checksum = "75cb1540fadbd5b8fbccc4dddad2734eba435053f725621c070711a14bb5f4b8" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.39" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1f1914ce909e1658d9907913b4b91947430c7d9be598b15a1912935b8c04801" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" dependencies = [ "proc-macro2", ] [[package]] name = "ryu" -version = "1.0.20" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" +checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" [[package]] name = "serde" -version = "1.0.218" +version = "1.0.193" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8dfc9d19bdbf6d17e22319da49161d5d0108e4188e8b680aef6299eed22df60" +checksum = "25dd9975e68d0cb5aa1120c288333fc98731bd1dd12f561e468ea4728c042b89" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.218" +version = "1.0.193" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f09503e191f4e797cb8aac08e9a4a4695c5edf6a2e70e376d961ddd5c969f82b" +checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3" dependencies = [ "proc-macro2", "quote", @@ -68,21 +62,20 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.140" +version = "1.0.108" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373" +checksum = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b" dependencies = [ "itoa", - "memchr", "ryu", "serde", ] [[package]] name = "syn" -version = "2.0.99" +version = "2.0.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e02e925281e18ffd9d640e234264753c43edc62d64b2d4cf898f1bc5e75f3fc2" +checksum = "ee659fb5f3d355364e1f3e5bc10fb82068efbf824a1e9d1c9504244a6469ad53" dependencies = [ "proc-macro2", "quote", @@ -91,6 +84,6 @@ dependencies = [ [[package]] name = "unicode-ident" -version = "1.0.18" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" diff --git a/deps/crates/vendor/either-v1/Cargo.toml b/deps/crates/vendor/either-v1/Cargo.toml index 68b38fd8097e..15de8104b8b1 100644 --- a/deps/crates/vendor/either-v1/Cargo.toml +++ b/deps/crates/vendor/either-v1/Cargo.toml @@ -13,8 +13,7 @@ edition = "2021" rust-version = "1.63.0" name = "either" -version = "1.15.0" -authors = ["bluss"] +version = "1.16.0" build = false autolib = false autobins = false @@ -37,17 +36,17 @@ categories = [ license = "MIT OR Apache-2.0" repository = "https://github.com/rayon-rs/either" +[package.metadata.release] +allow-branch = ["main"] +sign-tag = true +tag-name = "{{version}}" + [package.metadata.docs.rs] features = ["serde"] [package.metadata.playground] features = ["serde"] -[package.metadata.release] -allow-branch = ["main"] -sign-tag = true -tag-name = "{{version}}" - [features] default = ["std"] std = [] diff --git a/deps/crates/vendor/either-v1/Cargo.toml.orig b/deps/crates/vendor/either-v1/Cargo.toml.orig index 1d17f73cc4d0..fc46d174ece0 100644 --- a/deps/crates/vendor/either-v1/Cargo.toml.orig +++ b/deps/crates/vendor/either-v1/Cargo.toml.orig @@ -1,7 +1,6 @@ [package] name = "either" -version = "1.15.0" -authors = ["bluss"] +version = "1.16.0" edition = "2021" rust-version = "1.63.0" diff --git a/deps/crates/vendor/either-v1/README.rst b/deps/crates/vendor/either-v1/README.rst index 7665f1ff0dd7..10f392a75b97 100644 --- a/deps/crates/vendor/either-v1/README.rst +++ b/deps/crates/vendor/either-v1/README.rst @@ -31,6 +31,22 @@ How to use with cargo:: Recent Changes -------------- +- 1.16.0 + + - Add many new methods dealing with each side, by @A4-Tacks: + + - ``inspect_left`` and ``inspect_right`` (#124) + + - ``left_and`` and ``right_and`` (#125) + + - ``is_left_and`` and ``is_right_and`` (#126) + + - ``map_left_or`` and ``map_right_or`` (#127) + + - Add a version of ``for_both!`` with a single ``ident``, by @A4-Tacks (#128) + + - Add a ``map_both!`` macro, by @JohnScience (#109) and @ronnodas (#137) + - 1.15.0 - Fix ``serde`` support when building without ``std``, by @klkvr (#119) diff --git a/deps/crates/vendor/either-v1/src/iterator.rs b/deps/crates/vendor/either-v1/src/iterator.rs index d54fab793d96..a5535f0530c0 100644 --- a/deps/crates/vendor/either-v1/src/iterator.rs +++ b/deps/crates/vendor/either-v1/src/iterator.rs @@ -1,4 +1,4 @@ -use super::{for_both, Either, Left, Right}; +use super::{Either, Left, Right}; use core::iter; macro_rules! wrap_either { @@ -185,7 +185,7 @@ where type Item = Either; fn next(&mut self) -> Option { - Some(map_either!(self.inner, ref mut inner => inner.next()?)) + Some(map_both!(self.inner, ref mut inner => inner.next()?)) } fn size_hint(&self) -> (usize, Option) { @@ -211,11 +211,11 @@ where } fn last(self) -> Option { - Some(map_either!(self.inner, inner => inner.last()?)) + Some(map_both!(self.inner, inner => inner.last()?)) } fn nth(&mut self, n: usize) -> Option { - Some(map_either!(self.inner, ref mut inner => inner.nth(n)?)) + Some(map_both!(self.inner, ref mut inner => inner.nth(n)?)) } fn collect(self) -> B @@ -275,11 +275,11 @@ where R: DoubleEndedIterator, { fn next_back(&mut self) -> Option { - Some(map_either!(self.inner, ref mut inner => inner.next_back()?)) + Some(map_both!(self.inner, ref mut inner => inner.next_back()?)) } fn nth_back(&mut self, n: usize) -> Option { - Some(map_either!(self.inner, ref mut inner => inner.nth_back(n)?)) + Some(map_both!(self.inner, ref mut inner => inner.nth_back(n)?)) } fn rfold(self, init: Acc, f: G) -> Acc diff --git a/deps/crates/vendor/either-v1/src/lib.rs b/deps/crates/vendor/either-v1/src/lib.rs index e2265eb71040..ec16cee00197 100644 --- a/deps/crates/vendor/either-v1/src/lib.rs +++ b/deps/crates/vendor/either-v1/src/lib.rs @@ -58,7 +58,12 @@ pub enum Either { /// This macro is useful in cases where both sides of [`Either`] can be interacted with /// in the same way even though the don't share the same type. /// -/// Syntax: `either::for_both!(` *expression* `,` *pattern* `=>` *expression* `)` +/// Syntax: +/// +/// - `either::for_both!(` *expression* `,` *pattern* `=>` *expression* `)` +/// - `either::for_both!(` *ident* `=>` *expression* `)` +/// +/// Unlike [`map_both!`], this macro converges both variants to the type returned by the expression. /// /// # Example /// @@ -77,6 +82,22 @@ pub enum Either { /// assert_eq!(length(owned), 12); /// } /// ``` +/// +/// ``` +/// use either::Either; +/// +/// fn length(s: Either>) -> usize { +/// either::for_both!(s => s.len()) +/// } +/// +/// fn main() { +/// let string = Either::Left("Hello world!".to_owned()); +/// let bytes = Either::Right(b"Hello world!".to_vec()); +/// +/// assert_eq!(length(string), 12); +/// assert_eq!(length(bytes), 12); +/// } +/// ``` #[macro_export] macro_rules! for_both { ($value:expr, $pattern:pat => $result:expr) => { @@ -85,6 +106,59 @@ macro_rules! for_both { $crate::Either::Right($pattern) => $result, } }; + ($name:ident => $result:expr) => { + match $name { + $crate::Either::Left($name) => $result, + $crate::Either::Right($name) => $result, + } + }; +} + +/// Evaluate the provided expression for both [`Either::Left`] and [`Either::Right`], +/// returning an [`Either`] with the results. +/// +/// This macro is useful in cases where both sides of [`Either`] can be interacted with +/// in the same way even though the don't share the same type. +/// +/// Syntax: `either::map_both!(` *expression* `,` *pattern* `=>` *expression* `)` +/// +/// Unlike [`for_both!`], this macro returns an [`Either`] with the results of the expressions. +/// +/// # Example +/// +/// ``` +/// use either::Either; +/// +/// struct Wrapper(T); +/// +/// fn wrap( +/// owned_or_borrowed: Either, +/// ) -> Either, Wrapper<&'static str>> { +/// either::map_both!(owned_or_borrowed, s => Wrapper(s)) +/// } +/// ``` +/// +/// ``` +/// use either::Either; +/// +/// fn widen(x: Either) -> Either { +/// either::map_both!(x => x.into()) +/// } +/// ``` +#[macro_export] +macro_rules! map_both { + ($value:expr, $pattern:pat => $result:expr) => { + match $value { + $crate::Either::Left($pattern) => $crate::Either::Left($result), + $crate::Either::Right($pattern) => $crate::Either::Right($result), + } + }; + ($name:ident => $result:expr) => { + match $name { + $crate::Either::Left($name) => $crate::Either::Left($result), + $crate::Either::Right($name) => $crate::Either::Right($result), + } + }; } /// Macro for unwrapping the left side of an [`Either`], which fails early @@ -130,15 +204,6 @@ macro_rules! try_right { }; } -macro_rules! map_either { - ($value:expr, $pattern:pat => $result:expr) => { - match $value { - Left($pattern) => Left($result), - Right($pattern) => Right($result), - } - }; -} - mod iterator; pub use self::iterator::IterEither; @@ -179,6 +244,56 @@ impl Either { } } + /// Returns `true` if the value is [`Left`] and the value inside of it matches a predicate. + /// + /// # Examples + /// + /// ``` + /// use either::*; + /// + /// let left0: Either = Left(0); + /// let left2: Either = Left(2); + /// let right: Either = Right(2); + /// + /// assert_eq!(left2.is_left_and(|n| n > 1), true); + /// assert_eq!(left0.is_left_and(|n| n > 1), false); + /// assert_eq!(right.is_left_and(|n| n > 1), false); + /// ``` + pub fn is_left_and(self, f: F) -> bool + where + F: FnOnce(L) -> bool, + { + match self { + Left(left) => f(left), + Right(_) => false, + } + } + + /// Returns `true` if the value is [`Right`] and the value inside of it matches a predicate. + /// + /// # Examples + /// + /// ``` + /// use either::*; + /// + /// let right0: Either = Right(0); + /// let right2: Either = Right(2); + /// let left: Either = Left(2); + /// + /// assert_eq!(right2.is_right_and(|n| n > 1), true); + /// assert_eq!(right0.is_right_and(|n| n > 1), false); + /// assert_eq!(left.is_right_and(|n| n > 1), false); + /// ``` + pub fn is_right_and(self, f: F) -> bool + where + F: FnOnce(R) -> bool, + { + match self { + Left(_) => false, + Right(right) => f(right), + } + } + /// Return true if the value is the `Right` variant. /// /// ``` @@ -240,7 +355,7 @@ impl Either { /// assert_eq!(right.as_ref(), Right(&"some value")); /// ``` pub fn as_ref(&self) -> Either<&L, &R> { - map_either!(self, inner => inner) + map_both!(self, inner => inner) } /// Convert `&mut Either` to `Either<&mut L, &mut R>`. @@ -262,7 +377,7 @@ impl Either { /// assert_eq!(right, Right(123)); /// ``` pub fn as_mut(&mut self) -> Either<&mut L, &mut R> { - map_either!(self, inner => inner) + map_both!(self, inner => inner) } /// Convert `Pin<&Either>` to `Either, Pin<&R>>`, @@ -270,7 +385,7 @@ impl Either { pub fn as_pin_ref(self: Pin<&Self>) -> Either, Pin<&R>> { // SAFETY: We can use `new_unchecked` because the `inner` parts are // guaranteed to be pinned, as they come from `self` which is pinned. - unsafe { map_either!(Pin::get_ref(self), inner => Pin::new_unchecked(inner)) } + unsafe { map_both!(Pin::get_ref(self), inner => Pin::new_unchecked(inner)) } } /// Convert `Pin<&mut Either>` to `Either, Pin<&mut R>>`, @@ -281,7 +396,7 @@ impl Either { // to be pinned, as they come from `self` which is pinned, and we never // offer an unpinned `&mut L` or `&mut R` through `Pin<&mut Self>`. We // also don't have an implementation of `Drop`, nor manual `Unpin`. - unsafe { map_either!(Pin::get_unchecked_mut(self), inner => Pin::new_unchecked(inner)) } + unsafe { map_both!(Pin::get_unchecked_mut(self), inner => Pin::new_unchecked(inner)) } } /// Convert `Either` to `Either`. @@ -346,6 +461,54 @@ impl Either { } } + /// Returns the provided default (if [`Right`]), or + /// applies a function to the contained value (if [`Left`]). + /// + /// # Examples + /// + /// ``` + /// use either::*; + /// + /// let x: Either<_, i32> = Left(123); + /// assert_eq!(x.map_left_or(0, |n| n * 2), 246); + /// + /// let x: Either = Right(123); + /// assert_eq!(x.map_left_or(0, |n| n * 2), 0); + /// ``` + pub fn map_left_or(self, default: S, f: F) -> S + where + F: FnOnce(L) -> S, + { + match self { + Left(left) => f(left), + Right(_) => default, + } + } + + /// Returns the provided default (if [`Left`]), or + /// applies a function to the contained value (if [`Right`]). + /// + /// # Examples + /// + /// ``` + /// use either::*; + /// + /// let x: Either<_, i32> = Left(123); + /// assert_eq!(x.map_right_or(0, |n| n * 2), 0); + /// + /// let x: Either = Right(123); + /// assert_eq!(x.map_right_or(0, |n| n * 2), 246); + /// ``` + pub fn map_right_or(self, default: S, f: F) -> S + where + F: FnOnce(R) -> S, + { + match self { + Left(_) => default, + Right(right) => f(right), + } + } + /// Apply the functions `f` and `g` to the `Left` and `Right` variants /// respectively. This is equivalent to /// [bimap](https://hackage.haskell.org/package/bifunctors-5/docs/Data-Bifunctor.html) @@ -462,6 +625,62 @@ impl Either { } } + /// Returns `other` if the value is [`Left`], otherwise returns the [`Right`] value of `self`. + /// + /// Arguments passed to `left_and` are eagerly evaluated; if you are passing the + /// result of a function call, it is recommended to use [`left_and_then`], which is + /// lazily evaluated. + /// + /// [`left_and_then`]: Either::left_and_then + /// + /// # Examples + /// + /// ``` + /// use either::*; + /// + /// let left: Either<_, u32> = Left(123); + /// assert_eq!(left.left_and::<()>(Right(246)), Right(246)); + /// assert_eq!(left.left_and(Left(246)), Left(246)); + /// + /// let right: Either = Right(123); + /// assert_eq!(right.left_and::<()>(Right(246)), Right(123)); + /// assert_eq!(right.left_and(Left(246)), Right(123)); + /// ``` + pub fn left_and(self, other: Either) -> Either { + match self { + Left(_) => other, + Right(r) => Right(r), + } + } + + /// Returns `other` if the value is [`Right`], otherwise returns the [`Left`] value of `self`. + /// + /// Arguments passed to `right_and` are eagerly evaluated; if you are passing the + /// result of a function call, it is recommended to use [`right_and_then`], which is + /// lazily evaluated. + /// + /// [`right_and_then`]: Either::right_and_then + /// + /// # Examples + /// + /// ``` + /// use either::*; + /// + /// let left: Either<_, u32> = Left(123); + /// assert_eq!(left.right_and(Right(246)), Left(123)); + /// assert_eq!(left.right_and::<()>(Left(246)), Left(123)); + /// + /// let right: Either = Right(123); + /// assert_eq!(right.right_and(Right(246)), Right(246)); + /// assert_eq!(right.right_and::<()>(Left(246)), Left(246)); + /// ``` + pub fn right_and(self, other: Either) -> Either { + match self { + Left(l) => Left(l), + Right(_) => other, + } + } + /// Apply the function `f` on the value in the `Left` variant if it is present. /// /// ``` @@ -523,7 +742,7 @@ impl Either { L: IntoIterator, R: IntoIterator, { - map_either!(self, inner => inner.into_iter()) + map_both!(self, inner => inner.into_iter()) } /// Borrow the inner value as an iterator. @@ -546,7 +765,7 @@ impl Either { for<'a> &'a L: IntoIterator, for<'a> &'a R: IntoIterator::Item>, { - map_either!(self, inner => inner.into_iter()) + map_both!(self, inner => inner.into_iter()) } /// Mutably borrow the inner value as an iterator. @@ -577,7 +796,7 @@ impl Either { for<'a> &'a mut L: IntoIterator, for<'a> &'a mut R: IntoIterator::Item>, { - map_either!(self, inner => inner.into_iter()) + map_both!(self, inner => inner.into_iter()) } /// Converts an `Either` of `Iterator`s to be an `Iterator` of `Either`s @@ -594,14 +813,12 @@ impl Either { /// assert_eq!(right.factor_into_iter().collect::>(), vec![Right(0), Right(1)]); /// /// ``` - // TODO(MSRV): doc(alias) was stabilized in Rust 1.48 - // #[doc(alias = "transpose")] pub fn factor_into_iter(self) -> IterEither where L: IntoIterator, R: IntoIterator, { - IterEither::new(map_either!(self, inner => inner.into_iter())) + IterEither::new(map_both!(self, inner => inner.into_iter())) } /// Borrows an `Either` of `Iterator`s to be an `Iterator` of `Either`s @@ -625,7 +842,7 @@ impl Either { for<'a> &'a L: IntoIterator, for<'a> &'a R: IntoIterator, { - IterEither::new(map_either!(self, inner => inner.into_iter())) + IterEither::new(map_both!(self, inner => inner.into_iter())) } /// Mutably borrows an `Either` of `Iterator`s to be an `Iterator` of `Either`s @@ -651,7 +868,7 @@ impl Either { for<'a> &'a mut L: IntoIterator, for<'a> &'a mut R: IntoIterator, { - IterEither::new(map_either!(self, inner => inner.into_iter())) + IterEither::new(map_both!(self, inner => inner.into_iter())) } /// Return left value or given value @@ -807,6 +1024,7 @@ impl Either { /// let right: Either<(), _> = Right(3); /// right.unwrap_left(); /// ``` + #[track_caller] pub fn unwrap_left(self) -> L where R: core::fmt::Debug, @@ -838,6 +1056,7 @@ impl Either { /// let left: Either<_, ()> = Left(3); /// left.unwrap_right(); /// ``` + #[track_caller] pub fn unwrap_right(self) -> R where L: core::fmt::Debug, @@ -867,6 +1086,7 @@ impl Either { /// let right: Either<(), _> = Right(3); /// right.expect_left("value was Right"); /// ``` + #[track_caller] pub fn expect_left(self, msg: &str) -> L where R: core::fmt::Debug, @@ -896,6 +1116,7 @@ impl Either { /// let left: Either<_, ()> = Left(3); /// left.expect_right("value was Right"); /// ``` + #[track_caller] pub fn expect_right(self, msg: &str) -> R where L: core::fmt::Debug, @@ -906,6 +1127,56 @@ impl Either { } } + /// Calls a function with a reference to the contained value if [`Left`]. + /// + /// Returns the original self. + /// + /// # Examples + /// + /// ``` + /// use either::*; + /// + /// # fn foo() -> Either { Right(2) } + /// let x = foo() + /// .inspect_left(|n| println!("left: {n}")) + /// .left_or(0); + /// ``` + pub fn inspect_left(self, f: F) -> Self + where + F: FnOnce(&L), + { + if let Left(ref left) = self { + f(left); + } + + self + } + + /// Calls a function with a reference to the contained value if [`Right`]. + /// + /// Returns the original self. + /// + /// # Examples + /// + /// ``` + /// use either::*; + /// + /// # fn foo() -> Either { Right(2) } + /// let x = foo() + /// .inspect_right(|n| println!("right: {n}")) + /// .left_or(0); + /// ``` + pub fn inspect_right(self, f: F) -> Self + where + F: FnOnce(&R), + { + if let Right(ref right) = self { + f(right); + } + + self + } + /// Convert the contained value into `T` /// /// # Examples @@ -938,8 +1209,7 @@ impl Either, Option> { /// let right: Either>, _> = Right(Some(String::new())); /// assert_eq!(right.factor_none(), Some(Right(String::new()))); /// ``` - // TODO(MSRV): doc(alias) was stabilized in Rust 1.48 - // #[doc(alias = "transpose")] + #[doc(alias = "transpose")] pub fn factor_none(self) -> Option> { match self { Left(l) => l.map(Either::Left), @@ -949,7 +1219,7 @@ impl Either, Option> { } impl Either, Result> { - /// Factors out a homogenous type from an `Either` of [`Result`]. + /// Factors out a homogeneous type from an `Either` of [`Result`]. /// /// Here, the homogeneous type is the `Err` type of the [`Result`]. /// @@ -961,8 +1231,7 @@ impl Either, Result> { /// let right: Either, u32>, _> = Right(Ok(String::new())); /// assert_eq!(right.factor_err(), Ok(Right(String::new()))); /// ``` - // TODO(MSRV): doc(alias) was stabilized in Rust 1.48 - // #[doc(alias = "transpose")] + #[doc(alias = "transpose")] pub fn factor_err(self) -> Result, E> { match self { Left(l) => l.map(Either::Left), @@ -972,7 +1241,7 @@ impl Either, Result> { } impl Either, Result> { - /// Factors out a homogenous type from an `Either` of [`Result`]. + /// Factors out a homogeneous type from an `Either` of [`Result`]. /// /// Here, the homogeneous type is the `Ok` type of the [`Result`]. /// @@ -984,8 +1253,7 @@ impl Either, Result> { /// let right: Either>, _> = Right(Err(String::new())); /// assert_eq!(right.factor_ok(), Err(Right(String::new()))); /// ``` - // TODO(MSRV): doc(alias) was stabilized in Rust 1.48 - // #[doc(alias = "transpose")] + #[doc(alias = "transpose")] pub fn factor_ok(self) -> Result> { match self { Left(l) => l.map_err(Either::Left), @@ -1067,10 +1335,7 @@ impl Either { where F: FnOnce(T) -> M, { - match self { - Left(l) => Left(f(l)), - Right(r) => Right(f(r)), - } + map_both!(self, t => f(t)) } } @@ -1082,7 +1347,7 @@ impl Either<&L, &R> { L: Clone, R: Clone, { - map_either!(self, inner => inner.clone()) + map_both!(self, inner => inner.clone()) } /// Maps an `Either<&L, &R>` to an `Either` by copying the contents of @@ -1092,7 +1357,7 @@ impl Either<&L, &R> { L: Copy, R: Copy, { - map_either!(self, inner => *inner) + map_both!(self, inner => *inner) } } @@ -1104,7 +1369,7 @@ impl Either<&mut L, &mut R> { L: Clone, R: Clone, { - map_either!(self, inner => inner.clone()) + map_both!(self, inner => inner.clone()) } /// Maps an `Either<&mut L, &mut R>` to an `Either` by copying the contents of @@ -1114,7 +1379,7 @@ impl Either<&mut L, &mut R> { L: Copy, R: Copy, { - map_either!(self, inner => *inner) + map_both!(self, inner => *inner) } } diff --git a/deps/crates/vendor/either-v1/src/serde_untagged.rs b/deps/crates/vendor/either-v1/src/serde_untagged.rs index 72078c3ec8e8..d62dd7d06546 100644 --- a/deps/crates/vendor/either-v1/src/serde_untagged.rs +++ b/deps/crates/vendor/either-v1/src/serde_untagged.rs @@ -1,9 +1,9 @@ -//! Untagged serialization/deserialization support for Either. +//! Untagged serialization/deserialization support for `Either`. //! //! `Either` uses default, externally-tagged representation. //! However, sometimes it is useful to support several alternative types. -//! For example, we may have a field which is generally Map -//! but in typical cases Vec would suffice, too. +//! For example, we may have a field which is generally a `HashMap` +//! but in typical cases `Vec` would suffice, too. //! //! ```rust //! # fn main() -> Result<(), Box> { diff --git a/deps/crates/vendor/either-v1/src/serde_untagged_optional.rs b/deps/crates/vendor/either-v1/src/serde_untagged_optional.rs index fb3239ace1d5..d1316935c4dc 100644 --- a/deps/crates/vendor/either-v1/src/serde_untagged_optional.rs +++ b/deps/crates/vendor/either-v1/src/serde_untagged_optional.rs @@ -1,9 +1,9 @@ -//! Untagged serialization/deserialization support for Option>. +//! Untagged serialization/deserialization support for `Option>`. //! //! `Either` uses default, externally-tagged representation. //! However, sometimes it is useful to support several alternative types. -//! For example, we may have a field which is generally Map -//! but in typical cases Vec would suffice, too. +//! For example, we may have a field which is generally a `HashMap` +//! but in typical cases `Vec` would suffice, too. //! //! ```rust //! # fn main() -> Result<(), Box> { diff --git a/deps/crates/vendor/icu_locale_core-v2/src/extensions/mod.rs b/deps/crates/vendor/icu_locale_core-v2/src/extensions/mod.rs index 72ae65d44e61..47b2b81c4573 100644 --- a/deps/crates/vendor/icu_locale_core-v2/src/extensions/mod.rs +++ b/deps/crates/vendor/icu_locale_core-v2/src/extensions/mod.rs @@ -11,7 +11,7 @@ //! * [`Unicode Extensions`] - marked as `u`. //! * [`Transform Extensions`] - marked as `t`. //! * [`Private Use Extensions`] - marked as `x`. -//! * [`Other Extensions`] - marked as any `a-z` except of `u`, `t` and `x`. +//! * [`Other Extensions`] - marked as any `a-z` or `0-9` except `u`, `t`, and `x`. //! //! One can think of extensions as a bag of extra information on top of basic 4 [`subtags`]. //! @@ -102,7 +102,7 @@ impl ExtensionType { UNICODE_EXT_CHAR => Ok(Self::Unicode), TRANSFORM_EXT_CHAR => Ok(Self::Transform), PRIVATE_EXT_CHAR => Ok(Self::Private), - 'a'..='z' => Ok(Self::Other(key)), + 'a'..='z' | '0'..='9' => Ok(Self::Other(key)), _ => Err(ParseError::InvalidExtension), } } @@ -397,4 +397,12 @@ fn test_writeable() { .extensions, "a-foo-t-foo-u-foo-w-foo-z-foo-x-foo", ); + assert_writeable_eq!( + "en-1-ext-value".parse::().unwrap().extensions, + "1-ext-value", + ); + assert_writeable_eq!( + "und-a-foo-1-bar".parse::().unwrap().extensions, + "1-bar-a-foo", + ); } diff --git a/deps/crates/vendor/icu_locale_core-v2/src/extensions/other/mod.rs b/deps/crates/vendor/icu_locale_core-v2/src/extensions/other/mod.rs index 8934c4dff76f..51e2495751f0 100644 --- a/deps/crates/vendor/icu_locale_core-v2/src/extensions/other/mod.rs +++ b/deps/crates/vendor/icu_locale_core-v2/src/extensions/other/mod.rs @@ -93,7 +93,7 @@ impl Other { /// /// # Panics /// - /// Panics if `ext` is not ASCII alphabetic. + /// Panics if `ext` is not ASCII alphanumeric. /// /// # Examples /// @@ -114,7 +114,7 @@ impl Other { #[allow(dead_code)] pub(crate) fn from_short_slice_unchecked(ext: u8, keys: ShortBoxSlice) -> Self { - assert!(ext.is_ascii_alphabetic()); + assert!(ext.is_ascii_alphanumeric()); // Safety invariant upheld here: ext checked as ASCII above Self { ext, keys } } @@ -156,7 +156,7 @@ impl Other { /// assert_eq!(other_ext.get_ext_str(), "a"); /// ``` pub fn get_ext_str(&self) -> &str { - debug_assert!(self.ext.is_ascii_alphabetic()); + debug_assert!(self.ext.is_ascii_alphanumeric()); // Safety: from safety invariant on self.ext (that it is ASCII) unsafe { core::str::from_utf8_unchecked(core::slice::from_ref(&self.ext)) } } @@ -254,6 +254,9 @@ mod tests { let oe: Other = "o-foo-bar".parse().expect("Failed to parse Other"); assert_eq!(oe.to_string(), "o-foo-bar"); + let oe: Other = "1-foo-bar".parse().expect("Failed to parse Other"); + assert_eq!(oe.to_string(), "1-foo-bar"); + let oe: Result = "o".parse(); assert!(oe.is_err()); } diff --git a/deps/crates/vendor/icu_locale_core-v2/tests/fixtures/locale.json b/deps/crates/vendor/icu_locale_core-v2/tests/fixtures/locale.json index 93679a0667b1..c55f5e7ae564 100644 --- a/deps/crates/vendor/icu_locale_core-v2/tests/fixtures/locale.json +++ b/deps/crates/vendor/icu_locale_core-v2/tests/fixtures/locale.json @@ -294,5 +294,38 @@ "type": "Locale", "identifier": "en-a-bar-u-foo-w-bar-x-u-foo" } + }, + { + "input": { + "type": "Locale", + "identifier": "en-1-ext-value" + }, + "output": { + "type": "Locale", + "language": "en", + "extensions": { + "other": ["1-ext-value"] + } + } + }, + { + "input": { + "type": "Locale", + "identifier": "en-w-bar-1-foo" + }, + "output": { + "type": "Locale", + "identifier": "en-1-foo-w-bar" + } + }, + { + "input": { + "type": "Locale", + "identifier": "en-w-bar-1-foo-u-baz" + }, + "output": { + "type": "Locale", + "identifier": "en-1-foo-u-baz-w-bar" + } } ] diff --git a/deps/crates/vendor/icu_locale_core-v2/tests/fixtures/mod.rs b/deps/crates/vendor/icu_locale_core-v2/tests/fixtures/mod.rs index dd89ce86ff64..8867f34312ac 100644 --- a/deps/crates/vendor/icu_locale_core-v2/tests/fixtures/mod.rs +++ b/deps/crates/vendor/icu_locale_core-v2/tests/fixtures/mod.rs @@ -5,6 +5,7 @@ use std::collections::HashMap; use std::convert::{TryFrom, TryInto}; +use icu_locale_core::extensions::other; use icu_locale_core::extensions::private; use icu_locale_core::extensions::transform; use icu_locale_core::extensions::unicode; @@ -40,7 +41,8 @@ pub struct LocaleExtensions { transform: Option, #[serde(default)] private: Vec, - _other: Option, + #[serde(default)] + other: Vec, } impl TryFrom for Extensions { @@ -95,6 +97,13 @@ impl TryFrom for Extensions { .map(|v| private::Subtag::try_from_str(v).expect("Failed to add field.")) .collect(); ext.private = private::Private::from_vec_unchecked(v); + let mut other: Vec = input + .other + .iter() + .map(|v| other::Other::try_from_str(v).expect("Failed to parse Other extension")) + .collect(); + other.sort(); + ext.other = other; Ok(ext) } } diff --git a/deps/crates/vendor/icu_locale_core-v2/tests/locale.rs b/deps/crates/vendor/icu_locale_core-v2/tests/locale.rs index 5a700bcc724a..ddea6144298a 100644 --- a/deps/crates/vendor/icu_locale_core-v2/tests/locale.rs +++ b/deps/crates/vendor/icu_locale_core-v2/tests/locale.rs @@ -117,3 +117,18 @@ fn test_locale_strict_cmp() { } } } + +#[test] +fn test_locale_total_cmp() { + let l_1_bar = "und-1-bar".parse::().unwrap(); + let l_a_foo = "und-a-foo".parse::().unwrap(); + let l_2_baz = "und-2-baz".parse::().unwrap(); + + assert_eq!(l_1_bar.total_cmp(&l_a_foo), std::cmp::Ordering::Less); + assert_eq!(l_1_bar.total_cmp(&l_2_baz), std::cmp::Ordering::Less); + assert_eq!(l_2_baz.total_cmp(&l_a_foo), std::cmp::Ordering::Less); + + let l_en_1 = "en-1-ext-value".parse::().unwrap(); + let l_en_a = "en-a-ext-value".parse::().unwrap(); + assert_eq!(l_en_1.total_cmp(&l_en_a), std::cmp::Ordering::Less); +} diff --git a/deps/crates/vendor/ixdtf-v0_6/.cargo_vcs_info.json b/deps/crates/vendor/ixdtf-v0_6/.cargo_vcs_info.json index a32e9d347a5a..5b911edad6ae 100644 --- a/deps/crates/vendor/ixdtf-v0_6/.cargo_vcs_info.json +++ b/deps/crates/vendor/ixdtf-v0_6/.cargo_vcs_info.json @@ -1,6 +1,6 @@ { "git": { - "sha1": "29dfe2790b6cfdab94ca6a6b69f58ce54802dbf7" + "sha1": "c9fac4e625ccb2c6a7aa35079fff9709db4385ac" }, "path_in_vcs": "utils/ixdtf" } \ No newline at end of file diff --git a/deps/crates/vendor/ixdtf-v0_6/Cargo.lock b/deps/crates/vendor/ixdtf-v0_6/Cargo.lock index d4a518a1bdef..7c3507fe1f6c 100644 --- a/deps/crates/vendor/ixdtf-v0_6/Cargo.lock +++ b/deps/crates/vendor/ixdtf-v0_6/Cargo.lock @@ -4,9 +4,9 @@ version = 3 [[package]] name = "aho-corasick" -version = "1.1.3" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" +checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301" dependencies = [ "memchr", ] @@ -19,9 +19,9 @@ checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299" [[package]] name = "anstyle" -version = "1.0.13" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5192cca8006f1fd4f7237516f40fa183bb07f8fbdfedaa0036de5ea9b0b45e78" +checksum = "940b3a0ca603d1eade50a4846a2afffd5ef57a9feac2c0e2ec2e14f9ead76000" [[package]] name = "autocfg" @@ -31,9 +31,9 @@ checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" [[package]] name = "bumpalo" -version = "3.19.0" +version = "3.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43" +checksum = "5d20789868f4b01b2f2caec9f5c4e0213b41e3e5702a50157d699ae31ced2fcb" [[package]] name = "cast" @@ -210,13 +210,13 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.15" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" +checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682" [[package]] name = "ixdtf" -version = "0.6.4" +version = "0.6.5" dependencies = [ "criterion", "serde-json-core", @@ -224,9 +224,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.81" +version = "0.3.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec48937a97411dcb524a265206ccd4c90bb711fca92b2792c407f268825b9305" +checksum = "b49715b7073f385ba4bc528e5747d02e66cb39c6146efb66b781f131f0fb399c" dependencies = [ "once_cell", "wasm-bindgen", @@ -234,21 +234,15 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.177" +version = "0.2.183" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2874a2af47a2325c2001a6e6fad9b16a53b802102b528163885171cf92b15976" - -[[package]] -name = "log" -version = "0.4.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34080505efa8e45a4b816c349525ebe327ceaa8559756f0356cba97ef3bf7432" +checksum = "b5b646652bf6661599e1da8901b3b9522896f01e736bad5f723fe7a3a27f899d" [[package]] name = "memchr" -version = "2.7.6" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273" +checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79" [[package]] name = "num-traits" @@ -261,9 +255,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.21.3" +version = "1.21.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" +checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" [[package]] name = "oorandom" @@ -301,18 +295,18 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.103" +version = "1.0.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ee95bc4ef87b8d5ba32e8b7714ccc834865276eab0aed5c9958d00ec45f49e8" +checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.41" +version = "1.0.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce25767e7b499d1b604768e7cde645d14cc8584231ea6b295e9c9eb22c02e1d1" +checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924" dependencies = [ "proc-macro2", ] @@ -339,9 +333,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.12.2" +version = "1.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "843bc0191f75f3e22651ae5f1e72939ab2f72a4bc30fa80a066bd66edefc24d4" +checksum = "e10754a14b9137dd7b1e3e5b0493cc9171fdd105e0ab477f51b72e7f3ac0e276" dependencies = [ "aho-corasick", "memchr", @@ -351,9 +345,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.13" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5276caf25ac86c8d810222b3dbb938e512c55c6831a10f3e6ed1c93b84041f1c" +checksum = "6e1dd4122fc1595e8162618945476892eefca7b88c52820e74af6262213cae8f" dependencies = [ "aho-corasick", "memchr", @@ -362,9 +356,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.8.8" +version = "0.8.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a2d987857b319362043e95f5353c0535c1f58eec5336fdfcf626430af7def58" +checksum = "dc897dd8d9e8bd1ed8cdad82b5966c3e0ecae09fb1907d58efaa013543185d0a" [[package]] name = "rustversion" @@ -374,9 +368,9 @@ checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" [[package]] name = "ryu" -version = "1.0.20" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" +checksum = "9774ba4a74de5f7b1c1451ed6cd5285a32eddb5cccb8cc655a4e50009e06477f" [[package]] name = "same-file" @@ -429,22 +423,22 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.145" +version = "1.0.149" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "402a6f66d8c709116cf22f558eab210f5a50187f702eb4d7e5ef38d9a7f1c79c" +checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86" dependencies = [ "itoa", "memchr", - "ryu", "serde", "serde_core", + "zmij", ] [[package]] name = "syn" -version = "2.0.108" +version = "2.0.117" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da58917d35242480a05c2897064da0a80589a2a0476c9a3f2fdc83b53502e917" +checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99" dependencies = [ "proc-macro2", "quote", @@ -463,9 +457,9 @@ dependencies = [ [[package]] name = "unicode-ident" -version = "1.0.20" +version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "462eeb75aeb73aea900253ce739c8e18a67423fadf006037cd3ff27e82748a06" +checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" [[package]] name = "walkdir" @@ -479,9 +473,9 @@ dependencies = [ [[package]] name = "wasm-bindgen" -version = "0.2.104" +version = "0.2.114" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1da10c01ae9f1ae40cbfac0bac3b1e724b320abfcf52229f80b547c0d250e2d" +checksum = "6532f9a5c1ece3798cb1c2cfdba640b9b3ba884f5db45973a6f442510a87d38e" dependencies = [ "cfg-if", "once_cell", @@ -490,25 +484,11 @@ dependencies = [ "wasm-bindgen-shared", ] -[[package]] -name = "wasm-bindgen-backend" -version = "0.2.104" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "671c9a5a66f49d8a47345ab942e2cb93c7d1d0339065d4f8139c486121b43b19" -dependencies = [ - "bumpalo", - "log", - "proc-macro2", - "quote", - "syn", - "wasm-bindgen-shared", -] - [[package]] name = "wasm-bindgen-macro" -version = "0.2.104" +version = "0.2.114" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ca60477e4c59f5f2986c50191cd972e3a50d8a95603bc9434501cf156a9a119" +checksum = "18a2d50fcf105fb33bb15f00e7a77b772945a2ee45dcf454961fd843e74c18e6" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -516,31 +496,31 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.104" +version = "0.2.114" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f07d2f20d4da7b26400c9f4a0511e6e0345b040694e8a75bd41d578fa4421d7" +checksum = "03ce4caeaac547cdf713d280eda22a730824dd11e6b8c3ca9e42247b25c631e3" dependencies = [ + "bumpalo", "proc-macro2", "quote", "syn", - "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.104" +version = "0.2.114" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bad67dc8b2a1a6e5448428adec4c3e84c43e561d8c9ee8a9e5aabeb193ec41d1" +checksum = "75a326b8c223ee17883a4251907455a2431acc2791c98c26279376490c378c16" dependencies = [ "unicode-ident", ] [[package]] name = "web-sys" -version = "0.3.81" +version = "0.3.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9367c417a924a74cae129e6a2ae3b47fabb1f8995595ab474029da749a8be120" +checksum = "854ba17bb104abfb26ba36da9729addc7ce7f06f5c0f90f3c391f8461cca21f9" dependencies = [ "js-sys", "wasm-bindgen", @@ -569,3 +549,9 @@ checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" dependencies = [ "windows-link", ] + +[[package]] +name = "zmij" +version = "1.0.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa" diff --git a/deps/crates/vendor/ixdtf-v0_6/Cargo.toml b/deps/crates/vendor/ixdtf-v0_6/Cargo.toml index 2f2ddf27a41b..86d0018211b5 100644 --- a/deps/crates/vendor/ixdtf-v0_6/Cargo.toml +++ b/deps/crates/vendor/ixdtf-v0_6/Cargo.toml @@ -13,7 +13,7 @@ edition = "2021" rust-version = "1.82" name = "ixdtf" -version = "0.6.4" +version = "0.6.5" authors = ["The ICU4X Project Developers"] build = false include = [ @@ -35,7 +35,16 @@ autobenches = false description = "Parser for Internet eXtended DateTime Format" homepage = "https://icu4x.unicode.org" readme = "README.md" -categories = ["internationalization"] +keywords = [ + "iso8601", + "date-time", +] +categories = [ + "internationalization", + "localization", + "no-std", + "embedded", +] license = "Unicode-3.0" repository = "https://github.com/unicode-org/icu4x" @@ -65,3 +74,52 @@ default-features = false [target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies.criterion] version = "0.5.0" + +[lints.clippy] +alloc-instead-of-core = "warn" +branches-sharing-code = "warn" +collection_is_never_read = "warn" +crosspointer_transmute = "warn" +dbg_macro = "warn" +debug_assert_with_mut_call = "warn" +doc_markdown = "warn" +exhaustive_enums = "deny" +exhaustive_structs = "deny" +fn_to_numeric_cast_any = "warn" +infinite_loop = "warn" +large_stack_arrays = "warn" +mismatching_type_param_order = "warn" +missing_fields_in_debug = "warn" +missing_transmute_annotations = "warn" +negative_feature_names = "warn" +or-fun-call = "warn" +same_functions_in_if_condition = "warn" +todo = "warn" +transmute_bytes_to_str = "warn" +transmute_int_to_bool = "warn" +transmute_int_to_non_zero = "warn" +transmute_ptr_to_ptr = "warn" +transmute_ptr_to_ref = "warn" +transmute_undefined_repr = "warn" +transmutes_expressible_as_ptr_casts = "warn" +trivially_copy_pass_by_ref = "deny" +unnecessary-wraps = "warn" +useless_transmute = "warn" +wildcard_dependencies = "warn" + +[lints.rust] +missing_debug_implementations = "deny" +trivial_numeric_casts = "deny" +unused_lifetimes = "warn" +unused_macro_rules = "warn" +unused_qualifications = "warn" + +[lints.rust.unexpected_cfgs] +level = "warn" +priority = 0 +check-cfg = [ + "cfg(icu4c_enable_renaming)", + "cfg(needs_alloc_error_handler)", + "cfg(icu4x_run_size_tests)", + "cfg(icu4x_unstable_fast_trie_only)", +] diff --git a/deps/crates/vendor/ixdtf-v0_6/Cargo.toml.orig b/deps/crates/vendor/ixdtf-v0_6/Cargo.toml.orig index 86e56c71baf0..69c4b9e586c2 100644 --- a/deps/crates/vendor/ixdtf-v0_6/Cargo.toml.orig +++ b/deps/crates/vendor/ixdtf-v0_6/Cargo.toml.orig @@ -5,10 +5,11 @@ [package] name = "ixdtf" description = "Parser for Internet eXtended DateTime Format" -version = "0.6.4" +version = "0.6.5" +categories.workspace = true +keywords = ["iso8601", "date-time"] authors.workspace = true -categories.workspace = true edition.workspace = true homepage.workspace = true include.workspace = true @@ -36,3 +37,6 @@ criterion = { workspace = true } [package.metadata.cargo-semver-checks.lints] workspace = true + +[lints] +workspace = true diff --git a/deps/crates/vendor/ixdtf-v0_6/src/core.rs b/deps/crates/vendor/ixdtf-v0_6/src/core.rs index b60d09650276..a24a04cb347b 100644 --- a/deps/crates/vendor/ixdtf-v0_6/src/core.rs +++ b/deps/crates/vendor/ixdtf-v0_6/src/core.rs @@ -4,82 +4,9 @@ //! Core functionality for `ixdtf`'s parsers +use crate::encoding::EncodingType; use crate::{ParseError, ParserResult}; -mod private { - pub trait Sealed {} -} - -/// A trait for defining various supported encodings -/// and implementing functionality that is encoding -/// sensitive / specific. -pub trait EncodingType: private::Sealed { - type CodeUnit: PartialEq + core::fmt::Debug + Clone; - - /// Get a slice from the underlying source using for start..end - fn slice(source: &[Self::CodeUnit], start: usize, end: usize) -> Option<&[Self::CodeUnit]>; - - /// Retrieve the provided code unit index and returns the value as an ASCII byte - /// or None if the value is not ASCII representable. - fn get_ascii(source: &[Self::CodeUnit], index: usize) -> ParserResult>; - - /// Checks for the known calendar annotation key `u-ca`. - fn check_calendar_key(key: &[Self::CodeUnit]) -> bool; -} - -/// A marker type that signals a parser should parse the source as UTF-16 bytes. -#[derive(Debug, PartialEq, Clone)] -#[allow(clippy::exhaustive_structs)] // ZST Marker trait, no fields should be added -pub struct Utf16; - -impl private::Sealed for Utf16 {} - -impl EncodingType for Utf16 { - type CodeUnit = u16; - fn slice(source: &[Self::CodeUnit], start: usize, end: usize) -> Option<&[Self::CodeUnit]> { - source.get(start..end) - } - - fn get_ascii(source: &[Self::CodeUnit], index: usize) -> ParserResult> { - source.get(index).copied().map(to_ascii_byte).transpose() - } - - fn check_calendar_key(key: &[Self::CodeUnit]) -> bool { - key == [0x75, 0x2d, 0x63, 0x61] - } -} - -#[inline] -fn to_ascii_byte(b: u16) -> ParserResult { - if !(0x01..0x7F).contains(&b) { - return Err(ParseError::NonAsciiCodePoint); - } - Ok(b as u8) -} - -/// A marker type that signals a parser should parse the source as UTF-8 bytes. -#[derive(Debug, PartialEq, Clone)] -#[allow(clippy::exhaustive_structs)] // ZST Marker trait, no fields should be added. -pub struct Utf8; - -impl private::Sealed for Utf8 {} - -impl EncodingType for Utf8 { - type CodeUnit = u8; - - fn slice<'a>(source: &[Self::CodeUnit], start: usize, end: usize) -> Option<&[Self::CodeUnit]> { - source.get(start..end) - } - - fn get_ascii(source: &[Self::CodeUnit], index: usize) -> ParserResult> { - Ok(source.get(index).copied()) - } - - fn check_calendar_key(key: &[Self::CodeUnit]) -> bool { - key == "u-ca".as_bytes() - } -} - // ==== Mini cursor implementation for Iso8601 targets ==== /// `Cursor` is a small cursor implementation for parsing Iso8601 grammar. @@ -152,7 +79,7 @@ impl<'a, T: EncodingType> Cursor<'a, T> { /// Returns the next value as a digit /// /// # Errors - /// - Returns an AbruptEnd error if cursor ends. + /// - Returns an [`ParseError::AbruptEnd`] error if cursor ends. pub(crate) fn next_digit(&mut self) -> ParserResult> { let ascii_char = self.next_or(ParseError::AbruptEnd { location: "digit" })?; if ascii_char.is_ascii_digit() { @@ -162,7 +89,7 @@ impl<'a, T: EncodingType> Cursor<'a, T> { } } - /// A utility next method that returns an `AbruptEnd` error if invalid. + /// A utility next method that returns an [`ParseError::AbruptEnd`] error if invalid. pub(crate) fn next_or(&mut self, err: ParseError) -> ParserResult { self.next()?.ok_or(err) } diff --git a/deps/crates/vendor/ixdtf-v0_6/src/encoding.rs b/deps/crates/vendor/ixdtf-v0_6/src/encoding.rs new file mode 100644 index 000000000000..700b22206567 --- /dev/null +++ b/deps/crates/vendor/ixdtf-v0_6/src/encoding.rs @@ -0,0 +1,85 @@ +// This file is part of ICU4X. For terms of use, please see the file +// called LICENSE at the top level of the ICU4X source tree +// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ). + +//! This module contains the supported encoding for `ixdtf` parsing. + +use crate::{ParseError, ParserResult}; + +mod private { + pub trait Sealed {} +} + +/// A trait for defining various supported encodings +/// and implementing functionality that is encoding +/// sensitive / specific. +pub trait EncodingType: private::Sealed { + /// The code unit for the current encoding. + type CodeUnit: PartialEq + core::fmt::Debug + Clone; + + /// Get a slice from the underlying source using for start..end + #[doc(hidden)] + fn slice(source: &[Self::CodeUnit], start: usize, end: usize) -> Option<&[Self::CodeUnit]>; + + /// Retrieve the provided code unit index and returns the value as an ASCII byte + /// or None if the value is not ASCII representable. + #[doc(hidden)] + fn get_ascii(source: &[Self::CodeUnit], index: usize) -> ParserResult>; + + /// Checks for the known calendar annotation key `u-ca`. + #[doc(hidden)] + fn check_calendar_key(key: &[Self::CodeUnit]) -> bool; +} + +/// A marker type that signals a parser should parse the source as UTF-16 bytes. +#[derive(Debug, PartialEq, Clone)] +#[allow(clippy::exhaustive_structs)] // ZST Marker trait, no fields should be added +pub struct Utf16; + +impl private::Sealed for Utf16 {} + +impl EncodingType for Utf16 { + type CodeUnit = u16; + fn slice(source: &[Self::CodeUnit], start: usize, end: usize) -> Option<&[Self::CodeUnit]> { + source.get(start..end) + } + + fn get_ascii(source: &[Self::CodeUnit], index: usize) -> ParserResult> { + source.get(index).copied().map(to_ascii_byte).transpose() + } + + fn check_calendar_key(key: &[Self::CodeUnit]) -> bool { + key == [0x75, 0x2d, 0x63, 0x61] + } +} + +#[inline] +fn to_ascii_byte(b: u16) -> ParserResult { + if !(0x01..0x7F).contains(&b) { + return Err(ParseError::NonAsciiCodePoint); + } + Ok(b as u8) +} + +/// A marker type that signals a parser should parse the source as UTF-8 bytes. +#[derive(Debug, PartialEq, Clone)] +#[allow(clippy::exhaustive_structs)] // ZST Marker trait, no fields should be added. +pub struct Utf8; + +impl private::Sealed for Utf8 {} + +impl EncodingType for Utf8 { + type CodeUnit = u8; + + fn slice(source: &[Self::CodeUnit], start: usize, end: usize) -> Option<&[Self::CodeUnit]> { + source.get(start..end) + } + + fn get_ascii(source: &[Self::CodeUnit], index: usize) -> ParserResult> { + Ok(source.get(index).copied()) + } + + fn check_calendar_key(key: &[Self::CodeUnit]) -> bool { + key == "u-ca".as_bytes() + } +} diff --git a/deps/crates/vendor/ixdtf-v0_6/src/error.rs b/deps/crates/vendor/ixdtf-v0_6/src/error.rs index 91fb6b91b9fa..417e422ab5a5 100644 --- a/deps/crates/vendor/ixdtf-v0_6/src/error.rs +++ b/deps/crates/vendor/ixdtf-v0_6/src/error.rs @@ -76,10 +76,6 @@ pub enum ParseError { impl core::error::Error for ParseError {} impl ParseError { - pub(crate) fn abrupt_end(location: &'static str) -> Self { - ParseError::AbruptEnd { location } - } - /// Convert this error to a static string representation pub fn to_static_string(&self) -> &'static str { match *self { diff --git a/deps/crates/vendor/ixdtf-v0_6/src/lib.rs b/deps/crates/vendor/ixdtf-v0_6/src/lib.rs index e12df2f35500..ccb0fd235837 100644 --- a/deps/crates/vendor/ixdtf-v0_6/src/lib.rs +++ b/deps/crates/vendor/ixdtf-v0_6/src/lib.rs @@ -2,6 +2,19 @@ // called LICENSE at the top level of the ICU4X source tree // (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ). +// https://github.com/unicode-org/icu4x/blob/main/documents/process/boilerplate.md#library-annotations +#![cfg_attr(not(any(test, doc)), no_std)] +#![cfg_attr( + not(test), + deny( + clippy::indexing_slicing, + clippy::unwrap_used, + clippy::expect_used, + clippy::panic, + ) +)] +// #![warn(missing_docs)] + //! Parsers for extended date time string and Duration parsing. //! //! The [Internet Extended Date/Time Fmt (IXDTF)][rfc9557] is laid out by RFC 9557. RFC 9557 @@ -373,32 +386,15 @@ //! [rfc3339]: https://datatracker.ietf.org/doc/html/rfc3339 //! [temporal-grammar]: https://tc39.es/proposal-temporal/#sec-temporal-iso8601grammar -#![no_std] -#![cfg_attr( - not(test), - deny( - clippy::indexing_slicing, - clippy::unwrap_used, - clippy::expect_used, - clippy::panic, - clippy::exhaustive_structs, - clippy::exhaustive_enums, - clippy::trivially_copy_pass_by_ref, - missing_debug_implementations, - ) -)] +mod error; pub(crate) mod core; -mod error; + +pub mod encoding; pub mod parsers; pub mod records; pub use error::ParseError; -/// This module contains the supported encoding for `ixdtf` parsing. -pub mod encoding { - pub use crate::core::{Utf16, Utf8}; -} - /// The `ixdtf` crate's Result type. pub type ParserResult = Result; diff --git a/deps/crates/vendor/ixdtf-v0_6/src/parsers/annotations.rs b/deps/crates/vendor/ixdtf-v0_6/src/parsers/annotations.rs index dc4610e18a83..054d2db0c3e0 100644 --- a/deps/crates/vendor/ixdtf-v0_6/src/parsers/annotations.rs +++ b/deps/crates/vendor/ixdtf-v0_6/src/parsers/annotations.rs @@ -6,7 +6,7 @@ use crate::{ assert_syntax, - core::EncodingType, + encoding::EncodingType, parsers::{ grammar::{ is_a_key_char, is_a_key_leading_char, is_annotation_close, diff --git a/deps/crates/vendor/ixdtf-v0_6/src/parsers/datetime.rs b/deps/crates/vendor/ixdtf-v0_6/src/parsers/datetime.rs index 420044f261e5..b61ee30b2fa3 100644 --- a/deps/crates/vendor/ixdtf-v0_6/src/parsers/datetime.rs +++ b/deps/crates/vendor/ixdtf-v0_6/src/parsers/datetime.rs @@ -6,7 +6,7 @@ use crate::{ assert_syntax, - core::EncodingType, + encoding::EncodingType, parsers::{ annotations, grammar::{is_annotation_open, is_date_time_separator, is_hyphen, is_utc_designator}, @@ -106,7 +106,7 @@ fn parse_date(cursor: &mut Cursor) -> ParserResult(cursor: &mut Cursor) -> ParserResult( cursor: &mut Cursor<'a, T>, handler: impl FnMut(Annotation<'a, T>) -> Option>, @@ -170,7 +170,7 @@ pub(crate) fn parse_year_month( // ==== `MonthDay` parsing functions ==== -/// Parses an AnnotatedMonthDay. +/// Parses an `AnnotatedMonthDay`. pub(crate) fn parse_annotated_month_day<'a, T: EncodingType>( cursor: &mut Cursor<'a, T>, handler: impl FnMut(Annotation<'a, T>) -> Option>, @@ -202,14 +202,14 @@ pub(crate) fn parse_annotated_month_day<'a, T: EncodingType>( /// Parses a `DateSpecMonthDay` pub(crate) fn parse_month_day(cursor: &mut Cursor) -> ParserResult { - let hyphenated = cursor - .check(is_hyphen)? - .ok_or(ParseError::abrupt_end("MonthDay"))?; + let hyphenated = cursor.check(is_hyphen)?.ok_or(ParseError::AbruptEnd { + location: "MonthDay", + })?; cursor.advance_if(hyphenated); let balanced_hyphens = hyphenated - && cursor - .check(is_hyphen)? - .ok_or(ParseError::abrupt_end("MonthDay"))?; + && cursor.check(is_hyphen)?.ok_or(ParseError::AbruptEnd { + location: "MonthDay", + })?; cursor.advance_if(balanced_hyphens); if hyphenated && !balanced_hyphens { diff --git a/deps/crates/vendor/ixdtf-v0_6/src/parsers/duration.rs b/deps/crates/vendor/ixdtf-v0_6/src/parsers/duration.rs index c3d5e845f066..3f9dac9cbd9b 100644 --- a/deps/crates/vendor/ixdtf-v0_6/src/parsers/duration.rs +++ b/deps/crates/vendor/ixdtf-v0_6/src/parsers/duration.rs @@ -6,7 +6,7 @@ use crate::{ assert_syntax, - core::EncodingType, + encoding::EncodingType, parsers::{ grammar::{ is_ascii_sign, is_day_designator, is_duration_designator, is_hour_designator, @@ -23,24 +23,26 @@ use crate::{ pub(crate) fn parse_duration( cursor: &mut Cursor, ) -> ParserResult { - let sign = if cursor - .check(is_ascii_sign)? - .ok_or_else(|| ParseError::abrupt_end("DurationStart"))? - { + let sign = if cursor.check(is_ascii_sign)?.ok_or(ParseError::AbruptEnd { + location: "DurationStart", + })? { cursor.next_or(ParseError::ImplAssert)? == b'+' } else { true }; assert_syntax!( - is_duration_designator(cursor.next_or(ParseError::abrupt_end("DurationDesignator"))?), + is_duration_designator(cursor.next_or(ParseError::AbruptEnd { + location: "DurationDesignator" + })?), DurationDisgnator, ); let date = if cursor .check(is_time_designator)? - .ok_or(ParseError::abrupt_end("Duration"))? - { + .ok_or(ParseError::AbruptEnd { + location: "Duration", + })? { None } else { Some(parse_date_duration(cursor)?) @@ -75,9 +77,9 @@ pub(crate) fn parse_date_duration( while cursor.check_or(false, |ch| ch.is_ascii_digit())? { let mut value: u64 = 0; while cursor.check_or(false, |ch| ch.is_ascii_digit())? { - let digit = cursor - .next_digit()? - .ok_or_else(|| ParseError::abrupt_end("DateDuration"))?; + let digit = cursor.next_digit()?.ok_or(ParseError::AbruptEnd { + location: "DateDuration", + })?; value = value .checked_mul(10) .and_then(|v| v.checked_add(u64::from(digit))) @@ -116,7 +118,11 @@ pub(crate) fn parse_date_duration( date.days = value; previous_unit = DateUnit::Day; } - Some(_) | None => return Err(ParseError::abrupt_end("DateDurationDesignator")), + Some(_) | None => { + return Err(ParseError::AbruptEnd { + location: "DateDurationDesignator", + }) + } } } @@ -149,9 +155,9 @@ pub(crate) fn parse_time_duration( while cursor.check_or(false, |c| c.is_ascii_digit())? { let mut value: u64 = 0; while cursor.check_or(false, |c| c.is_ascii_digit())? { - let digit = cursor - .next_digit()? - .ok_or_else(|| ParseError::abrupt_end("TimeDurationDigit"))?; + let digit = cursor.next_digit()?.ok_or(ParseError::AbruptEnd { + location: "TimeDurationDigit", + })?; value = value .checked_mul(10) .and_then(|v| v.checked_add(u64::from(digit))) @@ -191,7 +197,11 @@ pub(crate) fn parse_time_duration( } previous_unit = TimeUnit::Second; } - Some(_) | None => return Err(ParseError::abrupt_end("TimeDurationDesignator")), + Some(_) | None => { + return Err(ParseError::AbruptEnd { + location: "TimeDurationDesignator", + }) + } } if fraction.is_some() { @@ -221,6 +231,8 @@ pub(crate) fn parse_time_duration( seconds: time.2, fraction: time.3, })), - TimeUnit::None => Err(ParseError::abrupt_end("TimeDurationDesignator")), + TimeUnit::None => Err(ParseError::AbruptEnd { + location: "TimeDurationDesignator", + }), } } diff --git a/deps/crates/vendor/ixdtf-v0_6/src/parsers/mod.rs b/deps/crates/vendor/ixdtf-v0_6/src/parsers/mod.rs index 662d4940566a..76673dc6794a 100644 --- a/deps/crates/vendor/ixdtf-v0_6/src/parsers/mod.rs +++ b/deps/crates/vendor/ixdtf-v0_6/src/parsers/mod.rs @@ -4,8 +4,9 @@ //! The parser module contains the implementation details for `IxdtfParser` and `IsoDurationParser` -use crate::core::{EncodingType, Utf16, Utf8}; -use crate::{core::Cursor, ParserResult}; +use crate::core::Cursor; +use crate::encoding::{EncodingType, Utf16, Utf8}; +use crate::ParserResult; #[cfg(feature = "duration")] use crate::records::DurationParseRecord; @@ -116,7 +117,8 @@ impl<'a, T: EncodingType> IxdtfParser<'a, T> { /// Parses the source as an [extended Date/Time string][rfc9557]. /// /// This is the baseline parse method for `ixdtf`. For this method, the - /// TimeRecord, UTCOffsetRecord, and all annotations are optional. + /// [`TimeRecord`](crate::records::TimeRecord), [`UtcOffsetRecord`], + /// and all annotations are optional. /// /// # Example /// @@ -159,7 +161,7 @@ impl<'a, T: EncodingType> IxdtfParser<'a, T> { self.parse_year_month_with_annotation_handler(Some) } - /// Parses the source as an extended YearMonth string with an Annotation handler. + /// Parses the source as an extended `YearMonth` string with an Annotation handler. /// /// For more, see [Implementing Annotation Handlers](crate#implementing-annotation-handlers) pub fn parse_year_month_with_annotation_handler( @@ -192,7 +194,7 @@ impl<'a, T: EncodingType> IxdtfParser<'a, T> { self.parse_month_day_with_annotation_handler(Some) } - /// Parses the source as an extended MonthDay string with an Annotation handler. + /// Parses the source as an extended `MonthDay` string with an Annotation handler. /// /// For more, see [Implementing Annotation Handlers](crate#implementing-annotation-handlers) pub fn parse_month_day_with_annotation_handler( diff --git a/deps/crates/vendor/ixdtf-v0_6/src/parsers/tests.rs b/deps/crates/vendor/ixdtf-v0_6/src/parsers/tests.rs index a4edc6e583bf..45d505551b37 100644 --- a/deps/crates/vendor/ixdtf-v0_6/src/parsers/tests.rs +++ b/deps/crates/vendor/ixdtf-v0_6/src/parsers/tests.rs @@ -9,7 +9,7 @@ use alloc::string::String; use alloc::vec::Vec; use crate::{ - core::Utf16, + encoding::Utf16, parsers::IxdtfParser, records::{ Annotation, DateRecord, Fraction, IxdtfParseRecord, TimeRecord, TimeZoneAnnotation, @@ -1103,7 +1103,7 @@ fn test_zulu_offset() { second: 0, fraction: None, }), - offset: Some(crate::records::UtcOffsetRecordOrZ::Z), + offset: Some(UtcOffsetRecordOrZ::Z), tz: Some(TimeZoneAnnotation { critical: false, tz: TimeZoneRecord::Name("America/Chicago".as_bytes()) diff --git a/deps/crates/vendor/ixdtf-v0_6/src/parsers/time.rs b/deps/crates/vendor/ixdtf-v0_6/src/parsers/time.rs index f67ecd5ae88c..5ef65d6bb8be 100644 --- a/deps/crates/vendor/ixdtf-v0_6/src/parsers/time.rs +++ b/deps/crates/vendor/ixdtf-v0_6/src/parsers/time.rs @@ -8,7 +8,7 @@ use core::num::NonZeroU8; use crate::{ assert_syntax, - core::EncodingType, + encoding::EncodingType, parsers::{ datetime::{parse_month_day, parse_year_month}, grammar::{ diff --git a/deps/crates/vendor/ixdtf-v0_6/src/parsers/timezone.rs b/deps/crates/vendor/ixdtf-v0_6/src/parsers/timezone.rs index 9c4741f14043..9b51cbc7338c 100644 --- a/deps/crates/vendor/ixdtf-v0_6/src/parsers/timezone.rs +++ b/deps/crates/vendor/ixdtf-v0_6/src/parsers/timezone.rs @@ -15,7 +15,7 @@ use super::{ }; use crate::{ assert_syntax, - core::EncodingType, + encoding::EncodingType, records::{ FullPrecisionOffset, MinutePrecisionOffset, Sign, TimeZoneAnnotation, TimeZoneRecord, UtcOffsetRecord, UtcOffsetRecordOrZ, @@ -39,19 +39,22 @@ pub(crate) fn parse_ambiguous_tz_annotation<'a, T: EncodingType>( ) -> ParserResult>> { // Peek position + 1 to check for critical flag. let mut current_peek = 1; - let critical = cursor - .peek_n(current_peek)? - .map(is_critical_flag) - .ok_or(ParseError::abrupt_end("AmbiguousAnnotation"))?; + let critical = + cursor + .peek_n(current_peek)? + .map(is_critical_flag) + .ok_or(ParseError::AbruptEnd { + location: "AmbiguousAnnotation", + })?; // Advance cursor if critical flag present. if critical { current_peek += 1; } - let leading_char = cursor - .peek_n(current_peek)? - .ok_or(ParseError::abrupt_end("AmbiguousAnnotation"))?; + let leading_char = cursor.peek_n(current_peek)?.ok_or(ParseError::AbruptEnd { + location: "AmbiguousAnnotation", + })?; // Ambigious start values when lowercase alpha that is shared between `TzLeadingChar` and `KeyLeadingChar`. if is_a_key_leading_char(leading_char) { @@ -69,7 +72,9 @@ pub(crate) fn parse_ambiguous_tz_annotation<'a, T: EncodingType>( peek_pos += 1; } - Err(ParseError::abrupt_end("AmbiguousAnnotation")) + Err(ParseError::AbruptEnd { + location: "AmbiguousAnnotation", + }) } else { // Unambiguously not a non-tz annotation, try parsing a tz annotation let tz = parse_tz_annotation(cursor)?; @@ -106,7 +111,9 @@ pub(crate) fn parse_time_zone<'a, T: EncodingType>( ) -> ParserResult> { let is_iana = cursor .check(is_tz_leading_char)? - .ok_or(ParseError::abrupt_end("TimeZoneAnnotation"))?; + .ok_or(ParseError::AbruptEnd { + location: "TimeZoneAnnotation", + })?; let is_offset = cursor.check_or(false, is_ascii_sign)?; if is_iana { @@ -203,7 +210,9 @@ pub(crate) fn parse_utc_offset_minute_precision( cursor: &mut Cursor, ) -> ParserResult<(MinutePrecisionOffset, bool)> { // https://www.rfc-editor.org/rfc/rfc3339#section-5.6 - let sign = cursor.next_or(ParseError::abrupt_end("time-numoffset"))?; + let sign = cursor.next_or(ParseError::AbruptEnd { + location: "time-numoffset", + })?; if !is_ascii_sign(sign) { return Err(ParseError::OffsetNeedsSign); } diff --git a/deps/crates/vendor/ixdtf-v0_6/src/records.rs b/deps/crates/vendor/ixdtf-v0_6/src/records.rs index 1ff1e796a118..19c7684aeef7 100644 --- a/deps/crates/vendor/ixdtf-v0_6/src/records.rs +++ b/deps/crates/vendor/ixdtf-v0_6/src/records.rs @@ -6,7 +6,7 @@ use core::num::NonZeroU8; -use crate::core::EncodingType; +use crate::encoding::EncodingType; /// An `IxdtfParseRecord` is an intermediary record returned by `IxdtfParser`. #[non_exhaustive] @@ -16,9 +16,9 @@ pub struct IxdtfParseRecord<'a, T: EncodingType> { pub date: Option, /// Parsed `TimeRecord` pub time: Option, - /// Parsed UtcOffset + /// Parsed `UtcOffset` pub offset: Option, - /// Parsed `TimeZone` annotation with critical flag and data (UTCOffset | IANA name) + /// Parsed `TimeZone` annotation with critical flag and data (`UTCOffset` | IANA name) pub tz: Option>, /// The parsed calendar value. pub calendar: Option<&'a [T::CodeUnit]>, @@ -76,9 +76,9 @@ pub struct TimeZoneAnnotation<'a, T: EncodingType> { #[non_exhaustive] #[derive(Debug, Clone, PartialEq)] pub enum TimeZoneRecord<'a, T: EncodingType> { - /// TimeZoneIANAName + /// `TimeZoneIANAName` Name(&'a [T::CodeUnit]), - /// TimeZoneOffset + /// `TimeZoneOffset` Offset(MinutePrecisionOffset), } @@ -356,6 +356,6 @@ impl Fraction { /// ``` pub fn to_truncated_nanoseconds(&self) -> u32 { self.to_nanoseconds() - .unwrap_or((self.value / 10u64.pow(u32::from(self.digits.get() - 9))) as u32) + .unwrap_or_else(|| (self.value / 10u64.pow(u32::from(self.digits.get() - 9))) as u32) } } diff --git a/deps/crates/vendor/litemap-v0_8/.cargo_vcs_info.json b/deps/crates/vendor/litemap-v0_8/.cargo_vcs_info.json index de7b36925b74..fbadd4056443 100644 --- a/deps/crates/vendor/litemap-v0_8/.cargo_vcs_info.json +++ b/deps/crates/vendor/litemap-v0_8/.cargo_vcs_info.json @@ -1,6 +1,6 @@ { "git": { - "sha1": "29dfe2790b6cfdab94ca6a6b69f58ce54802dbf7" + "sha1": "c9fac4e625ccb2c6a7aa35079fff9709db4385ac" }, "path_in_vcs": "utils/litemap" } \ No newline at end of file diff --git a/deps/crates/vendor/litemap-v0_8/Cargo.lock b/deps/crates/vendor/litemap-v0_8/Cargo.lock index 08116836b6a2..d5fd27c1e088 100644 --- a/deps/crates/vendor/litemap-v0_8/Cargo.lock +++ b/deps/crates/vendor/litemap-v0_8/Cargo.lock @@ -8,16 +8,16 @@ version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9" dependencies = [ - "getrandom 0.2.16", + "getrandom 0.2.17", "once_cell", "version_check", ] [[package]] name = "aho-corasick" -version = "1.1.3" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" +checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301" dependencies = [ "memchr", ] @@ -30,9 +30,9 @@ checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299" [[package]] name = "anstyle" -version = "1.0.13" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5192cca8006f1fd4f7237516f40fa183bb07f8fbdfedaa0036de5ea9b0b45e78" +checksum = "940b3a0ca603d1eade50a4846a2afffd5ef57a9feac2c0e2ec2e14f9ead76000" [[package]] name = "autocfg" @@ -63,9 +63,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.19.0" +version = "3.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43" +checksum = "5d20789868f4b01b2f2caec9f5c4e0213b41e3e5702a50157d699ae31ced2fcb" [[package]] name = "bytecheck" @@ -91,9 +91,9 @@ dependencies = [ [[package]] name = "bytes" -version = "1.10.1" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" +checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33" [[package]] name = "cast" @@ -237,9 +237,9 @@ checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5" [[package]] name = "databake" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff6ee9e2d2afb173bcdeee45934c89ec341ab26f91c9933774fc15c2b58f83ef" +checksum = "74d4b1db5ca40636726f1f73daff0d626accbd49bcd8136fcade87d7cf1e6bbb" dependencies = [ "proc-macro2", "quote", @@ -271,9 +271,9 @@ checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" [[package]] name = "getrandom" -version = "0.2.16" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592" +checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0" dependencies = [ "cfg-if", "libc", @@ -339,15 +339,15 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.15" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" +checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682" [[package]] name = "js-sys" -version = "0.3.81" +version = "0.3.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec48937a97411dcb524a265206ccd4c90bb711fca92b2792c407f268825b9305" +checksum = "b49715b7073f385ba4bc528e5747d02e66cb39c6146efb66b781f131f0fb399c" dependencies = [ "once_cell", "wasm-bindgen", @@ -355,13 +355,13 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.177" +version = "0.2.183" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2874a2af47a2325c2001a6e6fad9b16a53b802102b528163885171cf92b15976" +checksum = "b5b646652bf6661599e1da8901b3b9522896f01e736bad5f723fe7a3a27f899d" [[package]] name = "litemap" -version = "0.8.1" +version = "0.8.2" dependencies = [ "bincode", "criterion", @@ -374,17 +374,11 @@ dependencies = [ "yoke", ] -[[package]] -name = "log" -version = "0.4.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34080505efa8e45a4b816c349525ebe327ceaa8559756f0356cba97ef3bf7432" - [[package]] name = "memchr" -version = "2.7.6" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273" +checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79" [[package]] name = "num-traits" @@ -397,9 +391,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.21.3" +version = "1.21.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" +checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" [[package]] name = "oorandom" @@ -458,9 +452,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.103" +version = "1.0.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ee95bc4ef87b8d5ba32e8b7714ccc834865276eab0aed5c9958d00ec45f49e8" +checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934" dependencies = [ "unicode-ident", ] @@ -487,9 +481,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.41" +version = "1.0.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce25767e7b499d1b604768e7cde645d14cc8584231ea6b295e9c9eb22c02e1d1" +checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924" dependencies = [ "proc-macro2", ] @@ -528,9 +522,9 @@ dependencies = [ [[package]] name = "rand_core" -version = "0.9.3" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38" +checksum = "76afc826de14238e6e8c374ddcc1fa19e374fd8dd986b0d2af0d02377261d83c" dependencies = [ "getrandom 0.3.4", ] @@ -557,9 +551,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.12.2" +version = "1.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "843bc0191f75f3e22651ae5f1e72939ab2f72a4bc30fa80a066bd66edefc24d4" +checksum = "e10754a14b9137dd7b1e3e5b0493cc9171fdd105e0ab477f51b72e7f3ac0e276" dependencies = [ "aho-corasick", "memchr", @@ -569,9 +563,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.13" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5276caf25ac86c8d810222b3dbb938e512c55c6831a10f3e6ed1c93b84041f1c" +checksum = "6e1dd4122fc1595e8162618945476892eefca7b88c52820e74af6262213cae8f" dependencies = [ "aho-corasick", "memchr", @@ -580,9 +574,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.8.8" +version = "0.8.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a2d987857b319362043e95f5353c0535c1f58eec5336fdfcf626430af7def58" +checksum = "dc897dd8d9e8bd1ed8cdad82b5966c3e0ecae09fb1907d58efaa013543185d0a" [[package]] name = "rend" @@ -595,9 +589,9 @@ dependencies = [ [[package]] name = "rkyv" -version = "0.7.45" +version = "0.7.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9008cd6385b9e161d8229e1f6549dd23c3d022f132a2ea37ac3a10ac4935779b" +checksum = "2297bf9c81a3f0dc96bc9521370b88f054168c29826a75e89c55ff196e7ed6a1" dependencies = [ "bitvec", "bytecheck", @@ -613,9 +607,9 @@ dependencies = [ [[package]] name = "rkyv_derive" -version = "0.7.45" +version = "0.7.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "503d1d27590a2b0a3a4ca4c94755aa2875657196ecbf401a42eff41d7de532c0" +checksum = "84d7b42d4b8d06048d3ac8db0eb31bcb942cbeb709f0b5f2b2ebde398d3038f5" dependencies = [ "proc-macro2", "quote", @@ -628,12 +622,6 @@ version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" -[[package]] -name = "ryu" -version = "1.0.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" - [[package]] name = "same-file" version = "1.0.6" @@ -676,20 +664,20 @@ checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" dependencies = [ "proc-macro2", "quote", - "syn 2.0.108", + "syn 2.0.117", ] [[package]] name = "serde_json" -version = "1.0.145" +version = "1.0.149" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "402a6f66d8c709116cf22f558eab210f5a50187f702eb4d7e5ef38d9a7f1c79c" +checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86" dependencies = [ "itoa", "memchr", - "ryu", "serde", "serde_core", + "zmij", ] [[package]] @@ -717,9 +705,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.108" +version = "2.0.117" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da58917d35242480a05c2897064da0a80589a2a0476c9a3f2fdc83b53502e917" +checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99" dependencies = [ "proc-macro2", "quote", @@ -734,7 +722,7 @@ checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.108", + "syn 2.0.117", ] [[package]] @@ -745,22 +733,22 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "thiserror" -version = "2.0.17" +version = "2.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f63587ca0f12b72a0600bcba1d40081f830876000bb46dd2337a3051618f4fc8" +checksum = "4288b5bcbc7920c07a1149a35cf9590a2aa808e0bc1eafaade0b80947865fbc4" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "2.0.17" +version = "2.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ff15c8ecd7de3849db632e14d18d2571fa09dfc5ed93479bc4485c7a517c913" +checksum = "ebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.108", + "syn 2.0.117", ] [[package]] @@ -775,9 +763,9 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.10.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa5fdc3bce6191a1dbc8c02d5c8bffcf557bafa17c124c5264a458f1b0613fa" +checksum = "3e61e67053d25a4e82c844e8424039d9745781b3fc4f32b8d55ed50f5f667ef3" dependencies = [ "tinyvec_macros", ] @@ -790,15 +778,15 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "unicode-ident" -version = "1.0.20" +version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "462eeb75aeb73aea900253ce739c8e18a67423fadf006037cd3ff27e82748a06" +checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" [[package]] name = "uuid" -version = "1.18.1" +version = "1.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f87b8aa10b915a06587d0dec516c282ff295b475d94abf425d62b57710070a2" +checksum = "ee48d38b119b0cd71fe4141b30f5ba9c7c5d9f4e7a3a8b4a674e4b6ef789976f" dependencies = [ "js-sys", "wasm-bindgen", @@ -837,9 +825,9 @@ dependencies = [ [[package]] name = "wasm-bindgen" -version = "0.2.104" +version = "0.2.114" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1da10c01ae9f1ae40cbfac0bac3b1e724b320abfcf52229f80b547c0d250e2d" +checksum = "6532f9a5c1ece3798cb1c2cfdba640b9b3ba884f5db45973a6f442510a87d38e" dependencies = [ "cfg-if", "once_cell", @@ -848,25 +836,11 @@ dependencies = [ "wasm-bindgen-shared", ] -[[package]] -name = "wasm-bindgen-backend" -version = "0.2.104" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "671c9a5a66f49d8a47345ab942e2cb93c7d1d0339065d4f8139c486121b43b19" -dependencies = [ - "bumpalo", - "log", - "proc-macro2", - "quote", - "syn 2.0.108", - "wasm-bindgen-shared", -] - [[package]] name = "wasm-bindgen-macro" -version = "0.2.104" +version = "0.2.114" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ca60477e4c59f5f2986c50191cd972e3a50d8a95603bc9434501cf156a9a119" +checksum = "18a2d50fcf105fb33bb15f00e7a77b772945a2ee45dcf454961fd843e74c18e6" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -874,31 +848,31 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.104" +version = "0.2.114" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f07d2f20d4da7b26400c9f4a0511e6e0345b040694e8a75bd41d578fa4421d7" +checksum = "03ce4caeaac547cdf713d280eda22a730824dd11e6b8c3ca9e42247b25c631e3" dependencies = [ + "bumpalo", "proc-macro2", "quote", - "syn 2.0.108", - "wasm-bindgen-backend", + "syn 2.0.117", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.104" +version = "0.2.114" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bad67dc8b2a1a6e5448428adec4c3e84c43e561d8c9ee8a9e5aabeb193ec41d1" +checksum = "75a326b8c223ee17883a4251907455a2431acc2791c98c26279376490c378c16" dependencies = [ "unicode-ident", ] [[package]] name = "web-sys" -version = "0.3.81" +version = "0.3.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9367c417a924a74cae129e6a2ae3b47fabb1f8995595ab474029da749a8be120" +checksum = "854ba17bb104abfb26ba36da9729addc7ce7f06f5c0f90f3c391f8461cca21f9" dependencies = [ "js-sys", "wasm-bindgen", @@ -945,9 +919,9 @@ dependencies = [ [[package]] name = "yoke" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72d6e5c6afb84d73944e5cedb052c4680d5657337201555f9f2a16b7406d4954" +checksum = "abe8c5fda708d9ca3df187cae8bfb9ceda00dd96231bed36e445a1a48e66f9ca" dependencies = [ "stable_deref_trait", "yoke-derive", @@ -956,53 +930,59 @@ dependencies = [ [[package]] name = "yoke-derive" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b659052874eb698efe5b9e8cf382204678a0086ebf46982b79d6ca3182927e5d" +checksum = "de844c262c8848816172cef550288e7dc6c7b7814b4ee56b3e1553f275f1858e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.108", + "syn 2.0.117", "synstructure", ] [[package]] name = "zerocopy" -version = "0.8.27" +version = "0.8.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0894878a5fa3edfd6da3f88c4805f4c8558e2b996227a3d864f47fe11e38282c" +checksum = "efbb2a062be311f2ba113ce66f697a4dc589f85e78a4aea276200804cea0ed87" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.8.27" +version = "0.8.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88d2b8d9c68ad2b9e4340d7832716a4d21a22a1154777ad56ea55c51a9cf3831" +checksum = "0e8bc7269b54418e7aeeef514aa68f8690b8c0489a06b0136e5f57c4c5ccab89" dependencies = [ "proc-macro2", "quote", - "syn 2.0.108", + "syn 2.0.117", ] [[package]] name = "zerofrom" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5" +checksum = "69faa1f2a1ea75661980b013019ed6687ed0e83d069bc1114e2cc74c6c04c4df" dependencies = [ "zerofrom-derive", ] [[package]] name = "zerofrom-derive" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" +checksum = "11532158c46691caf0f2593ea8358fed6bbf68a0315e80aae9bd41fbade684a1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.108", + "syn 2.0.117", "synstructure", ] + +[[package]] +name = "zmij" +version = "1.0.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa" diff --git a/deps/crates/vendor/litemap-v0_8/Cargo.toml b/deps/crates/vendor/litemap-v0_8/Cargo.toml index 9280ee63ea9e..a5d635d59522 100644 --- a/deps/crates/vendor/litemap-v0_8/Cargo.toml +++ b/deps/crates/vendor/litemap-v0_8/Cargo.toml @@ -13,7 +13,7 @@ edition = "2021" rust-version = "1.82" name = "litemap" -version = "0.8.1" +version = "0.8.2" authors = ["The ICU4X Project Developers"] build = false include = [ @@ -36,11 +36,11 @@ description = "A key-value Map implementation based on a flat, sorted Vec." documentation = "https://docs.rs/litemap" readme = "README.md" keywords = [ + "data-structures", + "memory-efficiency", "sorted", "vec", "map", - "hashmap", - "btreemap", ] license = "Unicode-3.0" repository = "https://github.com/unicode-org/icu4x" @@ -51,6 +51,9 @@ independent = true [package.metadata.docs.rs] all-features = true +[package.metadata.cargo-all-features] +max_combination_size = 3 + [features] alloc = [] databake = ["dep:databake"] @@ -117,7 +120,7 @@ optional = true default-features = false [dependencies.yoke] -version = "0.8.0" +version = "0.8.2" features = ["derive"] optional = true default-features = false @@ -146,3 +149,52 @@ version = "1.0.45" [target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies.criterion] version = "0.5.0" + +[lints.clippy] +alloc-instead-of-core = "warn" +branches-sharing-code = "warn" +collection_is_never_read = "warn" +crosspointer_transmute = "warn" +dbg_macro = "warn" +debug_assert_with_mut_call = "warn" +doc_markdown = "warn" +exhaustive_enums = "deny" +exhaustive_structs = "deny" +fn_to_numeric_cast_any = "warn" +infinite_loop = "warn" +large_stack_arrays = "warn" +mismatching_type_param_order = "warn" +missing_fields_in_debug = "warn" +missing_transmute_annotations = "warn" +negative_feature_names = "warn" +or-fun-call = "warn" +same_functions_in_if_condition = "warn" +todo = "warn" +transmute_bytes_to_str = "warn" +transmute_int_to_bool = "warn" +transmute_int_to_non_zero = "warn" +transmute_ptr_to_ptr = "warn" +transmute_ptr_to_ref = "warn" +transmute_undefined_repr = "warn" +transmutes_expressible_as_ptr_casts = "warn" +trivially_copy_pass_by_ref = "deny" +unnecessary-wraps = "warn" +useless_transmute = "warn" +wildcard_dependencies = "warn" + +[lints.rust] +missing_debug_implementations = "deny" +trivial_numeric_casts = "deny" +unused_lifetimes = "warn" +unused_macro_rules = "warn" +unused_qualifications = "warn" + +[lints.rust.unexpected_cfgs] +level = "warn" +priority = 0 +check-cfg = [ + "cfg(icu4c_enable_renaming)", + "cfg(needs_alloc_error_handler)", + "cfg(icu4x_run_size_tests)", + "cfg(icu4x_unstable_fast_trie_only)", +] diff --git a/deps/crates/vendor/litemap-v0_8/Cargo.toml.orig b/deps/crates/vendor/litemap-v0_8/Cargo.toml.orig index 44a131875738..79c2ed61e52a 100644 --- a/deps/crates/vendor/litemap-v0_8/Cargo.toml.orig +++ b/deps/crates/vendor/litemap-v0_8/Cargo.toml.orig @@ -4,8 +4,8 @@ [package] name = "litemap" -version = "0.8.1" -keywords = ["sorted", "vec", "map", "hashmap", "btreemap"] +version = "0.8.2" +keywords = ["data-structures", "memory-efficiency", "sorted", "vec", "map"] description = "A key-value Map implementation based on a flat, sorted Vec." documentation = "https://docs.rs/litemap" @@ -75,3 +75,9 @@ required-features = ["serde"] name = "litemap" harness = false required-features = ["serde"] + +[lints] +workspace = true + +[package.metadata.cargo-all-features] +max_combination_size = 3 diff --git a/deps/crates/vendor/litemap-v0_8/src/databake.rs b/deps/crates/vendor/litemap-v0_8/src/databake.rs index 018961a4c01c..a3f54df89250 100644 --- a/deps/crates/vendor/litemap-v0_8/src/databake.rs +++ b/deps/crates/vendor/litemap-v0_8/src/databake.rs @@ -5,7 +5,7 @@ use crate::LiteMap; use databake::*; -/// Bakes a LiteMap into Rust code for fast runtime construction from data. Use this impl during +/// Bakes a [`LiteMap`] into Rust code for fast runtime construction from data. Use this impl during /// code generation, such as in a `build.rs` script. /// /// For the most efficient bake, bake the [`LiteMap`] with a slice store. Use functions such as diff --git a/deps/crates/vendor/litemap-v0_8/src/lib.rs b/deps/crates/vendor/litemap-v0_8/src/lib.rs index cd2763115666..2477e3bee344 100644 --- a/deps/crates/vendor/litemap-v0_8/src/lib.rs +++ b/deps/crates/vendor/litemap-v0_8/src/lib.rs @@ -2,6 +2,19 @@ // called LICENSE at the top level of the ICU4X source tree // (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ). +// https://github.com/unicode-org/icu4x/blob/main/documents/process/boilerplate.md#library-annotations +#![cfg_attr(not(any(test, doc)), no_std)] +#![cfg_attr( + not(test), + deny( + clippy::indexing_slicing, + clippy::unwrap_used, + clippy::expect_used, + clippy::panic, + ) +)] +// #![warn(missing_docs)] + //! # `litemap` //! //! `litemap` is a crate providing [`LiteMap`], a highly simplistic "flat" key-value map @@ -44,22 +57,6 @@ //! [`impl Bake for LiteMap`]: ./struct.LiteMap.html#impl-Bake-for-LiteMap //! [`Vec`]: alloc::vec::Vec -// https://github.com/unicode-org/icu4x/blob/main/documents/process/boilerplate.md#library-annotations -#![cfg_attr(not(any(test, doc)), no_std)] -#![cfg_attr( - not(test), - deny( - clippy::indexing_slicing, - clippy::unwrap_used, - clippy::expect_used, - clippy::panic, - clippy::exhaustive_structs, - clippy::exhaustive_enums, - clippy::trivially_copy_pass_by_ref, - missing_debug_implementations, - ) -)] - // for intra doc links #[cfg(doc)] extern crate std; diff --git a/deps/crates/vendor/litemap-v0_8/src/map.rs b/deps/crates/vendor/litemap-v0_8/src/map.rs index 266e11ba94fa..52eec3757217 100644 --- a/deps/crates/vendor/litemap-v0_8/src/map.rs +++ b/deps/crates/vendor/litemap-v0_8/src/map.rs @@ -35,7 +35,7 @@ macro_rules! litemap_impl( ); // You can't `cfg()` a default generic parameter, and we don't want to write this type twice // and keep them in sync so we use a small macro -litemap_impl!(feature = "alloc", S = alloc::vec::Vec<(K, V)>); +litemap_impl!(feature = "alloc", S = Vec<(K, V)>); litemap_impl!(not(feature = "alloc"), S); #[cfg(feature = "alloc")] @@ -45,7 +45,7 @@ impl LiteMap { /// ✨ *Enabled with the `alloc` Cargo feature.* pub const fn new_vec() -> Self { Self { - values: alloc::vec::Vec::new(), + values: Vec::new(), _key_type: PhantomData, _value_type: PhantomData, } diff --git a/deps/crates/vendor/litemap-v0_8/src/serde.rs b/deps/crates/vendor/litemap-v0_8/src/serde.rs index d885b4d7a5e7..f090b62134e1 100644 --- a/deps/crates/vendor/litemap-v0_8/src/serde.rs +++ b/deps/crates/vendor/litemap-v0_8/src/serde.rs @@ -59,7 +59,7 @@ where } } -/// Modified example from https://serde.rs/deserialize-map.html +/// Modified example from #[expect(clippy::type_complexity)] struct LiteMapVisitor { marker: PhantomData LiteMap>, @@ -224,7 +224,7 @@ mod test { assert_eq!(map, deserialized); } - /// Test that a LiteMap<_, _, Vec> is deserialized with an exact capacity + /// Test that a [`LiteMap<_, _, Vec>`] is deserialized with an exact capacity /// if the deserializer provides a size hint information, like postcard here. #[test] fn test_deserialize_capacity() { diff --git a/deps/crates/vendor/litemap-v0_8/src/store/mod.rs b/deps/crates/vendor/litemap-v0_8/src/store/mod.rs index 85cf8de2d440..e6c457143689 100644 --- a/deps/crates/vendor/litemap-v0_8/src/store/mod.rs +++ b/deps/crates/vendor/litemap-v0_8/src/store/mod.rs @@ -2,21 +2,21 @@ // called LICENSE at the top level of the ICU4X source tree // (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ). -//! Traits for pluggable LiteMap backends. +//! Traits for pluggable [`LiteMap`] backends. //! -//! By default, LiteMap is backed by a `Vec`. However, in some environments, it may be desirable -//! to use a different data store while still using LiteMap to manage proper ordering of items. +//! By default, [`LiteMap`] is backed by a `Vec`. However, in some environments, it may be desirable +//! to use a different data store while still using [`LiteMap`] to manage proper ordering of items. //! //! The general guidelines for a performant data store are: //! //! 1. Must support efficient random access for binary search //! 2. Should support efficient append operations for deserialization //! -//! To plug a custom data store into LiteMap, implement: +//! To plug a custom data store into [`LiteMap`], implement: //! //! - [`Store`] for most of the methods //! - [`StoreIterable`] for methods that return iterators -//! - [`StoreFromIterator`] to enable `FromIterator` for LiteMap +//! - [`StoreFromIterator`] to enable `FromIterator` for [`LiteMap`] //! //! To test your implementation, enable the `"testing"` Cargo feature and use [`check_store()`]. //! @@ -26,6 +26,8 @@ mod slice_impl; #[cfg(feature = "alloc")] mod vec_impl; +#[cfg(doc)] +use crate::LiteMap; use core::cmp::Ordering; use core::iter::DoubleEndedIterator; use core::iter::FromIterator; @@ -38,7 +40,7 @@ pub trait StoreConstEmpty { const EMPTY: Self; } -/// Trait to enable pluggable backends for LiteMap. +/// Trait to enable pluggable backends for [`LiteMap`]. /// /// Some methods have default implementations provided for convenience; however, it is generally /// better to implement all methods that your data store supports. @@ -130,7 +132,7 @@ pub trait StoreBulkMut: StoreMut { I: IntoIterator; } -/// Iterator methods for the LiteMap store. +/// Iterator methods for the [`LiteMap`] store. pub trait StoreIterable<'a, K: 'a + ?Sized, V: 'a + ?Sized>: Store { type KeyValueIter: Iterator + DoubleEndedIterator + 'a; diff --git a/deps/crates/vendor/litemap-v0_8/src/store/vec_impl.rs b/deps/crates/vendor/litemap-v0_8/src/store/vec_impl.rs index d6c6b5f7dbf7..d838a3e1a3c4 100644 --- a/deps/crates/vendor/litemap-v0_8/src/store/vec_impl.rs +++ b/deps/crates/vendor/litemap-v0_8/src/store/vec_impl.rs @@ -163,7 +163,7 @@ impl StoreBulkMut for Vec<(K, V)> { /// Returns two slices. The first contains no consecutive repeated elements. /// The second contains all the duplicates in no specified order. /// -/// This is based on std::slice::partition_dedup_by (currently unstable) but retains the +/// This is based on `std::slice::partition_dedup_by` (currently unstable) but retains the /// _last_ element of the duplicate run in the first slice (instead of first). #[inline] #[expect(clippy::type_complexity)] diff --git a/deps/crates/vendor/litemap-v0_8/src/testing.rs b/deps/crates/vendor/litemap-v0_8/src/testing.rs index 08ad15c63e8d..d8df6e245dc6 100644 --- a/deps/crates/vendor/litemap-v0_8/src/testing.rs +++ b/deps/crates/vendor/litemap-v0_8/src/testing.rs @@ -2,7 +2,7 @@ // called LICENSE at the top level of the ICU4X source tree // (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ). -//! Test utilities, primarily targeted to custom LiteMap stores. +//! Test utilities, primarily targeted to custom [`LiteMap`] stores. use crate::store::*; use crate::LiteMap; @@ -115,7 +115,7 @@ where /// Tests that a litemap that uses the given store as backend has behavior consistent with the /// reference impl. /// -/// Call this function in a test with the store impl to test as a valid backend for LiteMap. +/// Call this function in a test with the store impl to test as a valid backend for [`LiteMap`]. // Test code #[expect(clippy::expect_used)] pub fn check_store<'a, S>() diff --git a/deps/crates/vendor/litemap-v0_8/tests/store.rs b/deps/crates/vendor/litemap-v0_8/tests/store.rs index 212e31b67a1d..2b5449761502 100644 --- a/deps/crates/vendor/litemap-v0_8/tests/store.rs +++ b/deps/crates/vendor/litemap-v0_8/tests/store.rs @@ -128,7 +128,7 @@ impl StoreIntoIterator for VecWithDefaults<(K, V)> { // leave lm_extend_start as default } -impl std::iter::FromIterator for VecWithDefaults { +impl FromIterator for VecWithDefaults { fn from_iter>(iter: I) -> Self { Self(Vec::from_iter(iter)) } diff --git a/deps/crates/vendor/potential_utf-v0_1/.cargo_vcs_info.json b/deps/crates/vendor/potential_utf-v0_1/.cargo_vcs_info.json index 8b13bc0e8525..1a55c82d6463 100644 --- a/deps/crates/vendor/potential_utf-v0_1/.cargo_vcs_info.json +++ b/deps/crates/vendor/potential_utf-v0_1/.cargo_vcs_info.json @@ -1,6 +1,6 @@ { "git": { - "sha1": "29dfe2790b6cfdab94ca6a6b69f58ce54802dbf7" + "sha1": "c9fac4e625ccb2c6a7aa35079fff9709db4385ac" }, "path_in_vcs": "utils/potential_utf" } \ No newline at end of file diff --git a/deps/crates/vendor/potential_utf-v0_1/Cargo.lock b/deps/crates/vendor/potential_utf-v0_1/Cargo.lock index dac33641d252..5677c16ec4aa 100644 --- a/deps/crates/vendor/potential_utf-v0_1/Cargo.lock +++ b/deps/crates/vendor/potential_utf-v0_1/Cargo.lock @@ -13,9 +13,9 @@ dependencies = [ [[package]] name = "databake" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff6ee9e2d2afb173bcdeee45934c89ec341ab26f91c9933774fc15c2b58f83ef" +checksum = "74d4b1db5ca40636726f1f73daff0d626accbd49bcd8136fcade87d7cf1e6bbb" dependencies = [ "proc-macro2", "quote", @@ -23,19 +23,19 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.15" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" +checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682" [[package]] name = "memchr" -version = "2.7.6" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273" +checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79" [[package]] name = "potential_utf" -version = "0.1.4" +version = "0.1.5" dependencies = [ "bincode", "databake", @@ -47,28 +47,22 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.103" +version = "1.0.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ee95bc4ef87b8d5ba32e8b7714ccc834865276eab0aed5c9958d00ec45f49e8" +checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.41" +version = "1.0.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce25767e7b499d1b604768e7cde645d14cc8584231ea6b295e9c9eb22c02e1d1" +checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924" dependencies = [ "proc-macro2", ] -[[package]] -name = "ryu" -version = "1.0.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" - [[package]] name = "serde" version = "1.0.228" @@ -101,22 +95,22 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.145" +version = "1.0.149" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "402a6f66d8c709116cf22f558eab210f5a50187f702eb4d7e5ef38d9a7f1c79c" +checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86" dependencies = [ "itoa", "memchr", - "ryu", "serde", "serde_core", + "zmij", ] [[package]] name = "syn" -version = "2.0.108" +version = "2.0.117" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da58917d35242480a05c2897064da0a80589a2a0476c9a3f2fdc83b53502e917" +checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99" dependencies = [ "proc-macro2", "quote", @@ -125,9 +119,9 @@ dependencies = [ [[package]] name = "unicode-ident" -version = "1.0.20" +version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "462eeb75aeb73aea900253ce739c8e18a67423fadf006037cd3ff27e82748a06" +checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" [[package]] name = "writeable" @@ -137,16 +131,22 @@ checksum = "9edde0db4769d2dc68579893f2306b26c6ecfbe0ef499b013d731b7b9247e0b9" [[package]] name = "zerofrom" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5" +checksum = "69faa1f2a1ea75661980b013019ed6687ed0e83d069bc1114e2cc74c6c04c4df" [[package]] name = "zerovec" -version = "0.11.5" +version = "0.11.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c28719294829477f525be0186d13efa9a3c602f7ec202ca9e353d310fb9a002" +checksum = "90f911cbc359ab6af17377d242225f4d75119aec87ea711a880987b18cd7b239" dependencies = [ "serde", "zerofrom", ] + +[[package]] +name = "zmij" +version = "1.0.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa" diff --git a/deps/crates/vendor/potential_utf-v0_1/Cargo.toml b/deps/crates/vendor/potential_utf-v0_1/Cargo.toml index 66c21c85bb58..99aa52f11845 100644 --- a/deps/crates/vendor/potential_utf-v0_1/Cargo.toml +++ b/deps/crates/vendor/potential_utf-v0_1/Cargo.toml @@ -13,7 +13,7 @@ edition = "2021" rust-version = "1.82" name = "potential_utf" -version = "0.1.4" +version = "0.1.5" authors = ["The ICU4X Project Developers"] build = false include = [ @@ -35,7 +35,16 @@ autobenches = false description = "Unvalidated string and character types" homepage = "https://icu4x.unicode.org" readme = "README.md" -categories = ["internationalization"] +keywords = [ + "text-processing", + "encoding", +] +categories = [ + "internationalization", + "localization", + "no-std", + "embedded", +] license = "Unicode-3.0" repository = "https://github.com/unicode-org/icu4x" @@ -66,12 +75,12 @@ optional = true default-features = false [dependencies.writeable] -version = "0.6.0" +version = "0.6.1" optional = true default-features = false [dependencies.zerovec] -version = "0.11.3" +version = "0.11.6" optional = true default-features = false @@ -80,3 +89,52 @@ version = "1.3.1" [dev-dependencies.serde_json] version = "1.0.45" + +[lints.clippy] +alloc-instead-of-core = "warn" +branches-sharing-code = "warn" +collection_is_never_read = "warn" +crosspointer_transmute = "warn" +dbg_macro = "warn" +debug_assert_with_mut_call = "warn" +doc_markdown = "warn" +exhaustive_enums = "deny" +exhaustive_structs = "deny" +fn_to_numeric_cast_any = "warn" +infinite_loop = "warn" +large_stack_arrays = "warn" +mismatching_type_param_order = "warn" +missing_fields_in_debug = "warn" +missing_transmute_annotations = "warn" +negative_feature_names = "warn" +or-fun-call = "warn" +same_functions_in_if_condition = "warn" +todo = "warn" +transmute_bytes_to_str = "warn" +transmute_int_to_bool = "warn" +transmute_int_to_non_zero = "warn" +transmute_ptr_to_ptr = "warn" +transmute_ptr_to_ref = "warn" +transmute_undefined_repr = "warn" +transmutes_expressible_as_ptr_casts = "warn" +trivially_copy_pass_by_ref = "deny" +unnecessary-wraps = "warn" +useless_transmute = "warn" +wildcard_dependencies = "warn" + +[lints.rust] +missing_debug_implementations = "deny" +trivial_numeric_casts = "deny" +unused_lifetimes = "warn" +unused_macro_rules = "warn" +unused_qualifications = "warn" + +[lints.rust.unexpected_cfgs] +level = "warn" +priority = 0 +check-cfg = [ + "cfg(icu4c_enable_renaming)", + "cfg(needs_alloc_error_handler)", + "cfg(icu4x_run_size_tests)", + "cfg(icu4x_unstable_fast_trie_only)", +] diff --git a/deps/crates/vendor/potential_utf-v0_1/Cargo.toml.orig b/deps/crates/vendor/potential_utf-v0_1/Cargo.toml.orig index bf7f825b0291..578ecad0c675 100644 --- a/deps/crates/vendor/potential_utf-v0_1/Cargo.toml.orig +++ b/deps/crates/vendor/potential_utf-v0_1/Cargo.toml.orig @@ -5,7 +5,7 @@ [package] name = "potential_utf" description = "Unvalidated string and character types" -version = "0.1.4" +version = "0.1.5" rust-version = "1.82" authors.workspace = true edition.workspace = true @@ -13,6 +13,7 @@ repository.workspace = true homepage.workspace = true license.workspace = true categories.workspace = true +keywords = ["text-processing", "encoding"] include.workspace = true [dependencies] @@ -32,3 +33,6 @@ databake = ["dep:databake"] serde = ["dep:serde_core"] writeable = ["dep:writeable"] zerovec = ["dep:zerovec"] + +[lints] +workspace = true diff --git a/deps/crates/vendor/potential_utf-v0_1/src/lib.rs b/deps/crates/vendor/potential_utf-v0_1/src/lib.rs index 2b343c9cbce7..6c3e230faab5 100644 --- a/deps/crates/vendor/potential_utf-v0_1/src/lib.rs +++ b/deps/crates/vendor/potential_utf-v0_1/src/lib.rs @@ -2,6 +2,7 @@ // called LICENSE at the top level of the ICU4X source tree // (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ). +// https://github.com/unicode-org/icu4x/blob/main/documents/process/boilerplate.md#library-annotations #![cfg_attr(not(any(test, doc)), no_std)] #![cfg_attr( not(test), @@ -10,12 +11,9 @@ clippy::unwrap_used, clippy::expect_used, clippy::panic, - clippy::exhaustive_structs, - clippy::exhaustive_enums, - clippy::trivially_copy_pass_by_ref, - missing_debug_implementations, ) )] +#![warn(missing_docs)] //! A crate providing unvalidated string and character types. diff --git a/deps/crates/vendor/potential_utf-v0_1/src/uchar.rs b/deps/crates/vendor/potential_utf-v0_1/src/uchar.rs index 0157aae69ebe..fc607319dede 100644 --- a/deps/crates/vendor/potential_utf-v0_1/src/uchar.rs +++ b/deps/crates/vendor/potential_utf-v0_1/src/uchar.rs @@ -77,7 +77,7 @@ impl PotentialCodePoint { char::try_from(u32::from(self)) } - /// Convert a [`PotentialCodePoint`] to a `char', returning [`char::REPLACEMENT_CHARACTER`] + /// Convert a [`PotentialCodePoint`] to a [`char`], returning [`char::REPLACEMENT_CHARACTER`] /// if the `PotentialCodePoint` does not represent a valid Unicode scalar value. /// /// # Examples diff --git a/deps/crates/vendor/potential_utf-v0_1/src/ustr.rs b/deps/crates/vendor/potential_utf-v0_1/src/ustr.rs index 7e299c1b798d..04afc812e519 100644 --- a/deps/crates/vendor/potential_utf-v0_1/src/ustr.rs +++ b/deps/crates/vendor/potential_utf-v0_1/src/ustr.rs @@ -61,7 +61,7 @@ impl PotentialUtf8 { #[inline] pub const fn from_bytes(other: &[u8]) -> &Self { // Safety: PotentialUtf8 is transparent over [u8] - unsafe { core::mem::transmute(other) } + unsafe { &*(other as *const [u8] as *const Self) } } /// Create a [`PotentialUtf8`] from a string slice. @@ -77,7 +77,7 @@ impl PotentialUtf8 { #[cfg(feature = "alloc")] pub fn from_boxed_bytes(other: Box<[u8]>) -> Box { // Safety: PotentialUtf8 is transparent over [u8] - unsafe { core::mem::transmute(other) } + unsafe { core::mem::transmute::, Box>(other) } } /// Create a [`PotentialUtf8`] from a boxed `str`. @@ -89,7 +89,7 @@ impl PotentialUtf8 { Self::from_boxed_bytes(other.into_boxed_bytes()) } - /// Get the bytes from a [`PotentialUtf8]. + /// Get the bytes from a [`PotentialUtf8`]. #[inline] pub const fn as_bytes(&self) -> &[u8] { &self.0 @@ -246,6 +246,9 @@ where } } +/// A `u16` slice that is expected to be a UTF-16 string but does not enforce that invariant. +/// +/// See [`PotentialUtf8`] for more info. #[repr(transparent)] #[derive(PartialEq, Eq, PartialOrd, Ord)] #[allow(clippy::exhaustive_structs)] // transparent newtype @@ -269,9 +272,12 @@ impl PotentialUtf16 { #[inline] pub const fn from_slice(other: &[u16]) -> &Self { // Safety: PotentialUtf16 is transparent over [u16] - unsafe { core::mem::transmute(other) } + unsafe { &*(other as *const [u16] as *const Self) } } + /// Iterates the characters of the string. + /// + /// Returns [`char::REPLACEMENT_CHARACTER`] if invalid surrogates are encountered. pub fn chars(&self) -> impl Iterator + '_ { char::decode_utf16(self.0.iter().copied()).map(|c| c.unwrap_or(char::REPLACEMENT_CHARACTER)) } diff --git a/deps/crates/vendor/quote-v1/.cargo_vcs_info.json b/deps/crates/vendor/quote-v1/.cargo_vcs_info.json index 47b82ff031e3..ec14844c6798 100644 --- a/deps/crates/vendor/quote-v1/.cargo_vcs_info.json +++ b/deps/crates/vendor/quote-v1/.cargo_vcs_info.json @@ -1,6 +1,6 @@ { "git": { - "sha1": "842ffde933fdd76cd1681a288bed136d8b95a97a" + "sha1": "bc4caf255fa9e58e025e5ff5a11ca948442c0f7a" }, "path_in_vcs": "" } \ No newline at end of file diff --git a/deps/crates/vendor/quote-v1/.github/workflows/ci.yml b/deps/crates/vendor/quote-v1/.github/workflows/ci.yml index 9cf199aae292..0fd6a9b6b7cb 100644 --- a/deps/crates/vendor/quote-v1/.github/workflows/ci.yml +++ b/deps/crates/vendor/quote-v1/.github/workflows/ci.yml @@ -24,10 +24,10 @@ jobs: strategy: fail-fast: false matrix: - rust: [nightly, stable, beta, 1.83.0, 1.71.0] + rust: [nightly, stable, beta, 1.85.0, 1.71.0] timeout-minutes: 45 steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 - uses: dtolnay/rust-toolchain@master with: toolchain: ${{matrix.rust}} @@ -53,7 +53,7 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 45 steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 - uses: dtolnay/rust-toolchain@nightly - run: cargo generate-lockfile -Z minimal-versions - run: cargo check --locked @@ -67,7 +67,7 @@ jobs: env: RUSTDOCFLAGS: -Dwarnings steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 - uses: dtolnay/rust-toolchain@nightly with: components: rust-src @@ -80,7 +80,7 @@ jobs: if: github.event_name != 'pull_request' timeout-minutes: 45 steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 - uses: dtolnay/rust-toolchain@nightly with: components: clippy, rust-src @@ -93,7 +93,7 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 45 steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 - uses: dtolnay/rust-toolchain@miri - run: cargo miri setup - run: cargo miri test @@ -106,7 +106,7 @@ jobs: if: github.event_name != 'pull_request' timeout-minutes: 45 steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 - uses: dtolnay/rust-toolchain@stable - uses: dtolnay/install@cargo-outdated - run: cargo outdated --workspace --exit-code 1 diff --git a/deps/crates/vendor/quote-v1/Cargo.lock b/deps/crates/vendor/quote-v1/Cargo.lock index e1a3311be04e..8b7a0ab38754 100644 --- a/deps/crates/vendor/quote-v1/Cargo.lock +++ b/deps/crates/vendor/quote-v1/Cargo.lock @@ -4,9 +4,9 @@ version = 3 [[package]] name = "dissimilar" -version = "1.0.10" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8975ffdaa0ef3661bfe02dbdcc06c9f829dfafe6a3c474de366a8d5e44276921" +checksum = "aeda16ab4059c5fd2a83f2b9c9e9c981327b18aa8e3b313f7e6563799d4f093e" [[package]] name = "equivalent" @@ -22,15 +22,15 @@ checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280" [[package]] name = "hashbrown" -version = "0.16.1" +version = "0.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" +checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a" [[package]] name = "indexmap" -version = "2.13.0" +version = "2.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7714e70437a7dc3ac8eb7e6f8df75fd8eb422675fc7678aff7364301092b1017" +checksum = "d466e9454f08e4a911e14806c24e16fba1b4c121d1ea474396f396069cf949d9" dependencies = [ "equivalent", "hashbrown", @@ -38,15 +38,15 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.17" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92ecc6618181def0457392ccd0ee51198e065e016d1d527a7ac1b6dc7c1f09d2" +checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682" [[package]] name = "memchr" -version = "2.8.0" +version = "2.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79" +checksum = "88904434abc2901f197fe8cc55f0445e7ded921dba5911dad2e2b39b48e663c4" [[package]] name = "proc-macro2" @@ -59,16 +59,16 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.44" +version = "1.0.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21b2ebcf727b7760c461f091f9f0f539b77b8e87f2fd88131e7f1b433b3cece4" +checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924" dependencies = [ "proc-macro2", ] [[package]] name = "quote" -version = "1.0.45" +version = "1.0.46" dependencies = [ "proc-macro2", "rustversion", @@ -106,15 +106,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" dependencies = [ "proc-macro2", - "quote 1.0.44", + "quote 1.0.45", "syn", ] [[package]] name = "serde_json" -version = "1.0.149" +version = "1.0.150" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86" +checksum = "e8014e44b4736ed0538adeecded0fce2a272f22dc9578a7eb6b2d9993c74cfb9" dependencies = [ "itoa", "memchr", @@ -125,21 +125,21 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "1.0.4" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8bbf91e5a4d6315eee45e704372590b30e260ee83af6639d64557f51b067776" +checksum = "6662b5879511e06e8999a8a235d848113e942c9124f211511b16466ee2995f26" dependencies = [ "serde_core", ] [[package]] name = "syn" -version = "2.0.117" +version = "2.0.118" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99" +checksum = "1b9ae57f904213ebb649ce6895b8a66c66f0203b9319718f69a5612a065b1422" dependencies = [ "proc-macro2", - "quote 1.0.44", + "quote 1.0.45", "unicode-ident", ] @@ -160,9 +160,9 @@ dependencies = [ [[package]] name = "toml" -version = "1.0.3+spec-1.1.0" +version = "1.1.2+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7614eaf19ad818347db24addfa201729cf2a9b6fdfd9eb0ab870fcacc606c0c" +checksum = "81f3d15e84cbcd896376e6730314d59fb5a87f31e4b038454184435cd57defee" dependencies = [ "indexmap", "serde_core", @@ -175,33 +175,33 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "1.0.0+spec-1.1.0" +version = "1.1.1+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32c2555c699578a4f59f0cc68e5116c8d7cabbd45e1409b989d4be085b53f13e" +checksum = "3165f65f62e28e0115a00b2ebdd37eb6f3b641855f9d636d3cd4103767159ad7" dependencies = [ "serde_core", ] [[package]] name = "toml_parser" -version = "1.0.9+spec-1.1.0" +version = "1.1.2+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "702d4415e08923e7e1ef96cd5727c0dfed80b4d2fa25db9647fe5eb6f7c5a4c4" +checksum = "a2abe9b86193656635d2411dc43050282ca48aa31c2451210f4202550afb7526" dependencies = [ "winnow", ] [[package]] name = "toml_writer" -version = "1.0.6+spec-1.1.0" +version = "1.1.1+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab16f14aed21ee8bfd8ec22513f7287cd4a91aa92e44edfe2c17ddd004e92607" +checksum = "756daf9b1013ebe47a8776667b466417e2d4c5679d441c26230efd9ef78692db" [[package]] name = "trybuild" -version = "1.0.116" +version = "1.0.117" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47c635f0191bd3a2941013e5062667100969f8c4e9cd787c14f977265d73616e" +checksum = "0710d4dfbeae4f9c390baa784c49858a7468fa433f3fe5d0ec5ebef651cf59f9" dependencies = [ "dissimilar", "glob", @@ -245,9 +245,9 @@ dependencies = [ [[package]] name = "winnow" -version = "0.7.14" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a5364e9d77fcdeeaa6062ced926ee3381faa2ee02d3eb83a5c27a8825540829" +checksum = "0592e1c9d151f854e6fd382574c3a0855250e1d9b2f99d9281c6e6391af352f1" [[package]] name = "zmij" diff --git a/deps/crates/vendor/quote-v1/Cargo.toml b/deps/crates/vendor/quote-v1/Cargo.toml index dcd4104c5d4d..ec798b6d61f1 100644 --- a/deps/crates/vendor/quote-v1/Cargo.toml +++ b/deps/crates/vendor/quote-v1/Cargo.toml @@ -13,7 +13,7 @@ edition = "2021" rust-version = "1.71" name = "quote" -version = "1.0.45" +version = "1.0.46" authors = ["David Tolnay "] build = "build.rs" autolib = false diff --git a/deps/crates/vendor/quote-v1/Cargo.toml.orig b/deps/crates/vendor/quote-v1/Cargo.toml.orig index ac1426a6c5fd..37478a019782 100644 --- a/deps/crates/vendor/quote-v1/Cargo.toml.orig +++ b/deps/crates/vendor/quote-v1/Cargo.toml.orig @@ -1,6 +1,6 @@ [package] name = "quote" -version = "1.0.45" +version = "1.0.46" authors = ["David Tolnay "] autobenches = false categories = ["development-tools::procedural-macro-helpers"] diff --git a/deps/crates/vendor/quote-v1/src/lib.rs b/deps/crates/vendor/quote-v1/src/lib.rs index bdad175e2a66..fd83c97f5d2b 100644 --- a/deps/crates/vendor/quote-v1/src/lib.rs +++ b/deps/crates/vendor/quote-v1/src/lib.rs @@ -89,7 +89,7 @@ //! [prettyplease]: https://github.com/dtolnay/prettyplease #![no_std] -#![doc(html_root_url = "https://docs.rs/quote/1.0.45")] +#![doc(html_root_url = "https://docs.rs/quote/1.0.46")] #![allow( clippy::doc_markdown, clippy::elidable_lifetime_names, @@ -525,157 +525,145 @@ __quote![ } ]; -macro_rules! __quote_spanned { - ($quote_spanned:item) => { - /// Same as `quote!`, but applies a given span to all tokens originating within - /// the macro invocation. - /// - ///
- /// - /// # Syntax - /// - /// A span expression of type [`Span`], followed by `=>`, followed by the tokens - /// to quote. The span expression should be brief — use a variable for - /// anything more than a few characters. There should be no space before the - /// `=>` token. - /// - /// [`Span`]: proc_macro2::Span - /// - /// ``` - /// # use proc_macro2::Span; - /// # use quote::quote_spanned; - /// # - /// # const IGNORE_TOKENS: &'static str = stringify! { - /// let span = /* ... */; - /// # }; - /// # let span = Span::call_site(); - /// # let init = 0; - /// - /// // On one line, use parentheses. - /// let tokens = quote_spanned!(span=> Box::into_raw(Box::new(#init))); - /// - /// // On multiple lines, place the span at the top and use braces. - /// let tokens = quote_spanned! {span=> - /// Box::into_raw(Box::new(#init)) - /// }; - /// ``` - /// - /// The lack of space before the `=>` should look jarring to Rust programmers - /// and this is intentional. The formatting is designed to be visibly - /// off-balance and draw the eye a particular way, due to the span expression - /// being evaluated in the context of the procedural macro and the remaining - /// tokens being evaluated in the generated code. - /// - ///
- /// - /// # Hygiene - /// - /// Any interpolated tokens preserve the `Span` information provided by their - /// `ToTokens` implementation. Tokens that originate within the `quote_spanned!` - /// invocation are spanned with the given span argument. - /// - ///
- /// - /// # Example - /// - /// The following procedural macro code uses `quote_spanned!` to assert that a - /// particular Rust type implements the [`Sync`] trait so that references can be - /// safely shared between threads. - /// - /// ``` - /// # use quote::{quote_spanned, TokenStreamExt, ToTokens}; - /// # use proc_macro2::{Span, TokenStream}; - /// # - /// # struct Type; - /// # - /// # impl Type { - /// # fn span(&self) -> Span { - /// # Span::call_site() - /// # } - /// # } - /// # - /// # impl ToTokens for Type { - /// # fn to_tokens(&self, _tokens: &mut TokenStream) {} - /// # } - /// # - /// # let ty = Type; - /// # let call_site = Span::call_site(); - /// # - /// let ty_span = ty.span(); - /// let assert_sync = quote_spanned! {ty_span=> - /// struct _AssertSync where #ty: Sync; - /// }; - /// ``` - /// - /// If the assertion fails, the user will see an error like the following. The - /// input span of their type is highlighted in the error. - /// - /// ```text - /// error[E0277]: the trait bound `*const (): std::marker::Sync` is not satisfied - /// --> src/main.rs:10:21 - /// | - /// 10 | static ref PTR: *const () = &(); - /// | ^^^^^^^^^ `*const ()` cannot be shared between threads safely - /// ``` - /// - /// In this example it is important for the where-clause to be spanned with the - /// line/column information of the user's input type so that error messages are - /// placed appropriately by the compiler. - $quote_spanned - }; +/// Same as `quote!`, but applies a given span to all tokens originating within +/// the macro invocation. +/// +///
+/// +/// # Syntax +/// +/// A span expression of type [`Span`], followed by `=>`, followed by the tokens +/// to quote. The span expression should be brief — use a variable for +/// anything more than a few characters. There should be no space before the +/// `=>` token. +/// +/// [`Span`]: proc_macro2::Span +/// +/// ``` +/// # use proc_macro2::Span; +/// # use quote::quote_spanned; +/// # +/// # const IGNORE_TOKENS: &'static str = stringify! { +/// let span = /* ... */; +/// # }; +/// # let span = Span::call_site(); +/// # let init = 0; +/// +/// // On one line, use parentheses. +/// let tokens = quote_spanned!(span=> Box::into_raw(Box::new(#init))); +/// +/// // On multiple lines, place the span at the top and use braces. +/// let tokens = quote_spanned! {span=> +/// Box::into_raw(Box::new(#init)) +/// }; +/// ``` +/// +/// The lack of space before the `=>` should look jarring to Rust programmers +/// and this is intentional. The formatting is designed to be visibly +/// off-balance and draw the eye a particular way, due to the span expression +/// being evaluated in the context of the procedural macro and the remaining +/// tokens being evaluated in the generated code. +/// +///
+/// +/// # Hygiene +/// +/// Any interpolated tokens preserve the `Span` information provided by their +/// `ToTokens` implementation. Tokens that originate within the `quote_spanned!` +/// invocation are spanned with the given span argument. +/// +///
+/// +/// # Example +/// +/// The following procedural macro code uses `quote_spanned!` to assert that a +/// particular Rust type implements the [`Sync`] trait so that references can be +/// safely shared between threads. +/// +/// ``` +/// # use quote::{quote_spanned, TokenStreamExt, ToTokens}; +/// # use proc_macro2::{Span, TokenStream}; +/// # +/// # struct Type; +/// # +/// # impl Type { +/// # fn span(&self) -> Span { +/// # Span::call_site() +/// # } +/// # } +/// # +/// # impl ToTokens for Type { +/// # fn to_tokens(&self, _tokens: &mut TokenStream) {} +/// # } +/// # +/// # let ty = Type; +/// # let call_site = Span::call_site(); +/// # +/// let ty_span = ty.span(); +/// let assert_sync = quote_spanned! {ty_span=> +/// struct _AssertSync where #ty: Sync; +/// }; +/// ``` +/// +/// If the assertion fails, the user will see an error like the following. The +/// input span of their type is highlighted in the error. +/// +/// ```text +/// error[E0277]: the trait bound `*const (): std::marker::Sync` is not satisfied +/// --> src/main.rs:10:21 +/// | +/// 10 | static ref PTR: *const () = &(); +/// | ^^^^^^^^^ `*const ()` cannot be shared between threads safely +/// ``` +/// +/// In this example it is important for the where-clause to be spanned with the +/// line/column information of the user's input type so that error messages are +/// placed appropriately by the compiler. +#[macro_export] +macro_rules! quote_spanned { + ($span:expr=> $($tt:tt)*) => {{ + let _span: $crate::__private::Span = $crate::__private::get_span($span).__into_span(); + $crate::quote_spanned_with_expanded_span!{_span $($tt)*} + }}; } -#[cfg(doc)] -__quote_spanned![ - #[macro_export] - macro_rules! quote_spanned { - ($span:expr=> $($tt:tt)*) => { - ... - }; - } -]; - -#[cfg(not(doc))] -__quote_spanned![ - #[macro_export] - macro_rules! quote_spanned { - ($span:expr=>) => {{ - let _: $crate::__private::Span = $crate::__private::get_span($span).__into_span(); - $crate::__private::TokenStream::new() - }}; +// We want to ensure that `get_span` only gets called for the actual user +// invocation and not for recursive calls from groups, which will call this +// inner macro instead. +#[macro_export] +#[doc(hidden)] +macro_rules! quote_spanned_with_expanded_span { + ($span:ident) => { + $crate::__private::TokenStream::new() + }; - // Special case rule for a single tt, for performance. - ($span:expr=> $tt:tt) => {{ - let mut _s = $crate::__private::TokenStream::new(); - let _span: $crate::__private::Span = $crate::__private::get_span($span).__into_span(); - $crate::quote_token_spanned!{$tt _s _span} - _s - }}; + // Special case rule for a single tt, for performance. + ($span:ident $tt:tt) => { + let mut _s = $crate::__private::TokenStream::new(); + $crate::quote_token_spanned!{$tt _s $span} + _s + }; - // Special case rules for two tts, for performance. - ($span:expr=> # $var:ident) => {{ - let mut _s = $crate::__private::TokenStream::new(); - let _: $crate::__private::Span = $crate::__private::get_span($span).__into_span(); - $crate::ToTokens::to_tokens(&$var, &mut _s); - _s - }}; - ($span:expr=> $tt1:tt $tt2:tt) => {{ - let mut _s = $crate::__private::TokenStream::new(); - let _span: $crate::__private::Span = $crate::__private::get_span($span).__into_span(); - $crate::quote_token_spanned!{$tt1 _s _span} - $crate::quote_token_spanned!{$tt2 _s _span} - _s - }}; + // Special case rules for two tts, for performance. + ($span:ident # $var:ident) => { + let mut _s = $crate::__private::TokenStream::new(); + $crate::ToTokens::to_tokens(&$var, &mut _s); + _s + }; + ($span:ident $tt1:tt $tt2:tt) => { + let mut _s = $crate::__private::TokenStream::new(); + $crate::quote_token_spanned!{$tt1 _s $span} + $crate::quote_token_spanned!{$tt2 _s $span} + _s + }; - // Rule for any other number of tokens. - ($span:expr=> $($tt:tt)*) => {{ - let mut _s = $crate::__private::TokenStream::new(); - let _span: $crate::__private::Span = $crate::__private::get_span($span).__into_span(); - $crate::quote_each_token_spanned!{_s _span $($tt)*} - _s - }}; - } -]; + // Rule for any other number of tokens. + ($span:ident $($tt:tt)*) => { + let mut _s = $crate::__private::TokenStream::new(); + $crate::quote_each_token_spanned!{_s $span $($tt)*} + _s + }; +} // Extract the names of all #metavariables and pass them to the $call macro. // @@ -1261,7 +1249,9 @@ macro_rules! quote_token_spanned { &mut $tokens, $span, $crate::__private::Delimiter::Parenthesis, - $crate::quote_spanned!($span=> $($inner)*), + { + $crate::quote_spanned_with_expanded_span!{$span $($inner)*} + }, ); }; @@ -1270,7 +1260,9 @@ macro_rules! quote_token_spanned { &mut $tokens, $span, $crate::__private::Delimiter::Bracket, - $crate::quote_spanned!($span=> $($inner)*), + { + $crate::quote_spanned_with_expanded_span!{$span $($inner)*} + }, ); }; @@ -1279,7 +1271,9 @@ macro_rules! quote_token_spanned { &mut $tokens, $span, $crate::__private::Delimiter::Brace, - $crate::quote_spanned!($span=> $($inner)*), + { + $crate::quote_spanned_with_expanded_span!{$span $($inner)*} + }, ); }; diff --git a/deps/crates/vendor/quote-v1/src/to_tokens.rs b/deps/crates/vendor/quote-v1/src/to_tokens.rs index b8eadf5b315a..aff1a71bdb8c 100644 --- a/deps/crates/vendor/quote-v1/src/to_tokens.rs +++ b/deps/crates/vendor/quote-v1/src/to_tokens.rs @@ -1,5 +1,4 @@ use super::TokenStreamExt; -use std::sync::Arc; use alloc::borrow::{Cow, ToOwned}; use alloc::boxed::Box; use alloc::ffi::CString; @@ -8,6 +7,7 @@ use alloc::string::String; use core::ffi::CStr; use core::iter; use proc_macro2::{Group, Ident, Literal, Punct, Span, TokenStream, TokenTree}; +use std::sync::Arc; /// Types that can be interpolated inside a `quote!` invocation. pub trait ToTokens { diff --git a/deps/crates/vendor/smallvec-v1/.cargo_vcs_info.json b/deps/crates/vendor/smallvec-v1/.cargo_vcs_info.json index 931891889f1d..effc7e1db37a 100644 --- a/deps/crates/vendor/smallvec-v1/.cargo_vcs_info.json +++ b/deps/crates/vendor/smallvec-v1/.cargo_vcs_info.json @@ -1,6 +1,6 @@ { "git": { - "sha1": "d0f47a3ea99296498ee940b5d99f59b403c498a2" + "sha1": "c469051a1ba05ef1a03dd69e14b4a5aa329e6f10" }, "path_in_vcs": "" } \ No newline at end of file diff --git a/deps/crates/vendor/smallvec-v1/.github/workflows/main.yml b/deps/crates/vendor/smallvec-v1/.github/workflows/main.yml deleted file mode 100644 index e2e83f1b28cf..000000000000 --- a/deps/crates/vendor/smallvec-v1/.github/workflows/main.yml +++ /dev/null @@ -1,114 +0,0 @@ -name: CI - -on: - push: - branches: [v1] - pull_request: - workflow_dispatch: - merge_group: - types: [checks_requested] - -jobs: - ci: - name: Build/Test - strategy: - matrix: - toolchain: ["stable", "beta", "nightly", "1.36.0"] - os: [ubuntu-latest] - include: - - toolchain: stable - fuzz: 0 - - toolchain: beta - fuzz: 0 - - os: windows-latest - toolchain: nightly - - runs-on: ${{ matrix.os }} - - steps: - - uses: actions/checkout@v4 - - - name: Install packages for fuzzing - if: runner.os == 'Linux' && matrix.fuzz == 1 - run: sudo apt-get update -y && sudo apt-get install -y binutils-dev libunwind8-dev libcurl4-openssl-dev libelf-dev libdw-dev cmake gcc libiberty-dev - - - name: Install toolchain - uses: dtolnay/rust-toolchain@master - with: - toolchain: ${{ matrix.toolchain }} - - - name: Cargo build - run: cargo build --verbose - - - name: Cargo test - if: matrix.toolchain != '1.36.0' - run: cargo test --verbose - - - name: Cargo test w/ serde - if: matrix.toolchain != '1.36.0' - run: cargo test --verbose --features serde - - - name: Cargo test w/ malloc_size_of - if: matrix.toolchain != '1.36.0' - run: cargo test --verbose --features malloc_size_of - - - name: Cargo check w/o default features - if: matrix.toolchain == 'nightly' - run: cargo check --verbose --no-default-features - - - name: Cargo test w/ union - if: matrix.toolchain == 'beta' - run: cargo test --verbose --features union - - - name: Cargo test w/ debugger_visualizer - if: matrix.toolchain == 'nightly' - run: cargo test --test debugger_visualizer --verbose --features debugger_visualizer -- --test-threads=1 - - - name: Cargo test w/ debugger_visualizer and union - if: matrix.toolchain == 'nightly' - run: cargo test --test debugger_visualizer --verbose --features 'debugger_visualizer,union' -- --test-threads=1 - - - name: Cargo test all features - if: matrix.toolchain == 'nightly' - run: cargo test --verbose --all-features - - - name: Cargo bench - if: matrix.toolchain == 'nightly' - run: cargo bench --verbose bench - - - name: miri - if: matrix.toolchain == 'nightly' && matrix.os == 'ubuntu-latest' - run: bash ./scripts/run_miri.sh - - - name: fuzz - if: matrix.fuzz == 1 - working-directory: fuzz - run: ./travis-fuzz.sh - - no-std: - name: no_std - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Install toolchain - uses: dtolnay/rust-toolchain@master - with: - toolchain: stable - target: thumbv7m-none-eabi - - name: Cargo build - run: cargo build --verbose - - build_result: - name: Result - runs-on: ubuntu-latest - needs: - - "ci" - - "no-std" - - steps: - - name: Mark the job as successful - run: exit 0 - if: success() - - name: Mark the job as unsuccessful - run: exit 1 - if: "!success()" diff --git a/deps/crates/vendor/smallvec-v1/.gitignore b/deps/crates/vendor/smallvec-v1/.gitignore deleted file mode 100644 index 514974de698d..000000000000 --- a/deps/crates/vendor/smallvec-v1/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -target -/Cargo.lock -/fuzz/hfuzz_target -/.vscode diff --git a/deps/crates/vendor/smallvec-v1/Cargo.lock b/deps/crates/vendor/smallvec-v1/Cargo.lock index 79606a4229c4..800616ecaa55 100644 --- a/deps/crates/vendor/smallvec-v1/Cargo.lock +++ b/deps/crates/vendor/smallvec-v1/Cargo.lock @@ -4,24 +4,24 @@ version = 4 [[package]] name = "aho-corasick" -version = "1.1.3" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" +checksum = "43f6cb1bf222025340178f382c426f13757b2960e89779dfcb319c32542a5a41" dependencies = [ "memchr", ] [[package]] name = "anyhow" -version = "1.0.98" +version = "1.0.71" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e16d2d3311acee920a9eb8d33b8cbc1787ce4a264e85f964c2404b969bdcd487" +checksum = "9c7d0618f0e0b7e8ff11427422b64564d5fb0be1940354bfe2e0529b18a9d9b8" [[package]] name = "arbitrary" -version = "1.4.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dde20b3d026af13f561bdd0f15edf01fc734f0dafcedbaf42bba506a9517f223" +checksum = "c38b6b6b79f671c25e1a3e785b7b82d7562ffc9cd3efdc98627e5668a2472490" [[package]] name = "bincode" @@ -50,7 +50,7 @@ dependencies = [ "anyhow", "log", "quote", - "syn 1.0.109", + "syn", ] [[package]] @@ -66,9 +66,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.27" +version = "0.4.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94" +checksum = "b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4" [[package]] name = "malloc_size_of" @@ -78,33 +78,33 @@ checksum = "e5d719de8b8f230028cf8192ae4c1b25267cd6b8a99d2747d345a70b8c81aa13" [[package]] name = "memchr" -version = "2.7.4" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" +checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" [[package]] name = "proc-macro2" -version = "1.0.95" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778" +checksum = "7b368fba921b0dce7e60f5e04ec15e565b3303972b42bcfde1d0713b881959eb" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.40" +version = "1.0.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" +checksum = "573015e8ab27661678357f27dc26460738fd2b6c86e46f386fde94cb5d913105" dependencies = [ "proc-macro2", ] [[package]] name = "regex" -version = "1.11.1" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" +checksum = "89089e897c013b3deb627116ae56a6955a72b8bed395c9526af31c9fe528b484" dependencies = [ "aho-corasick", "memchr", @@ -114,9 +114,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.9" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" +checksum = "fa250384981ea14565685dea16a9ccc4d1c541a13f82b9c168572264d1df8c56" dependencies = [ "aho-corasick", "memchr", @@ -125,33 +125,19 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.8.5" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" +checksum = "2ab07dc67230e4a4718e70fd5c20055a4334b121f1f9db8fe63ef39ce9b8c846" [[package]] name = "serde" -version = "1.0.219" +version = "1.0.137" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6" -dependencies = [ - "serde_derive", -] - -[[package]] -name = "serde_derive" -version = "1.0.219" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.101", -] +checksum = "61ea8d54c77f8315140a05f4c7237403bf38b72704d031543aa1d16abbf517d1" [[package]] name = "smallvec" -version = "1.15.1" +version = "1.15.2" dependencies = [ "arbitrary", "bincode 1.3.3", @@ -174,22 +160,11 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "syn" -version = "2.0.101" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ce2b7fc941b3a24138a0a7cf8e858bfc6a992e7978a068a5c760deb0ed43caf" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - [[package]] name = "unicode-ident" -version = "1.0.18" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" +checksum = "22049a19f4a68748a168c0fc439f9516686aa045927ff767eca0a85101fb6e73" [[package]] name = "unty" diff --git a/deps/crates/vendor/smallvec-v1/Cargo.toml b/deps/crates/vendor/smallvec-v1/Cargo.toml index d9a4f3b2e06a..dc72f6ef41e4 100644 --- a/deps/crates/vendor/smallvec-v1/Cargo.toml +++ b/deps/crates/vendor/smallvec-v1/Cargo.toml @@ -12,9 +12,16 @@ [package] edition = "2018" name = "smallvec" -version = "1.15.1" +version = "1.15.2" authors = ["The Servo Project Developers"] build = false +include = [ + "Cargo.toml", + "LICENSE-MIT", + "LICENSE-APACHE", + "README.md", + "src/**/*.rs", +] autolib = false autobins = false autoexamples = false @@ -61,20 +68,6 @@ write = [] name = "smallvec" path = "src/lib.rs" -[[test]] -name = "debugger_visualizer" -path = "tests/debugger_visualizer.rs" -test = false -required-features = ["debugger_visualizer"] - -[[test]] -name = "macro" -path = "tests/macro.rs" - -[[bench]] -name = "bench" -path = "benches/bench.rs" - [dependencies.arbitrary] version = "1" optional = true diff --git a/deps/crates/vendor/smallvec-v1/Cargo.toml.orig b/deps/crates/vendor/smallvec-v1/Cargo.toml.orig index 81ea432ac6e5..b411d44bc660 100644 --- a/deps/crates/vendor/smallvec-v1/Cargo.toml.orig +++ b/deps/crates/vendor/smallvec-v1/Cargo.toml.orig @@ -1,6 +1,6 @@ [package] name = "smallvec" -version = "1.15.1" +version = "1.15.2" edition = "2018" authors = ["The Servo Project Developers"] license = "MIT OR Apache-2.0" @@ -10,6 +10,7 @@ keywords = ["small", "vec", "vector", "stack", "no_std"] categories = ["data-structures"] readme = "README.md" documentation = "https://docs.rs/smallvec/" +include = ["Cargo.toml", "LICENSE-MIT", "LICENSE-APACHE", "README.md", "src/**/*.rs"] [features] const_generics = [] diff --git a/deps/crates/vendor/smallvec-v1/benches/bench.rs b/deps/crates/vendor/smallvec-v1/benches/bench.rs deleted file mode 100644 index b6a8b857d3ed..000000000000 --- a/deps/crates/vendor/smallvec-v1/benches/bench.rs +++ /dev/null @@ -1,312 +0,0 @@ -#![feature(test)] -#![allow(deprecated)] - -extern crate test; - -use self::test::Bencher; -use smallvec::{ExtendFromSlice, smallvec, SmallVec}; - -const VEC_SIZE: usize = 16; -const SPILLED_SIZE: usize = 100; - -trait Vector: for<'a> From<&'a [T]> + Extend + ExtendFromSlice { - fn new() -> Self; - fn push(&mut self, val: T); - fn pop(&mut self) -> Option; - fn remove(&mut self, p: usize) -> T; - fn insert(&mut self, n: usize, val: T); - fn from_elem(val: T, n: usize) -> Self; - fn from_elems(val: &[T]) -> Self; -} - -impl Vector for Vec { - fn new() -> Self { - Self::with_capacity(VEC_SIZE) - } - - fn push(&mut self, val: T) { - self.push(val) - } - - fn pop(&mut self) -> Option { - self.pop() - } - - fn remove(&mut self, p: usize) -> T { - self.remove(p) - } - - fn insert(&mut self, n: usize, val: T) { - self.insert(n, val) - } - - fn from_elem(val: T, n: usize) -> Self { - vec![val; n] - } - - fn from_elems(val: &[T]) -> Self { - val.to_owned() - } -} - -impl Vector for SmallVec<[T; VEC_SIZE]> { - fn new() -> Self { - Self::new() - } - - fn push(&mut self, val: T) { - self.push(val) - } - - fn pop(&mut self) -> Option { - self.pop() - } - - fn remove(&mut self, p: usize) -> T { - self.remove(p) - } - - fn insert(&mut self, n: usize, val: T) { - self.insert(n, val) - } - - fn from_elem(val: T, n: usize) -> Self { - smallvec![val; n] - } - - fn from_elems(val: &[T]) -> Self { - SmallVec::from_slice(val) - } -} - -macro_rules! make_benches { - ($typ:ty { $($b_name:ident => $g_name:ident($($args:expr),*),)* }) => { - $( - #[bench] - fn $b_name(b: &mut Bencher) { - $g_name::<$typ>($($args,)* b) - } - )* - } -} - -make_benches! { - SmallVec<[u64; VEC_SIZE]> { - bench_push => gen_push(SPILLED_SIZE as _), - bench_push_small => gen_push(VEC_SIZE as _), - bench_insert_push => gen_insert_push(SPILLED_SIZE as _), - bench_insert_push_small => gen_insert_push(VEC_SIZE as _), - bench_insert => gen_insert(SPILLED_SIZE as _), - bench_insert_small => gen_insert(VEC_SIZE as _), - bench_remove => gen_remove(SPILLED_SIZE as _), - bench_remove_small => gen_remove(VEC_SIZE as _), - bench_extend => gen_extend(SPILLED_SIZE as _), - bench_extend_small => gen_extend(VEC_SIZE as _), - bench_from_iter => gen_from_iter(SPILLED_SIZE as _), - bench_from_iter_small => gen_from_iter(VEC_SIZE as _), - bench_from_slice => gen_from_slice(SPILLED_SIZE as _), - bench_from_slice_small => gen_from_slice(VEC_SIZE as _), - bench_extend_from_slice => gen_extend_from_slice(SPILLED_SIZE as _), - bench_extend_from_slice_small => gen_extend_from_slice(VEC_SIZE as _), - bench_macro_from_elem => gen_from_elem(SPILLED_SIZE as _), - bench_macro_from_elem_small => gen_from_elem(VEC_SIZE as _), - bench_pushpop => gen_pushpop(), - } -} - -make_benches! { - Vec { - bench_push_vec => gen_push(SPILLED_SIZE as _), - bench_push_vec_small => gen_push(VEC_SIZE as _), - bench_insert_push_vec => gen_insert_push(SPILLED_SIZE as _), - bench_insert_push_vec_small => gen_insert_push(VEC_SIZE as _), - bench_insert_vec => gen_insert(SPILLED_SIZE as _), - bench_insert_vec_small => gen_insert(VEC_SIZE as _), - bench_remove_vec => gen_remove(SPILLED_SIZE as _), - bench_remove_vec_small => gen_remove(VEC_SIZE as _), - bench_extend_vec => gen_extend(SPILLED_SIZE as _), - bench_extend_vec_small => gen_extend(VEC_SIZE as _), - bench_from_iter_vec => gen_from_iter(SPILLED_SIZE as _), - bench_from_iter_vec_small => gen_from_iter(VEC_SIZE as _), - bench_from_slice_vec => gen_from_slice(SPILLED_SIZE as _), - bench_from_slice_vec_small => gen_from_slice(VEC_SIZE as _), - bench_extend_from_slice_vec => gen_extend_from_slice(SPILLED_SIZE as _), - bench_extend_from_slice_vec_small => gen_extend_from_slice(VEC_SIZE as _), - bench_macro_from_elem_vec => gen_from_elem(SPILLED_SIZE as _), - bench_macro_from_elem_vec_small => gen_from_elem(VEC_SIZE as _), - bench_pushpop_vec => gen_pushpop(), - } -} - -fn gen_push>(n: u64, b: &mut Bencher) { - #[inline(never)] - fn push_noinline>(vec: &mut V, x: u64) { - vec.push(x); - } - - b.iter(|| { - let mut vec = V::new(); - for x in 0..n { - push_noinline(&mut vec, x); - } - vec - }); -} - -fn gen_insert_push>(n: u64, b: &mut Bencher) { - #[inline(never)] - fn insert_push_noinline>(vec: &mut V, x: u64) { - vec.insert(x as usize, x); - } - - b.iter(|| { - let mut vec = V::new(); - for x in 0..n { - insert_push_noinline(&mut vec, x); - } - vec - }); -} - -fn gen_insert>(n: u64, b: &mut Bencher) { - #[inline(never)] - fn insert_noinline>(vec: &mut V, p: usize, x: u64) { - vec.insert(p, x) - } - - b.iter(|| { - let mut vec = V::new(); - // Always insert at position 0 so that we are subject to shifts of - // many different lengths. - vec.push(0); - for x in 0..n { - insert_noinline(&mut vec, 0, x); - } - vec - }); -} - -fn gen_remove>(n: usize, b: &mut Bencher) { - #[inline(never)] - fn remove_noinline>(vec: &mut V, p: usize) -> u64 { - vec.remove(p) - } - - b.iter(|| { - let mut vec = V::from_elem(0, n as _); - - for _ in 0..n { - remove_noinline(&mut vec, 0); - } - }); -} - -fn gen_extend>(n: u64, b: &mut Bencher) { - b.iter(|| { - let mut vec = V::new(); - vec.extend(0..n); - vec - }); -} - -fn gen_from_iter>(n: u64, b: &mut Bencher) { - let v: Vec = (0..n).collect(); - b.iter(|| { - let vec = V::from(&v); - vec - }); -} - -fn gen_from_slice>(n: u64, b: &mut Bencher) { - let v: Vec = (0..n).collect(); - b.iter(|| { - let vec = V::from_elems(&v); - vec - }); -} - -fn gen_extend_from_slice>(n: u64, b: &mut Bencher) { - let v: Vec = (0..n).collect(); - b.iter(|| { - let mut vec = V::new(); - vec.extend_from_slice(&v); - vec - }); -} - -fn gen_pushpop>(b: &mut Bencher) { - #[inline(never)] - fn pushpop_noinline>(vec: &mut V, x: u64) -> Option { - vec.push(x); - vec.pop() - } - - b.iter(|| { - let mut vec = V::new(); - for x in 0..SPILLED_SIZE as _ { - pushpop_noinline(&mut vec, x); - } - vec - }); -} - -fn gen_from_elem>(n: usize, b: &mut Bencher) { - b.iter(|| { - let vec = V::from_elem(42, n); - vec - }); -} - -#[bench] -fn bench_insert_many(b: &mut Bencher) { - #[inline(never)] - fn insert_many_noinline>( - vec: &mut SmallVec<[u64; VEC_SIZE]>, - index: usize, - iterable: I, - ) { - vec.insert_many(index, iterable) - } - - b.iter(|| { - let mut vec = SmallVec::<[u64; VEC_SIZE]>::new(); - insert_many_noinline(&mut vec, 0, 0..SPILLED_SIZE as _); - insert_many_noinline(&mut vec, 0, 0..SPILLED_SIZE as _); - vec - }); -} - -#[bench] -fn bench_insert_from_slice(b: &mut Bencher) { - let v: Vec = (0..SPILLED_SIZE as _).collect(); - b.iter(|| { - let mut vec = SmallVec::<[u64; VEC_SIZE]>::new(); - vec.insert_from_slice(0, &v); - vec.insert_from_slice(0, &v); - vec - }); -} - -#[bench] -fn bench_macro_from_list(b: &mut Bencher) { - b.iter(|| { - let vec: SmallVec<[u64; 16]> = smallvec![ - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 20, 24, 32, 36, 0x40, 0x80, - 0x100, 0x200, 0x400, 0x800, 0x1000, 0x2000, 0x4000, 0x8000, 0x10000, 0x20000, 0x40000, - 0x80000, 0x100000, - ]; - vec - }); -} - -#[bench] -fn bench_macro_from_list_vec(b: &mut Bencher) { - b.iter(|| { - let vec: Vec = vec![ - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 20, 24, 32, 36, 0x40, 0x80, - 0x100, 0x200, 0x400, 0x800, 0x1000, 0x2000, 0x4000, 0x8000, 0x10000, 0x20000, 0x40000, - 0x80000, 0x100000, - ]; - vec - }); -} diff --git a/deps/crates/vendor/smallvec-v1/debug_metadata/smallvec.natvis b/deps/crates/vendor/smallvec-v1/debug_metadata/smallvec.natvis deleted file mode 100644 index 8731860f4897..000000000000 --- a/deps/crates/vendor/smallvec-v1/debug_metadata/smallvec.natvis +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - {{ len={len()} is_inline={is_inline()} }} - - is_inline() ? $T2 : capacity - len() - data_ptr() - - - len() - data_ptr() - - - - - - - - - {{ len={len()} is_inline={is_inline()} }} - - is_inline() ? $T2 : capacity - len() - - - len() - data_ptr() - - - - \ No newline at end of file diff --git a/deps/crates/vendor/smallvec-v1/scripts/run_miri.sh b/deps/crates/vendor/smallvec-v1/scripts/run_miri.sh deleted file mode 100644 index 010ceb06ecb9..000000000000 --- a/deps/crates/vendor/smallvec-v1/scripts/run_miri.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/bash - -set -ex - -# Clean out our target dir, which may have artifacts compiled by a version of -# rust different from the one we're about to download. -cargo clean - -# Install and run the latest version of nightly where miri built successfully. -# Taken from: https://github.com/rust-lang/miri#running-miri-on-ci - -MIRI_NIGHTLY=nightly-$(curl -s https://rust-lang.github.io/rustup-components-history/x86_64-unknown-linux-gnu/miri) -echo "Installing latest nightly with Miri: $MIRI_NIGHTLY" -rustup override unset -rustup default "$MIRI_NIGHTLY" - -rustup component add miri -cargo miri setup - -cargo miri test --verbose -cargo miri test --verbose --features union -cargo miri test --verbose --all-features - -rustup override set nightly diff --git a/deps/crates/vendor/smallvec-v1/src/lib.rs b/deps/crates/vendor/smallvec-v1/src/lib.rs index 3259774acada..8c50301b455e 100644 --- a/deps/crates/vendor/smallvec-v1/src/lib.rs +++ b/deps/crates/vendor/smallvec-v1/src/lib.rs @@ -166,7 +166,7 @@ use core::mem::ManuallyDrop; /// ``` /// # use smallvec::{smallvec, SmallVec}; /// # fn main() { -/// let v: SmallVec<[_; 0x8000]> = smallvec![1; 3]; +/// let v: SmallVec<[_; 10]> = smallvec![1; 3]; /// assert_eq!(v, SmallVec::from_buf([1, 1, 1])); /// # } /// ``` @@ -602,7 +602,7 @@ where unsafe { // ZSTs have no identity, so we don't need to move them around. - let needs_move = mem::size_of::() != 0; + let needs_move = mem::size_of::() != 0; if needs_move && this.idx < this.old_len && this.del > 0 { let ptr = this.vec.as_mut_ptr(); @@ -651,6 +651,19 @@ impl SmallVecData
{ inline: core::mem::ManuallyDrop::new(inline), } } + // Workaround for https://github.com/rust-lang/rust/issues/157743: when from_inline is + // called with MaybeUninit::uninit(), rustc 1.93+ GVN propagates const into the + // ManuallyDrop::new() aggregate, causing LLVM to materialize a global constant that + // MemCpyOpt then collapses into a memset over the whole struct. Using assume_init() of a + // doubly-wrapped MaybeUninit produces Immediate::Uninit instead of const , which + // codegen handles as undef without emitting any global. This function also avoids + // introducing an intermediate local that would inflate stack frames in debug builds. + #[inline] + fn empty() -> SmallVecData { + // SAFETY: ManuallyDrop> is valid for any bit pattern including + // uninitialized bytes, so assume_init() on a MaybeUninit of that type is sound. + SmallVecData { inline: unsafe { MaybeUninit::uninit().assume_init() } } + } #[inline] unsafe fn into_inline(self) -> MaybeUninit { core::mem::ManuallyDrop::into_inner(self.inline) @@ -713,6 +726,13 @@ impl SmallVecData { fn from_inline(inline: MaybeUninit) -> SmallVecData { SmallVecData::Inline(inline) } + // See the comment on the union variant's empty() for why this exists. + #[inline] + fn empty() -> SmallVecData { + // SAFETY: MaybeUninit is valid for any bit pattern including uninitialized bytes, + // so assume_init() on a MaybeUninit of that type is sound. + SmallVecData::Inline(unsafe { MaybeUninit::uninit().assume_init() }) + } #[inline] unsafe fn into_inline(self) -> MaybeUninit { match self { @@ -789,7 +809,7 @@ impl SmallVec { ); SmallVec { capacity: 0, - data: SmallVecData::from_inline(MaybeUninit::uninit()), + data: SmallVecData::empty(), } } @@ -831,7 +851,7 @@ impl SmallVec { // Cannot use Vec with smaller capacity // because we use value of `Self::capacity` field as indicator. unsafe { - let mut data = SmallVecData::::from_inline(MaybeUninit::uninit()); + let mut data = SmallVecData::::empty(); let len = vec.len(); vec.set_len(0); ptr::copy_nonoverlapping(vec.as_ptr(), data.inline_mut().as_ptr(), len); @@ -1183,7 +1203,7 @@ impl SmallVec { if unspilled { return Ok(()); } - self.data = SmallVecData::from_inline(MaybeUninit::uninit()); + self.data = SmallVecData::empty(); ptr::copy_nonoverlapping(ptr.as_ptr(), self.data.inline_mut().as_ptr(), len); self.capacity = len; deallocate(ptr, cap); @@ -1283,7 +1303,7 @@ impl SmallVec { if self.inline_size() >= len { unsafe { let (ptr, len) = self.data.heap(); - self.data = SmallVecData::from_inline(MaybeUninit::uninit()); + self.data = SmallVecData::empty(); ptr::copy_nonoverlapping(ptr.as_ptr(), self.data.inline_mut().as_ptr(), len); deallocate(ptr.0, self.capacity); self.capacity = len; diff --git a/deps/crates/vendor/smallvec-v1/src/tests.rs b/deps/crates/vendor/smallvec-v1/src/tests.rs index 88c5f32b9a58..8907421ef7aa 100644 --- a/deps/crates/vendor/smallvec-v1/src/tests.rs +++ b/deps/crates/vendor/smallvec-v1/src/tests.rs @@ -1040,6 +1040,29 @@ fn drain_keep_rest() { assert_eq!(a, SmallVec::<[i32; 3]>::from_slice(&[1i32, 3, 5, 6, 7, 8])); } +// Regression test: keep_rest on a SmallVec with zero inline capacity must +// still move tail elements to fill the gap left by drained items. +// Using Box so that Miri detects the use-after-move / double-drop +// caused by the missing backshift. +#[cfg(feature = "drain_keep_rest")] +#[test] +fn drain_keep_rest_zero_inline_capacity() { + let mut a: SmallVec<[Box; 0]> = SmallVec::new(); + for i in 1u8..=8 { + a.push(Box::new(i)); + } + + let mut df = a.drain_filter(|x| **x % 2 == 0); + + assert_eq!(*df.next().unwrap(), 2); + assert_eq!(*df.next().unwrap(), 4); + + df.keep_rest(); + + let values: Vec = a.iter().map(|b| **b).collect(); + assert_eq!(values, vec![1, 3, 5, 6, 7, 8]); +} + /// This assortment of tests, in combination with miri, verifies we handle UB on fishy arguments /// given to SmallVec. Draining and extending the allocation are fairly well-tested earlier, but /// `smallvec.insert(usize::MAX, val)` once slipped by! diff --git a/deps/crates/vendor/smallvec-v1/tests/debugger_visualizer.rs b/deps/crates/vendor/smallvec-v1/tests/debugger_visualizer.rs deleted file mode 100644 index b39aa9d9812c..000000000000 --- a/deps/crates/vendor/smallvec-v1/tests/debugger_visualizer.rs +++ /dev/null @@ -1,68 +0,0 @@ -use debugger_test::debugger_test; -use smallvec::{smallvec, SmallVec}; - -#[inline(never)] -fn __break() {} - -#[debugger_test( - debugger = "cdb", - commands = r#" -.nvlist -dx sv - -g - -dx sv - -g - -dx sv -"#, - expected_statements = r#" -sv : { len=0x2 is_inline=true } [Type: smallvec::SmallVec >] - [] [Type: smallvec::SmallVec >] - [capacity] : 4 - [len] : 0x2 [Type: unsigned __int64] - [0] : 1 [Type: int] - [1] : 2 [Type: int] - -sv : { len=0x5 is_inline=false } [Type: smallvec::SmallVec >] - [] [Type: smallvec::SmallVec >] - [capacity] : 0x8 [Type: unsigned __int64] - [len] : 0x5 [Type: unsigned __int64] - [0] : 5 [Type: int] - [1] : 2 [Type: int] - [2] : 3 [Type: int] - [3] : 4 [Type: int] - [4] : 5 [Type: int] - -sv : { len=0x5 is_inline=false } [Type: smallvec::SmallVec >] - [] [Type: smallvec::SmallVec >] - [capacity] : 0x8 [Type: unsigned __int64] - [len] : 0x5 [Type: unsigned __int64] - [0] : 2 [Type: int] - [1] : 3 [Type: int] - [2] : 4 [Type: int] - [3] : 5 [Type: int] - [4] : 5 [Type: int] -"# -)] -#[inline(never)] -fn test_debugger_visualizer() { - // This SmallVec can hold up to 4 items on the stack: - let mut sv: SmallVec<[i32; 4]> = smallvec![1, 2]; - __break(); - - // Overfill the SmallVec to move its contents to the heap - for i in 3..6 { - sv.push(i); - } - - // Update the contents of the first value of the SmallVec. - sv[0] = sv[1] + sv[2]; - __break(); - - // Sort the SmallVec in place. - sv.sort(); - __break(); -} diff --git a/deps/crates/vendor/smallvec-v1/tests/macro.rs b/deps/crates/vendor/smallvec-v1/tests/macro.rs deleted file mode 100644 index fa52e79b9ede..000000000000 --- a/deps/crates/vendor/smallvec-v1/tests/macro.rs +++ /dev/null @@ -1,24 +0,0 @@ -/// This file tests `smallvec!` without actually having the macro in scope. -/// This forces any recursion to use a `$crate` prefix to reliably find itself. - -#[test] -fn smallvec() { - let mut vec: smallvec::SmallVec<[i32; 2]>; - - macro_rules! check { - ($init:tt) => { - vec = smallvec::smallvec! $init; - assert_eq!(*vec, *vec! $init); - } - } - - check!([0; 0]); - check!([1; 1]); - check!([2; 2]); - check!([3; 3]); - - check!([]); - check!([1]); - check!([1, 2]); - check!([1, 2, 3]); -} diff --git a/deps/crates/vendor/syn-v2/.cargo_vcs_info.json b/deps/crates/vendor/syn-v2/.cargo_vcs_info.json index 87594551d550..b02256c6e611 100644 --- a/deps/crates/vendor/syn-v2/.cargo_vcs_info.json +++ b/deps/crates/vendor/syn-v2/.cargo_vcs_info.json @@ -1,6 +1,6 @@ { "git": { - "sha1": "7bcb37cdb3399977658c8b52d2441d37e42e48f2" + "sha1": "f033ef1403b4dbd276d95c26ff05b51d758d7b14" }, "path_in_vcs": "" } \ No newline at end of file diff --git a/deps/crates/vendor/syn-v2/Cargo.lock b/deps/crates/vendor/syn-v2/Cargo.lock index 3680651acd11..8e8f8199c005 100644 --- a/deps/crates/vendor/syn-v2/Cargo.lock +++ b/deps/crates/vendor/syn-v2/Cargo.lock @@ -22,20 +22,20 @@ checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" [[package]] name = "automod" -version = "1.0.16" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8b5778837666541195063243828c5b6139221b47dc4ec3ba81738e532469ab1" +checksum = "a273e731a7fb8c2268fd2932c9e9a3469f4fd171d85d070d2687190229653bd3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.116", + "syn 2.0.117", ] [[package]] name = "aws-lc-rs" -version = "1.16.0" +version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9a7b350e3bb1767102698302bc37256cbd48422809984b98d292c40e2579aa9" +checksum = "5ec2f1fc3ec205783a5da9a7e6c1509cc69dedf09a1949e412c1e18469326d00" dependencies = [ "aws-lc-sys", "zeroize", @@ -43,9 +43,9 @@ dependencies = [ [[package]] name = "aws-lc-sys" -version = "0.37.1" +version = "0.41.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b092fe214090261288111db7a2b2c2118e5a7f30dc2569f1732c4069a6840549" +checksum = "1a2f9779ce85b93ab6170dd940ad0169b5766ff848247aff13bb788b832fe3f4" dependencies = [ "cc", "cmake", @@ -61,15 +61,15 @@ checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" [[package]] name = "bitflags" -version = "2.11.0" +version = "2.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "843867be96c8daad0d758b57df9392b6d8d271134fce549de6ce169ff98a92af" +checksum = "b4388bee8683e3d04af747c73422af53102d2bd24d9eadb6cbc100baef4b43f8" [[package]] name = "bumpalo" -version = "3.20.2" +version = "3.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d20789868f4b01b2f2caec9f5c4e0213b41e3e5702a50157d699ae31ced2fcb" +checksum = "72f5acc6cb2ba439de613abc23857ec3d78374d8ed5ac84e9d11336e87da8649" [[package]] name = "bytes" @@ -79,9 +79,9 @@ checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33" [[package]] name = "cc" -version = "1.2.56" +version = "1.2.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aebf35691d1bfb0ac386a69bac2fde4dd276fb618cf8bf4f5318fe285e821bb2" +checksum = "dad887fd958be91b5098c0248def011f4523ab786cd411be668777e55063501f" dependencies = [ "find-msvc-tools", "jobserver", @@ -89,12 +89,6 @@ dependencies = [ "shlex", ] -[[package]] -name = "cesu8" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" - [[package]] name = "cfg-if" version = "1.0.4" @@ -109,9 +103,9 @@ checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" [[package]] name = "cmake" -version = "0.1.57" +version = "0.1.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75443c44cd6b379beb8c5b45d85d0773baf31cce901fe7bb252f4eff3008ef7d" +checksum = "c0f78a02292a74a88ac736019ab962ece0bc380e3f977bf72e376c5d78ff0678" dependencies = [ "cc", ] @@ -128,14 +122,13 @@ dependencies = [ [[package]] name = "console" -version = "0.15.11" +version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "054ccb5b10f9f2cbf51eb355ca1d05c2d279ce1804688d0db74b4733a5aeafd8" +checksum = "d64e8af5551369d19cf50138de61f1c42074ab970f74e99be916646777f8fc87" dependencies = [ "encode_unicode", "libc", - "once_cell", - "windows-sys 0.59.0", + "windows-sys 0.61.2", ] [[package]] @@ -200,13 +193,13 @@ checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" [[package]] name = "displaydoc" -version = "0.2.5" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +checksum = "1ac70aa55017e108007fbaf5aa0f54b021c98f92ff8af59d42eda9da96e3dd4f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.116", + "syn 2.0.117", ] [[package]] @@ -217,9 +210,9 @@ checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" [[package]] name = "either" -version = "1.15.0" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" +checksum = "91622ff5e7162018101f2fea40d6ebf4a78bbe5a49736a2020649edf9693679e" [[package]] name = "encode_unicode" @@ -254,19 +247,18 @@ dependencies = [ [[package]] name = "fastrand" -version = "2.3.0" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" +checksum = "9f1f227452a390804cdb637b74a86990f2a7d7ba4b7d5693aac9b4dd6defd8d6" [[package]] name = "filetime" -version = "0.2.27" +version = "0.2.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f98844151eee8917efc50bd9e8318cb963ae8b297431495d3f758616ea5c57db" +checksum = "5c287a33c7f0a620c38e641e7f60827713987b3c0f26e8ddc9462cc69cf75759" dependencies = [ "cfg-if", "libc", - "libredox", ] [[package]] @@ -383,29 +375,29 @@ dependencies = [ "cfg-if", "js-sys", "libc", - "r-efi", + "r-efi 5.3.0", "wasip2", "wasm-bindgen", ] [[package]] name = "getrandom" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "139ef39800118c7683f2fd3c98c1b23c09ae076556b435f8e9064ae108aaeeec" +checksum = "0de51e6874e94e7bf76d726fc5d13ba782deca734ff60d5bb2fb2607c7406555" dependencies = [ "cfg-if", "libc", - "r-efi", + "r-efi 6.0.0", "wasip2", "wasip3", ] [[package]] name = "h2" -version = "0.4.13" +version = "0.4.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f44da3a8150a6703ed5d34e164b875fd14c2cdab9af1252a9a1020bde2bdc54" +checksum = "6cb093c84e8bd9b188d4c4a8cb6579fc016968d14c99882163cd3ff402a4f155" dependencies = [ "atomic-waker", "bytes", @@ -431,9 +423,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.16.1" +version = "0.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" +checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a" [[package]] name = "heck" @@ -443,9 +435,9 @@ checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" [[package]] name = "http" -version = "1.4.0" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3ba2a386d7f85a81f119ad7498ebe444d2e22c2af0b86b069416ace48b3311a" +checksum = "6970f50e31d6fc17d3fa27329444bfa74e196cf62e95052a3f6fee181dba6425" dependencies = [ "bytes", "itoa", @@ -482,9 +474,9 @@ checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" [[package]] name = "hyper" -version = "1.8.1" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ab2d4f250c3d7b1c9fcdff1cece94ea4e2dfbec68614f7b87cb205f24ca9d11" +checksum = "55281c53a1894c864990125767da440a4e630446785086f52523b20033b74498" dependencies = [ "atomic-waker", "bytes", @@ -496,7 +488,6 @@ dependencies = [ "httparse", "itoa", "pin-project-lite", - "pin-utils", "smallvec", "tokio", "want", @@ -504,15 +495,14 @@ dependencies = [ [[package]] name = "hyper-rustls" -version = "0.27.7" +version = "0.27.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3c93eb611681b207e1fe55d5a71ecf91572ec8a6705cdb6857f7d8d5242cf58" +checksum = "33ca68d021ef39cf6463ab54c1d0f5daf03377b70561305bb89a8f83aab66e0f" dependencies = [ "http", "hyper", "hyper-util", "rustls", - "rustls-pki-types", "tokio", "tokio-rustls", "tower-service", @@ -545,12 +535,13 @@ dependencies = [ [[package]] name = "icu_collections" -version = "2.1.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c6b649701667bbe825c3b7e6388cb521c23d88644678e83c0c4d0a621a34b43" +checksum = "2984d1cd16c883d7935b9e07e44071dca8d917fd52ecc02c04d5fa0b5a3f191c" dependencies = [ "displaydoc", "potential_utf", + "utf8_iter", "yoke", "zerofrom", "zerovec", @@ -558,9 +549,9 @@ dependencies = [ [[package]] name = "icu_locale_core" -version = "2.1.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edba7861004dd3714265b4db54a3c390e880ab658fec5f7db895fae2046b5bb6" +checksum = "92219b62b3e2b4d88ac5119f8904c10f8f61bf7e95b640d25ba3075e6cac2c29" dependencies = [ "displaydoc", "litemap", @@ -571,9 +562,9 @@ dependencies = [ [[package]] name = "icu_normalizer" -version = "2.1.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f6c8828b67bf8908d82127b2054ea1b4427ff0230ee9141c54251934ab1b599" +checksum = "c56e5ee99d6e3d33bd91c5d85458b6005a22140021cc324cea84dd0e72cff3b4" dependencies = [ "icu_collections", "icu_normalizer_data", @@ -585,15 +576,15 @@ dependencies = [ [[package]] name = "icu_normalizer_data" -version = "2.1.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7aedcccd01fc5fe81e6b489c15b247b8b0690feb23304303a9e560f37efc560a" +checksum = "da3be0ae77ea334f4da67c12f149704f19f81d1adf7c51cf482943e84a2bad38" [[package]] name = "icu_properties" -version = "2.1.2" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "020bfc02fe870ec3a66d93e677ccca0562506e5872c650f893269e08615d74ec" +checksum = "bee3b67d0ea5c2cca5003417989af8996f8604e34fb9ddf96208a033901e70de" dependencies = [ "icu_collections", "icu_locale_core", @@ -605,15 +596,15 @@ dependencies = [ [[package]] name = "icu_properties_data" -version = "2.1.2" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "616c294cf8d725c6afcd8f55abc17c56464ef6211f9ed59cccffe534129c77af" +checksum = "8e2bbb201e0c04f7b4b3e14382af113e17ba4f63e2c9d2ee626b720cbce54a14" [[package]] name = "icu_provider" -version = "2.1.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85962cf0ce02e1e0a629cc34e7ca3e373ce20dda4c4d7294bbd0bf1fdb59e614" +checksum = "139c4cf31c8b5f33d7e199446eff9c1e02decfc2f0eec2c8d71f65befa45b421" dependencies = [ "displaydoc", "icu_locale_core", @@ -643,9 +634,9 @@ dependencies = [ [[package]] name = "idna_adapter" -version = "1.2.1" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3acae9609540aa318d1bc588455225fb2085b9ed0c4f6bd0d9d5bcd86f1a0344" +checksum = "cb68373c0d6620ef8105e855e7745e18b0d00d3bdb07fb532e434244cdb9a714" dependencies = [ "icu_normalizer", "icu_properties", @@ -653,21 +644,21 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.13.0" +version = "2.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7714e70437a7dc3ac8eb7e6f8df75fd8eb422675fc7678aff7364301092b1017" +checksum = "d466e9454f08e4a911e14806c24e16fba1b4c121d1ea474396f396069cf949d9" dependencies = [ "equivalent", - "hashbrown 0.16.1", + "hashbrown 0.17.1", "serde", "serde_core", ] [[package]] name = "insta" -version = "1.46.3" +version = "1.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e82db8c87c7f1ccecb34ce0c24399b8a73081427f3c7c50a5d597925356115e4" +checksum = "86f0f8fee8c926415c58d6ae43a08523a26faccb2323f5e6b644fe7dd4ef6b82" dependencies = [ "console", "once_cell", @@ -677,47 +668,64 @@ dependencies = [ [[package]] name = "ipnet" -version = "2.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130" - -[[package]] -name = "iri-string" -version = "0.7.10" +version = "2.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c91338f0783edbd6195decb37bae672fd3b165faffb89bf7b9e6942f8b1a731a" -dependencies = [ - "memchr", - "serde", -] +checksum = "d98f6fed1fde3f8c21bc40a1abb88dd75e67924f9cffc3ef95607bad8017f8e2" [[package]] name = "itoa" -version = "1.0.17" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92ecc6618181def0457392ccd0ee51198e065e016d1d527a7ac1b6dc7c1f09d2" +checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682" [[package]] name = "jni" -version = "0.21.1" +version = "0.22.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a87aa2bb7d2af34197c04845522473242e1aa17c12f4935d5856491a7fb8c97" +checksum = "5efd9a482cf3a427f00d6b35f14332adc7902ce91efb778580e180ff90fa3498" dependencies = [ - "cesu8", "cfg-if", "combine", + "jni-macros", "jni-sys", "log", - "thiserror 1.0.69", + "simd_cesu8", + "thiserror", "walkdir", - "windows-sys 0.45.0", + "windows-link", +] + +[[package]] +name = "jni-macros" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a00109accc170f0bdb141fed3e393c565b6f5e072365c3bd58f5b062591560a3" +dependencies = [ + "proc-macro2", + "quote", + "rustc_version", + "simd_cesu8", + "syn 2.0.117", ] [[package]] name = "jni-sys" -version = "0.3.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" +checksum = "c6377a88cb3910bee9b0fa88d4f42e1d2da8e79915598f65fb0c7ee14c878af2" +dependencies = [ + "jni-sys-macros", +] + +[[package]] +name = "jni-sys-macros" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38c0b942f458fe50cdac086d2f946512305e5631e720728f2a61aabcd47a6264" +dependencies = [ + "quote", + "syn 2.0.117", +] [[package]] name = "jobserver" @@ -731,11 +739,12 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.85" +version = "0.3.102" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c942ebf8e95485ca0d52d97da7c5a2c387d0e7f0ba4c35e93bfcaee045955b3" +checksum = "03d04c30968dffe80775bd4d7fb676131cd04a1fb46d2686dbffbaec2d9dfd31" dependencies = [ - "once_cell", + "cfg-if", + "futures-util", "wasm-bindgen", ] @@ -747,38 +756,27 @@ checksum = "09edd9e8b54e49e587e4f6295a7d29c3ea94d469cb40ab8ca70b288248a81db2" [[package]] name = "libc" -version = "0.2.182" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6800badb6cb2082ffd7b6a67e6125bb39f18782f793520caee8cb8846be06112" - -[[package]] -name = "libredox" -version = "0.1.12" +version = "0.2.186" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d0b95e02c851351f877147b7deea7b1afb1df71b63aa5f8270716e0c5720616" -dependencies = [ - "bitflags", - "libc", - "redox_syscall", -] +checksum = "68ab91017fe16c622486840e4c83c9a37afeff978bd239b5293d61ece587de66" [[package]] name = "linux-raw-sys" -version = "0.11.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df1d3c3b53da64cf5760482273a98e575c651a67eec7f77df96b5b642de8f039" +checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53" [[package]] name = "litemap" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6373607a59f0be73a39b6fe456b8192fcc3585f602af20751600e974dd455e77" +checksum = "92daf443525c4cce67b150400bc2316076100ce0b3686209eb8cf3c31612e6f0" [[package]] name = "log" -version = "0.4.29" +version = "0.4.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" +checksum = "953f07c43838f8e6f9758cab68bf5bed85465e7587ebe0b823f1bcd81978ad3a" [[package]] name = "lru-slab" @@ -788,9 +786,9 @@ checksum = "112b39cec0b298b6c1999fee3e31427f74f676e4cb9879ed1a121b43661a4154" [[package]] name = "memchr" -version = "2.8.0" +version = "2.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79" +checksum = "88904434abc2901f197fe8cc55f0445e7ded921dba5911dad2e2b39b48e663c4" [[package]] name = "mime" @@ -810,9 +808,9 @@ dependencies = [ [[package]] name = "mio" -version = "1.1.1" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a69bcab0ad47271a0234d9422b131806bf3968021e5dc9328caf2d4cd58557fc" +checksum = "02bd0af71c67b473010cbbc60715ee815645a4dc942899111f494b4b737d6fda" dependencies = [ "libc", "wasi", @@ -821,9 +819,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.21.3" +version = "1.21.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" +checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" [[package]] name = "openssl-probe" @@ -839,21 +837,15 @@ checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" [[package]] name = "pin-project-lite" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" - -[[package]] -name = "pin-utils" -version = "0.1.0" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" +checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" [[package]] name = "potential_utf" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b73949432f5e2a09657003c25bca5e19a0e9c84f8058ca374f49e0ebe605af77" +checksum = "0103b1cef7ec0cf76490e969665504990193874ea05c85ff9bab8b911d0a0564" dependencies = [ "zerovec", ] @@ -874,7 +866,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b" dependencies = [ "proc-macro2", - "syn 2.0.116", + "syn 2.0.117", ] [[package]] @@ -900,7 +892,7 @@ dependencies = [ "rustc-hash", "rustls", "socket2", - "thiserror 2.0.18", + "thiserror", "tokio", "tracing", "web-time", @@ -908,9 +900,9 @@ dependencies = [ [[package]] name = "quinn-proto" -version = "0.11.13" +version = "0.11.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1906b49b0c3bc04b5fe5d86a77925ae6524a19b816ae38ce1e426255f1d8a31" +checksum = "434b42fec591c96ef50e21e886936e66d3cc3f737104fdb9b737c40ffb94c098" dependencies = [ "aws-lc-rs", "bytes", @@ -922,7 +914,7 @@ dependencies = [ "rustls", "rustls-pki-types", "slab", - "thiserror 2.0.18", + "thiserror", "tinyvec", "tracing", "web-time", @@ -944,9 +936,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.44" +version = "1.0.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21b2ebcf727b7760c461f091f9f0f539b77b8e87f2fd88131e7f1b433b3cece4" +checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924" dependencies = [ "proc-macro2", ] @@ -957,11 +949,17 @@ version = "5.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" +[[package]] +name = "r-efi" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" + [[package]] name = "rand" -version = "0.9.2" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1" +checksum = "44c5af06bb1b7d3216d91932aed5265164bf384dc89cd6ba05cf59a35f5f76ea" dependencies = [ "rand_chacha", "rand_core", @@ -988,9 +986,9 @@ dependencies = [ [[package]] name = "rayon" -version = "1.11.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "368f01d005bf8fd9b1206fb6fa653e6c4a81ceb1466406b81792d87c5677a58f" +checksum = "fb39b166781f92d482534ef4b4b1b2568f42613b53e5b6c160e24cfbfa30926d" dependencies = [ "either", "rayon-core", @@ -1006,15 +1004,6 @@ dependencies = [ "crossbeam-utils", ] -[[package]] -name = "redox_syscall" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35985aa610addc02e24fc232012c86fd11f14111180f902b67e2d5331f8ebf2b" -dependencies = [ - "bitflags", -] - [[package]] name = "ref-cast" version = "1.0.25" @@ -1032,14 +1021,14 @@ checksum = "b7186006dcb21920990093f30e3dea63b7d6e977bf1256be20c3563a5db070da" dependencies = [ "proc-macro2", "quote", - "syn 2.0.116", + "syn 2.0.117", ] [[package]] name = "reqwest" -version = "0.13.2" +version = "0.13.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab3f43e3283ab1488b624b44b0e988d0acea0b3214e694730a055cb6b2efa801" +checksum = "219c5811de6525e5416c7d5d53bb656d3afdbc6c5af816e0802bcfa42dbdc1c3" dependencies = [ "base64", "bytes", @@ -1091,15 +1080,24 @@ dependencies = [ [[package]] name = "rustc-hash" -version = "2.1.1" +version = "2.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d" +checksum = "94300abf3f1ae2e2b8ffb7b58043de3d399c73fa6f4b73826402a5c457614dbe" + +[[package]] +name = "rustc_version" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" +dependencies = [ + "semver", +] [[package]] name = "rustix" -version = "1.1.3" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "146c9e247ccc180c1f61615433868c99f3de3ae256a30a43b49f67c2d9171f34" +checksum = "b6fe4565b9518b83ef4f91bb47ce29620ca828bd32cb7e408f0062e9930ba190" dependencies = [ "bitflags", "errno", @@ -1110,9 +1108,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.36" +version = "0.23.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c665f33d38cea657d9614f766881e4d510e0eda4239891eea56b4cadcf01801b" +checksum = "ef86cd5876211988985292b91c96a8f2d298df24e75989a43a3c73f2d4d8168b" dependencies = [ "aws-lc-rs", "once_cell", @@ -1124,9 +1122,9 @@ dependencies = [ [[package]] name = "rustls-native-certs" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "612460d5f7bea540c490b2b6395d8e34a953e52b491accd6c86c8164c5932a63" +checksum = "dab5152771c58876a2146916e53e35057e1a4dfa2b9df0f0305b07f611fdea4d" dependencies = [ "openssl-probe", "rustls-pki-types", @@ -1136,9 +1134,9 @@ dependencies = [ [[package]] name = "rustls-pki-types" -version = "1.14.0" +version = "1.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be040f8b0a225e40375822a563fa9524378b9d63112f53e19ffff34df5d33fdd" +checksum = "30a7197ae7eb376e574fe940d068c30fe0462554a3ddbe4eca7838e049c937a9" dependencies = [ "web-time", "zeroize", @@ -1146,9 +1144,9 @@ dependencies = [ [[package]] name = "rustls-platform-verifier" -version = "0.6.2" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d99feebc72bae7ab76ba994bb5e121b8d83d910ca40b36e0921f53becc41784" +checksum = "26d1e2536ce4f35f4846aa13bff16bd0ff40157cdb14cc056c7b14ba41233ba0" dependencies = [ "core-foundation 0.10.1", "core-foundation-sys", @@ -1173,9 +1171,9 @@ checksum = "f87165f0995f63a9fbeea62b64d10b4d9d8e78ec6d7d51fb2125fda7bb36788f" [[package]] name = "rustls-webpki" -version = "0.103.9" +version = "0.103.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7df23109aa6c1567d1c575b9952556388da57401e4ace1d15f79eedad0d8f53" +checksum = "61c429a8649f110dddef65e2a5ad240f747e85f7758a6bccc7e5777bd33f756e" dependencies = [ "aws-lc-rs", "ring", @@ -1200,9 +1198,9 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.28" +version = "0.1.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "891d81b926048e76efe18581bf793546b4c0eaf8448d72be8de2bbee5fd166e1" +checksum = "91c1b7e4904c873ef0710c1f407dde2e6287de2bebc1bbbf7d430bb7cbffd939" dependencies = [ "windows-sys 0.61.2", ] @@ -1232,9 +1230,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.27" +version = "1.0.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d767eb0aabc880b29956c35734170f26ed551a859dbd361d140cdbeca61ab1e2" +checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd" [[package]] name = "serde" @@ -1243,7 +1241,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" dependencies = [ "serde_core", - "serde_derive", ] [[package]] @@ -1263,14 +1260,14 @@ checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" dependencies = [ "proc-macro2", "quote", - "syn 2.0.116", + "syn 2.0.117", ] [[package]] name = "serde_json" -version = "1.0.149" +version = "1.0.150" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86" +checksum = "e8014e44b4736ed0538adeecded0fce2a272f22dc9578a7eb6b2d9993c74cfb9" dependencies = [ "itoa", "memchr", @@ -1281,15 +1278,31 @@ dependencies = [ [[package]] name = "shlex" -version = "1.3.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" +checksum = "f8fadd59c855ef2080decdef8ff161eb6661b86933c9d82e5ba29dc602a55aba" [[package]] name = "simd-adler32" -version = "0.3.8" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "703d5c7ef118737c72f1af64ad2f6f8c5e1921f818cdcb97b8fe6fc69bf66214" + +[[package]] +name = "simd_cesu8" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94f90157bb87cddf702797c5dadfa0be7d266cdf49e22da2fcaa32eff75b2c33" +dependencies = [ + "rustc_version", + "simdutf8", +] + +[[package]] +name = "simdutf8" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e320a6c5ad31d271ad523dcf3ad13e2767ad8b1cb8f047f75a8aeaf8da139da2" +checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e" [[package]] name = "similar" @@ -1305,18 +1318,18 @@ checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5" [[package]] name = "smallvec" -version = "1.15.1" +version = "1.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" +checksum = "8ed6a63f02c8539c91a8685a86f4099661ba3da017932f6ebbea6de3f0fa7c90" [[package]] name = "socket2" -version = "0.6.2" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86f4aa3ad99f2088c990dfa82d367e19cb29268ed67c574d10d0a4bfe71f07e0" +checksum = "52d1cfed4120b4d927bf7c0f86d2087a4a7d6027c906d9f9d525a80573b9be51" dependencies = [ "libc", - "windows-sys 0.60.2", + "windows-sys 0.61.2", ] [[package]] @@ -1333,9 +1346,9 @@ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "syn" -version = "2.0.116" +version = "2.0.117" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3df424c70518695237746f84cede799c9c58fcb37450d7b23716568cc8bc69cb" +checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99" dependencies = [ "proc-macro2", "quote", @@ -1344,7 +1357,7 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.117" +version = "2.0.118" dependencies = [ "anyhow", "automod", @@ -1386,7 +1399,7 @@ checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.116", + "syn 2.0.117", ] [[package]] @@ -1412,9 +1425,9 @@ dependencies = [ [[package]] name = "tar" -version = "0.4.44" +version = "0.4.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d863878d212c87a19c1a610eb53bb01fe12951c0501cf5a0d65f724914a667a" +checksum = "3f6221d9a6003c78398e3b239969f352578258df48c8eb051caadae0015bc840" dependencies = [ "filetime", "libc", @@ -1423,12 +1436,12 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.25.0" +version = "3.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0136791f7c95b1f6dd99f9cc786b91bb81c3800b639b3478e561ddb7be95e5f1" +checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd" dependencies = [ "fastrand", - "getrandom 0.4.1", + "getrandom 0.4.2", "once_cell", "rustix", "windows-sys 0.61.2", @@ -1443,33 +1456,13 @@ dependencies = [ "winapi-util", ] -[[package]] -name = "thiserror" -version = "1.0.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" -dependencies = [ - "thiserror-impl 1.0.69", -] - [[package]] name = "thiserror" version = "2.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4288b5bcbc7920c07a1149a35cf9590a2aa808e0bc1eafaade0b80947865fbc4" dependencies = [ - "thiserror-impl 2.0.18", -] - -[[package]] -name = "thiserror-impl" -version = "1.0.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.116", + "thiserror-impl", ] [[package]] @@ -1480,14 +1473,14 @@ checksum = "ebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.116", + "syn 2.0.117", ] [[package]] name = "tinystr" -version = "0.8.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42d3e9c45c09de15d06dd8acf5f4e0e399e85927b7f00711024eb7ae10fa4869" +checksum = "c8323304221c2a851516f22236c5722a72eaa19749016521d6dff0824447d96d" dependencies = [ "displaydoc", "zerovec", @@ -1495,9 +1488,9 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.10.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa5fdc3bce6191a1dbc8c02d5c8bffcf557bafa17c124c5264a458f1b0613fa" +checksum = "3e61e67053d25a4e82c844e8424039d9745781b3fc4f32b8d55ed50f5f667ef3" dependencies = [ "tinyvec_macros", ] @@ -1510,9 +1503,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.49.0" +version = "1.52.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72a2903cd7736441aac9df9d7688bd0ce48edccaadf181c3b90be801e81d3d86" +checksum = "8fc7f01b389ac15039e4dc9531aa973a135d7a4135281b12d7c1bc79fd57fffe" dependencies = [ "bytes", "libc", @@ -1562,20 +1555,20 @@ dependencies = [ [[package]] name = "tower-http" -version = "0.6.8" +version = "0.6.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4e6559d53cc268e5031cd8429d05415bc4cb4aefc4aa5d6cc35fbf5b924a1f8" +checksum = "4cfcf7e2740e6fc6d4d688b4ef00650406bb94adf4731e43c096c3a19fe40840" dependencies = [ "bitflags", "bytes", "futures-util", "http", "http-body", - "iri-string", "pin-project-lite", "tower", "tower-layer", "tower-service", + "url", ] [[package]] @@ -1678,11 +1671,11 @@ checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" [[package]] name = "wasip2" -version = "1.0.2+wasi-0.2.9" +version = "1.0.4+wasi-0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9517f9239f02c069db75e65f174b3da828fe5f5b945c4dd26bd25d89c03ebcf5" +checksum = "b67efb37e106e55ce722a510d6b5f9c17f083e5fc79afc2badeb12cc313d9487" dependencies = [ - "wit-bindgen", + "wit-bindgen 0.57.1", ] [[package]] @@ -1691,14 +1684,14 @@ version = "0.4.0+wasi-0.3.0-rc-2026-01-06" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5428f8bf88ea5ddc08faddef2ac4a67e390b88186c703ce6dbd955e1c145aca5" dependencies = [ - "wit-bindgen", + "wit-bindgen 0.51.0", ] [[package]] name = "wasm-bindgen" -version = "0.2.108" +version = "0.2.125" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64024a30ec1e37399cf85a7ffefebdb72205ca1c972291c51512360d90bd8566" +checksum = "8ddb3f79143bced6de84270411622a2699cee572fc0875aeaf1e7867cf9fca1a" dependencies = [ "cfg-if", "once_cell", @@ -1709,23 +1702,19 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.58" +version = "0.4.75" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70a6e77fd0ae8029c9ea0063f87c46fde723e7d887703d74ad2616d792e51e6f" +checksum = "503b14d284f2c8dac03b819967e155ea753f573586193b2b2c95990cb5d69280" dependencies = [ - "cfg-if", - "futures-util", "js-sys", - "once_cell", "wasm-bindgen", - "web-sys", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.108" +version = "0.2.125" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "008b239d9c740232e71bd39e8ef6429d27097518b6b30bdf9086833bd5b6d608" +checksum = "4e21a184b13fb19e157296e2c46056aec9092264fab83e4ba59e68c61b323c3d" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -1733,22 +1722,22 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.108" +version = "0.2.125" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5256bae2d58f54820e6490f9839c49780dff84c65aeab9e772f15d5f0e913a55" +checksum = "fecefd9c35bd935a20fc3fc344b5f29138961e4f47fb03297d88f2587afb5ebd" dependencies = [ "bumpalo", "proc-macro2", "quote", - "syn 2.0.116", + "syn 2.0.117", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.108" +version = "0.2.125" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f01b580c9ac74c8d8f0c0e4afb04eeef2acf145458e52c03845ee9cd23e3d12" +checksum = "23939e44bb9a5d7576fa2b563dc2e136628f1224e88a8deed09e04858b77871f" dependencies = [ "unicode-ident", ] @@ -1789,9 +1778,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.85" +version = "0.3.102" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "312e32e551d92129218ea9a2452120f4aabc03529ef03e4d0d82fb2780608598" +checksum = "a6430a72df5eb332242960fe84b3002a241163998241eb596d4f739b9757061d" dependencies = [ "js-sys", "wasm-bindgen", @@ -1809,9 +1798,9 @@ dependencies = [ [[package]] name = "webpki-root-certs" -version = "1.0.6" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "804f18a4ac2676ffb4e8b5b5fa9ae38af06df08162314f96a68d2a363e21a8ca" +checksum = "f31141ce3fc3e300ae89b78c0dd67f9708061d1d2eda54b8209346fd6be9a92c" dependencies = [ "rustls-pki-types", ] @@ -1860,15 +1849,6 @@ dependencies = [ "windows-link", ] -[[package]] -name = "windows-sys" -version = "0.45.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" -dependencies = [ - "windows-targets 0.42.2", -] - [[package]] name = "windows-sys" version = "0.52.0" @@ -1878,15 +1858,6 @@ dependencies = [ "windows-targets 0.52.6", ] -[[package]] -name = "windows-sys" -version = "0.59.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" -dependencies = [ - "windows-targets 0.52.6", -] - [[package]] name = "windows-sys" version = "0.60.2" @@ -1905,21 +1876,6 @@ dependencies = [ "windows-link", ] -[[package]] -name = "windows-targets" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" -dependencies = [ - "windows_aarch64_gnullvm 0.42.2", - "windows_aarch64_msvc 0.42.2", - "windows_i686_gnu 0.42.2", - "windows_i686_msvc 0.42.2", - "windows_x86_64_gnu 0.42.2", - "windows_x86_64_gnullvm 0.42.2", - "windows_x86_64_msvc 0.42.2", -] - [[package]] name = "windows-targets" version = "0.52.6" @@ -1953,12 +1909,6 @@ dependencies = [ "windows_x86_64_msvc 0.53.1", ] -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" - [[package]] name = "windows_aarch64_gnullvm" version = "0.52.6" @@ -1971,12 +1921,6 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53" -[[package]] -name = "windows_aarch64_msvc" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" - [[package]] name = "windows_aarch64_msvc" version = "0.52.6" @@ -1989,12 +1933,6 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006" -[[package]] -name = "windows_i686_gnu" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" - [[package]] name = "windows_i686_gnu" version = "0.52.6" @@ -2019,12 +1957,6 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c" -[[package]] -name = "windows_i686_msvc" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" - [[package]] name = "windows_i686_msvc" version = "0.52.6" @@ -2037,12 +1969,6 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2" -[[package]] -name = "windows_x86_64_gnu" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" - [[package]] name = "windows_x86_64_gnu" version = "0.52.6" @@ -2055,12 +1981,6 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499" -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" - [[package]] name = "windows_x86_64_gnullvm" version = "0.52.6" @@ -2073,12 +1993,6 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1" -[[package]] -name = "windows_x86_64_msvc" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" - [[package]] name = "windows_x86_64_msvc" version = "0.52.6" @@ -2100,6 +2014,12 @@ dependencies = [ "wit-bindgen-rust-macro", ] +[[package]] +name = "wit-bindgen" +version = "0.57.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ebf944e87a7c253233ad6766e082e3cd714b5d03812acc24c318f549614536e" + [[package]] name = "wit-bindgen-core" version = "0.51.0" @@ -2121,7 +2041,7 @@ dependencies = [ "heck", "indexmap", "prettyplease", - "syn 2.0.116", + "syn 2.0.117", "wasm-metadata", "wit-bindgen-core", "wit-component", @@ -2137,7 +2057,7 @@ dependencies = [ "prettyplease", "proc-macro2", "quote", - "syn 2.0.116", + "syn 2.0.117", "wit-bindgen-core", "wit-bindgen-rust", ] @@ -2181,9 +2101,9 @@ dependencies = [ [[package]] name = "writeable" -version = "0.6.2" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9edde0db4769d2dc68579893f2306b26c6ecfbe0ef499b013d731b7b9247e0b9" +checksum = "1ffae5123b2d3fc086436f8834ae3ab053a283cfac8fe0a0b8eaae044768a4c4" [[package]] name = "xattr" @@ -2197,9 +2117,9 @@ dependencies = [ [[package]] name = "yoke" -version = "0.8.1" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72d6e5c6afb84d73944e5cedb052c4680d5657337201555f9f2a16b7406d4954" +checksum = "709fe23a0424b6a435d82152b1bd3fdfb0833487d5fa90d05d42762a9891fef5" dependencies = [ "stable_deref_trait", "yoke-derive", @@ -2208,68 +2128,68 @@ dependencies = [ [[package]] name = "yoke-derive" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b659052874eb698efe5b9e8cf382204678a0086ebf46982b79d6ca3182927e5d" +checksum = "de844c262c8848816172cef550288e7dc6c7b7814b4ee56b3e1553f275f1858e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.116", + "syn 2.0.117", "synstructure", ] [[package]] name = "zerocopy" -version = "0.8.39" +version = "0.8.52" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db6d35d663eadb6c932438e763b262fe1a70987f9ae936e60158176d710cae4a" +checksum = "ce1022995ff5ff5d841ad7d994facc23098cd40152f2c1d11cd607c6f530653f" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.8.39" +version = "0.8.52" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4122cd3169e94605190e77839c9a40d40ed048d305bfdc146e7df40ab0f3e517" +checksum = "1ae7f38b72ec2a254e2b87ef277cf2cd4fb97cbebf944faa6f33354da0867930" dependencies = [ "proc-macro2", "quote", - "syn 2.0.116", + "syn 2.0.117", ] [[package]] name = "zerofrom" -version = "0.1.6" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5" +checksum = "0ec05a11813ea801ff6d75110ad09cd0824ddba17dfe17128ea0d5f68e6c5272" dependencies = [ "zerofrom-derive", ] [[package]] name = "zerofrom-derive" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" +checksum = "11532158c46691caf0f2593ea8358fed6bbf68a0315e80aae9bd41fbade684a1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.116", + "syn 2.0.117", "synstructure", ] [[package]] name = "zeroize" -version = "1.8.2" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b97154e67e32c85465826e8bcc1c59429aaaf107c1e4a9e53c8d8ccd5eff88d0" +checksum = "e13c156562582aa81c60cb29407084cdb54c4164760106ab78e6c5b0858cf64e" [[package]] name = "zerotrie" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a59c17a5562d507e4b54960e8569ebee33bee890c70aa3fe7b97e85a9fd7851" +checksum = "0f9152d31db0792fa83f70fb2f83148effb5c1f5b8c7686c3459e361d9bc20bf" dependencies = [ "displaydoc", "yoke", @@ -2278,9 +2198,9 @@ dependencies = [ [[package]] name = "zerovec" -version = "0.11.5" +version = "0.11.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c28719294829477f525be0186d13efa9a3c602f7ec202ca9e353d310fb9a002" +checksum = "90f911cbc359ab6af17377d242225f4d75119aec87ea711a880987b18cd7b239" dependencies = [ "yoke", "zerofrom", @@ -2289,13 +2209,13 @@ dependencies = [ [[package]] name = "zerovec-derive" -version = "0.11.2" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eadce39539ca5cb3985590102671f2567e659fca9666581ad3411d59207951f3" +checksum = "625dc425cab0dca6dc3c3319506e6593dcb08a9f387ea3b284dbd52a92c40555" dependencies = [ "proc-macro2", "quote", - "syn 2.0.116", + "syn 2.0.117", ] [[package]] diff --git a/deps/crates/vendor/syn-v2/Cargo.toml b/deps/crates/vendor/syn-v2/Cargo.toml index 6254c0b010ac..022f0e9294c7 100644 --- a/deps/crates/vendor/syn-v2/Cargo.toml +++ b/deps/crates/vendor/syn-v2/Cargo.toml @@ -13,7 +13,7 @@ edition = "2021" rust-version = "1.71" name = "syn" -version = "2.0.117" +version = "2.0.118" authors = ["David Tolnay "] build = false include = [ diff --git a/deps/crates/vendor/syn-v2/Cargo.toml.orig b/deps/crates/vendor/syn-v2/Cargo.toml.orig index bd1c104d9bf1..0341fafa99c3 100644 --- a/deps/crates/vendor/syn-v2/Cargo.toml.orig +++ b/deps/crates/vendor/syn-v2/Cargo.toml.orig @@ -1,6 +1,6 @@ [package] name = "syn" -version = "2.0.117" +version = "2.0.118" authors = ["David Tolnay "] categories = ["development-tools::procedural-macro-helpers", "parser-implementations"] description = "Parser for Rust source code" diff --git a/deps/crates/vendor/syn-v2/README.md b/deps/crates/vendor/syn-v2/README.md index 9ae472ea6699..7ac4b2dc3d82 100644 --- a/deps/crates/vendor/syn-v2/README.md +++ b/deps/crates/vendor/syn-v2/README.md @@ -205,7 +205,7 @@ longer trigger or be less helpful than it used to be. When developing a procedural macro it can be helpful to look at what the generated code looks like. Use `cargo rustc -- -Zunstable-options ---pretty=expanded` or the [`cargo expand`] subcommand. +-Zunpretty=expanded` or the [`cargo expand`] subcommand. [`cargo expand`]: https://github.com/dtolnay/cargo-expand diff --git a/deps/crates/vendor/syn-v2/benches/rust.rs b/deps/crates/vendor/syn-v2/benches/rust.rs index f6b61f3971ce..c0e82c65c00f 100644 --- a/deps/crates/vendor/syn-v2/benches/rust.rs +++ b/deps/crates/vendor/syn-v2/benches/rust.rs @@ -60,7 +60,6 @@ mod librustc_parse { use crate::repo; use rustc_errors::emitter::Emitter; - use rustc_errors::translation::Translator; use rustc_errors::{DiagCtxt, DiagInner}; use rustc_parse::lexer::StripTokens; use rustc_session::parse::ParseSess; @@ -77,9 +76,6 @@ mod librustc_parse { fn source_map(&self) -> Option<&SourceMap> { None } - fn translator(&self) -> &Translator { - panic!("silent emitter attempted to translate a diagnostic"); - } } let edition = repo::edition(path).parse().unwrap(); diff --git a/deps/crates/vendor/syn-v2/src/expr.rs b/deps/crates/vendor/syn-v2/src/expr.rs index 0f92701dca3a..043c023f812f 100644 --- a/deps/crates/vendor/syn-v2/src/expr.rs +++ b/deps/crates/vendor/syn-v2/src/expr.rs @@ -233,7 +233,7 @@ ast_enum_of_structs! { /// A tuple expression: `(a, b, c, d)`. Tuple(ExprTuple), - /// A unary operation: `!x`, `*x`. + /// A unary operation: `!x`, `*x`, `-x`. Unary(ExprUnary), /// An unsafe block: `unsafe { ... }`. @@ -674,7 +674,7 @@ ast_struct! { } ast_struct! { - /// A unary operation: `!x`, `*x`. + /// A unary operation: `!x`, `*x`, `-x`. #[cfg_attr(docsrs, doc(cfg(any(feature = "full", feature = "derive"))))] pub struct ExprUnary { pub attrs: Vec, diff --git a/deps/crates/vendor/syn-v2/src/lib.rs b/deps/crates/vendor/syn-v2/src/lib.rs index d1dc0caaab8f..6d3f5bb5aecb 100644 --- a/deps/crates/vendor/syn-v2/src/lib.rs +++ b/deps/crates/vendor/syn-v2/src/lib.rs @@ -207,7 +207,7 @@ //! //! When developing a procedural macro it can be helpful to look at what the //! generated code looks like. Use `cargo rustc -- -Zunstable-options -//! --pretty=expanded` or the [`cargo expand`] subcommand. +//! -Zunpretty=expanded` or the [`cargo expand`] subcommand. //! //! [`cargo expand`]: https://github.com/dtolnay/cargo-expand //! @@ -249,7 +249,7 @@ //! dynamic library libproc_macro from rustc toolchain. #![no_std] -#![doc(html_root_url = "https://docs.rs/syn/2.0.117")] +#![doc(html_root_url = "https://docs.rs/syn/2.0.118")] #![cfg_attr(docsrs, feature(doc_cfg), doc(auto_cfg = false))] #![deny(unsafe_op_in_unsafe_fn)] #![allow(non_camel_case_types)] diff --git a/deps/crates/vendor/syn-v2/src/lit.rs b/deps/crates/vendor/syn-v2/src/lit.rs index a77b3cd3e8ff..403d8bac3e62 100644 --- a/deps/crates/vendor/syn-v2/src/lit.rs +++ b/deps/crates/vendor/syn-v2/src/lit.rs @@ -1236,13 +1236,11 @@ mod value { } } // true, false - b't' | b'f' => { - if repr == "true" || repr == "false" { - return Lit::Bool(LitBool { - value: repr == "true", - span: token.span(), - }); - } + b't' | b'f' if repr == "true" || repr == "false" => { + return Lit::Bool(LitBool { + value: repr == "true", + span: token.span(), + }); } b'(' if repr == "(/*ERROR*/)" => return Lit::Verbatim(token), _ => {} diff --git a/deps/crates/vendor/syn-v2/src/token.rs b/deps/crates/vendor/syn-v2/src/token.rs index 8d63a4111b36..32c5a013e74a 100644 --- a/deps/crates/vendor/syn-v2/src/token.rs +++ b/deps/crates/vendor/syn-v2/src/token.rs @@ -143,7 +143,12 @@ pub(crate) mod private { /// Support writing `token.span` rather than `token.spans[0]` on tokens that /// hold a single span. #[repr(transparent)] - #[allow(unknown_lints, repr_transparent_non_zst_fields)] // False positive: https://github.com/rust-lang/rust/issues/115922 + #[allow( + unknown_lints, + renamed_and_removed_lints, + // False positive: https://github.com/rust-lang/rust/issues/115922 + repr_transparent_non_zst_fields, + )] pub struct WithSpan { pub span: Span, } @@ -324,7 +329,12 @@ macro_rules! define_punctuation_structs { ($($token:literal pub struct $name:ident/$len:tt #[doc = $usage:literal])*) => { $( #[cfg_attr(not(doc), repr(transparent))] - #[allow(unknown_lints, repr_transparent_non_zst_fields)] // False positive: https://github.com/rust-lang/rust/issues/115922 + #[allow( + unknown_lints, + renamed_and_removed_lints, + // False positive: https://github.com/rust-lang/rust/issues/115922 + repr_transparent_non_zst_fields, + )] #[doc = concat!('`', $token, '`')] /// /// Usage: diff --git a/deps/crates/vendor/syn-v2/tests/common/eq.rs b/deps/crates/vendor/syn-v2/tests/common/eq.rs index d9440ab39429..f59943cd9b7d 100644 --- a/deps/crates/vendor/syn-v2/tests/common/eq.rs +++ b/deps/crates/vendor/syn-v2/tests/common/eq.rs @@ -43,6 +43,8 @@ use rustc_ast::ast::Crate; use rustc_ast::ast::Defaultness; use rustc_ast::ast::Delegation; use rustc_ast::ast::DelegationMac; +use rustc_ast::ast::DelegationSource; +use rustc_ast::ast::DelegationSuffixes; use rustc_ast::ast::DelimArgs; use rustc_ast::ast::EarlyParsedAttribute; use rustc_ast::ast::EiiDecl; @@ -85,8 +87,10 @@ use rustc_ast::ast::GenericBound; use rustc_ast::ast::GenericParam; use rustc_ast::ast::GenericParamKind; use rustc_ast::ast::Generics; +use rustc_ast::ast::Guard; use rustc_ast::ast::Impl; use rustc_ast::ast::ImplPolarity; +use rustc_ast::ast::ImplRestriction; use rustc_ast::ast::Inline; use rustc_ast::ast::InlineAsm; use rustc_ast::ast::InlineAsmOperand; @@ -119,6 +123,7 @@ use rustc_ast::ast::MgcaDisambiguation; use rustc_ast::ast::ModKind; use rustc_ast::ast::ModSpans; use rustc_ast::ast::Movability; +use rustc_ast::ast::MutRestriction; use rustc_ast::ast::MutTy; use rustc_ast::ast::Mutability; use rustc_ast::ast::NodeId; @@ -140,6 +145,7 @@ use rustc_ast::ast::RangeEnd; use rustc_ast::ast::RangeLimits; use rustc_ast::ast::RangeSyntax; use rustc_ast::ast::Recovered; +use rustc_ast::ast::RestrictionKind; use rustc_ast::ast::Safety; use rustc_ast::ast::StaticItem; use rustc_ast::ast::Stmt; @@ -185,9 +191,8 @@ use rustc_ast::tokenstream::{ Spacing, TokenStream, TokenTree, }; use rustc_data_structures::packed::Pu128; -use rustc_span::source_map::Spanned; use rustc_span::symbol::{sym, ByteSymbol, Ident, Symbol}; -use rustc_span::{ErrorGuaranteed, Span, SyntaxContext, DUMMY_SP}; +use rustc_span::{ErrorGuaranteed, LocalExpnId, Span, Spanned, SyntaxContext, DUMMY_SP}; use std::borrow::Cow; use std::collections::HashMap; use std::hash::{BuildHasher, Hash}; @@ -305,6 +310,7 @@ spanless_eq_true!(AttrId); spanless_eq_true!(NodeId); spanless_eq_true!(SyntaxContext); spanless_eq_true!(Spacing); +spanless_eq_true!(LocalExpnId); macro_rules! spanless_eq_partial_eq { ($name:ty) => { @@ -497,7 +503,7 @@ spanless_eq_struct!(Closure; binder capture_clause constness coroutine_kind mova spanless_eq_struct!(ConstBlockItem; id span block); spanless_eq_struct!(ConstItem; defaultness ident generics ty rhs_kind define_opaque); spanless_eq_struct!(Crate; attrs items spans id is_placeholder); -spanless_eq_struct!(Delegation; id qself path ident rename body from_glob); +spanless_eq_struct!(Delegation; id qself path ident rename body source); spanless_eq_struct!(DelegationMac; qself prefix suffixes body); spanless_eq_struct!(DelimArgs; dspan delim tokens); spanless_eq_struct!(DelimSpacing; open close); @@ -506,7 +512,7 @@ spanless_eq_struct!(EiiImpl; node_id eii_macro_path known_eii_macro_resolution i spanless_eq_struct!(EnumDef; variants); spanless_eq_struct!(Expr; id kind span attrs !tokens); spanless_eq_struct!(ExprField; attrs id span ident expr is_shorthand is_placeholder); -spanless_eq_struct!(FieldDef; attrs id span vis safety ident ty default is_placeholder); +spanless_eq_struct!(FieldDef; attrs id span vis mut_restriction safety ident ty default is_placeholder); spanless_eq_struct!(Fn; defaultness ident generics sig contract define_opaque body eii_impls); spanless_eq_struct!(FnContract; declarations requires ensures); spanless_eq_struct!(FnDecl; inputs output); @@ -521,7 +527,9 @@ spanless_eq_struct!(FormatOptions; width precision alignment fill sign alternate spanless_eq_struct!(FormatPlaceholder; argument span format_trait format_options); spanless_eq_struct!(GenericParam; id ident attrs bounds is_placeholder kind !colon_span); spanless_eq_struct!(Generics; params where_clause span); +spanless_eq_struct!(Guard; cond span_with_leading_if); spanless_eq_struct!(Impl; generics constness of_trait self_ty items); +spanless_eq_struct!(ImplRestriction; kind span tokens); spanless_eq_struct!(InlineAsm; asm_macro template template_strs operands clobber_abis options line_spans); spanless_eq_struct!(InlineAsmSym; id qself path); spanless_eq_struct!(Item; attrs id span vis kind !tokens); @@ -536,6 +544,7 @@ spanless_eq_struct!(MetaItem; unsafety path kind span); spanless_eq_struct!(MetaItemLit; symbol suffix kind span); spanless_eq_struct!(MethodCall; seg receiver args !span); spanless_eq_struct!(ModSpans; !inner_span !inject_use_span); +spanless_eq_struct!(MutRestriction; kind span tokens); spanless_eq_struct!(MutTy; ty mutbl); spanless_eq_struct!(NormalAttr; item tokens); spanless_eq_struct!(ParenthesizedArgs; span inputs inputs_span output); @@ -545,12 +554,12 @@ spanless_eq_struct!(Path; span segments tokens); spanless_eq_struct!(PathSegment; ident id args); spanless_eq_struct!(PolyTraitRef; bound_generic_params modifiers trait_ref span parens); spanless_eq_struct!(QSelf; ty path_span position); -spanless_eq_struct!(StaticItem; ident ty safety mutability expr define_opaque); +spanless_eq_struct!(StaticItem; ident ty safety mutability expr define_opaque eii_impls); spanless_eq_struct!(Stmt; id kind span); spanless_eq_struct!(StrLit; symbol suffix symbol_unescaped style span); spanless_eq_struct!(StructExpr; qself path fields rest); spanless_eq_struct!(Token; kind span); -spanless_eq_struct!(Trait; constness safety is_auto ident generics bounds items); +spanless_eq_struct!(Trait; constness safety is_auto impl_restriction ident generics bounds items); spanless_eq_struct!(TraitAlias; constness ident generics bounds); spanless_eq_struct!(TraitBoundModifiers; constness asyncness polarity); spanless_eq_struct!(TraitImplHeader; defaultness safety polarity trait_ref); @@ -559,7 +568,7 @@ spanless_eq_struct!(Ty; id kind span tokens); spanless_eq_struct!(TyAlias; defaultness ident generics after_where_clause bounds ty); spanless_eq_struct!(TyPat; id kind span tokens); spanless_eq_struct!(UnsafeBinderTy; generic_params inner_ty); -spanless_eq_struct!(UseTree; prefix kind span); +spanless_eq_struct!(UseTree; prefix kind); spanless_eq_struct!(Variant; attrs id span !vis ident data disr_expr is_placeholder); spanless_eq_struct!(Visibility; kind span tokens); spanless_eq_struct!(WhereBoundPredicate; bound_generic_params bounded_ty bounds); @@ -587,6 +596,8 @@ spanless_eq_enum!(ClosureBinder; NotPresent For(span generic_params)); spanless_eq_enum!(Const; Yes(0) No); spanless_eq_enum!(ConstItemRhsKind; Body(rhs) TypeConst(rhs)); spanless_eq_enum!(Defaultness; Implicit Default(0) Final(0)); +spanless_eq_enum!(DelegationSource; Single List(0) Glob); +spanless_eq_enum!(DelegationSuffixes; List(0) Glob(0)); spanless_eq_enum!(EarlyParsedAttribute; CfgTrace(0) CfgAttrTrace); spanless_eq_enum!(Extern; None Implicit(0) Explicit(0 1)); spanless_eq_enum!(FloatTy; F16 F32 F64 F128); @@ -630,10 +641,11 @@ spanless_eq_enum!(PreciseCapturingArg; Lifetime(0) Arg(0 1)); spanless_eq_enum!(RangeEnd; Included(0) Excluded); spanless_eq_enum!(RangeLimits; HalfOpen Closed); spanless_eq_enum!(Recovered; No Yes(0)); +spanless_eq_enum!(RestrictionKind; Unrestricted Restricted(path id shorthand)); spanless_eq_enum!(Safety; Unsafe(0) Safe(0) Default); spanless_eq_enum!(StmtKind; Let(0) Item(0) Expr(0) Semi(0) Empty MacCall(0)); spanless_eq_enum!(StrStyle; Cooked Raw(0)); -spanless_eq_enum!(StructRest; Base(0) Rest(0) None); +spanless_eq_enum!(StructRest; Base(0) Rest(0) None NoneWithError(0)); spanless_eq_enum!(Term; Ty(0) Const(0)); spanless_eq_enum!(TokenTree; Token(0 1) Delimited(0 1 2 3)); spanless_eq_enum!(TraitObjectSyntax; Dyn None); @@ -642,10 +654,10 @@ spanless_eq_enum!(UintTy; Usize U8 U16 U32 U64 U128); spanless_eq_enum!(UnOp; Deref Not Neg); spanless_eq_enum!(UnsafeBinderCastKind; Wrap Unwrap); spanless_eq_enum!(UnsafeSource; CompilerGenerated UserProvided); -spanless_eq_enum!(UseTreeKind; Simple(0) Nested(items span) Glob); +spanless_eq_enum!(UseTreeKind; Simple(0) Nested(items span) Glob(0)); spanless_eq_enum!(VariantData; Struct(fields recovered) Tuple(0 1) Unit(0)); spanless_eq_enum!(VisibilityKind; Public Restricted(path id shorthand) Inherited); -spanless_eq_enum!(WherePredicateKind; BoundPredicate(0) RegionPredicate(0) EqPredicate(0)); +spanless_eq_enum!(WherePredicateKind; BoundPredicate(0) RegionPredicate(0)); spanless_eq_enum!(YieldKind; Prefix(0) Postfix(0)); spanless_eq_enum!(AssignOpKind; AddAssign SubAssign MulAssign DivAssign RemAssign BitXorAssign BitAndAssign BitOrAssign ShlAssign ShrAssign); @@ -653,10 +665,10 @@ spanless_eq_enum!(CoroutineKind; Async(span closure_id return_impl_trait_id) Gen(span closure_id return_impl_trait_id) AsyncGen(span closure_id return_impl_trait_id)); spanless_eq_enum!(ExprKind; Array(0) ConstBlock(0) Call(0 1) MethodCall(0) - Tup(0) Binary(0 1 2) Unary(0 1) Lit(0) Cast(0 1) Type(0 1) Let(0 1 2 3) - If(0 1 2) While(0 1 2) ForLoop(pat iter body label kind) Loop(0 1 2) - Match(0 1 2) Closure(0) Block(0 1) Gen(0 1 2 3) Await(0 1) Use(0 1) - TryBlock(0 1) Assign(0 1 2) AssignOp(0 1 2) Field(0 1) Index(0 1 2) + Tup(0) Binary(0 1 2) Unary(0 1) Move(0 1) Lit(0) Cast(0 1) Type(0 1) + Let(0 1 2 3) If(0 1 2) While(0 1 2) ForLoop(pat iter body label kind) + Loop(0 1 2) Match(0 1 2) Closure(0) Block(0 1) Gen(0 1 2 3) Await(0 1) + Use(0 1) TryBlock(0 1) Assign(0 1 2) AssignOp(0 1 2) Field(0 1) Index(0 1 2) Underscore Range(0 1 2) Path(0 1) AddrOf(0 1 2) Break(0 1) Continue(0) Ret(0) InlineAsm(0) OffsetOf(0 1) MacCall(0) Struct(0) Repeat(0 1) Paren(0) Try(0) Yield(0) Yeet(0) Become(0) IncludedBytes(0) FormatArgs(0) @@ -677,7 +689,7 @@ spanless_eq_enum!(PatKind; Missing Wild Ident(0 1 2) Struct(0 1 2 3) spanless_eq_enum!(TyKind; Slice(0) Array(0 1) Ptr(0) Ref(0 1) PinnedRef(0 1) FnPtr(0) UnsafeBinder(0) Never Tup(0) Path(0 1) TraitObject(0 1) ImplTrait(0 1) Paren(0) Infer ImplicitSelf MacCall(0) CVarArgs Pat(0 1) - Dummy Err(0)); + FieldOf(0 1 2) Dummy Err(0)); impl SpanlessEq for Ident { fn eq(&self, other: &Self) -> bool { diff --git a/deps/crates/vendor/syn-v2/tests/debug/gen.rs b/deps/crates/vendor/syn-v2/tests/debug/gen.rs index c0d37b791d6b..b74d3a6d86f9 100644 --- a/deps/crates/vendor/syn-v2/tests/debug/gen.rs +++ b/deps/crates/vendor/syn-v2/tests/debug/gen.rs @@ -1,7 +1,6 @@ // This file is @generated by syn-internal-codegen. // It is not intended for manual editing. -#![allow(repr_transparent_non_zst_fields)] #![allow(clippy::match_wildcard_for_single_variants)] use super::{Lite, Present}; use core::fmt::{self, Debug, Display}; @@ -2955,12 +2954,12 @@ impl Debug for Lite { } impl Debug for Lite { fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - write!(formatter, "{}", & self.value) + write!(formatter, "{}", self.value) } } impl Debug for Lite { fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - write!(formatter, "{}", & self.value) + write!(formatter, "{}", self.value) } } impl Debug for Lite { diff --git a/deps/crates/vendor/syn-v2/tests/test_item.rs b/deps/crates/vendor/syn-v2/tests/test_item.rs index 2840f91af030..cb63ad4c69fd 100644 --- a/deps/crates/vendor/syn-v2/tests/test_item.rs +++ b/deps/crates/vendor/syn-v2/tests/test_item.rs @@ -1,4 +1,5 @@ #![recursion_limit = "256"] +#![feature(negative_impls)] #![allow( clippy::elidable_lifetime_names, clippy::needless_lifetimes, diff --git a/deps/crates/vendor/temporal_capi-v0_2/.cargo_vcs_info.json b/deps/crates/vendor/temporal_capi-v0_2/.cargo_vcs_info.json index 5bead886949c..e5fa93fbbbc8 100644 --- a/deps/crates/vendor/temporal_capi-v0_2/.cargo_vcs_info.json +++ b/deps/crates/vendor/temporal_capi-v0_2/.cargo_vcs_info.json @@ -1,6 +1,6 @@ { "git": { - "sha1": "c003cc92325e19b26f8ee2f85e4a47d98cbcc781" + "sha1": "a5cebbcce231552bf6ed985d7ea13b0c7b195f02" }, "path_in_vcs": "temporal_capi" } \ No newline at end of file diff --git a/deps/crates/vendor/temporal_capi-v0_2/Cargo.lock b/deps/crates/vendor/temporal_capi-v0_2/Cargo.lock index 12f2d3ade352..5df3626fcbe2 100644 --- a/deps/crates/vendor/temporal_capi-v0_2/Cargo.lock +++ b/deps/crates/vendor/temporal_capi-v0_2/Cargo.lock @@ -253,9 +253,9 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.225" +version = "1.0.228" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd6c24dee235d0da097043389623fb913daddf92c76e9f5a1db88607a0bcbd1d" +checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" dependencies = [ "serde_core", "serde_derive", @@ -263,18 +263,18 @@ dependencies = [ [[package]] name = "serde_core" -version = "1.0.225" +version = "1.0.228" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "659356f9a0cb1e529b24c01e43ad2bdf520ec4ceaf83047b83ddcc2251f96383" +checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.225" +version = "1.0.228" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ea936adf78b1f766949a4977b91d2f5595825bd6ec079aa9543ad2685fc4516" +checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" dependencies = [ "proc-macro2", "quote", @@ -304,9 +304,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.106" +version = "2.0.118" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ede7c438028d4436d71104916910f5bb611972c5cfd7f89b8300a8186e6fada6" +checksum = "1b9ae57f904213ebb649ce6895b8a66c66f0203b9319718f69a5612a065b1422" dependencies = [ "proc-macro2", "quote", @@ -326,7 +326,7 @@ dependencies = [ [[package]] name = "temporal_capi" -version = "0.2.3" +version = "0.2.4" dependencies = [ "diplomat", "diplomat-runtime", @@ -341,9 +341,9 @@ dependencies = [ [[package]] name = "temporal_rs" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a902a45282e5175186b21d355efc92564601efe6e2d92818dc9e333d50bd4de" +checksum = "b1afc06e45b0d63943c777d0233523fa2e23a12431a73c37b1c0366777b31717" dependencies = [ "calendrical_calculations", "core_maths", @@ -358,9 +358,9 @@ dependencies = [ [[package]] name = "timezone_provider" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c48f9b04628a2b813051e4dfe97c65281e49625eabd09ec343190e31e399a8c2" +checksum = "48738555f588bc05b58cb55206843cde9875bb1fde50101dd1a7c50ac6535cd5" dependencies = [ "combine", "jiff-tzdb", diff --git a/deps/crates/vendor/temporal_capi-v0_2/Cargo.toml b/deps/crates/vendor/temporal_capi-v0_2/Cargo.toml index 51450e447f05..a2a00a7eda47 100644 --- a/deps/crates/vendor/temporal_capi-v0_2/Cargo.toml +++ b/deps/crates/vendor/temporal_capi-v0_2/Cargo.toml @@ -13,7 +13,7 @@ edition = "2021" rust-version = "1.86.0" name = "temporal_capi" -version = "0.2.3" +version = "0.2.4" authors = ["boa-dev"] build = false include = [ diff --git a/deps/crates/vendor/temporal_rs-v0_2/.cargo_vcs_info.json b/deps/crates/vendor/temporal_rs-v0_2/.cargo_vcs_info.json index 083d95e45c04..1bba5740ef5f 100644 --- a/deps/crates/vendor/temporal_rs-v0_2/.cargo_vcs_info.json +++ b/deps/crates/vendor/temporal_rs-v0_2/.cargo_vcs_info.json @@ -1,6 +1,6 @@ { "git": { - "sha1": "c003cc92325e19b26f8ee2f85e4a47d98cbcc781", + "sha1": "a5cebbcce231552bf6ed985d7ea13b0c7b195f02", "dirty": true }, "path_in_vcs": "" diff --git a/deps/crates/vendor/temporal_rs-v0_2/CHANGELOG.md b/deps/crates/vendor/temporal_rs-v0_2/CHANGELOG.md index b14b555cb92a..59ff0b8a8571 100644 --- a/deps/crates/vendor/temporal_rs-v0_2/CHANGELOG.md +++ b/deps/crates/vendor/temporal_rs-v0_2/CHANGELOG.md @@ -2,6 +2,12 @@ All notable changes to this project will be documented in this file. +## What's Changed in v0.2.4 +* ZonedDateTime backward shift spec change by @Manishearth in [#725](https://github.com/boa-dev/temporal/pull/725) +* Fix ComputeNudgeWindow startEpochNs computation to check full startDateDuration sign by @Manishearth in [#723](https://github.com/boa-dev/temporal/pull/723) + +**Full Changelog**: https://github.com/boa-dev/temporal/compare/v0.2.3...v0.2.4 + ## What's Changed in v0.2.3 * Update zoneinfo64 and Diplomat by @Manishearth in [#713](https://github.com/boa-dev/temporal/pull/713) * Update icu_calendar to fix `with()` regression by @Manishearth in [#716](https://github.com/boa-dev/temporal/pull/716) diff --git a/deps/crates/vendor/temporal_rs-v0_2/Cargo.lock b/deps/crates/vendor/temporal_rs-v0_2/Cargo.lock index 8ca26406cff0..ec56807220d0 100644 --- a/deps/crates/vendor/temporal_rs-v0_2/Cargo.lock +++ b/deps/crates/vendor/temporal_rs-v0_2/Cargo.lock @@ -92,9 +92,9 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.64" +version = "0.1.65" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33e57f83510bb73707521ebaffa789ec8caf86f9657cad665b092b581d40e9fb" +checksum = "e31bc9ad994ba00e440a8aa5c9ef0ec67d5cb5e5cb0cc7f8b744a35b389cc470" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -244,9 +244,9 @@ checksum = "241eaef5fd12c88705a01fc1066c48c4b36e0dd4377dcdc7ec3942cea7a69956" [[package]] name = "log" -version = "0.4.28" +version = "0.4.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34080505efa8e45a4b816c349525ebe327ceaa8559756f0356cba97ef3bf7432" +checksum = "953f07c43838f8e6f9758cab68bf5bed85465e7587ebe0b823f1bcd81978ad3a" [[package]] name = "memchr" @@ -305,9 +305,9 @@ checksum = "8a0d197bd2c9dc6e53b84da9556a69ba4cdfab8619eb41a8bd1cc2027a0f6b1d" [[package]] name = "serde" -version = "1.0.225" +version = "1.0.228" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd6c24dee235d0da097043389623fb913daddf92c76e9f5a1db88607a0bcbd1d" +checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" dependencies = [ "serde_core", "serde_derive", @@ -315,18 +315,18 @@ dependencies = [ [[package]] name = "serde_core" -version = "1.0.225" +version = "1.0.228" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "659356f9a0cb1e529b24c01e43ad2bdf520ec4ceaf83047b83ddcc2251f96383" +checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.225" +version = "1.0.228" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ea936adf78b1f766949a4977b91d2f5595825bd6ec079aa9543ad2685fc4516" +checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" dependencies = [ "proc-macro2", "quote", @@ -347,9 +347,9 @@ checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" [[package]] name = "syn" -version = "2.0.106" +version = "2.0.118" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ede7c438028d4436d71104916910f5bb611972c5cfd7f89b8300a8186e6fada6" +checksum = "1b9ae57f904213ebb649ce6895b8a66c66f0203b9319718f69a5612a065b1422" dependencies = [ "proc-macro2", "quote", @@ -369,7 +369,7 @@ dependencies = [ [[package]] name = "temporal_rs" -version = "0.2.3" +version = "0.2.4" dependencies = [ "calendrical_calculations", "core_maths", @@ -387,9 +387,9 @@ dependencies = [ [[package]] name = "timezone_provider" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c48f9b04628a2b813051e4dfe97c65281e49625eabd09ec343190e31e399a8c2" +checksum = "48738555f588bc05b58cb55206843cde9875bb1fde50101dd1a7c50ac6535cd5" dependencies = [ "combine", "jiff-tzdb", diff --git a/deps/crates/vendor/temporal_rs-v0_2/Cargo.toml b/deps/crates/vendor/temporal_rs-v0_2/Cargo.toml index 0d1f26e61487..a7c358338e72 100644 --- a/deps/crates/vendor/temporal_rs-v0_2/Cargo.toml +++ b/deps/crates/vendor/temporal_rs-v0_2/Cargo.toml @@ -13,7 +13,7 @@ edition = "2021" rust-version = "1.86.0" name = "temporal_rs" -version = "0.2.3" +version = "0.2.4" authors = ["boa-dev"] build = false exclude = [ diff --git a/deps/crates/vendor/temporal_rs-v0_2/Cargo.toml.orig b/deps/crates/vendor/temporal_rs-v0_2/Cargo.toml.orig index 2bd1acb7cb99..f359d7c2cad6 100644 --- a/deps/crates/vendor/temporal_rs-v0_2/Cargo.toml.orig +++ b/deps/crates/vendor/temporal_rs-v0_2/Cargo.toml.orig @@ -11,7 +11,7 @@ members = [ [workspace.package] edition = "2021" -version = "0.2.3" +version = "0.2.4" rust-version = "1.86.0" authors = ["boa-dev"] license = "MIT OR Apache-2.0" diff --git a/deps/crates/vendor/temporal_rs-v0_2/src/builtins/core/duration/normalized.rs b/deps/crates/vendor/temporal_rs-v0_2/src/builtins/core/duration/normalized.rs index 60c366aec64d..9def7f7e0861 100644 --- a/deps/crates/vendor/temporal_rs-v0_2/src/builtins/core/duration/normalized.rs +++ b/deps/crates/vendor/temporal_rs-v0_2/src/builtins/core/duration/normalized.rs @@ -707,7 +707,7 @@ impl InternalDurationRecord { || (sign == NonZeroSign::Negative && r1 <= 0 && r1 > r2) ); - let start_epoch_ns = if r1 == 0 { + let start_epoch_ns = if start_duration.sign() == Sign::Zero { origin_epoch_ns } else { // 7. Let start be ? CalendarDateAdd(calendar, isoDateTime.[[ISODate]], startDuration, constrain). diff --git a/deps/crates/vendor/temporal_rs-v0_2/src/builtins/core/duration/tests.rs b/deps/crates/vendor/temporal_rs-v0_2/src/builtins/core/duration/tests.rs index 113d56802c2b..2c1f448c57a1 100644 --- a/deps/crates/vendor/temporal_rs-v0_2/src/builtins/core/duration/tests.rs +++ b/deps/crates/vendor/temporal_rs-v0_2/src/builtins/core/duration/tests.rs @@ -605,3 +605,41 @@ fn out_of_bounds_duration_no_crash() { assert!(duration.is_err()); } + +// https://github.com/tc39/test262/commit/a70493eb104948583a7928d50eac28b6c81114bf +// https://github.com/tc39/proposal-temporal/issues/3316 +#[test] +#[cfg(feature = "compiled_data")] +fn test_exact_multiple_of_larger_unit_plaindate() { + use crate::options::RoundingMode; + use crate::PlainDate; + + let relative_to = PlainDate::try_new_iso(2012, 1, 1).unwrap(); + + // Temporal.Duration(0, 0, 0, 31).round({ smallestUnit: "weeks", largestUnit: "months", roundingMode, relativeTo }) + // should be 0, 1, 0, 0, 0, 0, 0, 0, 0, 0 + let d1 = Duration::new(0, 0, 0, 31, 0, 0, 0, 0, 0, 0).unwrap(); + + for mode in [ + RoundingMode::Ceil, + RoundingMode::Floor, + RoundingMode::Expand, + RoundingMode::HalfCeil, + RoundingMode::HalfFloor, + RoundingMode::HalfEven, + RoundingMode::HalfExpand, + RoundingMode::HalfTrunc, + RoundingMode::Trunc, + ] { + let options = RoundingOptions { + smallest_unit: Some(Unit::Week), + largest_unit: Some(Unit::Month), + rounding_mode: Some(mode), + ..Default::default() + }; + let res = d1.round(options, Some(relative_to.clone().into())).unwrap(); + assert_eq!(res.months(), 1, "P31D weeks..months {mode:?}"); + assert_eq!(res.weeks(), 0, "P31D weeks..months {mode:?}"); + assert_eq!(res.days(), 0, "P31D weeks..months {mode:?}"); + } +} diff --git a/deps/crates/vendor/temporal_rs-v0_2/src/builtins/core/zoned_date_time.rs b/deps/crates/vendor/temporal_rs-v0_2/src/builtins/core/zoned_date_time.rs index ff4e32041822..a5b1199d9df0 100644 --- a/deps/crates/vendor/temporal_rs-v0_2/src/builtins/core/zoned_date_time.rs +++ b/deps/crates/vendor/temporal_rs-v0_2/src/builtins/core/zoned_date_time.rs @@ -1301,17 +1301,20 @@ impl ZonedDateTime { // c. Let startNs be ? GetStartOfDay(timeZone, dateStart). // d. Assert: thisNs ≥ startNs. // e. Let endNs be ? GetStartOfDay(timeZone, dateEnd). - // f. Assert: thisNs < endNs. + // f. [Struck out in spec] Assert: thisNs < endNs. let start = self.time_zone.get_start_of_day(&iso_start.date, provider)?; let end = self.time_zone.get_start_of_day(&iso_end, provider)?; - if !(this_ns.0 >= start.ns.0 && this_ns.0 < end.ns.0) { + if this_ns.0 < start.ns.0 { return Err(TemporalError::range().with_enum(ErrorMessage::ZDTOutOfDayBounds)); } - // g. Let dayLengthNs be ℝ(endNs - startNs). - // h. Let dayProgressNs be TimeDurationFromEpochNanosecondsDifference(thisNs, startNs). + // g. Set thisNs to min(thisNs, endNs - 1). + let this_ns_val = this_ns.0.min(end.ns.0 - 1); + // h. Let dayLengthNs be ℝ(endNs - startNs). + // i. Let dayProgressNs be TimeDurationFromEpochNanosecondsDifference(thisNs, startNs). let day_len_ns = TimeDuration::from_nanosecond_difference(end.ns.0, start.ns.0)?; - let day_progress_ns = TimeDuration::from_nanosecond_difference(this_ns.0, start.ns.0)?; - // i. Let roundedDayNs be ! RoundTimeDurationToIncrement(dayProgressNs, dayLengthNs, roundingMode). + let day_progress_ns = + TimeDuration::from_nanosecond_difference(this_ns_val, start.ns.0)?; + // j. Let roundedDayNs be ! RoundTimeDurationToIncrement(dayProgressNs, dayLengthNs, roundingMode). let rounded = if let Some(increment) = NonZeroU128::new(day_len_ns.0.unsigned_abs()) { IncrementRounder::::from_signed_num(day_progress_ns.0, increment)? .round(resolved.rounding_mode) @@ -1326,7 +1329,7 @@ impl ZonedDateTime { end.offset }; - // j. Let epochNanoseconds be AddTimeDurationToEpochNanoseconds(roundedDayNs, startNs). + // k. Let epochNanoseconds be AddTimeDurationToEpochNanoseconds(roundedDayNs, startNs). let candidate = start.ns.0 + rounded; Instant::try_new(candidate)?; // 20. Return ! CreateTemporalZonedDateTime(epochNanoseconds, timeZone, calendar). diff --git a/deps/crates/vendor/temporal_rs-v0_2/src/builtins/core/zoned_date_time/tests.rs b/deps/crates/vendor/temporal_rs-v0_2/src/builtins/core/zoned_date_time/tests.rs index e56df724b4ea..0efc5426122a 100644 --- a/deps/crates/vendor/temporal_rs-v0_2/src/builtins/core/zoned_date_time/tests.rs +++ b/deps/crates/vendor/temporal_rs-v0_2/src/builtins/core/zoned_date_time/tests.rs @@ -1278,3 +1278,104 @@ fn hours_in_day_dst_changes() { assert_eq!(spring.hours_in_day_with_provider(provider), Ok(23.0)); }) } + +// Case where midnight occurs twice (e.g., Antarctica/Casey on 2010-03-05). +// Upstream tests: https://github.com/tc39/test262/pull/5047 +#[test] +fn test_same_date_starts_twice() { + test_all_providers!(provider: { + let zdt1 = ZonedDateTime::from_utf8_with_provider( + b"2010-03-04T23:10:00+11:00[Antarctica/Casey]", + Disambiguation::Compatible, + OffsetDisambiguation::Use, + provider, + ); + if zdt1.is_err() { + std::println!("Antarctica/Casey not supported by provider, skipping test."); + return; + } + let zdt1 = zdt1.unwrap(); + + let zdt2 = ZonedDateTime::from_utf8_with_provider( + b"2010-03-05T00:45:00+11:00[Antarctica/Casey]", + Disambiguation::Compatible, + OffsetDisambiguation::Use, + provider, + ).unwrap(); + + let zdt3 = ZonedDateTime::from_utf8_with_provider( + b"2010-03-04T23:10:00+08:00[Antarctica/Casey]", + Disambiguation::Compatible, + OffsetDisambiguation::Use, + provider, + ).unwrap(); + + let zdt4 = ZonedDateTime::from_utf8_with_provider( + b"2010-03-05T00:45:00+08:00[Antarctica/Casey]", + Disambiguation::Compatible, + OffsetDisambiguation::Use, + provider, + ).unwrap(); + + let start_of_march4 = "2010-03-04T00:00:00+11:00[Antarctica/Casey]"; + let start_of_march5 = "2010-03-05T00:00:00+11:00[Antarctica/Casey]"; + let start_of_march6 = "2010-03-06T00:00:00+08:00[Antarctica/Casey]"; + + // Hours in day + assert_eq!(zdt1.hours_in_day_with_provider(provider).unwrap(), 24.0); + assert_eq!(zdt2.hours_in_day_with_provider(provider).unwrap(), 27.0); + assert_eq!(zdt3.hours_in_day_with_provider(provider).unwrap(), 24.0); + assert_eq!(zdt4.hours_in_day_with_provider(provider).unwrap(), 27.0); + + // Start of day + assert_eq!(zdt1.start_of_day_with_provider(provider).unwrap().to_string_with_provider(provider).unwrap(), start_of_march4); + assert_eq!(zdt2.start_of_day_with_provider(provider).unwrap().to_string_with_provider(provider).unwrap(), start_of_march5); + assert_eq!(zdt3.start_of_day_with_provider(provider).unwrap().to_string_with_provider(provider).unwrap(), start_of_march4); + assert_eq!(zdt4.start_of_day_with_provider(provider).unwrap().to_string_with_provider(provider).unwrap(), start_of_march5); + + // Rounding down + for rounding_mode in [RoundingMode::Floor, RoundingMode::Trunc] { + let options = RoundingOptions { + smallest_unit: Some(Unit::Day), + rounding_mode: Some(rounding_mode), + ..Default::default() + }; + assert_eq!(zdt1.round_with_provider(options, provider).unwrap().to_string_with_provider(provider).unwrap(), start_of_march4); + assert_eq!(zdt2.round_with_provider(options, provider).unwrap().to_string_with_provider(provider).unwrap(), start_of_march5); + assert_eq!(zdt3.round_with_provider(options, provider).unwrap().to_string_with_provider(provider).unwrap(), start_of_march4); + assert_eq!(zdt4.round_with_provider(options, provider).unwrap().to_string_with_provider(provider).unwrap(), start_of_march5); + } + + // Rounding to nearest + for rounding_mode in [ + RoundingMode::HalfCeil, + RoundingMode::HalfEven, + RoundingMode::HalfExpand, + RoundingMode::HalfFloor, + RoundingMode::HalfTrunc, + ] { + let options = RoundingOptions { + smallest_unit: Some(Unit::Day), + rounding_mode: Some(rounding_mode), + ..Default::default() + }; + assert_eq!(zdt1.round_with_provider(options, provider).unwrap().to_string_with_provider(provider).unwrap(), start_of_march5); + assert_eq!(zdt2.round_with_provider(options, provider).unwrap().to_string_with_provider(provider).unwrap(), start_of_march5); + assert_eq!(zdt3.round_with_provider(options, provider).unwrap().to_string_with_provider(provider).unwrap(), start_of_march5); + assert_eq!(zdt4.round_with_provider(options, provider).unwrap().to_string_with_provider(provider).unwrap(), start_of_march5); + } + + // Rounding up + for rounding_mode in [RoundingMode::Ceil, RoundingMode::Expand] { + let options = RoundingOptions { + smallest_unit: Some(Unit::Day), + rounding_mode: Some(rounding_mode), + ..Default::default() + }; + assert_eq!(zdt1.round_with_provider(options, provider).unwrap().to_string_with_provider(provider).unwrap(), start_of_march5); + assert_eq!(zdt2.round_with_provider(options, provider).unwrap().to_string_with_provider(provider).unwrap(), start_of_march6); + assert_eq!(zdt3.round_with_provider(options, provider).unwrap().to_string_with_provider(provider).unwrap(), start_of_march5); + assert_eq!(zdt4.round_with_provider(options, provider).unwrap().to_string_with_provider(provider).unwrap(), start_of_march6); + } + }) +} diff --git a/deps/crates/vendor/temporal_rs-v0_2/src/iso.rs b/deps/crates/vendor/temporal_rs-v0_2/src/iso.rs index 1771a7b34943..833f141c73cb 100644 --- a/deps/crates/vendor/temporal_rs-v0_2/src/iso.rs +++ b/deps/crates/vendor/temporal_rs-v0_2/src/iso.rs @@ -452,7 +452,7 @@ impl IsoDate { // c. Repeat, while ISODateSurpasses(sign, intermediate.[[Year]], intermediate.[[Month]], d1, y2, m2, d2) is false, // Safety: balance_iso_year_month should always return a month value from 1..=12 while !iso_date_surpasses( - &IsoDate::new_unchecked(intermediate.0, intermediate.1 as u8, self.day), + &IsoDate::new_unchecked(intermediate.0, intermediate.1, self.day), other, sign, ) { diff --git a/deps/crates/vendor/writeable-v0_6/.cargo_vcs_info.json b/deps/crates/vendor/writeable-v0_6/.cargo_vcs_info.json index e42a7e557215..4a3e3b8e887c 100644 --- a/deps/crates/vendor/writeable-v0_6/.cargo_vcs_info.json +++ b/deps/crates/vendor/writeable-v0_6/.cargo_vcs_info.json @@ -1,6 +1,6 @@ { "git": { - "sha1": "29dfe2790b6cfdab94ca6a6b69f58ce54802dbf7" + "sha1": "e8d5b7561cf6cc4bee35286f5d5e569100dfa79d" }, "path_in_vcs": "utils/writeable" } \ No newline at end of file diff --git a/deps/crates/vendor/writeable-v0_6/Cargo.lock b/deps/crates/vendor/writeable-v0_6/Cargo.lock index 90f63c6846e6..d8987e3c9341 100644 --- a/deps/crates/vendor/writeable-v0_6/Cargo.lock +++ b/deps/crates/vendor/writeable-v0_6/Cargo.lock @@ -4,9 +4,9 @@ version = 3 [[package]] name = "aho-corasick" -version = "1.1.3" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" +checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301" dependencies = [ "memchr", ] @@ -19,9 +19,9 @@ checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299" [[package]] name = "anstyle" -version = "1.0.13" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5192cca8006f1fd4f7237516f40fa183bb07f8fbdfedaa0036de5ea9b0b45e78" +checksum = "940b3a0ca603d1eade50a4846a2afffd5ef57a9feac2c0e2ec2e14f9ead76000" [[package]] name = "autocfg" @@ -31,9 +31,9 @@ checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" [[package]] name = "bumpalo" -version = "3.19.0" +version = "3.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43" +checksum = "5d20789868f4b01b2f2caec9f5c4e0213b41e3e5702a50157d699ae31ced2fcb" [[package]] name = "cast" @@ -222,15 +222,15 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.15" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" +checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682" [[package]] name = "js-sys" -version = "0.3.81" +version = "0.3.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec48937a97411dcb524a265206ccd4c90bb711fca92b2792c407f268825b9305" +checksum = "b49715b7073f385ba4bc528e5747d02e66cb39c6146efb66b781f131f0fb399c" dependencies = [ "once_cell", "wasm-bindgen", @@ -238,21 +238,15 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.177" +version = "0.2.183" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2874a2af47a2325c2001a6e6fad9b16a53b802102b528163885171cf92b15976" - -[[package]] -name = "log" -version = "0.4.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34080505efa8e45a4b816c349525ebe327ceaa8559756f0356cba97ef3bf7432" +checksum = "b5b646652bf6661599e1da8901b3b9522896f01e736bad5f723fe7a3a27f899d" [[package]] name = "memchr" -version = "2.7.6" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273" +checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79" [[package]] name = "num-traits" @@ -265,9 +259,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.21.3" +version = "1.21.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" +checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" [[package]] name = "oorandom" @@ -314,18 +308,18 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.103" +version = "1.0.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ee95bc4ef87b8d5ba32e8b7714ccc834865276eab0aed5c9958d00ec45f49e8" +checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.41" +version = "1.0.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce25767e7b499d1b604768e7cde645d14cc8584231ea6b295e9c9eb22c02e1d1" +checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924" dependencies = [ "proc-macro2", ] @@ -358,9 +352,9 @@ dependencies = [ [[package]] name = "rand_core" -version = "0.9.3" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38" +checksum = "76afc826de14238e6e8c374ddcc1fa19e374fd8dd986b0d2af0d02377261d83c" dependencies = [ "getrandom", ] @@ -387,9 +381,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.12.2" +version = "1.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "843bc0191f75f3e22651ae5f1e72939ab2f72a4bc30fa80a066bd66edefc24d4" +checksum = "e10754a14b9137dd7b1e3e5b0493cc9171fdd105e0ab477f51b72e7f3ac0e276" dependencies = [ "aho-corasick", "memchr", @@ -399,9 +393,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.13" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5276caf25ac86c8d810222b3dbb938e512c55c6831a10f3e6ed1c93b84041f1c" +checksum = "6e1dd4122fc1595e8162618945476892eefca7b88c52820e74af6262213cae8f" dependencies = [ "aho-corasick", "memchr", @@ -410,9 +404,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.8.8" +version = "0.8.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a2d987857b319362043e95f5353c0535c1f58eec5336fdfcf626430af7def58" +checksum = "dc897dd8d9e8bd1ed8cdad82b5966c3e0ecae09fb1907d58efaa013543185d0a" [[package]] name = "rustversion" @@ -420,12 +414,6 @@ version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" -[[package]] -name = "ryu" -version = "1.0.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" - [[package]] name = "same-file" version = "1.0.6" @@ -467,22 +455,22 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.145" +version = "1.0.149" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "402a6f66d8c709116cf22f558eab210f5a50187f702eb4d7e5ef38d9a7f1c79c" +checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86" dependencies = [ "itoa", "memchr", - "ryu", "serde", "serde_core", + "zmij", ] [[package]] name = "syn" -version = "2.0.108" +version = "2.0.117" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da58917d35242480a05c2897064da0a80589a2a0476c9a3f2fdc83b53502e917" +checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99" dependencies = [ "proc-macro2", "quote", @@ -501,9 +489,9 @@ dependencies = [ [[package]] name = "unicode-ident" -version = "1.0.20" +version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "462eeb75aeb73aea900253ce739c8e18a67423fadf006037cd3ff27e82748a06" +checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" [[package]] name = "walkdir" @@ -526,9 +514,9 @@ dependencies = [ [[package]] name = "wasm-bindgen" -version = "0.2.104" +version = "0.2.114" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1da10c01ae9f1ae40cbfac0bac3b1e724b320abfcf52229f80b547c0d250e2d" +checksum = "6532f9a5c1ece3798cb1c2cfdba640b9b3ba884f5db45973a6f442510a87d38e" dependencies = [ "cfg-if", "once_cell", @@ -537,25 +525,11 @@ dependencies = [ "wasm-bindgen-shared", ] -[[package]] -name = "wasm-bindgen-backend" -version = "0.2.104" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "671c9a5a66f49d8a47345ab942e2cb93c7d1d0339065d4f8139c486121b43b19" -dependencies = [ - "bumpalo", - "log", - "proc-macro2", - "quote", - "syn", - "wasm-bindgen-shared", -] - [[package]] name = "wasm-bindgen-macro" -version = "0.2.104" +version = "0.2.114" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ca60477e4c59f5f2986c50191cd972e3a50d8a95603bc9434501cf156a9a119" +checksum = "18a2d50fcf105fb33bb15f00e7a77b772945a2ee45dcf454961fd843e74c18e6" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -563,31 +537,31 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.104" +version = "0.2.114" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f07d2f20d4da7b26400c9f4a0511e6e0345b040694e8a75bd41d578fa4421d7" +checksum = "03ce4caeaac547cdf713d280eda22a730824dd11e6b8c3ca9e42247b25c631e3" dependencies = [ + "bumpalo", "proc-macro2", "quote", "syn", - "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.104" +version = "0.2.114" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bad67dc8b2a1a6e5448428adec4c3e84c43e561d8c9ee8a9e5aabeb193ec41d1" +checksum = "75a326b8c223ee17883a4251907455a2431acc2791c98c26279376490c378c16" dependencies = [ "unicode-ident", ] [[package]] name = "web-sys" -version = "0.3.81" +version = "0.3.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9367c417a924a74cae129e6a2ae3b47fabb1f8995595ab474029da749a8be120" +checksum = "854ba17bb104abfb26ba36da9729addc7ce7f06f5c0f90f3c391f8461cca21f9" dependencies = [ "js-sys", "wasm-bindgen", @@ -625,7 +599,7 @@ checksum = "f17a85883d4e6d00e8a97c586de764dabcc06133f7f1d55dce5cdc070ad7fe59" [[package]] name = "writeable" -version = "0.6.2" +version = "0.6.3" dependencies = [ "criterion", "either", @@ -634,20 +608,26 @@ dependencies = [ [[package]] name = "zerocopy" -version = "0.8.27" +version = "0.8.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0894878a5fa3edfd6da3f88c4805f4c8558e2b996227a3d864f47fe11e38282c" +checksum = "efbb2a062be311f2ba113ce66f697a4dc589f85e78a4aea276200804cea0ed87" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.8.27" +version = "0.8.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88d2b8d9c68ad2b9e4340d7832716a4d21a22a1154777ad56ea55c51a9cf3831" +checksum = "0e8bc7269b54418e7aeeef514aa68f8690b8c0489a06b0136e5f57c4c5ccab89" dependencies = [ "proc-macro2", "quote", "syn", ] + +[[package]] +name = "zmij" +version = "1.0.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa" diff --git a/deps/crates/vendor/writeable-v0_6/Cargo.toml b/deps/crates/vendor/writeable-v0_6/Cargo.toml index 5b7ad9faae4d..b829b63e0ff5 100644 --- a/deps/crates/vendor/writeable-v0_6/Cargo.toml +++ b/deps/crates/vendor/writeable-v0_6/Cargo.toml @@ -13,7 +13,7 @@ edition = "2021" rust-version = "1.82" name = "writeable" -version = "0.6.2" +version = "0.6.3" authors = ["The ICU4X Project Developers"] build = false include = [ @@ -34,6 +34,12 @@ autotests = false autobenches = false description = "A more efficient alternative to fmt::Display" readme = "README.md" +keywords = [ + "formatting", + "write", + "string", + "no-std", +] license = "Unicode-3.0" repository = "https://github.com/unicode-org/icu4x" @@ -77,3 +83,52 @@ features = ["small_rng"] [target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies.criterion] version = "0.5.0" + +[lints.clippy] +alloc-instead-of-core = "warn" +branches-sharing-code = "warn" +collection_is_never_read = "warn" +crosspointer_transmute = "warn" +dbg_macro = "warn" +debug_assert_with_mut_call = "warn" +doc_markdown = "warn" +exhaustive_enums = "deny" +exhaustive_structs = "deny" +fn_to_numeric_cast_any = "warn" +infinite_loop = "warn" +large_stack_arrays = "warn" +mismatching_type_param_order = "warn" +missing_fields_in_debug = "warn" +missing_transmute_annotations = "warn" +negative_feature_names = "warn" +or-fun-call = "warn" +same_functions_in_if_condition = "warn" +todo = "warn" +transmute_bytes_to_str = "warn" +transmute_int_to_bool = "warn" +transmute_int_to_non_zero = "warn" +transmute_ptr_to_ptr = "warn" +transmute_ptr_to_ref = "warn" +transmute_undefined_repr = "warn" +transmutes_expressible_as_ptr_casts = "warn" +trivially_copy_pass_by_ref = "deny" +unnecessary-wraps = "warn" +useless_transmute = "warn" +wildcard_dependencies = "warn" + +[lints.rust] +missing_debug_implementations = "deny" +trivial_numeric_casts = "deny" +unused_lifetimes = "warn" +unused_macro_rules = "warn" +unused_qualifications = "warn" + +[lints.rust.unexpected_cfgs] +level = "warn" +priority = 0 +check-cfg = [ + "cfg(icu4c_enable_renaming)", + "cfg(needs_alloc_error_handler)", + "cfg(icu4x_run_size_tests)", + "cfg(icu4x_unstable_fast_trie_only)", +] diff --git a/deps/crates/vendor/writeable-v0_6/Cargo.toml.orig b/deps/crates/vendor/writeable-v0_6/Cargo.toml.orig index ae98f79b88fd..c03b12f3d41a 100644 --- a/deps/crates/vendor/writeable-v0_6/Cargo.toml.orig +++ b/deps/crates/vendor/writeable-v0_6/Cargo.toml.orig @@ -5,7 +5,8 @@ [package] name = "writeable" description = "A more efficient alternative to fmt::Display" -version = "0.6.2" +version = "0.6.3" +keywords = ["formatting", "write", "string", "no-std"] authors.workspace = true edition.workspace = true @@ -14,6 +15,7 @@ license.workspace = true repository.workspace = true rust-version = "1.82" + [package.metadata.workspaces] independent = true @@ -41,3 +43,6 @@ bench = false # This option is required for Benchmark CI [[bench]] name = "writeable" harness = false + +[lints] +workspace = true diff --git a/deps/crates/vendor/writeable-v0_6/benches/writeable.rs b/deps/crates/vendor/writeable-v0_6/benches/writeable.rs index 07b731762f99..de79aa00c599 100644 --- a/deps/crates/vendor/writeable-v0_6/benches/writeable.rs +++ b/deps/crates/vendor/writeable-v0_6/benches/writeable.rs @@ -204,21 +204,21 @@ fn writeable_dyn_benches(c: &mut Criterion) { fn display_benches(c: &mut Criterion) { c.bench_function("display/to_string/short", |b| { b.iter(|| { - std::string::ToString::to_string(&DisplayMessage { + ToString::to_string(&DisplayMessage { message: black_box(SHORT_STR), }) }); }); c.bench_function("display/to_string/medium", |b| { b.iter(|| { - std::string::ToString::to_string(&DisplayMessage { + ToString::to_string(&DisplayMessage { message: black_box(MEDIUM_STR), }) }); }); c.bench_function("display/to_string/long", |b| { b.iter(|| { - std::string::ToString::to_string(&DisplayMessage { + ToString::to_string(&DisplayMessage { message: black_box(LONG_STR), }) }); @@ -280,7 +280,7 @@ fn complex_benches(c: &mut Criterion) { }); }); c.bench_function("complex/display_to_string/medium", |b| { - b.iter(|| std::string::ToString::to_string(&black_box(COMPLEX_WRITEABLE_MEDIUM))); + b.iter(|| ToString::to_string(&black_box(COMPLEX_WRITEABLE_MEDIUM))); }); const REFERENCE_STRS: [&str; 6] = [ "There are 55 apples and 8124 oranges", diff --git a/deps/crates/vendor/writeable-v0_6/examples/writeable_message.rs b/deps/crates/vendor/writeable-v0_6/examples/writeable_message.rs index ca7c773d7ee5..ff6cc0e86f34 100644 --- a/deps/crates/vendor/writeable-v0_6/examples/writeable_message.rs +++ b/deps/crates/vendor/writeable-v0_6/examples/writeable_message.rs @@ -47,8 +47,7 @@ impl fmt::Display for WriteableMessage { } fn main() { - let (string, parts) = - writeable::_internal::writeable_to_parts_for_test(&WriteableMessage("world")); + let (string, parts) = _internal::writeable_to_parts_for_test(&WriteableMessage("world")); assert_eq!(string, "Hello world 😅"); diff --git a/deps/crates/vendor/writeable-v0_6/src/cmp.rs b/deps/crates/vendor/writeable-v0_6/src/cmp.rs index 5f0050e2684e..1f8814b164eb 100644 --- a/deps/crates/vendor/writeable-v0_6/src/cmp.rs +++ b/deps/crates/vendor/writeable-v0_6/src/cmp.rs @@ -97,6 +97,26 @@ pub fn cmp_utf8(writeable: &impl Writeable, other: &[u8]) -> Ordering { /// assert_eq!(Ordering::Less, writeable::cmp_str(&message, "Hello, Bob!")); /// assert_eq!(Ordering::Less, (*message_str).cmp("Hello, Bob!")); /// ``` +/// +/// This function can be combined with `writeable::concat_writeable!` to make an efficient +/// comparison between a string and a sequence of substrings: +/// +/// ``` +/// use core::cmp::Ordering; +/// +/// assert_eq!( +/// Ordering::Less, +/// writeable::cmp_str(&writeable::concat_writeable!("loop", 1), "loop12") +/// ); +/// assert_eq!( +/// Ordering::Equal, +/// writeable::cmp_str(&writeable::concat_writeable!("loop", 12), "loop12") +/// ); +/// assert_eq!( +/// Ordering::Greater, +/// writeable::cmp_str(&writeable::concat_writeable!("loop", 2), "loop12") +/// ); +/// ``` #[inline] pub fn cmp_str(writeable: &impl Writeable, other: &str) -> Ordering { cmp_utf8(writeable, other.as_bytes()) diff --git a/deps/crates/vendor/writeable-v0_6/src/concat.rs b/deps/crates/vendor/writeable-v0_6/src/concat.rs new file mode 100644 index 000000000000..703199688bc5 --- /dev/null +++ b/deps/crates/vendor/writeable-v0_6/src/concat.rs @@ -0,0 +1,146 @@ +// This file is part of ICU4X. For terms of use, please see the file +// called LICENSE at the top level of the ICU4X source tree +// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ). + +use crate::TryWriteable; +use crate::Writeable; +use core::fmt; + +/// A [`Writeable`] that efficiently concatenates two other [`Writeable`]s. +/// +/// See the [`concat_writeable!`] macro for a convenient way to make one of these. +/// +/// # Examples +/// +/// ``` +/// use writeable::adapters::Concat; +/// use writeable::assert_writeable_eq; +/// +/// assert_writeable_eq!(Concat("Number: ", 25), "Number: 25"); +/// ``` +/// +/// With [`TryWriteable`]: +/// +/// ``` +/// use writeable::adapters::Concat; +/// use writeable::assert_try_writeable_eq; +/// use writeable::TryWriteable; +/// +/// struct AlwaysPanic; +/// +/// impl TryWriteable for AlwaysPanic { +/// type Error = &'static str; +/// fn try_write_to_parts( +/// &self, +/// _sink: &mut W, +/// ) -> Result, core::fmt::Error> { +/// // Unreachable panic: the first Writeable errors, +/// // so the second Writeable is not evaluated. +/// panic!("this is a test to demonstrate unreachable code") +/// } +/// } +/// +/// let writeable0: Result<&str, &str> = Err("error message"); +/// let writeable1 = AlwaysPanic; +/// +/// assert_try_writeable_eq!( +/// Concat(writeable0, writeable1), +/// "error message", +/// Err("error message"), +/// ) +/// ``` +#[derive(Debug)] +#[allow(clippy::exhaustive_structs)] // designed for nesting +pub struct Concat(pub A, pub B); + +impl Writeable for Concat +where + A: Writeable, + B: Writeable, +{ + #[inline] + fn write_to(&self, sink: &mut W) -> fmt::Result { + self.0.write_to(sink)?; + self.1.write_to(sink) + } + #[inline] + fn write_to_parts(&self, sink: &mut S) -> fmt::Result { + self.0.write_to_parts(sink)?; + self.1.write_to_parts(sink) + } + #[inline] + fn writeable_length_hint(&self) -> crate::LengthHint { + self.0.writeable_length_hint() + self.1.writeable_length_hint() + } +} + +impl TryWriteable for Concat +where + A: TryWriteable, + B: TryWriteable, +{ + type Error = E; + #[inline] + fn try_write_to( + &self, + sink: &mut W, + ) -> Result, fmt::Error> { + if let Err(e) = self.0.try_write_to(sink)? { + return Ok(Err(e)); + } + self.1.try_write_to(sink) + } + #[inline] + fn try_write_to_parts( + &self, + sink: &mut S, + ) -> Result, fmt::Error> { + if let Err(e) = self.0.try_write_to_parts(sink)? { + return Ok(Err(e)); + } + self.1.try_write_to_parts(sink) + } + #[inline] + fn writeable_length_hint(&self) -> crate::LengthHint { + self.0.writeable_length_hint() + self.1.writeable_length_hint() + } +} + +impl fmt::Display for Concat +where + A: Writeable, + B: Writeable, +{ + #[inline] + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + self.0.write_to(f)?; + self.1.write_to(f) + } +} + +/// Returns a [`Writeable`] concatenating any number of [`Writeable`]s. +/// +/// The macro resolves to a nested [`Concat`]. +/// +/// # Examples +/// +/// ``` +/// use writeable::assert_writeable_eq; +/// +/// let concatenated = writeable::concat_writeable!("Health: ", 5, '/', 8); +/// +/// assert_writeable_eq!(concatenated, "Health: 5/8"); +/// ``` +#[macro_export] +#[doc(hidden)] // macro +macro_rules! __concat_writeable { + // Base case: + ($x:expr) => ($x); + // `$x` followed by at least one `$y,` + ($x:expr, $($y:expr),+) => ( + // Call `concat_writeable!` recursively on the tail `$y` + $crate::adapters::Concat($x, $crate::concat_writeable!($($y),+)) + ) +} +#[doc(inline)] +pub use __concat_writeable as concat_writeable; diff --git a/deps/crates/vendor/writeable-v0_6/src/impls.rs b/deps/crates/vendor/writeable-v0_6/src/impls.rs index 4e648375fe95..0f1c038b8b01 100644 --- a/deps/crates/vendor/writeable-v0_6/src/impls.rs +++ b/deps/crates/vendor/writeable-v0_6/src/impls.rs @@ -15,6 +15,7 @@ macro_rules! impl_write_num { let mut n = *self; let mut i = MAX_LEN; #[expect(clippy::indexing_slicing)] // n < 10^i + #[allow(trivial_numeric_casts)] while n != 0 { i -= 1; buf[i] = b'0' + (n % 10) as u8; @@ -49,6 +50,7 @@ macro_rules! impl_write_num { } #[test] + #[allow(trivial_numeric_casts)] fn $test() { use $crate::assert_writeable_eq; assert_writeable_eq!(&(0 as $u), "0"); @@ -179,7 +181,8 @@ impl Writeable for &T { #[cfg(feature = "alloc")] macro_rules! impl_write_smart_pointer { ($ty:path, T: $extra_bound:path) => { - impl<'a, T: ?Sized + Writeable + $extra_bound> Writeable for $ty { + #[allow(unused_qualifications)] + impl Writeable for $ty { #[inline] fn write_to(&self, sink: &mut W) -> fmt::Result { core::borrow::Borrow::::borrow(self).write_to(sink) @@ -209,7 +212,7 @@ macro_rules! impl_write_smart_pointer { } #[cfg(feature = "alloc")] -impl_write_smart_pointer!(Cow<'a, T>, T: alloc::borrow::ToOwned); +impl_write_smart_pointer!(Cow<'_, T>, T: alloc::borrow::ToOwned); #[cfg(feature = "alloc")] impl_write_smart_pointer!(alloc::boxed::Box); #[cfg(feature = "alloc")] @@ -241,7 +244,7 @@ fn test_string_impls() { assert_writeable_eq!(&chars[i], s); for j in 0..chars.len() { assert_eq!( - crate::cmp_str(&chars[j], &s), + cmp_str(&chars[j], &s), chars[j].cmp(&chars[i]), "{:?} vs {:?}", chars[j], diff --git a/deps/crates/vendor/writeable-v0_6/src/lib.rs b/deps/crates/vendor/writeable-v0_6/src/lib.rs index e0ba054292ae..c5fd523f75d2 100644 --- a/deps/crates/vendor/writeable-v0_6/src/lib.rs +++ b/deps/crates/vendor/writeable-v0_6/src/lib.rs @@ -11,12 +11,9 @@ clippy::unwrap_used, clippy::expect_used, clippy::panic, - clippy::exhaustive_structs, - clippy::exhaustive_enums, - clippy::trivially_copy_pass_by_ref, - missing_debug_implementations, ) )] +#![warn(missing_docs)] //! This crate defines [`Writeable`], a trait representing an object that can be written to a //! sink implementing `std::fmt::Write`. It is an alternative to `std::fmt::Display` with the @@ -80,6 +77,7 @@ extern crate alloc; mod cmp; +mod concat; #[cfg(feature = "either")] mod either; mod impls; @@ -99,6 +97,7 @@ use alloc::string::String; use core::fmt; pub use cmp::{cmp_str, cmp_utf8}; +pub use concat::concat_writeable; #[cfg(feature = "alloc")] pub use to_string_or_borrow::to_string_or_borrow; pub use try_writeable::TryWriteable; @@ -107,11 +106,14 @@ pub use try_writeable::TryWriteable; pub mod adapters { use super::*; + pub use concat::Concat; pub use parts_write_adapter::CoreWriteAsPartsWrite; pub use parts_write_adapter::WithPart; pub use try_writeable::TryWriteableInfallibleAsWriteable; pub use try_writeable::WriteableAsTryWriteableInfallible; + /// A lossy wrapper for a [`TryWriteable`] that implements [`Writeable`] + /// and ignores any errors. #[derive(Debug)] #[allow(clippy::exhaustive_structs)] // newtype pub struct LossyWrap(pub T); @@ -160,6 +162,7 @@ pub mod _internal { pub struct LengthHint(pub usize, pub Option); impl LengthHint { + /// Unknown pub fn undefined() -> Self { Self(0, None) } @@ -233,6 +236,7 @@ impl LengthHint { /// formatters should expose the `Part`s they produces as constants. #[derive(Clone, Copy, Debug, PartialEq)] #[allow(clippy::exhaustive_structs)] // stable +#[allow(missing_docs)] // behavior not defined, explained in type docs pub struct Part { pub category: &'static str, pub value: &'static str, @@ -250,6 +254,7 @@ impl Part { /// A sink that supports annotating parts of the string with [`Part`]s. pub trait PartsWrite: fmt::Write { + /// The recursive sink type SubPartsWrite: PartsWrite + ?Sized; /// Annotates all strings written by the closure with the given [`Part`]. @@ -371,7 +376,7 @@ pub trait Writeable { #[macro_export] macro_rules! impl_display_with_writeable { (@display, $type:ty) => { - /// This trait is implemented for compatibility with [`fmt!`](alloc::fmt). + /// This trait is implemented for compatibility with [`fmt!`](core::fmt). /// To create a string, [`Writeable::write_to_string`] is usually more efficient. impl core::fmt::Display for $type { #[inline] diff --git a/deps/crates/vendor/writeable-v0_6/src/parts_write_adapter.rs b/deps/crates/vendor/writeable-v0_6/src/parts_write_adapter.rs index 4b6d37e3e581..1c589934f131 100644 --- a/deps/crates/vendor/writeable-v0_6/src/parts_write_adapter.rs +++ b/deps/crates/vendor/writeable-v0_6/src/parts_write_adapter.rs @@ -81,7 +81,9 @@ impl PartsWrite for CoreWriteAsPartsWrite { #[derive(Debug)] #[allow(clippy::exhaustive_structs)] // public adapter pub struct WithPart { + /// The [`Part`] pub part: Part, + /// The value pub writeable: T, } diff --git a/deps/crates/vendor/writeable-v0_6/src/testing.rs b/deps/crates/vendor/writeable-v0_6/src/testing.rs index 2e48860516f4..958c10e29518 100644 --- a/deps/crates/vendor/writeable-v0_6/src/testing.rs +++ b/deps/crates/vendor/writeable-v0_6/src/testing.rs @@ -46,6 +46,7 @@ impl PartsWrite for TestWriter { } } +#[doc(hidden)] pub fn writeable_to_parts_for_test( writeable: &W, ) -> (String, Vec<(usize, usize, Part)>) { @@ -61,6 +62,7 @@ pub fn writeable_to_parts_for_test( } #[expect(clippy::type_complexity)] +#[doc(hidden)] pub fn try_writeable_to_parts_for_test( writeable: &W, ) -> (String, Vec<(usize, usize, Part)>, Option) { diff --git a/deps/crates/vendor/writeable-v0_6/src/try_writeable.rs b/deps/crates/vendor/writeable-v0_6/src/try_writeable.rs index c90dca901b5b..fd8c0477f4ea 100644 --- a/deps/crates/vendor/writeable-v0_6/src/try_writeable.rs +++ b/deps/crates/vendor/writeable-v0_6/src/try_writeable.rs @@ -93,6 +93,7 @@ use core::convert::Infallible; /// ); /// ``` pub trait TryWriteable { + /// The error type type Error; /// Writes the content of this writeable to a sink. diff --git a/deps/crates/vendor/yoke-v0_8/.cargo_vcs_info.json b/deps/crates/vendor/yoke-v0_8/.cargo_vcs_info.json index 37b40d0ae1d7..337747e19e55 100644 --- a/deps/crates/vendor/yoke-v0_8/.cargo_vcs_info.json +++ b/deps/crates/vendor/yoke-v0_8/.cargo_vcs_info.json @@ -1,6 +1,6 @@ { "git": { - "sha1": "c9fac4e625ccb2c6a7aa35079fff9709db4385ac" + "sha1": "a954ec29392c0225453404cb1f6a77f0ded27089" }, "path_in_vcs": "utils/yoke" } \ No newline at end of file diff --git a/deps/crates/vendor/yoke-v0_8/Cargo.lock b/deps/crates/vendor/yoke-v0_8/Cargo.lock index 71945cbe3050..f68d17e841a7 100644 --- a/deps/crates/vendor/yoke-v0_8/Cargo.lock +++ b/deps/crates/vendor/yoke-v0_8/Cargo.lock @@ -134,7 +134,7 @@ checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" [[package]] name = "yoke" -version = "0.8.2" +version = "0.8.3" dependencies = [ "bincode", "postcard", @@ -158,9 +158,9 @@ dependencies = [ [[package]] name = "zerofrom" -version = "0.1.7" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69faa1f2a1ea75661980b013019ed6687ed0e83d069bc1114e2cc74c6c04c4df" +checksum = "0ec05a11813ea801ff6d75110ad09cd0824ddba17dfe17128ea0d5f68e6c5272" dependencies = [ "zerofrom-derive", ] diff --git a/deps/crates/vendor/yoke-v0_8/Cargo.toml b/deps/crates/vendor/yoke-v0_8/Cargo.toml index adb5fb2b43a7..eeafbf1378e0 100644 --- a/deps/crates/vendor/yoke-v0_8/Cargo.toml +++ b/deps/crates/vendor/yoke-v0_8/Cargo.toml @@ -13,7 +13,7 @@ edition = "2021" rust-version = "1.82" name = "yoke" -version = "0.8.2" +version = "0.8.3" authors = ["Manish Goregaokar "] build = false include = [ @@ -113,6 +113,7 @@ default-features = false [lints.clippy] alloc-instead-of-core = "warn" +bool-assert-comparison = "allow" branches-sharing-code = "warn" collection_is_never_read = "warn" crosspointer_transmute = "warn" diff --git a/deps/crates/vendor/yoke-v0_8/Cargo.toml.orig b/deps/crates/vendor/yoke-v0_8/Cargo.toml.orig index 8a3e28eb953d..bc644c8c39a1 100644 --- a/deps/crates/vendor/yoke-v0_8/Cargo.toml.orig +++ b/deps/crates/vendor/yoke-v0_8/Cargo.toml.orig @@ -5,12 +5,12 @@ [package] name = "yoke" description = "Abstraction allowing borrowed data to be carried along with the backing data it borrows from" -version = "0.8.2" +version = "0.8.3" authors = ["Manish Goregaokar "] categories = ["data-structures", "memory-management", "caching", "no-std"] keywords = ["zero-copy", "serialization", "memory-efficiency", "self-referential"] -edition.workspace = true +edition = "2021" include.workspace = true license.workspace = true repository.workspace = true diff --git a/deps/crates/vendor/yoke-v0_8/src/cartable_ptr.rs b/deps/crates/vendor/yoke-v0_8/src/cartable_ptr.rs index 59bb0b16565e..f220329ed422 100644 --- a/deps/crates/vendor/yoke-v0_8/src/cartable_ptr.rs +++ b/deps/crates/vendor/yoke-v0_8/src/cartable_ptr.rs @@ -370,10 +370,10 @@ unsafe impl CloneableCart for CartableOptionPointer where } // Safety: logically an Option. Has same bounds as Option -unsafe impl Send for CartableOptionPointer where C: Sync + CartablePointerLike {} +unsafe impl Send for CartableOptionPointer where C: Send + CartablePointerLike {} // Safety: logically an Option. Has same bounds as Option -unsafe impl Sync for CartableOptionPointer where C: Send + CartablePointerLike {} +unsafe impl Sync for CartableOptionPointer where C: Sync + CartablePointerLike {} #[cfg(test)] mod tests { @@ -441,4 +441,33 @@ mod tests { } assert_eq!(start + 1, DROP_INVOCATIONS.with(Cell::get)); } + + // Miri test for CartableOptionPointer Send/Sync soundness. + // + // Verifies that a CartableOptionPointer wrapping a Send + !Sync cart can be + // safely sent to another thread and dropped, which compiles under the corrected + // bounds but would fail under the old (backwards) bounds. + #[test] + fn test_send_drops_on_another_thread() { + use std::marker::PhantomData; + + // ThreadDrop is Send but !Sync + struct ThreadDrop { + _not_sync: PhantomData>, + } + + let yoke = Yoke::>::attach_to_cart( + Box::new(ThreadDrop { + _not_sync: PhantomData, + }), + |_| 0, + ) + .wrap_cart_in_option() + .convert_cart_into_option_pointer(); + + // This requires CartableOptionPointer to be Send. + // It is Send because Box is Send. + // It would NOT be Send under the old bounds because Box is !Sync. + std::thread::spawn(move || drop(yoke)).join().unwrap(); + } } diff --git a/deps/crates/vendor/zerofrom-derive-v0_1/.cargo_vcs_info.json b/deps/crates/vendor/zerofrom-derive-v0_1/.cargo_vcs_info.json index 322ac502043a..58f5a56738dd 100644 --- a/deps/crates/vendor/zerofrom-derive-v0_1/.cargo_vcs_info.json +++ b/deps/crates/vendor/zerofrom-derive-v0_1/.cargo_vcs_info.json @@ -1,6 +1,6 @@ { "git": { - "sha1": "f4290a877dfcb0f87cad6de4abdd65f0cbb33c9c" + "sha1": "c9fac4e625ccb2c6a7aa35079fff9709db4385ac" }, "path_in_vcs": "utils/zerofrom/derive" } \ No newline at end of file diff --git a/deps/crates/vendor/zerofrom-derive-v0_1/Cargo.lock b/deps/crates/vendor/zerofrom-derive-v0_1/Cargo.lock index f36a10c6ed0b..c784667bac7e 100644 --- a/deps/crates/vendor/zerofrom-derive-v0_1/Cargo.lock +++ b/deps/crates/vendor/zerofrom-derive-v0_1/Cargo.lock @@ -4,27 +4,27 @@ version = 3 [[package]] name = "proc-macro2" -version = "1.0.93" +version = "1.0.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60946a68e5f9d28b0dc1c21bb8a97ee7d018a8b322fa57838ba31cc878e22d99" +checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.38" +version = "1.0.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e4dccaaaf89514f546c693ddc140f729f958c247918a13380cccc6078391acc" +checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924" dependencies = [ "proc-macro2", ] [[package]] name = "syn" -version = "2.0.98" +version = "2.0.117" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36147f1a48ae0ec2b5b3bc5b537d267457555a10dc06f3dbc8cb11ba3006d3b1" +checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99" dependencies = [ "proc-macro2", "quote", @@ -33,9 +33,9 @@ dependencies = [ [[package]] name = "synstructure" -version = "0.13.1" +version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" +checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" dependencies = [ "proc-macro2", "quote", @@ -44,13 +44,13 @@ dependencies = [ [[package]] name = "unicode-ident" -version = "1.0.17" +version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00e2473a93778eb0bad35909dff6a10d28e63f792f16ed15e404fca9d5eeedbe" +checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" [[package]] name = "zerofrom-derive" -version = "0.1.6" +version = "0.1.7" dependencies = [ "proc-macro2", "quote", diff --git a/deps/crates/vendor/zerofrom-derive-v0_1/Cargo.toml b/deps/crates/vendor/zerofrom-derive-v0_1/Cargo.toml index 3bf262afdf21..d550ded8c1cd 100644 --- a/deps/crates/vendor/zerofrom-derive-v0_1/Cargo.toml +++ b/deps/crates/vendor/zerofrom-derive-v0_1/Cargo.toml @@ -11,8 +11,9 @@ [package] edition = "2021" +rust-version = "1.71.1" name = "zerofrom-derive" -version = "0.1.6" +version = "0.1.7" authors = ["Manish Goregaokar "] build = false autolib = false @@ -23,10 +24,10 @@ autobenches = false description = "Custom derive for the zerofrom crate" readme = "README.md" keywords = [ - "zerocopy", + "macros", + "derive", + "zero-copy", "serialization", - "lifetime", - "borrow", ] categories = [ "data-structures", @@ -53,7 +54,7 @@ path = "examples/zf_derive.rs" version = "1.0.61" [dependencies.quote] -version = "1.0.28" +version = "1.0.44" [dependencies.syn] version = "2.0.21" @@ -63,3 +64,52 @@ features = ["fold"] version = "0.13.0" [dev-dependencies] + +[lints.clippy] +alloc-instead-of-core = "warn" +branches-sharing-code = "warn" +collection_is_never_read = "warn" +crosspointer_transmute = "warn" +dbg_macro = "warn" +debug_assert_with_mut_call = "warn" +doc_markdown = "warn" +exhaustive_enums = "deny" +exhaustive_structs = "deny" +fn_to_numeric_cast_any = "warn" +infinite_loop = "warn" +large_stack_arrays = "warn" +mismatching_type_param_order = "warn" +missing_fields_in_debug = "warn" +missing_transmute_annotations = "warn" +negative_feature_names = "warn" +or-fun-call = "warn" +same_functions_in_if_condition = "warn" +todo = "warn" +transmute_bytes_to_str = "warn" +transmute_int_to_bool = "warn" +transmute_int_to_non_zero = "warn" +transmute_ptr_to_ptr = "warn" +transmute_ptr_to_ref = "warn" +transmute_undefined_repr = "warn" +transmutes_expressible_as_ptr_casts = "warn" +trivially_copy_pass_by_ref = "deny" +unnecessary-wraps = "warn" +useless_transmute = "warn" +wildcard_dependencies = "warn" + +[lints.rust] +missing_debug_implementations = "deny" +trivial_numeric_casts = "deny" +unused_lifetimes = "warn" +unused_macro_rules = "warn" +unused_qualifications = "warn" + +[lints.rust.unexpected_cfgs] +level = "warn" +priority = 0 +check-cfg = [ + "cfg(icu4c_enable_renaming)", + "cfg(needs_alloc_error_handler)", + "cfg(icu4x_run_size_tests)", + "cfg(icu4x_unstable_fast_trie_only)", +] diff --git a/deps/crates/vendor/zerofrom-derive-v0_1/Cargo.toml.orig b/deps/crates/vendor/zerofrom-derive-v0_1/Cargo.toml.orig index ba5aadf1ae42..fa89857ff060 100644 --- a/deps/crates/vendor/zerofrom-derive-v0_1/Cargo.toml.orig +++ b/deps/crates/vendor/zerofrom-derive-v0_1/Cargo.toml.orig @@ -5,14 +5,15 @@ [package] name = "zerofrom-derive" description = "Custom derive for the zerofrom crate" -version = "0.1.6" +version = "0.1.7" authors = ["Manish Goregaokar "] categories = ["data-structures", "memory-management", "caching", "no-std"] -keywords = ["zerocopy", "serialization", "lifetime", "borrow"] +keywords = ["macros", "derive", "zero-copy", "serialization"] edition.workspace = true license.workspace = true repository.workspace = true +rust-version = "1.71.1" [package.metadata.workspaces] independent = true @@ -31,3 +32,5 @@ synstructure = { workspace = true } zerofrom = { path = "..", features = ["derive"]} zerovec = { path = "../../../utils/zerovec", features = ["yoke"] } +[lints] +workspace = true diff --git a/deps/crates/vendor/zerofrom-derive-v0_1/examples/zf_derive.rs b/deps/crates/vendor/zerofrom-derive-v0_1/examples/zf_derive.rs index d3eb2a6fb658..2c89b84c2976 100644 --- a/deps/crates/vendor/zerofrom-derive-v0_1/examples/zf_derive.rs +++ b/deps/crates/vendor/zerofrom-derive-v0_1/examples/zf_derive.rs @@ -9,24 +9,24 @@ use zerofrom::ZeroFrom; use zerovec::{maps::ZeroMapKV, ule::AsULE, VarZeroVec, ZeroMap, ZeroVec}; #[derive(ZeroFrom, Copy, Clone)] -pub struct IntExample { +struct IntExample { x: u32, } #[derive(ZeroFrom, Copy, Clone)] -pub struct GenericsExample { +struct GenericsExample { x: u32, y: T, } #[derive(ZeroFrom, Copy, Clone)] -pub struct GenericsExampleWithDefault { +struct GenericsExampleWithDefault { x: T, y: U, } #[derive(ZeroFrom)] -pub struct CowExample<'a> { +struct CowExample<'a> { x: u8, y: &'a str, z: Cow<'a, str>, @@ -34,81 +34,81 @@ pub struct CowExample<'a> { } #[derive(ZeroFrom)] -pub struct ZeroVecExample<'a> { +struct ZeroVecExample<'a> { var: VarZeroVec<'a, str>, vec: ZeroVec<'a, u16>, } #[derive(ZeroFrom)] -pub struct ZeroVecExampleWithGenerics<'a, T: AsULE> { +struct ZeroVecExampleWithGenerics<'a, T: AsULE> { gen: ZeroVec<'a, T>, vec: ZeroVec<'a, u16>, bare: T, } #[derive(ZeroFrom)] -pub struct HasTuples<'data> { +struct HasTuples<'data> { pub bar: (&'data str, &'data str), } -pub fn assert_zf_tuples<'b>(x: &'b HasTuples) -> HasTuples<'b> { +fn assert_zf_tuples<'b>(x: &'b HasTuples) -> HasTuples<'b> { HasTuples::zero_from(x) } -pub fn assert_zf_generics<'a, 'b>( +fn assert_zf_generics<'a, 'b>( x: &'b ZeroVecExampleWithGenerics<'a, u8>, ) -> ZeroVecExampleWithGenerics<'b, u8> { ZeroVecExampleWithGenerics::<'b, u8>::zero_from(x) } #[derive(ZeroFrom)] -pub struct ZeroMapGenericExample<'a, T: for<'b> ZeroMapKV<'b> + ?Sized> { +struct ZeroMapGenericExample<'a, T: for<'b> ZeroMapKV<'b> + ?Sized> { map: ZeroMap<'a, str, T>, } -pub fn assert_zf_map<'b>(x: &'b ZeroMapGenericExample) -> ZeroMapGenericExample<'b, str> { +fn assert_zf_map<'b>(x: &'b ZeroMapGenericExample) -> ZeroMapGenericExample<'b, str> { ZeroMapGenericExample::zero_from(x) } #[derive(Clone, ZeroFrom)] -pub struct CloningZF1 { +struct CloningZF1 { #[zerofrom(clone)] // Vec is not ZeroFrom, so it needs to be cloned vec: Vec, } #[derive(Clone, ZeroFrom)] -pub struct CloningZF2<'data> { +struct CloningZF2<'data> { #[zerofrom(clone)] // Cow is ZeroFrom, but we force a clone cow: Cow<'data, str>, } #[derive(ZeroFrom)] -pub enum CloningZF3<'data> { +enum CloningZF3<'data> { Cow(#[zerofrom(clone)] Cow<'data, str>), } #[derive(ZeroFrom)] #[zerofrom(may_borrow(T, Q))] // instead of treating T as a copy type, we want to allow zerofromming T too -pub struct GenericsThatAreAlsoZf { +struct GenericsThatAreAlsoZf { x: T, y: Option, ignored: PhantomData, q: Q, } -pub fn assert_zf_generics_may_borrow<'a, 'b>( +fn assert_zf_generics_may_borrow<'a, 'b>( x: &'b GenericsThatAreAlsoZf<&'a str, usize, str>, ) -> GenericsThatAreAlsoZf<&'b str, usize, str> { GenericsThatAreAlsoZf::<&'b str, usize, str>::zero_from(x) } #[derive(ZeroFrom)] -pub struct UsesGenericsThatAreAlsoZf<'a> { +struct UsesGenericsThatAreAlsoZf<'a> { x: GenericsThatAreAlsoZf<&'a str, usize, str>, } // Ensure it works with invariant types too #[derive(ZeroFrom)] -pub struct UsesGenericsThatAreAlsoZfWithMap<'a> { +struct UsesGenericsThatAreAlsoZfWithMap<'a> { x: GenericsThatAreAlsoZf, usize, str>, } diff --git a/deps/crates/vendor/zerofrom-derive-v0_1/src/lib.rs b/deps/crates/vendor/zerofrom-derive-v0_1/src/lib.rs index f2c43b344d96..060b961c8ca5 100644 --- a/deps/crates/vendor/zerofrom-derive-v0_1/src/lib.rs +++ b/deps/crates/vendor/zerofrom-derive-v0_1/src/lib.rs @@ -2,9 +2,8 @@ // called LICENSE at the top level of the ICU4X source tree // (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ). -//! Custom derives for `ZeroFrom` from the `zerofrom` crate. - // https://github.com/unicode-org/icu4x/blob/main/documents/process/boilerplate.md#library-annotations +// #![cfg_attr(not(any(test, doc)), no_std)] #![cfg_attr( not(test), deny( @@ -12,14 +11,12 @@ clippy::unwrap_used, clippy::expect_used, clippy::panic, - clippy::exhaustive_structs, - clippy::exhaustive_enums, - clippy::trivially_copy_pass_by_ref, - missing_debug_implementations, ) )] +#![warn(missing_docs)] + +//! Custom derives for `ZeroFrom` from the `zerofrom` crate. -use core::mem; use proc_macro::TokenStream; use proc_macro2::{Span, TokenStream as TokenStream2}; use quote::quote; @@ -41,7 +38,7 @@ mod visitor; /// for types with a lifetime parameter. /// /// Apply the `#[zerofrom(clone)]` attribute to a field if it doesn't implement -/// Copy or ZeroFrom; this data will be cloned when the struct is zero_from'ed. +/// [`Copy`] or [`ZeroFrom`]; this data will be cloned when the struct is zero-from'ed. /// /// Apply the `#[zerofrom(maybe_borrow(T, U, V))]` attribute to the struct to indicate /// that certain type parameters may themselves contain borrows (by default @@ -245,7 +242,7 @@ fn zf_derive_impl(input: &DeriveInput) -> TokenStream2 { for typaram_c in &mut typarams_c { if let Some(Some(replacement)) = generics_env.get(typaram_c) { // we use mem::replace here so we can be really clear about the C vs the T type - let typaram_t = mem::replace(typaram_c, replacement.clone()); + let typaram_t = core::mem::replace(typaram_c, replacement.clone()); zf_bounds .push(parse_quote!(#typaram_c: zerofrom::ZeroFrom<'zf_inner, #typaram_t>)); tybounds.push(parse_quote!(#typaram_c)); diff --git a/deps/crates/vendor/zerofrom-derive-v0_1/src/visitor.rs b/deps/crates/vendor/zerofrom-derive-v0_1/src/visitor.rs index 0cc44e9d6460..01a91e610822 100644 --- a/deps/crates/vendor/zerofrom-derive-v0_1/src/visitor.rs +++ b/deps/crates/vendor/zerofrom-derive-v0_1/src/visitor.rs @@ -43,7 +43,7 @@ impl<'ast> Visit<'ast> for TypeVisitor<'_> { } /// Checks if a type has type or lifetime parameters, given the local context of -/// named type parameters. Returns (has_type_params, has_lifetime_params) +/// named type parameters. Returns `(has_type_params, has_lifetime_params)` pub fn check_type_for_parameters( ty: &Type, typarams: &HashMap>, diff --git a/deps/crates/vendor/zerofrom-v0_1/.cargo_vcs_info.json b/deps/crates/vendor/zerofrom-v0_1/.cargo_vcs_info.json index bd821252129c..ac0ea88d4f1b 100644 --- a/deps/crates/vendor/zerofrom-v0_1/.cargo_vcs_info.json +++ b/deps/crates/vendor/zerofrom-v0_1/.cargo_vcs_info.json @@ -1,6 +1,6 @@ { "git": { - "sha1": "f4290a877dfcb0f87cad6de4abdd65f0cbb33c9c" + "sha1": "e9575f7e4b5aeddfeeb87ada5d3e715950e8233e" }, "path_in_vcs": "utils/zerofrom" } \ No newline at end of file diff --git a/deps/crates/vendor/zerofrom-v0_1/Cargo.lock b/deps/crates/vendor/zerofrom-v0_1/Cargo.lock index 230c18fa7968..a5b5375ff80e 100644 --- a/deps/crates/vendor/zerofrom-v0_1/Cargo.lock +++ b/deps/crates/vendor/zerofrom-v0_1/Cargo.lock @@ -4,27 +4,27 @@ version = 3 [[package]] name = "proc-macro2" -version = "1.0.93" +version = "1.0.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60946a68e5f9d28b0dc1c21bb8a97ee7d018a8b322fa57838ba31cc878e22d99" +checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.38" +version = "1.0.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e4dccaaaf89514f546c693ddc140f729f958c247918a13380cccc6078391acc" +checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924" dependencies = [ "proc-macro2", ] [[package]] name = "syn" -version = "2.0.98" +version = "2.0.117" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36147f1a48ae0ec2b5b3bc5b537d267457555a10dc06f3dbc8cb11ba3006d3b1" +checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99" dependencies = [ "proc-macro2", "quote", @@ -33,9 +33,9 @@ dependencies = [ [[package]] name = "synstructure" -version = "0.13.1" +version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" +checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" dependencies = [ "proc-macro2", "quote", @@ -44,22 +44,22 @@ dependencies = [ [[package]] name = "unicode-ident" -version = "1.0.17" +version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00e2473a93778eb0bad35909dff6a10d28e63f792f16ed15e404fca9d5eeedbe" +checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" [[package]] name = "zerofrom" -version = "0.1.6" +version = "0.1.8" dependencies = [ "zerofrom-derive", ] [[package]] name = "zerofrom-derive" -version = "0.1.5" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808" +checksum = "11532158c46691caf0f2593ea8358fed6bbf68a0315e80aae9bd41fbade684a1" dependencies = [ "proc-macro2", "quote", diff --git a/deps/crates/vendor/zerofrom-v0_1/Cargo.toml b/deps/crates/vendor/zerofrom-v0_1/Cargo.toml index eb66cad5805d..1e05f9a99552 100644 --- a/deps/crates/vendor/zerofrom-v0_1/Cargo.toml +++ b/deps/crates/vendor/zerofrom-v0_1/Cargo.toml @@ -11,10 +11,10 @@ [package] edition = "2021" -rust-version = "1.81" +rust-version = "1.71.1" name = "zerofrom" -version = "0.1.6" -authors = ["Manish Goregaokar "] +version = "0.1.8" +authors = ["The ICU4X Project Developers"] build = false include = [ "data/**/*", @@ -25,6 +25,7 @@ include = [ "Cargo.toml", "LICENSE", "README.md", + "build.rs", ] autolib = false autobins = false @@ -34,10 +35,9 @@ autobenches = false description = "ZeroFrom trait for constructing" readme = "README.md" keywords = [ - "zerocopy", + "zero-copy", "serialization", - "lifetime", - "borrow", + "memory-efficiency", ] categories = [ "data-structures", @@ -47,11 +47,14 @@ categories = [ license = "Unicode-3.0" repository = "https://github.com/unicode-org/icu4x" +[package.metadata.workspaces] +independent = true + [package.metadata.docs.rs] all-features = true -[package.metadata.workspaces] -independent = true +[package.metadata.playground] +all-features = true [features] alloc = [] @@ -63,6 +66,56 @@ name = "zerofrom" path = "src/lib.rs" [dependencies.zerofrom-derive] -version = "0.1.3" +version = "0.1.6" optional = true default-features = false + +[lints.clippy] +alloc-instead-of-core = "warn" +bool-assert-comparison = "allow" +branches-sharing-code = "warn" +collection_is_never_read = "warn" +crosspointer_transmute = "warn" +dbg_macro = "warn" +debug_assert_with_mut_call = "warn" +doc_markdown = "warn" +exhaustive_enums = "deny" +exhaustive_structs = "deny" +fn_to_numeric_cast_any = "warn" +infinite_loop = "warn" +large_stack_arrays = "warn" +mismatching_type_param_order = "warn" +missing_fields_in_debug = "warn" +missing_transmute_annotations = "warn" +negative_feature_names = "warn" +or-fun-call = "warn" +same_functions_in_if_condition = "warn" +todo = "warn" +transmute_bytes_to_str = "warn" +transmute_int_to_bool = "warn" +transmute_int_to_non_zero = "warn" +transmute_ptr_to_ptr = "warn" +transmute_ptr_to_ref = "warn" +transmute_undefined_repr = "warn" +transmutes_expressible_as_ptr_casts = "warn" +trivially_copy_pass_by_ref = "deny" +unnecessary-wraps = "warn" +useless_transmute = "warn" +wildcard_dependencies = "warn" + +[lints.rust] +missing_debug_implementations = "deny" +trivial_numeric_casts = "deny" +unused_lifetimes = "warn" +unused_macro_rules = "warn" +unused_qualifications = "warn" + +[lints.rust.unexpected_cfgs] +level = "warn" +priority = 0 +check-cfg = [ + "cfg(icu4c_enable_renaming)", + "cfg(needs_alloc_error_handler)", + "cfg(icu4x_run_size_tests)", + "cfg(icu4x_unstable_fast_trie_only)", +] diff --git a/deps/crates/vendor/zerofrom-v0_1/Cargo.toml.orig b/deps/crates/vendor/zerofrom-v0_1/Cargo.toml.orig index f61029924e3f..89da87534ced 100644 --- a/deps/crates/vendor/zerofrom-v0_1/Cargo.toml.orig +++ b/deps/crates/vendor/zerofrom-v0_1/Cargo.toml.orig @@ -5,16 +5,16 @@ [package] name = "zerofrom" description = "ZeroFrom trait for constructing" -version = "0.1.6" -authors = ["Manish Goregaokar "] +version = "0.1.8" categories = ["data-structures", "caching", "no-std"] -keywords = ["zerocopy", "serialization", "lifetime", "borrow"] +keywords = ["zero-copy", "serialization", "memory-efficiency"] -edition.workspace = true +authors.workspace = true +edition = "2021" include.workspace = true license.workspace = true repository.workspace = true -rust-version.workspace = true +rust-version = "1.71.1" [package.metadata.workspaces] independent = true @@ -22,6 +22,9 @@ independent = true [package.metadata.docs.rs] all-features = true +[package.metadata.playground] +all-features = true + [features] alloc = [] derive = ["dep:zerofrom-derive"] @@ -29,3 +32,6 @@ default = ["alloc"] [dependencies] zerofrom-derive = { workspace = true, optional = true} + +[lints] +workspace = true diff --git a/deps/crates/vendor/zerofrom-v0_1/src/lib.rs b/deps/crates/vendor/zerofrom-v0_1/src/lib.rs index 911d7e780772..680a64f3fc04 100644 --- a/deps/crates/vendor/zerofrom-v0_1/src/lib.rs +++ b/deps/crates/vendor/zerofrom-v0_1/src/lib.rs @@ -2,10 +2,6 @@ // called LICENSE at the top level of the ICU4X source tree // (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ). -//! This crate provides [`ZeroFrom`], a trait for converting types in a zero-copy way. -//! -//! See the documentation of [`ZeroFrom`] for more details. - // https://github.com/unicode-org/icu4x/blob/main/documents/process/boilerplate.md#library-annotations #![cfg_attr(not(any(test, doc)), no_std)] #![cfg_attr( @@ -15,12 +11,14 @@ clippy::unwrap_used, clippy::expect_used, clippy::panic, - clippy::exhaustive_structs, - clippy::exhaustive_enums, - clippy::trivially_copy_pass_by_ref, - missing_debug_implementations, ) )] +#![warn(missing_docs)] + +//! This crate provides [`ZeroFrom`], a trait for converting types in a zero-copy way. +//! +//! See the documentation of [`ZeroFrom`] for more details. + // The lifetimes here are important for safety and explicitly writing // them out is good even when redundant #![allow(clippy::needless_lifetimes)]