| 1 | use quoterust-analyzer cargo quote 1.0.47 crate/::quote_spannedrust-analyzer cargo quote 1.0.47 quote_spanned!; |
| 2 | use synrust-analyzer cargo syn 2.0.119 crate/::{spannedrust-analyzer cargo syn 2.0.119 spanned/::Spannedrust-analyzer cargo syn 2.0.119 spanned/Spanned#, Typerust-analyzer cargo syn 2.0.119 ty/Type#}; |
| 3 | |
| 4 | use craterust-analyzer cargo educe 0.6.0 crate/::commonrust-analyzer cargo educe 0.6.0 common/::{r#typerust-analyzer cargo educe 0.6.0 common/`r#type`/::dereference_changedrust-analyzer cargo educe 0.6.0 common/`r#type`/dereference_changed()., toolsrust-analyzer cargo educe 0.6.0 common/tools/::HashTyperust-analyzer cargo educe 0.6.0 common/tools/hash_type/HashType#}; |
| 5 | |
| 6 | #[inline] |
| 7 | pub(craterust-analyzer cargo educe 0.6.0 crate/) fn to_hash_typerust-analyzer cargo educe 0.6.0 trait_handlers/into/common/to_hash_type().(ty: &Typerust-analyzer cargo syn 2.0.119 ty/Type#) -> HashTyperust-analyzer cargo educe 0.6.0 common/tools/hash_type/HashType# { |
| 8 | let (ty, is_ref) = dereference_changedrust-analyzer cargo educe 0.6.0 common/`r#type`/dereference_changed().(ty); |
| 9 | |
| 10 | let ty = if is_ref { |
| 11 | synrust-analyzer cargo syn 2.0.119 crate/::parse2rust-analyzer cargo syn 2.0.119 parse2().(quote_spannedrust-analyzer cargo quote 1.0.47 quote_spanned!!( ty.spanrust-analyzer cargo syn 2.0.119 spanned/impl#[T][Spanned]span().() => &'static #ty )).unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().() |
| 12 | } else { |
| 13 | ty.clonerust-analyzer cargo syn 2.0.119 gen/clone/impl#[`crate::Type`][Clone]clone().() |
| 14 | }; |
| 15 | |
| 16 | HashTyperust-analyzer cargo educe 0.6.0 common/tools/hash_type/HashType#::fromrust-analyzer cargo educe 0.6.0 common/tools/hash_type/impl#[HashType][`From<Type>`]from().(ty) |
| 17 | } |