pub fn classify(cx: &mut ExtCtxt, tname: Name) -> DeriveType {
        let legacy_derive_name = Symbol::intern(&format!("derive_{}", tname));

        if let Ok(_) = cx.resolver.resolve_builtin_macro(legacy_derive_name) {
            return DeriveType::Legacy;
        }

        match cx.resolver.resolve_builtin_macro(tname) {
            Ok(ext) => match *ext {
                SyntaxExtension::BuiltinDerive(..) => DeriveType::Builtin,
                _ => DeriveType::ProcMacro,
            },
            Err(_) => DeriveType::ProcMacro,
        }
    }
// Classify a derive trait name by resolving the macro.
Classify a derive trait name by resolving the macro.
Classify a derive trait name by resolving the macro .
pub fn classify(cx: &mut ExtCtxt, tname: Name) -> DeriveType {
        let legacy_derive_name = Symbol::intern(&format!("derive_{}", tname));
        if let Ok(_) = cx.resolver.resolve_builtin_macro(legacy_derive_name) {
            return DeriveType::Legacy;
        }
        match cx.resolver.resolve_builtin_macro(tname) {
            Ok(ext) => match *ext {
                SyntaxExtension::BuiltinDerive(..) => DeriveType::Builtin,
                _ => DeriveType::ProcMacro,
            },
            Err(_) => DeriveType::ProcMacro,
        }
    }
pub fn classify ( cx : & mut ExtCtxt , tname : Name ) -> DeriveType { let legacy_derive_name = Symbol :: intern ( & format ! ( " " tname ) ) ; if let Ok ( _ ) = cx . resolver . resolve_builtin_macro ( legacy_derive_name ) { return DeriveType :: Legacy ; } match cx . resolver . resolve_builtin_macro ( tname ) { Ok ( ext ) => match * ext { SyntaxExtension :: BuiltinDerive ( .. ) => DeriveType :: Builtin , _ => DeriveType :: ProcMacro , } , Err ( _ ) => DeriveType :: ProcMacro , } }
Classify a derive trait name by resolving the macro.
Classify a derive trait name by resolving the macro .
cx
&mut ExtCtxt
tname
Name
cx
&mut ExtCtxt
tname
Name