MCPcopy Create free account
hub / github.com/dtolnay/thiserror / call_site_ident

Function call_site_ident

impl/src/expand.rs:505–509  ·  view source on GitHub ↗

Create an ident with which we can expand `impl Trait for #ident {}` on a deprecated type without triggering deprecation warning on the generated impl.

(ident: &Ident)

Source from the content-addressed store, hash-verified

503// Create an ident with which we can expand `impl Trait for #ident {}` on a
504// deprecated type without triggering deprecation warning on the generated impl.
505pub(crate) fn call_site_ident(ident: &Ident) -> Ident {
506 let mut ident = ident.clone();
507 ident.set_span(ident.span().resolved_at(Span::call_site()));
508 ident
509}
510
511fn fields_pat(fields: &[Field]) -> TokenStream {
512 let mut members = fields.iter().map(|field| &field.member).peekable();

Callers 3

impl_structFunction · 0.85
impl_enumFunction · 0.85
expandFunction · 0.85

Calls 2

set_spanMethod · 0.80
spanMethod · 0.80

Tested by

no test coverage detected