Debian Codegraph @

tests/integration/crate_alias.rs

raw symbols SCIP
1 use craterust-analyzer cargo schemars 1.2.2 crate/::preluderust-analyzer cargo schemars 1.2.2 prelude/::*;
2 use ::schemarsrust-analyzer cargo schemars 1.2.2 crate/ as aliased_schemarsrust-analyzer cargo schemars 1.2.2 crate/;
3
4 #[allow(dead_code)]
5 #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(aliased_schemarsrust-analyzer cargo schemars 1.2.2 crate/::JsonSchemarust-analyzer cargo schemars_derive 1.2.2 JsonSchema:, Deserializerust-analyzer cargo serde_derive 1.0.229 Deserialize:, Serializerust-analyzer cargo serde_derive 1.0.229 Serialize:, Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default:)]
6 #[schemars(crate = "aliased_schemars")]
7 struct MyStructrust-analyzer cargo schemars 1.2.2 crate_alias/MyStruct# {
8 /// Is it ok with doc comments?
9 foorust-analyzer cargo schemars 1.2.2 crate_alias/MyStruct#foo.: i32,
10 #[schemarsrust-analyzer cargo schemars_derive 1.2.2 schemars:(extend("x-test" = "...and extensions?"))]
11 barrust-analyzer cargo schemars 1.2.2 crate_alias/MyStruct#bar.: bool,
12 }
13
14 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
15 fn crate_aliasrust-analyzer cargo schemars 1.2.2 crate_alias/crate_alias().() {
16 testrust-analyzer cargo schemars 1.2.2 test!!(MyStructrust-analyzer cargo schemars 1.2.2 crate_alias/MyStruct#)
17 .assert_allows_ser_roundtrip_defaultrust-analyzer cargo schemars 1.2.2 test_helper/impl#[`TestHelper<T>`]assert_allows_ser_roundtrip_default().()
18 .assert_matches_de_roundtriprust-analyzer cargo schemars 1.2.2 test_helper/impl#[`TestHelper<T>`]assert_matches_de_roundtrip().(arbitrary_valuesrust-analyzer cargo schemars 1.2.2 test_helper/arbitrary_values().());
19 }