/// Panics if the type is incomplete
Panics if the type is incomplete
Panics if the type is incomplete
fn deref(&self) -> Option<TCTypeRef> {
        if let Some(first) = self.mods().first() {
            let base = self.base();
            let mods = &self.mods()[1..];
            let to_ret = TCTypeRef { base, mods };
            match first {
                TCTypeModifier::Pointer => {
                    if to_ret.is_function() {
                        let mods = self.mods();
                        return Some(TCTypeRef { base, mods });
                    }
                    return Some(to_ret);
                }
                TCTypeModifier::Array(_) | TCTypeModifier::VariableArray => return Some(to_ret),
                TCTypeModifier::BeginParam(_)
                | TCTypeModifier::NoParams
                | TCTypeModifier::UnknownParams => return None,
                _ => unreachable!(),
            }
        }
        if let Some(def) = self.get_typedef() {
            return TCTy::deref(def);
        }
        return None;
    }
fn deref ( & self ) -> Option < TCTypeRef > { if let Some ( first ) = self . mods ( ) . first ( ) { let base = self . base ( ) ; let mods = & self . mods ( ) [ 1 .. ] ; let to_ret = TCTypeRef { base , mods } ; match first { TCTypeModifier :: Pointer => { if to_ret . is_function ( ) { let mods = self . mods ( ) ; return Some ( TCTypeRef { base , mods } ) ; } return Some ( to_ret ) ; } TCTypeModifier :: Array ( _ ) | TCTypeModifier :: VariableArray => return Some ( to_ret ) , TCTypeModifier :: BeginParam ( _ ) | TCTypeModifier :: NoParams | TCTypeModifier :: UnknownParams => return None , _ => unreachable ! ( ) , } } if let Some ( def ) = self . get_typedef ( ) { return TCTy :: deref ( def ) ; } return None ; }
Panics if the type is incomplete
Panics if the type is incomplete
&self