code_ownership 2.2.0 → 2.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Cargo.lock +30 -27
- data/bin/codeownership +1 -0
- data/ext/cargo-vendor/bindgen-0.72.1/.cargo-checksum.json +1 -0
- data/ext/cargo-vendor/bindgen-0.72.1/.cargo_vcs_info.json +6 -0
- data/ext/cargo-vendor/bindgen-0.72.1/Cargo.lock +485 -0
- data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/Cargo.toml +72 -38
- data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/Cargo.toml.orig +26 -28
- data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/README.md +2 -2
- data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/build.rs +2 -2
- data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/callbacks.rs +114 -10
- data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/clang.rs +184 -83
- data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/codegen/bitfield_unit.rs +20 -10
- data/ext/cargo-vendor/bindgen-0.72.1/codegen/bitfield_unit_raw_ref_macros.rs +191 -0
- data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/codegen/bitfield_unit_tests.rs +4 -4
- data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/codegen/dyngen.rs +77 -20
- data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/codegen/error.rs +2 -3
- data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/codegen/helpers.rs +106 -66
- data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/codegen/impl_debug.rs +32 -34
- data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/codegen/impl_partialeq.rs +5 -5
- data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/codegen/mod.rs +1197 -679
- data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/codegen/postprocessing/merge_extern_blocks.rs +3 -3
- data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/codegen/postprocessing/sort_semantically.rs +3 -3
- data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/codegen/serialize.rs +33 -34
- data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/codegen/struct_layout.rs +33 -26
- data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/deps.rs +1 -1
- data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/diagnostics.rs +22 -65
- data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/extra_assertions.rs +1 -1
- data/ext/cargo-vendor/bindgen-0.72.1/features.rs +570 -0
- data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/ir/analysis/derive.rs +69 -75
- data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/ir/analysis/has_destructor.rs +5 -6
- data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/ir/analysis/has_float.rs +13 -17
- data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/ir/analysis/has_type_param_in_array.rs +22 -32
- data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/ir/analysis/has_vtable.rs +11 -16
- data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/ir/analysis/mod.rs +15 -20
- data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/ir/analysis/sizedness.rs +13 -21
- data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/ir/analysis/template_params.rs +20 -26
- data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/ir/annotations.rs +18 -15
- data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/ir/comment.rs +2 -2
- data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/ir/comp.rs +54 -29
- data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/ir/context.rs +205 -136
- data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/ir/derive.rs +5 -10
- data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/ir/dot.rs +3 -4
- data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/ir/enum_ty.rs +5 -7
- data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/ir/function.rs +27 -28
- data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/ir/int.rs +7 -6
- data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/ir/item.rs +92 -132
- data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/ir/item_kind.rs +7 -7
- data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/ir/layout.rs +11 -23
- data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/ir/module.rs +2 -2
- data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/ir/objc.rs +22 -33
- data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/ir/template.rs +26 -33
- data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/ir/traversal.rs +4 -5
- data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/ir/ty.rs +63 -88
- data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/ir/var.rs +73 -38
- data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/lib.rs +186 -144
- data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/log_stubs.rs +6 -0
- data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/options/as_args.rs +1 -1
- data/ext/cargo-vendor/bindgen-0.72.1/options/cli.rs +1151 -0
- data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/options/mod.rs +234 -27
- data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/regex_set.rs +23 -28
- data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/time.rs +4 -4
- data/ext/cargo-vendor/rb-sys-0.9.130/.cargo-checksum.json +1 -0
- data/ext/cargo-vendor/rb-sys-0.9.130/.cargo_vcs_info.json +6 -0
- data/ext/cargo-vendor/{rb-sys-0.9.117 → rb-sys-0.9.130}/Cargo.lock +23 -31
- data/ext/cargo-vendor/{rb-sys-0.9.117 → rb-sys-0.9.130}/Cargo.toml +5 -4
- data/ext/cargo-vendor/{rb-sys-0.9.117 → rb-sys-0.9.130}/Cargo.toml.orig +5 -4
- data/ext/cargo-vendor/{rb-sys-0.9.117 → rb-sys-0.9.130}/build/main.rs +7 -1
- data/ext/cargo-vendor/{rb-sys-0.9.117 → rb-sys-0.9.130}/build/stable_api_config.rs +30 -6
- data/ext/cargo-vendor/{rb-sys-0.9.117 → rb-sys-0.9.130}/build/version.rs +14 -6
- data/ext/cargo-vendor/{rb-sys-0.9.117 → rb-sys-0.9.130}/src/bindings.rs +1 -0
- data/ext/cargo-vendor/rb-sys-0.9.130/src/macros.rs +701 -0
- data/ext/cargo-vendor/{rb-sys-0.9.117 → rb-sys-0.9.130}/src/memory.rs +17 -6
- data/ext/cargo-vendor/{rb-sys-0.9.117 → rb-sys-0.9.130}/src/stable_api/compiled.c +169 -10
- data/ext/cargo-vendor/{rb-sys-0.9.117 → rb-sys-0.9.130}/src/stable_api/compiled.rs +209 -14
- data/ext/cargo-vendor/rb-sys-0.9.130/src/stable_api/ruby_2_7.rs +770 -0
- data/ext/cargo-vendor/rb-sys-0.9.130/src/stable_api/ruby_3_0.rs +773 -0
- data/ext/cargo-vendor/rb-sys-0.9.130/src/stable_api/ruby_3_1.rs +766 -0
- data/ext/cargo-vendor/rb-sys-0.9.130/src/stable_api/ruby_3_2.rs +764 -0
- data/ext/cargo-vendor/rb-sys-0.9.130/src/stable_api/ruby_3_3.rs +777 -0
- data/ext/cargo-vendor/rb-sys-0.9.130/src/stable_api/ruby_3_4.rs +788 -0
- data/ext/cargo-vendor/rb-sys-0.9.130/src/stable_api/ruby_4_0.rs +784 -0
- data/ext/cargo-vendor/{rb-sys-0.9.117 → rb-sys-0.9.130}/src/stable_api.rs +213 -9
- data/ext/cargo-vendor/{rb-sys-0.9.117 → rb-sys-0.9.130}/src/utils.rs +12 -7
- data/ext/cargo-vendor/rb-sys-build-0.9.130/.cargo-checksum.json +1 -0
- data/ext/cargo-vendor/{rb-sys-build-0.9.117 → rb-sys-build-0.9.130}/.cargo_vcs_info.json +1 -1
- data/ext/cargo-vendor/{rb-sys-build-0.9.117 → rb-sys-build-0.9.130}/Cargo.lock +19 -27
- data/ext/cargo-vendor/{rb-sys-build-0.9.117 → rb-sys-build-0.9.130}/Cargo.toml +8 -3
- data/ext/cargo-vendor/{rb-sys-build-0.9.117 → rb-sys-build-0.9.130}/Cargo.toml.orig +4 -3
- data/ext/cargo-vendor/rb-sys-build-0.9.130/src/bindings/gc_stress.rs +303 -0
- data/ext/cargo-vendor/{rb-sys-build-0.9.117 → rb-sys-build-0.9.130}/src/bindings/stable_api.rs +102 -11
- data/ext/cargo-vendor/{rb-sys-build-0.9.117 → rb-sys-build-0.9.130}/src/bindings.rs +19 -13
- data/ext/cargo-vendor/{rb-sys-build-0.9.117 → rb-sys-build-0.9.130}/src/cc.rs +1 -1
- data/ext/cargo-vendor/{rb-sys-build-0.9.117 → rb-sys-build-0.9.130}/src/rb_config.rs +199 -2
- data/ext/cargo-vendor/rb-sys-build-0.9.130/tests/fixtures/rubyopt_stdout.rb +1 -0
- data/ext/cargo-vendor/rb-sys-build-0.9.130/tests/rubyopt.rs +17 -0
- data/ext/cargo-vendor/rb-sys-env-0.2.3/.cargo-checksum.json +1 -0
- data/ext/cargo-vendor/rb-sys-env-0.2.3/.cargo_vcs_info.json +6 -0
- data/ext/cargo-vendor/rb-sys-env-0.2.3/Cargo.lock +7 -0
- data/ext/cargo-vendor/{rb-sys-env-0.2.2 → rb-sys-env-0.2.3}/Cargo.toml +2 -2
- data/ext/cargo-vendor/{rb-sys-env-0.2.2 → rb-sys-env-0.2.3}/Cargo.toml.orig +2 -2
- data/ext/cargo-vendor/{rb-sys-env-0.2.2 → rb-sys-env-0.2.3}/readme.md +0 -2
- data/ext/cargo-vendor/{rb-sys-env-0.2.2 → rb-sys-env-0.2.3}/src/ruby_version.rs +3 -1
- data/ext/cargo-vendor/rustc-hash-2.1.3/.cargo-checksum.json +1 -0
- data/ext/cargo-vendor/rustc-hash-2.1.3/.cargo_vcs_info.json +6 -0
- data/ext/cargo-vendor/rustc-hash-2.1.3/.github/workflows/rust.yml +73 -0
- data/ext/cargo-vendor/rustc-hash-2.1.3/CHANGELOG.md +41 -0
- data/ext/cargo-vendor/rustc-hash-2.1.3/CODE_OF_CONDUCT.md +3 -0
- data/ext/cargo-vendor/rustc-hash-2.1.3/Cargo.lock +90 -0
- data/ext/cargo-vendor/rustc-hash-2.1.3/Cargo.toml +50 -0
- data/ext/cargo-vendor/rustc-hash-2.1.3/Cargo.toml.orig +20 -0
- data/ext/cargo-vendor/rustc-hash-2.1.3/LICENSE-APACHE +176 -0
- data/ext/cargo-vendor/rustc-hash-2.1.3/LICENSE-MIT +23 -0
- data/ext/cargo-vendor/rustc-hash-2.1.3/README.md +42 -0
- data/ext/cargo-vendor/rustc-hash-2.1.3/src/lib.rs +472 -0
- data/ext/cargo-vendor/rustc-hash-2.1.3/src/random_state.rs +101 -0
- data/ext/cargo-vendor/rustc-hash-2.1.3/src/seeded_state.rs +76 -0
- data/ext/cargo-vendor/{serde-1.0.228 → serde-1.0.229}/.cargo-checksum.json +1 -1
- data/ext/cargo-vendor/serde-1.0.229/.cargo_vcs_info.json +6 -0
- data/ext/cargo-vendor/{serde-1.0.228 → serde-1.0.229}/Cargo.lock +13 -13
- data/ext/cargo-vendor/{serde-1.0.228 → serde-1.0.229}/Cargo.toml +2 -2
- data/ext/cargo-vendor/{serde-1.0.228 → serde-1.0.229}/Cargo.toml.orig +2 -2
- data/ext/cargo-vendor/{serde_derive-1.0.228 → serde-1.0.229}/README.md +3 -3
- data/ext/cargo-vendor/{serde-1.0.228 → serde-1.0.229}/build.rs +2 -2
- data/ext/cargo-vendor/{serde_core-1.0.228/src → serde-1.0.229/src/core}/de/impls.rs +4 -4
- data/ext/cargo-vendor/{serde_core-1.0.228/src → serde-1.0.229/src/core}/lib.rs +2 -2
- data/ext/cargo-vendor/{serde-1.0.228 → serde-1.0.229}/src/lib.rs +3 -3
- data/ext/cargo-vendor/{serde_core-1.0.228 → serde_core-1.0.229}/.cargo-checksum.json +1 -1
- data/ext/cargo-vendor/serde_core-1.0.229/.cargo_vcs_info.json +6 -0
- data/ext/cargo-vendor/{serde_core-1.0.228 → serde_core-1.0.229}/Cargo.lock +11 -11
- data/ext/cargo-vendor/{serde_core-1.0.228 → serde_core-1.0.229}/Cargo.toml +2 -2
- data/ext/cargo-vendor/{serde_core-1.0.228 → serde_core-1.0.229}/Cargo.toml.orig +2 -2
- data/ext/cargo-vendor/{serde_core-1.0.228 → serde_core-1.0.229}/build.rs +5 -5
- data/ext/cargo-vendor/{serde-1.0.228/src/core → serde_core-1.0.229/src}/de/impls.rs +4 -4
- data/ext/cargo-vendor/{serde-1.0.228/src/core → serde_core-1.0.229/src}/lib.rs +2 -2
- data/ext/cargo-vendor/serde_derive-1.0.229/.cargo-checksum.json +1 -0
- data/ext/cargo-vendor/serde_derive-1.0.229/.cargo_vcs_info.json +6 -0
- data/ext/cargo-vendor/{serde_derive-1.0.228 → serde_derive-1.0.229}/Cargo.lock +29 -18
- data/ext/cargo-vendor/{serde_derive-1.0.228 → serde_derive-1.0.229}/Cargo.toml +3 -3
- data/ext/cargo-vendor/{serde_derive-1.0.228 → serde_derive-1.0.229}/Cargo.toml.orig +2 -2
- data/ext/cargo-vendor/{serde-1.0.228 → serde_derive-1.0.229}/README.md +3 -3
- data/ext/cargo-vendor/{serde_derive-1.0.228 → serde_derive-1.0.229}/src/bound.rs +80 -59
- data/ext/cargo-vendor/{serde_derive-1.0.228 → serde_derive-1.0.229}/src/de/enum_adjacently.rs +46 -45
- data/ext/cargo-vendor/{serde_derive-1.0.228 → serde_derive-1.0.229}/src/de/enum_externally.rs +3 -2
- data/ext/cargo-vendor/{serde_derive-1.0.228 → serde_derive-1.0.229}/src/de.rs +10 -7
- data/ext/cargo-vendor/{serde_derive-1.0.228 → serde_derive-1.0.229}/src/internals/ast.rs +15 -8
- data/ext/cargo-vendor/{serde_derive-1.0.228 → serde_derive-1.0.229}/src/internals/attr.rs +18 -31
- data/ext/cargo-vendor/{serde_derive-1.0.228 → serde_derive-1.0.229}/src/internals/ctxt.rs +3 -4
- data/ext/cargo-vendor/{serde_derive-1.0.228 → serde_derive-1.0.229}/src/internals/receiver.rs +2 -2
- data/ext/cargo-vendor/{serde_derive-1.0.228 → serde_derive-1.0.229}/src/lib.rs +1 -1
- data/ext/cargo-vendor/{serde_derive-1.0.228 → serde_derive-1.0.229}/src/pretend.rs +7 -7
- data/ext/cargo-vendor/{serde_derive-1.0.228 → serde_derive-1.0.229}/src/ser.rs +94 -94
- data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/.cargo-checksum.json +1 -1
- data/ext/cargo-vendor/serde_magnus-0.11.0/.cargo_vcs_info.json +6 -0
- data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/Cargo.lock +71 -73
- data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/Cargo.toml +2 -2
- data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/Cargo.toml.orig +2 -2
- data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/README.md +1 -1
- data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/src/de/deserializer.rs +2 -2
- data/ext/cargo-vendor/syn-3.0.9/.cargo-checksum.json +1 -0
- data/ext/cargo-vendor/syn-3.0.9/.cargo_vcs_info.json +6 -0
- data/ext/cargo-vendor/syn-3.0.9/Cargo.lock +1948 -0
- data/ext/cargo-vendor/syn-3.0.9/Cargo.toml +268 -0
- data/ext/cargo-vendor/syn-3.0.9/Cargo.toml.orig +95 -0
- data/ext/cargo-vendor/{lazycell-1.3.0 → syn-3.0.9}/LICENSE-APACHE +0 -25
- data/ext/cargo-vendor/syn-3.0.9/README.md +297 -0
- data/ext/cargo-vendor/syn-3.0.9/benches/file.rs +59 -0
- data/ext/cargo-vendor/syn-3.0.9/benches/rust.rs +189 -0
- data/ext/cargo-vendor/syn-3.0.9/src/attr.rs +841 -0
- data/ext/cargo-vendor/syn-3.0.9/src/bigint.rs +68 -0
- data/ext/cargo-vendor/syn-3.0.9/src/buffer.rs +462 -0
- data/ext/cargo-vendor/syn-3.0.9/src/classify.rs +311 -0
- data/ext/cargo-vendor/syn-3.0.9/src/custom_keyword.rs +260 -0
- data/ext/cargo-vendor/syn-3.0.9/src/custom_punctuation.rs +305 -0
- data/ext/cargo-vendor/syn-3.0.9/src/data.rs +489 -0
- data/ext/cargo-vendor/syn-3.0.9/src/derive.rs +260 -0
- data/ext/cargo-vendor/syn-3.0.9/src/discouraged.rs +233 -0
- data/ext/cargo-vendor/syn-3.0.9/src/drops.rs +58 -0
- data/ext/cargo-vendor/syn-3.0.9/src/error.rs +552 -0
- data/ext/cargo-vendor/syn-3.0.9/src/export.rs +73 -0
- data/ext/cargo-vendor/syn-3.0.9/src/expr.rs +4249 -0
- data/ext/cargo-vendor/syn-3.0.9/src/ext.rs +180 -0
- data/ext/cargo-vendor/syn-3.0.9/src/file.rs +136 -0
- data/ext/cargo-vendor/syn-3.0.9/src/fixup.rs +773 -0
- data/ext/cargo-vendor/syn-3.0.9/src/gen/clone.rs +2394 -0
- data/ext/cargo-vendor/syn-3.0.9/src/gen/debug.rs +3399 -0
- data/ext/cargo-vendor/syn-3.0.9/src/gen/eq.rs +2459 -0
- data/ext/cargo-vendor/syn-3.0.9/src/gen/fold.rs +3934 -0
- data/ext/cargo-vendor/syn-3.0.9/src/gen/hash.rs +3040 -0
- data/ext/cargo-vendor/syn-3.0.9/src/gen/token.css +744 -0
- data/ext/cargo-vendor/syn-3.0.9/src/gen/visit.rs +4037 -0
- data/ext/cargo-vendor/syn-3.0.9/src/gen/visit_mut.rs +3824 -0
- data/ext/cargo-vendor/syn-3.0.9/src/generics.rs +1490 -0
- data/ext/cargo-vendor/syn-3.0.9/src/group.rs +294 -0
- data/ext/cargo-vendor/syn-3.0.9/src/ident.rs +109 -0
- data/ext/cargo-vendor/syn-3.0.9/src/item.rs +3923 -0
- data/ext/cargo-vendor/syn-3.0.9/src/lib.rs +1132 -0
- data/ext/cargo-vendor/syn-3.0.9/src/lifetime.rs +193 -0
- data/ext/cargo-vendor/syn-3.0.9/src/lit.rs +1881 -0
- data/ext/cargo-vendor/syn-3.0.9/src/lookahead.rs +350 -0
- data/ext/cargo-vendor/syn-3.0.9/src/mac.rs +225 -0
- data/ext/cargo-vendor/syn-3.0.9/src/macros.rs +151 -0
- data/ext/cargo-vendor/syn-3.0.9/src/meta.rs +427 -0
- data/ext/cargo-vendor/syn-3.0.9/src/op.rs +219 -0
- data/ext/cargo-vendor/syn-3.0.9/src/parse.rs +1420 -0
- data/ext/cargo-vendor/syn-3.0.9/src/parse_macro_input.rs +128 -0
- data/ext/cargo-vendor/syn-3.0.9/src/parse_quote.rs +261 -0
- data/ext/cargo-vendor/syn-3.0.9/src/pat.rs +994 -0
- data/ext/cargo-vendor/syn-3.0.9/src/path.rs +972 -0
- data/ext/cargo-vendor/syn-3.0.9/src/precedence.rs +210 -0
- data/ext/cargo-vendor/syn-3.0.9/src/print.rs +16 -0
- data/ext/cargo-vendor/syn-3.0.9/src/punctuated.rs +1200 -0
- data/ext/cargo-vendor/syn-3.0.9/src/restriction.rs +160 -0
- data/ext/cargo-vendor/syn-3.0.9/src/scan_expr.rs +270 -0
- data/ext/cargo-vendor/syn-3.0.9/src/sealed.rs +4 -0
- data/ext/cargo-vendor/syn-3.0.9/src/span.rs +63 -0
- data/ext/cargo-vendor/syn-3.0.9/src/spanned.rs +118 -0
- data/ext/cargo-vendor/syn-3.0.9/src/stmt.rs +536 -0
- data/ext/cargo-vendor/syn-3.0.9/src/thread.rs +60 -0
- data/ext/cargo-vendor/syn-3.0.9/src/token.rs +1103 -0
- data/ext/cargo-vendor/syn-3.0.9/src/tt.rs +97 -0
- data/ext/cargo-vendor/syn-3.0.9/src/ty.rs +1347 -0
- data/ext/cargo-vendor/syn-3.0.9/src/verbatim.rs +32 -0
- data/ext/cargo-vendor/syn-3.0.9/src/whitespace.rs +65 -0
- data/ext/cargo-vendor/syn-3.0.9/tests/common/eq.rs +939 -0
- data/ext/cargo-vendor/syn-3.0.9/tests/common/mod.rs +6 -0
- data/ext/cargo-vendor/syn-3.0.9/tests/common/parse.rs +51 -0
- data/ext/cargo-vendor/syn-3.0.9/tests/common/visit.rs +119 -0
- data/ext/cargo-vendor/syn-3.0.9/tests/debug/gen.rs +5394 -0
- data/ext/cargo-vendor/syn-3.0.9/tests/debug/mod.rs +147 -0
- data/ext/cargo-vendor/syn-3.0.9/tests/macros/mod.rs +7 -0
- data/ext/cargo-vendor/syn-3.0.9/tests/regression/issue1108.rs +5 -0
- data/ext/cargo-vendor/syn-3.0.9/tests/regression/issue1235.rs +32 -0
- data/ext/cargo-vendor/syn-3.0.9/tests/regression.rs +5 -0
- data/ext/cargo-vendor/syn-3.0.9/tests/repo/mod.rs +789 -0
- data/ext/cargo-vendor/syn-3.0.9/tests/repo/progress.rs +37 -0
- data/ext/cargo-vendor/syn-3.0.9/tests/snapshot/mod.rs +68 -0
- data/ext/cargo-vendor/syn-3.0.9/tests/test_attribute.rs +231 -0
- data/ext/cargo-vendor/syn-3.0.9/tests/test_derive_input.rs +801 -0
- data/ext/cargo-vendor/syn-3.0.9/tests/test_expr.rs +1721 -0
- data/ext/cargo-vendor/syn-3.0.9/tests/test_generics.rs +363 -0
- data/ext/cargo-vendor/syn-3.0.9/tests/test_grouping.rs +59 -0
- data/ext/cargo-vendor/syn-3.0.9/tests/test_ident.rs +87 -0
- data/ext/cargo-vendor/syn-3.0.9/tests/test_item.rs +374 -0
- data/ext/cargo-vendor/syn-3.0.9/tests/test_lit.rs +335 -0
- data/ext/cargo-vendor/syn-3.0.9/tests/test_meta.rs +180 -0
- data/ext/cargo-vendor/syn-3.0.9/tests/test_parse_buffer.rs +104 -0
- data/ext/cargo-vendor/syn-3.0.9/tests/test_parse_quote.rs +175 -0
- data/ext/cargo-vendor/syn-3.0.9/tests/test_parse_stream.rs +187 -0
- data/ext/cargo-vendor/syn-3.0.9/tests/test_pat.rs +158 -0
- data/ext/cargo-vendor/syn-3.0.9/tests/test_path.rs +117 -0
- data/ext/cargo-vendor/syn-3.0.9/tests/test_precedence.rs +560 -0
- data/ext/cargo-vendor/syn-3.0.9/tests/test_punctuated.rs +92 -0
- data/ext/cargo-vendor/syn-3.0.9/tests/test_receiver.rs +275 -0
- data/ext/cargo-vendor/syn-3.0.9/tests/test_round_trip.rs +226 -0
- data/ext/cargo-vendor/syn-3.0.9/tests/test_shebang.rs +77 -0
- data/ext/cargo-vendor/syn-3.0.9/tests/test_size.rs +54 -0
- data/ext/cargo-vendor/syn-3.0.9/tests/test_stmt.rs +378 -0
- data/ext/cargo-vendor/syn-3.0.9/tests/test_token_trees.rs +38 -0
- data/ext/cargo-vendor/syn-3.0.9/tests/test_ty.rs +479 -0
- data/ext/cargo-vendor/syn-3.0.9/tests/test_unparenthesize.rs +71 -0
- data/ext/cargo-vendor/syn-3.0.9/tests/test_visibility.rs +193 -0
- data/ext/cargo-vendor/syn-3.0.9/tests/zzz_stable.rs +33 -0
- data/ext/code_ownership/Cargo.toml +1 -1
- data/ext/code_ownership/src/lib.rs +2 -2
- data/lib/code_ownership/version.rb +1 -1
- data/lib/code_ownership.rb +1 -1
- metadata +400 -293
- data/ext/cargo-vendor/bindgen-0.69.5/.cargo-checksum.json +0 -1
- data/ext/cargo-vendor/bindgen-0.69.5/.cargo_vcs_info.json +0 -6
- data/ext/cargo-vendor/bindgen-0.69.5/features.rs +0 -296
- data/ext/cargo-vendor/lazycell-1.3.0/.cargo-checksum.json +0 -1
- data/ext/cargo-vendor/lazycell-1.3.0/.cargo_vcs_info.json +0 -5
- data/ext/cargo-vendor/lazycell-1.3.0/CHANGELOG.md +0 -197
- data/ext/cargo-vendor/lazycell-1.3.0/Cargo.toml +0 -34
- data/ext/cargo-vendor/lazycell-1.3.0/Cargo.toml.orig +0 -27
- data/ext/cargo-vendor/lazycell-1.3.0/LICENSE-MIT +0 -26
- data/ext/cargo-vendor/lazycell-1.3.0/README.md +0 -73
- data/ext/cargo-vendor/lazycell-1.3.0/src/lib.rs +0 -680
- data/ext/cargo-vendor/lazycell-1.3.0/src/serde_impl.rs +0 -86
- data/ext/cargo-vendor/rb-sys-0.9.117/.cargo-checksum.json +0 -1
- data/ext/cargo-vendor/rb-sys-0.9.117/.cargo_vcs_info.json +0 -6
- data/ext/cargo-vendor/rb-sys-0.9.117/src/macros.rs +0 -371
- data/ext/cargo-vendor/rb-sys-0.9.117/src/stable_api/ruby_2_6.rs +0 -324
- data/ext/cargo-vendor/rb-sys-0.9.117/src/stable_api/ruby_2_7.rs +0 -324
- data/ext/cargo-vendor/rb-sys-0.9.117/src/stable_api/ruby_3_0.rs +0 -332
- data/ext/cargo-vendor/rb-sys-0.9.117/src/stable_api/ruby_3_1.rs +0 -325
- data/ext/cargo-vendor/rb-sys-0.9.117/src/stable_api/ruby_3_2.rs +0 -323
- data/ext/cargo-vendor/rb-sys-0.9.117/src/stable_api/ruby_3_3.rs +0 -339
- data/ext/cargo-vendor/rb-sys-0.9.117/src/stable_api/ruby_3_4.rs +0 -339
- data/ext/cargo-vendor/rb-sys-build-0.9.117/.cargo-checksum.json +0 -1
- data/ext/cargo-vendor/rb-sys-env-0.2.2/.cargo-checksum.json +0 -1
- data/ext/cargo-vendor/rb-sys-env-0.2.2/.cargo_vcs_info.json +0 -6
- data/ext/cargo-vendor/rustc-hash-1.1.0/.cargo-checksum.json +0 -1
- data/ext/cargo-vendor/rustc-hash-1.1.0/.cargo_vcs_info.json +0 -5
- data/ext/cargo-vendor/rustc-hash-1.1.0/CODE_OF_CONDUCT.md +0 -40
- data/ext/cargo-vendor/rustc-hash-1.1.0/Cargo.toml +0 -25
- data/ext/cargo-vendor/rustc-hash-1.1.0/Cargo.toml.orig +0 -13
- data/ext/cargo-vendor/rustc-hash-1.1.0/LICENSE-APACHE +0 -201
- data/ext/cargo-vendor/rustc-hash-1.1.0/README.md +0 -38
- data/ext/cargo-vendor/rustc-hash-1.1.0/src/lib.rs +0 -148
- data/ext/cargo-vendor/serde-1.0.228/.cargo_vcs_info.json +0 -6
- data/ext/cargo-vendor/serde_core-1.0.228/.cargo_vcs_info.json +0 -6
- data/ext/cargo-vendor/serde_derive-1.0.228/.cargo-checksum.json +0 -1
- data/ext/cargo-vendor/serde_derive-1.0.228/.cargo_vcs_info.json +0 -6
- data/ext/cargo-vendor/serde_magnus-0.10.0/.cargo_vcs_info.json +0 -6
- /data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/LICENSE +0 -0
- /data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/codegen/postprocessing/mod.rs +0 -0
- /data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/ir/mod.rs +0 -0
- /data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/options/helpers.rs +0 -0
- /data/ext/cargo-vendor/{bindgen-0.69.5 → bindgen-0.72.1}/parse.rs +0 -0
- /data/ext/cargo-vendor/{rb-sys-0.9.117 → rb-sys-0.9.130}/LICENSE-APACHE +0 -0
- /data/ext/cargo-vendor/{rb-sys-0.9.117 → rb-sys-0.9.130}/LICENSE-MIT +0 -0
- /data/ext/cargo-vendor/{rb-sys-0.9.117 → rb-sys-0.9.130}/bin/release.sh +0 -0
- /data/ext/cargo-vendor/{rb-sys-0.9.117 → rb-sys-0.9.130}/build/features.rs +0 -0
- /data/ext/cargo-vendor/{rb-sys-0.9.117 → rb-sys-0.9.130}/readme.md +0 -0
- /data/ext/cargo-vendor/{rb-sys-0.9.117 → rb-sys-0.9.130}/src/hidden.rs +0 -0
- /data/ext/cargo-vendor/{rb-sys-0.9.117 → rb-sys-0.9.130}/src/lib.rs +0 -0
- /data/ext/cargo-vendor/{rb-sys-0.9.117 → rb-sys-0.9.130}/src/ruby_abi_version.rs +0 -0
- /data/ext/cargo-vendor/{rb-sys-0.9.117 → rb-sys-0.9.130}/src/special_consts.rs +0 -0
- /data/ext/cargo-vendor/{rb-sys-0.9.117 → rb-sys-0.9.130}/src/symbol.rs +0 -0
- /data/ext/cargo-vendor/{rb-sys-0.9.117 → rb-sys-0.9.130}/src/tracking_allocator.rs +0 -0
- /data/ext/cargo-vendor/{rb-sys-0.9.117 → rb-sys-0.9.130}/src/value_type.rs +0 -0
- /data/ext/cargo-vendor/{rb-sys-build-0.9.117 → rb-sys-build-0.9.130}/LICENSE-APACHE +0 -0
- /data/ext/cargo-vendor/{rb-sys-build-0.9.117 → rb-sys-build-0.9.130}/LICENSE-MIT +0 -0
- /data/ext/cargo-vendor/{rb-sys-build-0.9.117 → rb-sys-build-0.9.130}/src/bindings/sanitizer.rs +0 -0
- /data/ext/cargo-vendor/{rb-sys-build-0.9.117 → rb-sys-build-0.9.130}/src/bindings/wrapper.h +0 -0
- /data/ext/cargo-vendor/{rb-sys-build-0.9.117 → rb-sys-build-0.9.130}/src/lib.rs +0 -0
- /data/ext/cargo-vendor/{rb-sys-build-0.9.117 → rb-sys-build-0.9.130}/src/rb_config/flags.rs +0 -0
- /data/ext/cargo-vendor/{rb-sys-build-0.9.117 → rb-sys-build-0.9.130}/src/rb_config/library.rs +0 -0
- /data/ext/cargo-vendor/{rb-sys-build-0.9.117 → rb-sys-build-0.9.130}/src/rb_config/search_path.rs +0 -0
- /data/ext/cargo-vendor/{rb-sys-build-0.9.117 → rb-sys-build-0.9.130}/src/utils.rs +0 -0
- /data/ext/cargo-vendor/{rb-sys-env-0.2.2 → rb-sys-env-0.2.3}/LICENSE-APACHE +0 -0
- /data/ext/cargo-vendor/{rb-sys-env-0.2.2 → rb-sys-env-0.2.3}/LICENSE-MIT +0 -0
- /data/ext/cargo-vendor/{rb-sys-env-0.2.2 → rb-sys-env-0.2.3}/build.rs +0 -0
- /data/ext/cargo-vendor/{rb-sys-env-0.2.2 → rb-sys-env-0.2.3}/src/defines.rs +0 -0
- /data/ext/cargo-vendor/{rb-sys-env-0.2.2 → rb-sys-env-0.2.3}/src/lib.rs +0 -0
- /data/ext/cargo-vendor/{rb-sys-env-0.2.2 → rb-sys-env-0.2.3}/src/rb_env.rs +0 -0
- /data/ext/cargo-vendor/{rb-sys-env-0.2.2 → rb-sys-env-0.2.3}/src/utils.rs +0 -0
- /data/ext/cargo-vendor/{serde-1.0.228 → serde-1.0.229}/LICENSE-APACHE +0 -0
- /data/ext/cargo-vendor/{rustc-hash-1.1.0 → serde-1.0.229}/LICENSE-MIT +0 -0
- /data/ext/cargo-vendor/{serde-1.0.228 → serde-1.0.229}/crates-io.md +0 -0
- /data/ext/cargo-vendor/{serde-1.0.228 → serde-1.0.229}/src/core/crate_root.rs +0 -0
- /data/ext/cargo-vendor/{serde-1.0.228 → serde-1.0.229}/src/core/de/ignored_any.rs +0 -0
- /data/ext/cargo-vendor/{serde-1.0.228 → serde-1.0.229}/src/core/de/mod.rs +0 -0
- /data/ext/cargo-vendor/{serde-1.0.228 → serde-1.0.229}/src/core/de/value.rs +0 -0
- /data/ext/cargo-vendor/{serde-1.0.228 → serde-1.0.229}/src/core/format.rs +0 -0
- /data/ext/cargo-vendor/{serde-1.0.228 → serde-1.0.229}/src/core/macros.rs +0 -0
- /data/ext/cargo-vendor/{serde-1.0.228 → serde-1.0.229}/src/core/private/content.rs +0 -0
- /data/ext/cargo-vendor/{serde-1.0.228 → serde-1.0.229}/src/core/private/doc.rs +0 -0
- /data/ext/cargo-vendor/{serde-1.0.228 → serde-1.0.229}/src/core/private/mod.rs +0 -0
- /data/ext/cargo-vendor/{serde-1.0.228 → serde-1.0.229}/src/core/private/seed.rs +0 -0
- /data/ext/cargo-vendor/{serde-1.0.228 → serde-1.0.229}/src/core/private/size_hint.rs +0 -0
- /data/ext/cargo-vendor/{serde-1.0.228 → serde-1.0.229}/src/core/private/string.rs +0 -0
- /data/ext/cargo-vendor/{serde-1.0.228 → serde-1.0.229}/src/core/ser/fmt.rs +0 -0
- /data/ext/cargo-vendor/{serde-1.0.228 → serde-1.0.229}/src/core/ser/impls.rs +0 -0
- /data/ext/cargo-vendor/{serde-1.0.228 → serde-1.0.229}/src/core/ser/impossible.rs +0 -0
- /data/ext/cargo-vendor/{serde-1.0.228 → serde-1.0.229}/src/core/ser/mod.rs +0 -0
- /data/ext/cargo-vendor/{serde-1.0.228 → serde-1.0.229}/src/core/std_error.rs +0 -0
- /data/ext/cargo-vendor/{serde-1.0.228 → serde-1.0.229}/src/integer128.rs +0 -0
- /data/ext/cargo-vendor/{serde-1.0.228 → serde-1.0.229}/src/private/de.rs +0 -0
- /data/ext/cargo-vendor/{serde-1.0.228 → serde-1.0.229}/src/private/mod.rs +0 -0
- /data/ext/cargo-vendor/{serde-1.0.228 → serde-1.0.229}/src/private/ser.rs +0 -0
- /data/ext/cargo-vendor/{serde_core-1.0.228 → serde_core-1.0.229}/LICENSE-APACHE +0 -0
- /data/ext/cargo-vendor/{serde-1.0.228 → serde_core-1.0.229}/LICENSE-MIT +0 -0
- /data/ext/cargo-vendor/{serde_core-1.0.228 → serde_core-1.0.229}/README.md +0 -0
- /data/ext/cargo-vendor/{serde_core-1.0.228 → serde_core-1.0.229}/src/crate_root.rs +0 -0
- /data/ext/cargo-vendor/{serde_core-1.0.228 → serde_core-1.0.229}/src/de/ignored_any.rs +0 -0
- /data/ext/cargo-vendor/{serde_core-1.0.228 → serde_core-1.0.229}/src/de/mod.rs +0 -0
- /data/ext/cargo-vendor/{serde_core-1.0.228 → serde_core-1.0.229}/src/de/value.rs +0 -0
- /data/ext/cargo-vendor/{serde_core-1.0.228 → serde_core-1.0.229}/src/format.rs +0 -0
- /data/ext/cargo-vendor/{serde_core-1.0.228 → serde_core-1.0.229}/src/macros.rs +0 -0
- /data/ext/cargo-vendor/{serde_core-1.0.228 → serde_core-1.0.229}/src/private/content.rs +0 -0
- /data/ext/cargo-vendor/{serde_core-1.0.228 → serde_core-1.0.229}/src/private/doc.rs +0 -0
- /data/ext/cargo-vendor/{serde_core-1.0.228 → serde_core-1.0.229}/src/private/mod.rs +0 -0
- /data/ext/cargo-vendor/{serde_core-1.0.228 → serde_core-1.0.229}/src/private/seed.rs +0 -0
- /data/ext/cargo-vendor/{serde_core-1.0.228 → serde_core-1.0.229}/src/private/size_hint.rs +0 -0
- /data/ext/cargo-vendor/{serde_core-1.0.228 → serde_core-1.0.229}/src/private/string.rs +0 -0
- /data/ext/cargo-vendor/{serde_core-1.0.228 → serde_core-1.0.229}/src/ser/fmt.rs +0 -0
- /data/ext/cargo-vendor/{serde_core-1.0.228 → serde_core-1.0.229}/src/ser/impls.rs +0 -0
- /data/ext/cargo-vendor/{serde_core-1.0.228 → serde_core-1.0.229}/src/ser/impossible.rs +0 -0
- /data/ext/cargo-vendor/{serde_core-1.0.228 → serde_core-1.0.229}/src/ser/mod.rs +0 -0
- /data/ext/cargo-vendor/{serde_core-1.0.228 → serde_core-1.0.229}/src/std_error.rs +0 -0
- /data/ext/cargo-vendor/{serde_derive-1.0.228 → serde_derive-1.0.229}/LICENSE-APACHE +0 -0
- /data/ext/cargo-vendor/{serde_core-1.0.228 → serde_derive-1.0.229}/LICENSE-MIT +0 -0
- /data/ext/cargo-vendor/{serde_derive-1.0.228 → serde_derive-1.0.229}/crates-io.md +0 -0
- /data/ext/cargo-vendor/{serde_derive-1.0.228 → serde_derive-1.0.229}/src/de/enum_.rs +0 -0
- /data/ext/cargo-vendor/{serde_derive-1.0.228 → serde_derive-1.0.229}/src/de/enum_internally.rs +0 -0
- /data/ext/cargo-vendor/{serde_derive-1.0.228 → serde_derive-1.0.229}/src/de/enum_untagged.rs +0 -0
- /data/ext/cargo-vendor/{serde_derive-1.0.228 → serde_derive-1.0.229}/src/de/identifier.rs +0 -0
- /data/ext/cargo-vendor/{serde_derive-1.0.228 → serde_derive-1.0.229}/src/de/struct_.rs +0 -0
- /data/ext/cargo-vendor/{serde_derive-1.0.228 → serde_derive-1.0.229}/src/de/tuple.rs +0 -0
- /data/ext/cargo-vendor/{serde_derive-1.0.228 → serde_derive-1.0.229}/src/de/unit.rs +0 -0
- /data/ext/cargo-vendor/{serde_derive-1.0.228 → serde_derive-1.0.229}/src/deprecated.rs +0 -0
- /data/ext/cargo-vendor/{serde_derive-1.0.228 → serde_derive-1.0.229}/src/dummy.rs +0 -0
- /data/ext/cargo-vendor/{serde_derive-1.0.228 → serde_derive-1.0.229}/src/fragment.rs +0 -0
- /data/ext/cargo-vendor/{serde_derive-1.0.228 → serde_derive-1.0.229}/src/internals/case.rs +0 -0
- /data/ext/cargo-vendor/{serde_derive-1.0.228 → serde_derive-1.0.229}/src/internals/check.rs +0 -0
- /data/ext/cargo-vendor/{serde_derive-1.0.228 → serde_derive-1.0.229}/src/internals/mod.rs +0 -0
- /data/ext/cargo-vendor/{serde_derive-1.0.228 → serde_derive-1.0.229}/src/internals/name.rs +0 -0
- /data/ext/cargo-vendor/{serde_derive-1.0.228 → serde_derive-1.0.229}/src/internals/respan.rs +0 -0
- /data/ext/cargo-vendor/{serde_derive-1.0.228 → serde_derive-1.0.229}/src/internals/symbol.rs +0 -0
- /data/ext/cargo-vendor/{serde_derive-1.0.228 → serde_derive-1.0.229}/src/this.rs +0 -0
- /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/LICENSE +0 -0
- /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/src/de/array_deserializer.rs +0 -0
- /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/src/de/array_enumerator.rs +0 -0
- /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/src/de/enum_deserializer.rs +0 -0
- /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/src/de/hash_deserializer.rs +0 -0
- /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/src/de/mod.rs +0 -0
- /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/src/de/variant_deserializer.rs +0 -0
- /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/src/error.rs +0 -0
- /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/src/lib.rs +0 -0
- /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/src/ser/enums.rs +0 -0
- /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/src/ser/map_serializer.rs +0 -0
- /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/src/ser/mod.rs +0 -0
- /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/src/ser/seq_serializer.rs +0 -0
- /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/src/ser/serializer.rs +0 -0
- /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/src/ser/struct_serializer.rs +0 -0
- /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/src/ser/struct_variant_serializer.rs +0 -0
- /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/src/ser/tuple_variant_serializer.rs +0 -0
- /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/tests/deserializing_arrays.rs +0 -0
- /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/tests/deserializing_booleans.rs +0 -0
- /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/tests/deserializing_enums.rs +0 -0
- /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/tests/deserializing_floats.rs +0 -0
- /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/tests/deserializing_integers.rs +0 -0
- /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/tests/deserializing_maps.rs +0 -0
- /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/tests/deserializing_options.rs +0 -0
- /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/tests/deserializing_results.rs +0 -0
- /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/tests/deserializing_strings.rs +0 -0
- /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/tests/deserializing_structs.rs +0 -0
- /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/tests/deserializing_tuples.rs +0 -0
- /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/tests/deserializing_vecs.rs +0 -0
- /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/tests/serializing_arrays.rs +0 -0
- /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/tests/serializing_booleans.rs +0 -0
- /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/tests/serializing_enums.rs +0 -0
- /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/tests/serializing_floats.rs +0 -0
- /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/tests/serializing_integers.rs +0 -0
- /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/tests/serializing_maps.rs +0 -0
- /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/tests/serializing_options.rs +0 -0
- /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/tests/serializing_results.rs +0 -0
- /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/tests/serializing_strings.rs +0 -0
- /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/tests/serializing_structs.rs +0 -0
- /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/tests/serializing_tuples.rs +0 -0
- /data/ext/cargo-vendor/{serde_magnus-0.10.0 → serde_magnus-0.11.0}/tests/serializing_vecs.rs +0 -0
- /data/ext/cargo-vendor/{serde_derive-1.0.228 → syn-3.0.9}/LICENSE-MIT +0 -0
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
use crate::path::Path;
|
|
2
|
+
use crate::token;
|
|
3
|
+
use alloc::boxed::Box;
|
|
4
|
+
|
|
5
|
+
ast_enum! {
|
|
6
|
+
/// The visibility level of an item: inherited or `pub` or
|
|
7
|
+
/// `pub(restricted)`.
|
|
8
|
+
///
|
|
9
|
+
/// # Syntax tree enum
|
|
10
|
+
///
|
|
11
|
+
/// This type is a [syntax tree enum].
|
|
12
|
+
///
|
|
13
|
+
/// [syntax tree enum]: crate::expr::Expr#syntax-tree-enums
|
|
14
|
+
#[cfg_attr(docsrs, doc(cfg(any(feature = "full", feature = "derive"))))]
|
|
15
|
+
pub enum Visibility {
|
|
16
|
+
/// A public visibility level: `pub`.
|
|
17
|
+
Public(Token![pub]),
|
|
18
|
+
|
|
19
|
+
/// A visibility level restricted to some path: `pub(self)` or
|
|
20
|
+
/// `pub(super)` or `pub(crate)` or `pub(in some::module)`.
|
|
21
|
+
Restricted(VisRestricted),
|
|
22
|
+
|
|
23
|
+
/// An inherited visibility, which usually means private.
|
|
24
|
+
Inherited,
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
ast_struct! {
|
|
29
|
+
/// A visibility level restricted to some path: `pub(self)` or
|
|
30
|
+
/// `pub(super)` or `pub(crate)` or `pub(in some::module)`.
|
|
31
|
+
#[cfg_attr(docsrs, doc(cfg(any(feature = "full", feature = "derive"))))]
|
|
32
|
+
pub struct VisRestricted {
|
|
33
|
+
pub pub_token: Token![pub],
|
|
34
|
+
pub paren_token: token::Paren,
|
|
35
|
+
pub in_token: Option<Token![in]>,
|
|
36
|
+
pub path: Box<Path>,
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
#[cfg(feature = "parsing")]
|
|
41
|
+
pub(crate) mod parsing {
|
|
42
|
+
use crate::error::Result;
|
|
43
|
+
use crate::ext::IdentExt as _;
|
|
44
|
+
use crate::ident::Ident;
|
|
45
|
+
use crate::parse::discouraged::Speculative as _;
|
|
46
|
+
use crate::parse::{Parse, ParseStream};
|
|
47
|
+
use crate::path::Path;
|
|
48
|
+
use crate::restriction::{VisRestricted, Visibility};
|
|
49
|
+
use crate::token;
|
|
50
|
+
use alloc::boxed::Box;
|
|
51
|
+
|
|
52
|
+
#[cfg_attr(docsrs, doc(cfg(feature = "parsing")))]
|
|
53
|
+
impl Parse for Visibility {
|
|
54
|
+
fn parse(input: ParseStream) -> Result<Self> {
|
|
55
|
+
// Recognize an empty None-delimited group, as produced by a $:vis
|
|
56
|
+
// matcher that matched no tokens.
|
|
57
|
+
if input.peek(token::Group) {
|
|
58
|
+
let ahead = input.fork();
|
|
59
|
+
let group = crate::group::parse_group(&ahead)?;
|
|
60
|
+
if group.content.is_empty() {
|
|
61
|
+
input.advance_to(&ahead);
|
|
62
|
+
return Ok(Visibility::Inherited);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
if input.peek(Token![pub]) {
|
|
67
|
+
Self::parse_pub(input)
|
|
68
|
+
} else {
|
|
69
|
+
Ok(Visibility::Inherited)
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
impl Visibility {
|
|
75
|
+
fn parse_pub(input: ParseStream) -> Result<Self> {
|
|
76
|
+
let pub_token = input.parse::<Token![pub]>()?;
|
|
77
|
+
|
|
78
|
+
if input.peek(token::Paren) {
|
|
79
|
+
let ahead = input.fork();
|
|
80
|
+
|
|
81
|
+
let content;
|
|
82
|
+
let paren_token = parenthesized!(content in ahead);
|
|
83
|
+
if content.peek(Token![crate])
|
|
84
|
+
|| content.peek(Token![self])
|
|
85
|
+
|| content.peek(Token![super])
|
|
86
|
+
{
|
|
87
|
+
let path = content.call(Ident::parse_any)?;
|
|
88
|
+
|
|
89
|
+
// Ensure there are no additional tokens within `content`.
|
|
90
|
+
// Without explicitly checking, we may misinterpret a tuple
|
|
91
|
+
// field as a restricted visibility, causing a parse error.
|
|
92
|
+
// e.g. `pub (crate::A, crate::B)` (Issue #720).
|
|
93
|
+
if content.is_empty() {
|
|
94
|
+
input.advance_to(&ahead);
|
|
95
|
+
return Ok(Visibility::Restricted(VisRestricted {
|
|
96
|
+
pub_token,
|
|
97
|
+
paren_token,
|
|
98
|
+
in_token: None,
|
|
99
|
+
path: Box::new(Path::from(path)),
|
|
100
|
+
}));
|
|
101
|
+
}
|
|
102
|
+
} else if content.peek(Token![in]) {
|
|
103
|
+
let in_token: Token![in] = content.parse()?;
|
|
104
|
+
let path = content.call(Path::parse_mod_style)?;
|
|
105
|
+
|
|
106
|
+
input.advance_to(&ahead);
|
|
107
|
+
return Ok(Visibility::Restricted(VisRestricted {
|
|
108
|
+
pub_token,
|
|
109
|
+
paren_token,
|
|
110
|
+
in_token: Some(in_token),
|
|
111
|
+
path: Box::new(path),
|
|
112
|
+
}));
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
Ok(Visibility::Public(pub_token))
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
#[cfg(feature = "full")]
|
|
120
|
+
pub(crate) fn is_some(&self) -> bool {
|
|
121
|
+
match self {
|
|
122
|
+
Visibility::Inherited => false,
|
|
123
|
+
_ => true,
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
#[cfg(feature = "printing")]
|
|
130
|
+
mod printing {
|
|
131
|
+
use crate::path;
|
|
132
|
+
use crate::path::printing::PathStyle;
|
|
133
|
+
use crate::restriction::{VisRestricted, Visibility};
|
|
134
|
+
use proc_macro2::TokenStream;
|
|
135
|
+
use quote::ToTokens;
|
|
136
|
+
|
|
137
|
+
#[cfg_attr(docsrs, doc(cfg(feature = "printing")))]
|
|
138
|
+
impl ToTokens for Visibility {
|
|
139
|
+
fn to_tokens(&self, tokens: &mut TokenStream) {
|
|
140
|
+
match self {
|
|
141
|
+
Visibility::Public(pub_token) => pub_token.to_tokens(tokens),
|
|
142
|
+
Visibility::Restricted(vis_restricted) => vis_restricted.to_tokens(tokens),
|
|
143
|
+
Visibility::Inherited => {}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
#[cfg_attr(docsrs, doc(cfg(feature = "printing")))]
|
|
149
|
+
impl ToTokens for VisRestricted {
|
|
150
|
+
fn to_tokens(&self, tokens: &mut TokenStream) {
|
|
151
|
+
self.pub_token.to_tokens(tokens);
|
|
152
|
+
self.paren_token.surround(tokens, |tokens| {
|
|
153
|
+
// TODO: If we have a path which is not "self" or "super" or
|
|
154
|
+
// "crate", automatically add the "in" token.
|
|
155
|
+
self.in_token.to_tokens(tokens);
|
|
156
|
+
path::printing::print_path(tokens, &self.path, PathStyle::Mod);
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
}
|
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
use self::{Action::*, Input::*};
|
|
2
|
+
use proc_macro2::{Delimiter, Ident, Spacing, TokenTree};
|
|
3
|
+
use syn::parse::{ParseStream, Result};
|
|
4
|
+
#[allow(unused_imports)]
|
|
5
|
+
//#[cfg_attr(not(test), expect(unused_imports))] // Rust 1.81+
|
|
6
|
+
use syn::Token;
|
|
7
|
+
use syn::{AngleBracketedGenericArguments, BinOp, Expr, ExprPath, Lifetime, Lit, Type};
|
|
8
|
+
|
|
9
|
+
enum Input {
|
|
10
|
+
Keyword(&'static str),
|
|
11
|
+
Punct(&'static str),
|
|
12
|
+
ConsumeAny,
|
|
13
|
+
ConsumeBinOp,
|
|
14
|
+
ConsumeBrace,
|
|
15
|
+
ConsumeDelimiter,
|
|
16
|
+
ConsumeIdent,
|
|
17
|
+
ConsumeLifetime,
|
|
18
|
+
ConsumeLiteral,
|
|
19
|
+
ConsumeNestedBrace,
|
|
20
|
+
ExpectPath,
|
|
21
|
+
ExpectTurbofish,
|
|
22
|
+
ExpectType,
|
|
23
|
+
CanBeginExpr,
|
|
24
|
+
Otherwise,
|
|
25
|
+
Empty,
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
enum Action {
|
|
29
|
+
SetState(&'static [(Input, Action)]),
|
|
30
|
+
IncDepth,
|
|
31
|
+
DecDepth,
|
|
32
|
+
Finish,
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
static INIT: [(Input, Action); 29] = [
|
|
36
|
+
(ConsumeDelimiter, SetState(&POSTFIX)),
|
|
37
|
+
(Keyword("async"), SetState(&ASYNC)),
|
|
38
|
+
(Keyword("break"), SetState(&BREAK_LABEL)),
|
|
39
|
+
(Keyword("const"), SetState(&CONST)),
|
|
40
|
+
(Keyword("continue"), SetState(&CONTINUE)),
|
|
41
|
+
(Keyword("for"), SetState(&FOR)),
|
|
42
|
+
(Keyword("if"), IncDepth),
|
|
43
|
+
(Keyword("let"), SetState(&PATTERN)),
|
|
44
|
+
(Keyword("loop"), SetState(&BLOCK)),
|
|
45
|
+
(Keyword("match"), IncDepth),
|
|
46
|
+
(Keyword("move"), SetState(&CLOSURE)),
|
|
47
|
+
(Keyword("return"), SetState(&RETURN)),
|
|
48
|
+
(Keyword("static"), SetState(&CLOSURE)),
|
|
49
|
+
(Keyword("try"), SetState(&BLOCK)),
|
|
50
|
+
(Keyword("unsafe"), SetState(&BLOCK)),
|
|
51
|
+
(Keyword("while"), IncDepth),
|
|
52
|
+
(Keyword("yield"), SetState(&RETURN)),
|
|
53
|
+
(Keyword("_"), SetState(&POSTFIX)),
|
|
54
|
+
(Punct("!"), SetState(&INIT)),
|
|
55
|
+
(Punct("#"), SetState(&[(ConsumeDelimiter, SetState(&INIT))])),
|
|
56
|
+
(Punct("&"), SetState(&REFERENCE)),
|
|
57
|
+
(Punct("*"), SetState(&INIT)),
|
|
58
|
+
(Punct("-"), SetState(&INIT)),
|
|
59
|
+
(Punct("..="), SetState(&INIT)),
|
|
60
|
+
(Punct(".."), SetState(&RANGE)),
|
|
61
|
+
(Punct("|"), SetState(&CLOSURE_ARGS)),
|
|
62
|
+
(ConsumeLifetime, SetState(&[(Punct(":"), SetState(&INIT))])),
|
|
63
|
+
(ConsumeLiteral, SetState(&POSTFIX)),
|
|
64
|
+
(ExpectPath, SetState(&PATH)),
|
|
65
|
+
];
|
|
66
|
+
|
|
67
|
+
static POSTFIX: [(Input, Action); 10] = [
|
|
68
|
+
(Keyword("as"), SetState(&[(ExpectType, SetState(&POSTFIX))])),
|
|
69
|
+
(Punct("..="), SetState(&INIT)),
|
|
70
|
+
(Punct(".."), SetState(&RANGE)),
|
|
71
|
+
(Punct("."), SetState(&DOT)),
|
|
72
|
+
(Punct("?"), SetState(&POSTFIX)),
|
|
73
|
+
(ConsumeBinOp, SetState(&INIT)),
|
|
74
|
+
(Punct("="), SetState(&INIT)),
|
|
75
|
+
(ConsumeNestedBrace, SetState(&IF_THEN)),
|
|
76
|
+
(ConsumeDelimiter, SetState(&POSTFIX)),
|
|
77
|
+
(Empty, Finish),
|
|
78
|
+
];
|
|
79
|
+
|
|
80
|
+
static ASYNC: [(Input, Action); 3] = [
|
|
81
|
+
(Keyword("move"), SetState(&ASYNC)),
|
|
82
|
+
(Punct("|"), SetState(&CLOSURE_ARGS)),
|
|
83
|
+
(ConsumeBrace, SetState(&POSTFIX)),
|
|
84
|
+
];
|
|
85
|
+
|
|
86
|
+
static BLOCK: [(Input, Action); 1] = [(ConsumeBrace, SetState(&POSTFIX))];
|
|
87
|
+
|
|
88
|
+
static BREAK_LABEL: [(Input, Action); 2] = [
|
|
89
|
+
(ConsumeLifetime, SetState(&BREAK_VALUE)),
|
|
90
|
+
(Otherwise, SetState(&BREAK_VALUE)),
|
|
91
|
+
];
|
|
92
|
+
|
|
93
|
+
static BREAK_VALUE: [(Input, Action); 3] = [
|
|
94
|
+
(ConsumeNestedBrace, SetState(&IF_THEN)),
|
|
95
|
+
(CanBeginExpr, SetState(&INIT)),
|
|
96
|
+
(Otherwise, SetState(&POSTFIX)),
|
|
97
|
+
];
|
|
98
|
+
|
|
99
|
+
static CLOSURE: [(Input, Action); 7] = [
|
|
100
|
+
(Keyword("async"), SetState(&CLOSURE)),
|
|
101
|
+
(Keyword("move"), SetState(&CLOSURE)),
|
|
102
|
+
(Punct(","), SetState(&CLOSURE)),
|
|
103
|
+
(Punct(">"), SetState(&CLOSURE)),
|
|
104
|
+
(Punct("|"), SetState(&CLOSURE_ARGS)),
|
|
105
|
+
(ConsumeLifetime, SetState(&CLOSURE)),
|
|
106
|
+
(ConsumeIdent, SetState(&CLOSURE)),
|
|
107
|
+
];
|
|
108
|
+
|
|
109
|
+
static CLOSURE_ARGS: [(Input, Action); 2] = [
|
|
110
|
+
(Punct("|"), SetState(&CLOSURE_RET)),
|
|
111
|
+
(ConsumeAny, SetState(&CLOSURE_ARGS)),
|
|
112
|
+
];
|
|
113
|
+
|
|
114
|
+
static CLOSURE_RET: [(Input, Action); 2] = [
|
|
115
|
+
(Punct("->"), SetState(&[(ExpectType, SetState(&BLOCK))])),
|
|
116
|
+
(Otherwise, SetState(&INIT)),
|
|
117
|
+
];
|
|
118
|
+
|
|
119
|
+
static CONST: [(Input, Action); 3] = [
|
|
120
|
+
(Keyword("move"), SetState(&CLOSURE)),
|
|
121
|
+
(Punct("|"), SetState(&CLOSURE_ARGS)),
|
|
122
|
+
(ConsumeBrace, SetState(&POSTFIX)),
|
|
123
|
+
];
|
|
124
|
+
|
|
125
|
+
static CONTINUE: [(Input, Action); 2] = [
|
|
126
|
+
(ConsumeLifetime, SetState(&POSTFIX)),
|
|
127
|
+
(Otherwise, SetState(&POSTFIX)),
|
|
128
|
+
];
|
|
129
|
+
|
|
130
|
+
static DOT: [(Input, Action); 3] = [
|
|
131
|
+
(Keyword("await"), SetState(&POSTFIX)),
|
|
132
|
+
(ConsumeIdent, SetState(&METHOD)),
|
|
133
|
+
(ConsumeLiteral, SetState(&POSTFIX)),
|
|
134
|
+
];
|
|
135
|
+
|
|
136
|
+
static FOR: [(Input, Action); 2] = [
|
|
137
|
+
(Punct("<"), SetState(&CLOSURE)),
|
|
138
|
+
(Otherwise, SetState(&PATTERN)),
|
|
139
|
+
];
|
|
140
|
+
|
|
141
|
+
static IF_ELSE: [(Input, Action); 2] = [(Keyword("if"), SetState(&INIT)), (ConsumeBrace, DecDepth)];
|
|
142
|
+
static IF_THEN: [(Input, Action); 2] =
|
|
143
|
+
[(Keyword("else"), SetState(&IF_ELSE)), (Otherwise, DecDepth)];
|
|
144
|
+
|
|
145
|
+
static METHOD: [(Input, Action); 1] = [(ExpectTurbofish, SetState(&POSTFIX))];
|
|
146
|
+
|
|
147
|
+
static PATH: [(Input, Action); 4] = [
|
|
148
|
+
(Punct("!="), SetState(&INIT)),
|
|
149
|
+
(Punct("!"), SetState(&INIT)),
|
|
150
|
+
(ConsumeNestedBrace, SetState(&IF_THEN)),
|
|
151
|
+
(Otherwise, SetState(&POSTFIX)),
|
|
152
|
+
];
|
|
153
|
+
|
|
154
|
+
static PATTERN: [(Input, Action); 15] = [
|
|
155
|
+
(ConsumeDelimiter, SetState(&PATTERN)),
|
|
156
|
+
(Keyword("box"), SetState(&PATTERN)),
|
|
157
|
+
(Keyword("in"), IncDepth),
|
|
158
|
+
(Keyword("mut"), SetState(&PATTERN)),
|
|
159
|
+
(Keyword("ref"), SetState(&PATTERN)),
|
|
160
|
+
(Keyword("_"), SetState(&PATTERN)),
|
|
161
|
+
(Punct("!"), SetState(&PATTERN)),
|
|
162
|
+
(Punct("&"), SetState(&PATTERN)),
|
|
163
|
+
(Punct("..="), SetState(&PATTERN)),
|
|
164
|
+
(Punct(".."), SetState(&PATTERN)),
|
|
165
|
+
(Punct("="), SetState(&INIT)),
|
|
166
|
+
(Punct("@"), SetState(&PATTERN)),
|
|
167
|
+
(Punct("|"), SetState(&PATTERN)),
|
|
168
|
+
(ConsumeLiteral, SetState(&PATTERN)),
|
|
169
|
+
(ExpectPath, SetState(&PATTERN)),
|
|
170
|
+
];
|
|
171
|
+
|
|
172
|
+
static RANGE: [(Input, Action); 6] = [
|
|
173
|
+
(Punct("..="), SetState(&INIT)),
|
|
174
|
+
(Punct(".."), SetState(&RANGE)),
|
|
175
|
+
(Punct("."), SetState(&DOT)),
|
|
176
|
+
(ConsumeNestedBrace, SetState(&IF_THEN)),
|
|
177
|
+
(Empty, Finish),
|
|
178
|
+
(Otherwise, SetState(&INIT)),
|
|
179
|
+
];
|
|
180
|
+
|
|
181
|
+
static RAW: [(Input, Action); 3] = [
|
|
182
|
+
(Keyword("const"), SetState(&INIT)),
|
|
183
|
+
(Keyword("mut"), SetState(&INIT)),
|
|
184
|
+
(Otherwise, SetState(&POSTFIX)),
|
|
185
|
+
];
|
|
186
|
+
|
|
187
|
+
static REFERENCE: [(Input, Action); 3] = [
|
|
188
|
+
(Keyword("mut"), SetState(&INIT)),
|
|
189
|
+
(Keyword("raw"), SetState(&RAW)),
|
|
190
|
+
(Otherwise, SetState(&INIT)),
|
|
191
|
+
];
|
|
192
|
+
|
|
193
|
+
static RETURN: [(Input, Action); 2] = [
|
|
194
|
+
(CanBeginExpr, SetState(&INIT)),
|
|
195
|
+
(Otherwise, SetState(&POSTFIX)),
|
|
196
|
+
];
|
|
197
|
+
|
|
198
|
+
pub(crate) fn scan_expr(input: ParseStream) -> Result<()> {
|
|
199
|
+
let mut state = INIT.as_slice();
|
|
200
|
+
let mut depth = 0usize;
|
|
201
|
+
'table: loop {
|
|
202
|
+
for rule in state {
|
|
203
|
+
if match rule.0 {
|
|
204
|
+
Input::Keyword(expected) => input.step(|cursor| match cursor.ident() {
|
|
205
|
+
Some((ident, rest)) if ident == expected => Ok((true, rest)),
|
|
206
|
+
_ => Ok((false, *cursor)),
|
|
207
|
+
})?,
|
|
208
|
+
Input::Punct(expected) => input.step(|cursor| {
|
|
209
|
+
let begin = *cursor;
|
|
210
|
+
let mut cursor = begin;
|
|
211
|
+
for (i, ch) in expected.chars().enumerate() {
|
|
212
|
+
match cursor.punct() {
|
|
213
|
+
Some((punct, _)) if punct.as_char() != ch => break,
|
|
214
|
+
Some((_, rest)) if i == expected.len() - 1 => {
|
|
215
|
+
return Ok((true, rest));
|
|
216
|
+
}
|
|
217
|
+
Some((punct, rest)) if punct.spacing() == Spacing::Joint => {
|
|
218
|
+
cursor = rest;
|
|
219
|
+
}
|
|
220
|
+
_ => break,
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
Ok((false, begin))
|
|
224
|
+
})?,
|
|
225
|
+
Input::ConsumeAny => input.parse::<Option<TokenTree>>()?.is_some(),
|
|
226
|
+
Input::ConsumeBinOp => input.parse::<BinOp>().is_ok(),
|
|
227
|
+
Input::ConsumeBrace | Input::ConsumeNestedBrace => {
|
|
228
|
+
(matches!(rule.0, Input::ConsumeBrace) || depth > 0)
|
|
229
|
+
&& input.step(|cursor| match cursor.group(Delimiter::Brace) {
|
|
230
|
+
Some((_inside, _span, rest)) => Ok((true, rest)),
|
|
231
|
+
None => Ok((false, *cursor)),
|
|
232
|
+
})?
|
|
233
|
+
}
|
|
234
|
+
Input::ConsumeDelimiter => input.step(|cursor| match cursor.any_group() {
|
|
235
|
+
Some((_inside, _delimiter, _span, rest)) => Ok((true, rest)),
|
|
236
|
+
None => Ok((false, *cursor)),
|
|
237
|
+
})?,
|
|
238
|
+
Input::ConsumeIdent => input.parse::<Option<Ident>>()?.is_some(),
|
|
239
|
+
Input::ConsumeLifetime => input.parse::<Option<Lifetime>>()?.is_some(),
|
|
240
|
+
Input::ConsumeLiteral => input.parse::<Option<Lit>>()?.is_some(),
|
|
241
|
+
Input::ExpectPath => {
|
|
242
|
+
input.parse::<ExprPath>()?;
|
|
243
|
+
true
|
|
244
|
+
}
|
|
245
|
+
Input::ExpectTurbofish => {
|
|
246
|
+
if input.peek(Token![::]) {
|
|
247
|
+
input.parse::<AngleBracketedGenericArguments>()?;
|
|
248
|
+
}
|
|
249
|
+
true
|
|
250
|
+
}
|
|
251
|
+
Input::ExpectType => {
|
|
252
|
+
Type::without_plus(input)?;
|
|
253
|
+
true
|
|
254
|
+
}
|
|
255
|
+
Input::CanBeginExpr => Expr::peek(input),
|
|
256
|
+
Input::Otherwise => true,
|
|
257
|
+
Input::Empty => input.is_empty() || input.peek(Token![,]),
|
|
258
|
+
} {
|
|
259
|
+
state = match rule.1 {
|
|
260
|
+
Action::SetState(next) => next,
|
|
261
|
+
Action::IncDepth => (depth += 1, &INIT).1,
|
|
262
|
+
Action::DecDepth => (depth -= 1, &POSTFIX).1,
|
|
263
|
+
Action::Finish => return if depth == 0 { Ok(()) } else { break },
|
|
264
|
+
};
|
|
265
|
+
continue 'table;
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
return Err(input.error("unsupported expression"));
|
|
269
|
+
}
|
|
270
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
use proc_macro2::extra::DelimSpan;
|
|
2
|
+
use proc_macro2::{Delimiter, Group, Span, TokenStream};
|
|
3
|
+
|
|
4
|
+
#[doc(hidden)]
|
|
5
|
+
pub trait IntoSpans<S> {
|
|
6
|
+
fn into_spans(self) -> S;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
impl IntoSpans<Span> for Span {
|
|
10
|
+
fn into_spans(self) -> Span {
|
|
11
|
+
self
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
impl IntoSpans<[Span; 1]> for Span {
|
|
16
|
+
fn into_spans(self) -> [Span; 1] {
|
|
17
|
+
[self]
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
impl IntoSpans<[Span; 2]> for Span {
|
|
22
|
+
fn into_spans(self) -> [Span; 2] {
|
|
23
|
+
[self, self]
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
impl IntoSpans<[Span; 3]> for Span {
|
|
28
|
+
fn into_spans(self) -> [Span; 3] {
|
|
29
|
+
[self, self, self]
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
impl IntoSpans<[Span; 1]> for [Span; 1] {
|
|
34
|
+
fn into_spans(self) -> [Span; 1] {
|
|
35
|
+
self
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
impl IntoSpans<[Span; 2]> for [Span; 2] {
|
|
40
|
+
fn into_spans(self) -> [Span; 2] {
|
|
41
|
+
self
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
impl IntoSpans<[Span; 3]> for [Span; 3] {
|
|
46
|
+
fn into_spans(self) -> [Span; 3] {
|
|
47
|
+
self
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
impl IntoSpans<DelimSpan> for Span {
|
|
52
|
+
fn into_spans(self) -> DelimSpan {
|
|
53
|
+
let mut group = Group::new(Delimiter::None, TokenStream::new());
|
|
54
|
+
group.set_span(self);
|
|
55
|
+
group.delim_span()
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
impl IntoSpans<DelimSpan> for DelimSpan {
|
|
60
|
+
fn into_spans(self) -> DelimSpan {
|
|
61
|
+
self
|
|
62
|
+
}
|
|
63
|
+
}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
//! A trait that can provide the `Span` of the complete contents of a syntax
|
|
2
|
+
//! tree node.
|
|
3
|
+
//!
|
|
4
|
+
//! <br>
|
|
5
|
+
//!
|
|
6
|
+
//! # Example
|
|
7
|
+
//!
|
|
8
|
+
//! Suppose in a procedural macro we have a [`Type`] that we want to assert
|
|
9
|
+
//! implements the [`Sync`] trait. Maybe this is the type of one of the fields
|
|
10
|
+
//! of a struct for which we are deriving a trait implementation, and we need to
|
|
11
|
+
//! be able to pass a reference to one of those fields across threads.
|
|
12
|
+
//!
|
|
13
|
+
//! [`Type`]: crate::Type
|
|
14
|
+
//! [`Sync`]: core::marker::Sync
|
|
15
|
+
//!
|
|
16
|
+
//! If the field type does *not* implement `Sync` as required, we want the
|
|
17
|
+
//! compiler to report an error pointing out exactly which type it was.
|
|
18
|
+
//!
|
|
19
|
+
//! The following macro code takes a variable `ty` of type `Type` and produces a
|
|
20
|
+
//! static assertion that `Sync` is implemented for that type.
|
|
21
|
+
//!
|
|
22
|
+
//! ```
|
|
23
|
+
//! # extern crate proc_macro;
|
|
24
|
+
//! #
|
|
25
|
+
//! use proc_macro::TokenStream;
|
|
26
|
+
//! use proc_macro2::Span;
|
|
27
|
+
//! use quote::quote_spanned;
|
|
28
|
+
//! use syn::Type;
|
|
29
|
+
//! use syn::spanned::Spanned;
|
|
30
|
+
//!
|
|
31
|
+
//! # const IGNORE_TOKENS: &str = stringify! {
|
|
32
|
+
//! #[proc_macro_derive(MyMacro)]
|
|
33
|
+
//! # };
|
|
34
|
+
//! pub fn my_macro(input: TokenStream) -> TokenStream {
|
|
35
|
+
//! # let ty = get_a_type();
|
|
36
|
+
//! /* ... */
|
|
37
|
+
//!
|
|
38
|
+
//! let assert_sync = quote_spanned! {ty.span()=>
|
|
39
|
+
//! struct _AssertSync where #ty: Sync;
|
|
40
|
+
//! };
|
|
41
|
+
//!
|
|
42
|
+
//! /* ... */
|
|
43
|
+
//! # input
|
|
44
|
+
//! }
|
|
45
|
+
//! #
|
|
46
|
+
//! # fn get_a_type() -> Type {
|
|
47
|
+
//! # unimplemented!()
|
|
48
|
+
//! # }
|
|
49
|
+
//! ```
|
|
50
|
+
//!
|
|
51
|
+
//! By inserting this `assert_sync` fragment into the output code generated by
|
|
52
|
+
//! our macro, the user's code will fail to compile if `ty` does not implement
|
|
53
|
+
//! `Sync`. The errors they would see look like the following.
|
|
54
|
+
//!
|
|
55
|
+
//! ```text
|
|
56
|
+
//! error[E0277]: the trait bound `*const i32: core::marker::Sync` is not satisfied
|
|
57
|
+
//! --> src/main.rs:10:21
|
|
58
|
+
//! |
|
|
59
|
+
//! 10 | bad_field: *const i32,
|
|
60
|
+
//! | ^^^^^^^^^^ `*const i32` cannot be shared between threads safely
|
|
61
|
+
//! ```
|
|
62
|
+
//!
|
|
63
|
+
//! In this technique, using the `Type`'s span for the error message makes the
|
|
64
|
+
//! error appear in the correct place underlining the right type.
|
|
65
|
+
//!
|
|
66
|
+
//! <br>
|
|
67
|
+
//!
|
|
68
|
+
//! # Limitations
|
|
69
|
+
//!
|
|
70
|
+
//! The underlying [`proc_macro::Span::join`] method is nightly-only. When
|
|
71
|
+
//! called from within a procedural macro in a nightly compiler, `Spanned` will
|
|
72
|
+
//! use `join` to produce the intended span. When not using a nightly compiler,
|
|
73
|
+
//! only the span of the *first token* of the syntax tree node is returned.
|
|
74
|
+
//!
|
|
75
|
+
//! In the common case of wanting to use the joined span as the span of a
|
|
76
|
+
//! `syn::Error`, consider instead using [`syn::Error::new_spanned`] which is
|
|
77
|
+
//! able to span the error correctly under the complete syntax tree node without
|
|
78
|
+
//! needing the unstable `join`.
|
|
79
|
+
//!
|
|
80
|
+
//! [`syn::Error::new_spanned`]: crate::Error::new_spanned
|
|
81
|
+
|
|
82
|
+
use proc_macro2::Span;
|
|
83
|
+
use quote::spanned::Spanned as ToTokens;
|
|
84
|
+
|
|
85
|
+
/// A trait that can provide the `Span` of the complete contents of a syntax
|
|
86
|
+
/// tree node.
|
|
87
|
+
///
|
|
88
|
+
/// This trait is automatically implemented for all types that implement
|
|
89
|
+
/// [`ToTokens`] from the `quote` crate, as well as for `Span` itself.
|
|
90
|
+
///
|
|
91
|
+
/// [`ToTokens`]: quote::ToTokens
|
|
92
|
+
///
|
|
93
|
+
/// See the [module documentation] for an example.
|
|
94
|
+
///
|
|
95
|
+
/// [module documentation]: self
|
|
96
|
+
pub trait Spanned: private::Sealed {
|
|
97
|
+
/// Returns a `Span` covering the complete contents of this syntax tree
|
|
98
|
+
/// node, or [`Span::call_site()`] if this node is empty.
|
|
99
|
+
///
|
|
100
|
+
/// [`Span::call_site()`]: proc_macro2::Span::call_site
|
|
101
|
+
fn span(&self) -> Span;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
impl<T: ?Sized + ToTokens> Spanned for T {
|
|
105
|
+
fn span(&self) -> Span {
|
|
106
|
+
self.__span()
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
mod private {
|
|
111
|
+
use crate::spanned::ToTokens;
|
|
112
|
+
|
|
113
|
+
pub trait Sealed {}
|
|
114
|
+
impl<T: ?Sized + ToTokens> Sealed for T {}
|
|
115
|
+
|
|
116
|
+
#[cfg(any(feature = "full", feature = "derive"))]
|
|
117
|
+
impl Sealed for crate::QSelf {}
|
|
118
|
+
}
|