/// Cross-references the feature names of unstable APIs with enabled
/// features and possibly prints errors. Returns a list of all
/// features used.
Cross-references the feature names of unstable APIs with enabled
features and possibly prints errors. Returns a list of all
features used.
Cross - references the feature names of unstable APIs with enabled features and possibly prints errors . Returns a list of all features used .
pub fn check_unstable_api_usage(tcx: &ty::ctxt)
                                -> FnvHashMap<InternedString, attr::StabilityLevel> {
    let ref active_lib_features = tcx.sess.features.borrow().declared_lib_features;
    // Put the active features into a map for quick lookup
    let active_features = active_lib_features.iter().map(|&(ref s, _)| s.clone()).collect();
    let mut checker = Checker {
        tcx: tcx,
        active_features: active_features,
        used_features: FnvHashMap()
    };
    let krate = tcx.map.krate();
    visit::walk_crate(&mut checker, krate);
    let used_features = checker.used_features;
    return used_features;
}
pub fn check_unstable_api_usage ( tcx : & ty :: ctxt ) -> FnvHashMap < InternedString , attr :: StabilityLevel > { let ref active_lib_features = tcx . sess . features . borrow ( ) . declared_lib_features ; // Put the active features into a map for quick lookup let active_features = active_lib_features . iter ( ) . map ( | & ( ref s , _ ) | s . clone ( ) ) . collect ( ) ; let mut checker = Checker { tcx : tcx , active_features : active_features , used_features : FnvHashMap ( ) } ; let krate = tcx . map . krate ( ) ; visit :: walk_crate ( & mut checker , krate ) ; let used_features = checker . used_features ; return used_features ; }
Cross-references the feature names of unstable APIs with enabled
features and possibly prints errors.
Cross - references the feature names of unstable APIs with enabled features and possibly prints errors .
tcx
&ty::ctxt