chore: checkpoint before Python removal

This commit is contained in:
2026-03-26 22:33:59 +00:00
parent 683cec9307
commit e568ddf82a
29972 changed files with 11269302 additions and 2 deletions

1
vendor/dyn-clone/.cargo-checksum.json vendored Normal file
View File

@@ -0,0 +1 @@
{"files":{".cargo_vcs_info.json":"5bdef671e0900d9ee84d1ea3a3199e267052fe2e2e13ffe35d349853df03027a",".github/FUNDING.yml":"b017158736b3c9751a2d21edfce7fe61c8954e2fced8da8dd3013c2f3e295bd9",".github/workflows/ci.yml":"3ed6fdca5c827a7e0aa1bcd0f895c8e5b421911525aaa4597f728fcc30157b2b","Cargo.lock":"7a6279de01add2f8f3308d1d42ef79b2f1f7b4bb5c93c15c1a981e1ca6ca13b1","Cargo.toml":"6753280e066f943c3569ef818b09e1400cca53501dcd462fa1aa25d4f516c162","Cargo.toml.orig":"f26502d8e56541b714aea7cce711298c217998622d5f376a626b6c84e522e227","LICENSE-APACHE":"62c7a1e35f56406896d7aa7ca52d0cc0d272ac022b5d2796e7d6905db8a3636a","LICENSE-MIT":"23f18e03dc49df91622fe2a76176497404e46ced8a715d9d2b67a7446571cca3","README.md":"864fd84ec0dae30bc664133709c37a43f37a6af8912b756c6cb9663f5b38a082","examples/readme.rs":"b1ba0f1e1de54250c737347acc4853516ff54746e31646daff083b3ef21da3f9","src/lib.rs":"9f51e32a68ab923052fb4001ca04f89d3dc59ae9f62274ed8dd28028a7e10999","src/macros.rs":"c7d5a9ed757d28b5895096d52c6fcf3346ac6a069bbb6a6f93dde75f47dbe65d","tests/compiletest.rs":"4e381aa8ca3eabb7ac14d1e0c3700b3223e47640547a6988cfa13ad68255f60f","tests/macros.rs":"83342fca0bb0c94fb4956d2b7dbe230a36f6cf347686fc4c3c382b7e79cd8b22","tests/trait.rs":"6d31af4bf3391cf8a27c6649432951fafb9e5ddaaf0163104e4ef2128eb5d816","tests/ui/missing-supertrait.rs":"b93e0ef7d8e8fa6b90bcea66978071302a074e338d1141dd310773ede99f74b4","tests/ui/missing-supertrait.stderr":"f9d6e6d6ffcf50a174c498d2b241a6b0115327736dea1c0ab33c204856ff1d55"},"package":"d0881ea181b1df73ff77ffaaf9c7544ecc11e82fba9b5f27b262a3c73a332555"}

6
vendor/dyn-clone/.cargo_vcs_info.json vendored Normal file
View File

@@ -0,0 +1,6 @@
{
"git": {
"sha1": "1d2d15c5d9d0d538c9da2141a75422d94c6be194"
},
"path_in_vcs": ""
}

1
vendor/dyn-clone/.github/FUNDING.yml vendored Normal file
View File

@@ -0,0 +1 @@
github: dtolnay

View File

@@ -0,0 +1,101 @@
name: CI
on:
push:
pull_request:
workflow_dispatch:
schedule: [cron: "40 1 * * *"]
permissions:
contents: read
env:
RUSTFLAGS: -Dwarnings
jobs:
pre_ci:
uses: dtolnay/.github/.github/workflows/pre_ci.yml@master
test:
name: Rust ${{matrix.rust}}
needs: pre_ci
if: needs.pre_ci.outputs.continue
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
rust: [nightly, beta, stable, 1.70.0]
timeout-minutes: 45
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{matrix.rust}}
- name: Enable type layout randomization
run: echo RUSTFLAGS=${RUSTFLAGS}\ -Zrandomize-layout >> $GITHUB_ENV
if: matrix.rust == 'nightly'
- run: cargo test
embedded:
name: No atomic
needs: pre_ci
if: needs.pre_ci.outputs.continue
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
targets: thumbv6m-none-eabi
- run: cargo check --target thumbv6m-none-eabi
msrv:
name: Rust 1.60.0
needs: pre_ci
if: needs.pre_ci.outputs.continue
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@1.60.0
- run: cargo check
doc:
name: Documentation
needs: pre_ci
if: needs.pre_ci.outputs.continue
runs-on: ubuntu-latest
timeout-minutes: 45
env:
RUSTDOCFLAGS: -Dwarnings
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
- uses: dtolnay/install@cargo-docs-rs
- run: cargo docs-rs
miri:
name: Miri
needs: pre_ci
if: needs.pre_ci.outputs.continue
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@miri
with:
toolchain: nightly-2025-05-16 # https://github.com/rust-lang/miri/issues/4323
- run: cargo miri setup
- run: cargo miri test
env:
MIRIFLAGS: -Zmiri-strict-provenance
clippy:
name: Clippy
runs-on: ubuntu-latest
if: github.event_name != 'pull_request'
timeout-minutes: 45
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@clippy
- run: cargo clippy --tests -- -Dclippy::all -Dclippy::pedantic

303
vendor/dyn-clone/Cargo.lock generated vendored Normal file
View File

@@ -0,0 +1,303 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 3
[[package]]
name = "dissimilar"
version = "1.0.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8975ffdaa0ef3661bfe02dbdcc06c9f829dfafe6a3c474de366a8d5e44276921"
[[package]]
name = "dyn-clone"
version = "1.0.20"
dependencies = [
"rustversion",
"trybuild",
]
[[package]]
name = "equivalent"
version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f"
[[package]]
name = "glob"
version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a8d1add55171497b4705a648c6b583acafb01d58050a51727785f0b2c8e0a2b2"
[[package]]
name = "hashbrown"
version = "0.15.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5971ac85611da7067dbfcabef3c70ebb5606018acd9e2a3903a0da507521e0d5"
[[package]]
name = "indexmap"
version = "2.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fe4cd85333e22411419a0bcae1297d25e58c9443848b11dc6a86fefe8c78a661"
dependencies = [
"equivalent",
"hashbrown",
]
[[package]]
name = "itoa"
version = "1.0.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c"
[[package]]
name = "memchr"
version = "2.7.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "32a282da65faaf38286cf3be983213fcf1d2e2a58700e808f83f4ea9a4804bc0"
[[package]]
name = "proc-macro2"
version = "1.0.95"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778"
dependencies = [
"unicode-ident",
]
[[package]]
name = "quote"
version = "1.0.40"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d"
dependencies = [
"proc-macro2",
]
[[package]]
name = "rustversion"
version = "1.0.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8a0d197bd2c9dc6e53b84da9556a69ba4cdfab8619eb41a8bd1cc2027a0f6b1d"
[[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.219"
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",
]
[[package]]
name = "serde_json"
version = "1.0.141"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "30b9eff21ebe718216c6ec64e1d9ac57087aad11efc64e32002bce4a0d4c03d3"
dependencies = [
"itoa",
"memchr",
"ryu",
"serde",
]
[[package]]
name = "serde_spanned"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "40734c41988f7306bb04f0ecf60ec0f3f1caa34290e4e8ea471dcd3346483b83"
dependencies = [
"serde",
]
[[package]]
name = "syn"
version = "2.0.104"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "17b6f705963418cdb9927482fa304bc562ece2fdd4f616084c50b7023b435a40"
dependencies = [
"proc-macro2",
"quote",
"unicode-ident",
]
[[package]]
name = "target-triple"
version = "0.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1ac9aa371f599d22256307c24a9d748c041e548cbf599f35d890f9d365361790"
[[package]]
name = "termcolor"
version = "1.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755"
dependencies = [
"winapi-util",
]
[[package]]
name = "toml"
version = "0.9.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ed0aee96c12fa71097902e0bb061a5e1ebd766a6636bb605ba401c45c1650eac"
dependencies = [
"indexmap",
"serde",
"serde_spanned",
"toml_datetime",
"toml_parser",
"toml_writer",
"winnow",
]
[[package]]
name = "toml_datetime"
version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bade1c3e902f58d73d3f294cd7f20391c1cb2fbcb643b73566bc773971df91e3"
dependencies = [
"serde",
]
[[package]]
name = "toml_parser"
version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "97200572db069e74c512a14117b296ba0a80a30123fbbb5aa1f4a348f639ca30"
dependencies = [
"winnow",
]
[[package]]
name = "toml_writer"
version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fcc842091f2def52017664b53082ecbbeb5c7731092bad69d2c63050401dfd64"
[[package]]
name = "trybuild"
version = "1.0.106"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "65af40ad689f2527aebbd37a0a816aea88ff5f774ceabe99de5be02f2f91dae2"
dependencies = [
"dissimilar",
"glob",
"serde",
"serde_derive",
"serde_json",
"target-triple",
"termcolor",
"toml",
]
[[package]]
name = "unicode-ident"
version = "1.0.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512"
[[package]]
name = "winapi-util"
version = "0.1.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb"
dependencies = [
"windows-sys",
]
[[package]]
name = "windows-sys"
version = "0.59.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b"
dependencies = [
"windows-targets",
]
[[package]]
name = "windows-targets"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973"
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.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
[[package]]
name = "windows_aarch64_msvc"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
[[package]]
name = "windows_i686_gnu"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
[[package]]
name = "windows_i686_gnullvm"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
[[package]]
name = "windows_i686_msvc"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
[[package]]
name = "windows_x86_64_gnu"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
[[package]]
name = "windows_x86_64_gnullvm"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
[[package]]
name = "windows_x86_64_msvc"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
[[package]]
name = "winnow"
version = "0.7.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f3edebf492c8125044983378ecb5766203ad3b4c2f7a922bd7dd207f6d443e95"

74
vendor/dyn-clone/Cargo.toml vendored Normal file
View File

@@ -0,0 +1,74 @@
# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.
[package]
edition = "2018"
rust-version = "1.60"
name = "dyn-clone"
version = "1.0.20"
authors = ["David Tolnay <dtolnay@gmail.com>"]
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Clone trait that is dyn-compatible"
documentation = "https://docs.rs/dyn-clone"
readme = "README.md"
keywords = [
"dyn",
"clone",
"trait-object",
"object-safe",
]
categories = [
"rust-patterns",
"no-std",
]
license = "MIT OR Apache-2.0"
repository = "https://github.com/dtolnay/dyn-clone"
[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
rustdoc-args = [
"--generate-link-to-definition",
"--extern-html-root-url=core=https://doc.rust-lang.org",
"--extern-html-root-url=alloc=https://doc.rust-lang.org",
"--extern-html-root-url=std=https://doc.rust-lang.org",
]
[lib]
name = "dyn_clone"
path = "src/lib.rs"
[[example]]
name = "readme"
path = "examples/readme.rs"
[[test]]
name = "compiletest"
path = "tests/compiletest.rs"
[[test]]
name = "macros"
path = "tests/macros.rs"
[[test]]
name = "trait"
path = "tests/trait.rs"
[dev-dependencies.rustversion]
version = "1.0"
[dev-dependencies.trybuild]
version = "1.0.66"
features = ["diff"]

176
vendor/dyn-clone/LICENSE-APACHE vendored Normal file
View File

@@ -0,0 +1,176 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS

23
vendor/dyn-clone/LICENSE-MIT vendored Normal file
View File

@@ -0,0 +1,23 @@
Permission is hereby granted, free of charge, to any
person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the
Software without restriction, including without
limitation the rights to use, copy, modify, merge,
publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software
is furnished to do so, subject to the following
conditions:
The above copyright notice and this permission notice
shall be included in all copies or substantial portions
of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.

89
vendor/dyn-clone/README.md vendored Normal file
View File

@@ -0,0 +1,89 @@
Clone trait that is dyn-compatible
==================================
[<img alt="github" src="https://img.shields.io/badge/github-dtolnay/dyn--clone-8da0cb?style=for-the-badge&labelColor=555555&logo=github" height="20">](https://github.com/dtolnay/dyn-clone)
[<img alt="crates.io" src="https://img.shields.io/crates/v/dyn-clone.svg?style=for-the-badge&color=fc8d62&logo=rust" height="20">](https://crates.io/crates/dyn-clone)
[<img alt="docs.rs" src="https://img.shields.io/badge/docs.rs-dyn--clone-66c2a5?style=for-the-badge&labelColor=555555&logo=docs.rs" height="20">](https://docs.rs/dyn-clone)
[<img alt="build status" src="https://img.shields.io/github/actions/workflow/status/dtolnay/dyn-clone/ci.yml?branch=master&style=for-the-badge" height="20">](https://github.com/dtolnay/dyn-clone/actions?query=branch%3Amaster)
This crate provides a `DynClone` trait that can be used in trait objects, and a
`clone_box` function that can clone any sized or dynamically sized
implementation of `DynClone`. Types that implement the standard library's
[`std::clone::Clone`] trait are automatically usable by a `DynClone` trait
object.
[`std::clone::Clone`]: https://doc.rust-lang.org/std/clone/trait.Clone.html
The signature of `clone_box` is:
```rust
fn clone_box<T>(t: &T) -> Box<T>
where
T: ?Sized + DynClone
```
## Example
```rust
use dyn_clone::DynClone;
trait MyTrait: DynClone {
fn recite(&self);
}
impl MyTrait for String {
fn recite(&self) {
println!("{}", self);
}
}
fn main() {
let line = "The slithy structs did gyre and gimble the namespace";
// Build a trait object holding a String.
// This requires String to implement MyTrait and std::clone::Clone.
let x: Box<dyn MyTrait> = Box::new(String::from(line));
x.recite();
// The type of x2 is a Box<dyn MyTrait> cloned from x.
let x2 = dyn_clone::clone_box(&*x);
x2.recite();
}
```
This crate includes a macro for generating the implementation `impl
std::clone::Clone for Box<dyn MyTrait>` in terms of `dyn_clone::clone_box`:
```rust
// As before.
trait MyTrait: DynClone {
/* ... */
}
dyn_clone::clone_trait_object!(MyTrait);
// Now data structures containing Box<dyn MyTrait> can derive Clone:
#[derive(Clone)]
struct Container {
trait_object: Box<dyn MyTrait>,
}
```
<br>
#### License
<sup>
Licensed under either of <a href="LICENSE-APACHE">Apache License, Version
2.0</a> or <a href="LICENSE-MIT">MIT license</a> at your option.
</sup>
<br>
<sub>
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.
</sub>

26
vendor/dyn-clone/examples/readme.rs vendored Normal file
View File

@@ -0,0 +1,26 @@
use dyn_clone::DynClone;
trait MyTrait: DynClone {
fn recite(&self);
}
impl MyTrait for String {
fn recite(&self) {
println!("{}", self);
}
}
fn main() {
let line = "The slithy structs did gyre and gimble the namespace";
// Build a trait object holding a String.
// This requires String to implement MyTrait and std::clone::Clone.
let x: Box<dyn MyTrait> = Box::new(String::from(line));
x.recite();
// The type of x2 is a Box<dyn MyTrait> cloned from x.
let x2 = dyn_clone::clone_box(&*x);
x2.recite();
}

218
vendor/dyn-clone/src/lib.rs vendored Normal file
View File

@@ -0,0 +1,218 @@
//! [![github]](https://github.com/dtolnay/dyn-clone)&ensp;[![crates-io]](https://crates.io/crates/dyn-clone)&ensp;[![docs-rs]](https://docs.rs/dyn-clone)
//!
//! [github]: https://img.shields.io/badge/github-8da0cb?style=for-the-badge&labelColor=555555&logo=github
//! [crates-io]: https://img.shields.io/badge/crates.io-fc8d62?style=for-the-badge&labelColor=555555&logo=rust
//! [docs-rs]: https://img.shields.io/badge/docs.rs-66c2a5?style=for-the-badge&labelColor=555555&logo=docs.rs
//!
//! <br>
//!
//! This crate provides a [`DynClone`] trait that can be used in trait objects,
//! and a [`clone_box`] function that can clone any sized or dynamically sized
//! implementation of `DynClone`. Types that implement the standard library's
//! [`std::clone::Clone`] trait are automatically usable by a `DynClone` trait
//! object.
//!
//! # Example
//!
//! ```
//! use dyn_clone::DynClone;
//!
//! trait MyTrait: DynClone {
//! fn recite(&self);
//! }
//!
//! impl MyTrait for String {
//! fn recite(&self) {
//! println!("{} ♫", self);
//! }
//! }
//!
//! fn main() {
//! let line = "The slithy structs did gyre and gimble the namespace";
//!
//! // Build a trait object holding a String.
//! // This requires String to implement MyTrait and std::clone::Clone.
//! let x: Box<dyn MyTrait> = Box::new(String::from(line));
//!
//! x.recite();
//!
//! // The type of x2 is a Box<dyn MyTrait> cloned from x.
//! let x2 = dyn_clone::clone_box(&*x);
//!
//! x2.recite();
//! }
//! ```
//!
//! This crate includes a macro for concisely implementing `impl
//! std::clone::Clone for Box<dyn MyTrait>` in terms of `dyn_clone::clone_box`.
//!
//! ```
//! # use dyn_clone::DynClone;
//! #
//! // As before.
//! trait MyTrait: DynClone {
//! /* ... */
//! }
//!
//! dyn_clone::clone_trait_object!(MyTrait);
//!
//! // Now data structures containing Box<dyn MyTrait> can derive Clone:
//! #[derive(Clone)]
//! struct Container {
//! trait_object: Box<dyn MyTrait>,
//! }
//! ```
//!
//! The `clone_trait_object!` macro expands to just the following, which you can
//! handwrite instead if you prefer:
//!
//! ```
//! # use dyn_clone::DynClone;
//! #
//! # trait MyTrait: DynClone {}
//! #
//! impl Clone for Box<dyn MyTrait> {
//! fn clone(&self) -> Self {
//! dyn_clone::clone_box(&**self)
//! }
//! }
//!
//! // and similar for Box<dyn MyTrait + Send>, Box<dyn MyTrait + Sync>, Box<dyn MyTrait + Send + Sync>
//! ```
#![doc(html_root_url = "https://docs.rs/dyn-clone/1.0.20")]
#![no_std]
#![allow(
clippy::missing_panics_doc,
clippy::needless_doctest_main,
clippy::ptr_as_ptr
)]
extern crate alloc;
#[cfg(doc)]
extern crate core as std;
#[macro_use]
mod macros;
// Not public API.
#[doc(hidden)]
pub mod __private {
#[doc(hidden)]
pub use core::clone::Clone;
#[doc(hidden)]
pub use core::marker::{Send, Sync};
#[doc(hidden)]
pub type Box<T> = alloc::boxed::Box<T>;
}
mod sealed {
pub trait Sealed {}
impl<T: Clone> Sealed for T {}
impl Sealed for str {}
impl<T: Clone> Sealed for [T] {}
pub struct Private;
}
use crate::sealed::{Private, Sealed};
use alloc::boxed::Box;
use alloc::rc::Rc;
#[cfg(target_has_atomic = "ptr")]
use alloc::sync::Arc;
use core::ptr;
/// This trait is implemented by any type that implements [`std::clone::Clone`].
pub trait DynClone: Sealed {
// Not public API
#[doc(hidden)]
fn __clone_box(&self, _: Private) -> *mut ();
}
/// `&T`&ensp;&mdash;&blacktriangleright;&ensp;`T`
pub fn clone<T>(t: &T) -> T
where
T: DynClone,
{
unsafe { *Box::from_raw(<T as DynClone>::__clone_box(t, Private) as *mut T) }
}
/// `&T`&ensp;&mdash;&blacktriangleright;&ensp;`Box<T>`
pub fn clone_box<T>(t: &T) -> Box<T>
where
T: ?Sized + DynClone,
{
let mut fat_ptr = t as *const T;
unsafe {
let data_ptr = ptr::addr_of_mut!(fat_ptr) as *mut *mut ();
assert_eq!(*data_ptr as *const (), t as *const T as *const ());
*data_ptr = <T as DynClone>::__clone_box(t, Private);
}
unsafe { Box::from_raw(fat_ptr as *mut T) }
}
/// `&mut Arc<T>`&ensp;&mdash;&blacktriangleright;&ensp;`&mut T`
#[cfg(target_has_atomic = "ptr")]
pub fn arc_make_mut<T>(arc: &mut Arc<T>) -> &mut T
where
T: ?Sized + DynClone,
{
// Atomic. Find out whether the Arc in the argument is the single holder of
// a reference count (strong or weak) on the target object. If yes, it is
// guaranteed to remain that way throughout the rest of this function
// because no other threads could bump the reference count through any other
// Arc (because no others exist) or through this Arc (because the current
// thread holds an exclusive borrow of it).
let is_unique = Arc::get_mut(arc).is_some();
if !is_unique {
// Non-atomic.
let clone = Arc::from(clone_box(&**arc));
// Atomic. Check the reference counts again to find out whether the old
// object needs to be dropped. Probably not, but it can happen if all
// the other holders of a reference count went away during the time that
// the clone operation took.
*arc = clone;
}
// Non-atomic. TODO: replace with Arc::get_mut_unchecked when stable.
let ptr = Arc::as_ptr(arc) as *mut T;
unsafe { &mut *ptr }
}
/// `&mut Rc<T>`&ensp;&mdash;&blacktriangleright;&ensp;`&mut T`
pub fn rc_make_mut<T>(rc: &mut Rc<T>) -> &mut T
where
T: ?Sized + DynClone,
{
let is_unique = Rc::get_mut(rc).is_some();
if !is_unique {
let clone = Rc::from(clone_box(&**rc));
*rc = clone;
}
let ptr = Rc::as_ptr(rc) as *mut T;
unsafe { &mut *ptr }
}
impl<T> DynClone for T
where
T: Clone,
{
fn __clone_box(&self, _: Private) -> *mut () {
Box::<T>::into_raw(Box::new(self.clone())) as *mut ()
}
}
impl DynClone for str {
fn __clone_box(&self, _: Private) -> *mut () {
Box::<str>::into_raw(Box::from(self)) as *mut ()
}
}
impl<T> DynClone for [T]
where
T: Clone,
{
fn __clone_box(&self, _: Private) -> *mut () {
Box::<[T]>::into_raw(self.iter().cloned().collect()) as *mut ()
}
}

121
vendor/dyn-clone/src/macros.rs vendored Normal file
View File

@@ -0,0 +1,121 @@
use crate::DynClone;
/// Implement the standard library `Clone` for a trait object that has
/// `DynClone` as a supertrait.
///
/// ```
/// use dyn_clone::DynClone;
///
/// trait MyTrait: DynClone {
/// /* ... */
/// }
///
/// dyn_clone::clone_trait_object!(MyTrait);
///
/// // Now data structures containing Box<dyn MyTrait> can derive Clone.
/// #[derive(Clone)]
/// struct Container {
/// trait_object: Box<dyn MyTrait>,
/// }
/// ```
///
/// The macro supports traits that have type parameters and/or `where` clauses.
///
/// ```
/// use dyn_clone::DynClone;
/// use std::io::Read;
///
/// trait Difficult<R>: DynClone where R: Read {
/// /* ... */
/// }
///
/// dyn_clone::clone_trait_object!(<R> Difficult<R> where R: Read);
/// ```
#[macro_export]
macro_rules! clone_trait_object {
($($path:tt)+) => {
$crate::__internal_clone_trait_object!(begin $($path)+);
};
}
#[doc(hidden)]
#[macro_export]
macro_rules! __internal_clone_trait_object {
// Invocation started with `<`, parse generics.
(begin < $($rest:tt)*) => {
$crate::__internal_clone_trait_object!(generics () () $($rest)*);
};
// Invocation did not start with `<`.
(begin $first:tt $($rest:tt)*) => {
$crate::__internal_clone_trait_object!(path () ($first) $($rest)*);
};
// End of generics.
(generics ($($generics:tt)*) () > $($rest:tt)*) => {
$crate::__internal_clone_trait_object!(path ($($generics)*) () $($rest)*);
};
// Generics open bracket.
(generics ($($generics:tt)*) ($($brackets:tt)*) < $($rest:tt)*) => {
$crate::__internal_clone_trait_object!(generics ($($generics)* <) ($($brackets)* <) $($rest)*);
};
// Generics close bracket.
(generics ($($generics:tt)*) (< $($brackets:tt)*) > $($rest:tt)*) => {
$crate::__internal_clone_trait_object!(generics ($($generics)* >) ($($brackets)*) $($rest)*);
};
// Token inside of generics.
(generics ($($generics:tt)*) ($($brackets:tt)*) $first:tt $($rest:tt)*) => {
$crate::__internal_clone_trait_object!(generics ($($generics)* $first) ($($brackets)*) $($rest)*);
};
// End with `where` clause.
(path ($($generics:tt)*) ($($path:tt)*) where $($rest:tt)*) => {
$crate::__internal_clone_trait_object!(impl ($($generics)*) ($($path)*) ($($rest)*));
};
// End without `where` clause.
(path ($($generics:tt)*) ($($path:tt)*)) => {
$crate::__internal_clone_trait_object!(impl ($($generics)*) ($($path)*) ());
};
// Token inside of path.
(path ($($generics:tt)*) ($($path:tt)*) $first:tt $($rest:tt)*) => {
$crate::__internal_clone_trait_object!(path ($($generics)*) ($($path)* $first) $($rest)*);
};
// The impl.
(impl ($($generics:tt)*) ($($path:tt)*) ($($bound:tt)*)) => {
#[allow(unknown_lints, non_local_definitions)] // false positive: https://github.com/rust-lang/rust/issues/121621
impl<'clone, $($generics)*> $crate::__private::Clone for $crate::__private::Box<dyn $($path)* + 'clone> where $($bound)* {
fn clone(&self) -> Self {
$crate::clone_box(&**self)
}
}
#[allow(unknown_lints, non_local_definitions)]
impl<'clone, $($generics)*> $crate::__private::Clone for $crate::__private::Box<dyn $($path)* + $crate::__private::Send + 'clone> where $($bound)* {
fn clone(&self) -> Self {
$crate::clone_box(&**self)
}
}
#[allow(unknown_lints, non_local_definitions)]
impl<'clone, $($generics)*> $crate::__private::Clone for $crate::__private::Box<dyn $($path)* + $crate::__private::Sync + 'clone> where $($bound)* {
fn clone(&self) -> Self {
$crate::clone_box(&**self)
}
}
#[allow(unknown_lints, non_local_definitions)]
impl<'clone, $($generics)*> $crate::__private::Clone for $crate::__private::Box<dyn $($path)* + $crate::__private::Send + $crate::__private::Sync + 'clone> where $($bound)* {
fn clone(&self) -> Self {
$crate::clone_box(&**self)
}
}
};
}
clone_trait_object!(DynClone);

7
vendor/dyn-clone/tests/compiletest.rs vendored Normal file
View File

@@ -0,0 +1,7 @@
#[rustversion::attr(not(nightly), ignore = "requires nightly")]
#[cfg_attr(miri, ignore = "incompatible with miri")]
#[test]
fn ui() {
let t = trybuild::TestCases::new();
t.compile_fail("tests/ui/*.rs");
}

57
vendor/dyn-clone/tests/macros.rs vendored Normal file
View File

@@ -0,0 +1,57 @@
#![allow(clippy::extra_unused_type_parameters)]
use dyn_clone::{clone_trait_object, DynClone};
fn assert_clone<T: Clone>() {}
#[test]
fn test_plain() {
trait Trait: DynClone {}
clone_trait_object!(Trait);
assert_clone::<Box<dyn Trait>>();
assert_clone::<Box<dyn Trait + Send>>();
assert_clone::<Box<dyn Trait + Sync>>();
assert_clone::<Box<dyn Trait + Send + Sync>>();
}
#[test]
fn test_type_parameter() {
trait Trait<T>: DynClone {}
clone_trait_object!(<T> Trait<T>);
assert_clone::<Box<dyn Trait<u32>>>();
}
#[test]
fn test_generic_bound() {
trait Trait<T: PartialEq<T>, U>: DynClone {}
clone_trait_object!(<T: PartialEq<T>, U> Trait<T, U>);
assert_clone::<Box<dyn Trait<u32, ()>>>();
}
#[test]
fn test_where_clause() {
trait Trait<T>: DynClone
where
T: Clone,
{
}
clone_trait_object!(<T> Trait<T> where T: Clone);
assert_clone::<Box<dyn Trait<u32>>>();
}
#[test]
fn test_lifetime() {
trait Trait<'a>: DynClone {}
clone_trait_object!(<'a> Trait<'a>);
assert_clone::<Box<dyn Trait>>();
}

64
vendor/dyn-clone/tests/trait.rs vendored Normal file
View File

@@ -0,0 +1,64 @@
#![cfg(target_has_atomic = "ptr")]
use dyn_clone::DynClone;
use std::fmt::{self, Display};
use std::sync::{Arc, Mutex};
struct Log {
id: u64,
events: Arc<Mutex<Vec<String>>>,
}
impl Clone for Log {
fn clone(&self) -> Self {
Log {
id: self.id + 1,
events: self.events.clone(),
}
}
}
impl Display for Log {
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
write!(formatter, "id={}", self.id)
}
}
impl Drop for Log {
fn drop(&mut self) {
self.events.lock().unwrap().push(format!("dropping {self}"));
}
}
#[test]
fn clone_sized() {
let arc = Arc::new(0);
assert_eq!(Arc::strong_count(&arc), 1);
let c = dyn_clone::clone(&arc);
assert_eq!(Arc::strong_count(&arc), 2);
drop(c);
assert_eq!(Arc::strong_count(&arc), 1);
}
#[test]
fn clone_trait_object() {
trait MyTrait: Display + Sync + DynClone {}
impl MyTrait for Log {}
let events = Arc::new(Mutex::new(Vec::new()));
let mut expected = Vec::new();
{
let b11: Box<dyn MyTrait> = Box::new(Log {
id: 11,
events: events.clone(),
});
let b12 = dyn_clone::clone_box(&*b11);
assert_eq!(b11.to_string(), "id=11");
assert_eq!(b12.to_string(), "id=12");
expected.push("dropping id=12".to_owned());
expected.push("dropping id=11".to_owned());
}
assert_eq!(*events.lock().unwrap(), expected);
}

View File

@@ -0,0 +1,5 @@
pub trait MyTrait {}
dyn_clone::clone_trait_object!(MyTrait);
fn main() {}

View File

@@ -0,0 +1,91 @@
error[E0277]: the trait bound `dyn MyTrait: DynClone` is not satisfied
--> tests/ui/missing-supertrait.rs:3:1
|
3 | dyn_clone::clone_trait_object!(MyTrait);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
| the trait `Clone` is not implemented for `dyn MyTrait`
| required by a bound introduced by this call
|
= help: the following other types implement trait `DynClone`:
[T]
str
= note: required for `dyn MyTrait` to implement `DynClone`
note: required by a bound in `clone_box`
--> src/lib.rs
|
| pub fn clone_box<T>(t: &T) -> Box<T>
| --------- required by a bound in this function
| where
| T: ?Sized + DynClone,
| ^^^^^^^^ required by this bound in `clone_box`
= note: this error originates in the macro `$crate::__internal_clone_trait_object` which comes from the expansion of the macro `dyn_clone::clone_trait_object` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `dyn MyTrait + Send: DynClone` is not satisfied
--> tests/ui/missing-supertrait.rs:3:1
|
3 | dyn_clone::clone_trait_object!(MyTrait);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
| the trait `Clone` is not implemented for `dyn MyTrait + Send`
| required by a bound introduced by this call
|
= help: the following other types implement trait `DynClone`:
[T]
str
= note: required for `dyn MyTrait + Send` to implement `DynClone`
note: required by a bound in `clone_box`
--> src/lib.rs
|
| pub fn clone_box<T>(t: &T) -> Box<T>
| --------- required by a bound in this function
| where
| T: ?Sized + DynClone,
| ^^^^^^^^ required by this bound in `clone_box`
= note: this error originates in the macro `$crate::__internal_clone_trait_object` which comes from the expansion of the macro `dyn_clone::clone_trait_object` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `dyn MyTrait + Sync: DynClone` is not satisfied
--> tests/ui/missing-supertrait.rs:3:1
|
3 | dyn_clone::clone_trait_object!(MyTrait);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
| the trait `Clone` is not implemented for `dyn MyTrait + Sync`
| required by a bound introduced by this call
|
= help: the following other types implement trait `DynClone`:
[T]
str
= note: required for `dyn MyTrait + Sync` to implement `DynClone`
note: required by a bound in `clone_box`
--> src/lib.rs
|
| pub fn clone_box<T>(t: &T) -> Box<T>
| --------- required by a bound in this function
| where
| T: ?Sized + DynClone,
| ^^^^^^^^ required by this bound in `clone_box`
= note: this error originates in the macro `$crate::__internal_clone_trait_object` which comes from the expansion of the macro `dyn_clone::clone_trait_object` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `dyn MyTrait + Send + Sync: DynClone` is not satisfied
--> tests/ui/missing-supertrait.rs:3:1
|
3 | dyn_clone::clone_trait_object!(MyTrait);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
| the trait `Clone` is not implemented for `dyn MyTrait + Send + Sync`
| required by a bound introduced by this call
|
= help: the following other types implement trait `DynClone`:
[T]
str
= note: required for `dyn MyTrait + Send + Sync` to implement `DynClone`
note: required by a bound in `clone_box`
--> src/lib.rs
|
| pub fn clone_box<T>(t: &T) -> Box<T>
| --------- required by a bound in this function
| where
| T: ?Sized + DynClone,
| ^^^^^^^^ required by this bound in `clone_box`
= note: this error originates in the macro `$crate::__internal_clone_trait_object` which comes from the expansion of the macro `dyn_clone::clone_trait_object` (in Nightly builds, run with -Z macro-backtrace for more info)