fn report_warning_count(&mut self, config: &Config, id: JobId) {
        let count = match self.warning_count.remove(&id) {
            Some(count) => count,
            None => return,
        };
        let unit = &self.active[&id];
        let mut message = format!("`{}` ({}", unit.pkg.name(), unit.target.description_named());
        if unit.mode.is_rustc_test() && !(unit.target.is_test() || unit.target.is_bench()) {
            message.push_str(" test");
        } else if unit.mode.is_doc_test() {
            message.push_str(" doctest");
        } else if unit.mode.is_doc() {
            message.push_str(" doc");
        }
        message.push_str(") generated ");
        match count.0 {
            1 => message.push_str("1 warning"),
            n => drop(write!(message, "{} warnings", n)),
        };
        match count.1 {
            0 => {}
            1 => message.push_str(" (1 duplicate)"),
            n => drop(write!(message, " ({} duplicates)", n)),
        }
        // Errors are ignored here because it is tricky to handle them
        // correctly, and they aren't important.
        drop(config.shell().warn(message));
    }
/// Displays a final report of the warnings emitted by a particular job.
Displays a final report of the warnings emitted by a particular job.
Displays a final report of the warnings emitted by a particular job .
fn report_warning_count(&mut self, config: &Config, id: JobId) {
        let count = match self.warning_count.remove(&id) {
            Some(count) => count,
            None => return,
        };
        let unit = &self.active[&id];
        let mut message = format!("`{}` ({}", unit.pkg.name(), unit.target.description_named());
        if unit.mode.is_rustc_test() && !(unit.target.is_test() || unit.target.is_bench()) {
            message.push_str(" test");
        } else if unit.mode.is_doc_test() {
            message.push_str(" doctest");
        } else if unit.mode.is_doc() {
            message.push_str(" doc");
        }
        message.push_str(") generated ");
        match count.0 {
            1 => message.push_str("1 warning"),
            n => drop(write!(message, "{} warnings", n)),
        };
        match count.1 {
            0 => {}
            1 => message.push_str(" (1 duplicate)"),
            n => drop(write!(message, " ({} duplicates)", n)),
        }
        // Errors are ignored here because it is tricky to handle them
        // correctly, and they aren't important.
        drop(config.shell().warn(message));
    }
fn report_warning_count ( & mut self , config : & Config , id : JobId ) { let count = match self . warning_count . remove ( & id ) { Some ( count ) => count , None => return , } ; let unit = & self . active [ & id ] ; let mut message = format ! ( " " unit pkg name ( ) unit target description_named ( ) ) ; if unit . mode . is_rustc_test ( ) && ! ( unit . target . is_test ( ) || unit . target . is_bench ( ) ) { message . push_str ( " " ) ; } else if unit . mode . is_doc_test ( ) { message . push_str ( " " ) ; } else if unit . mode . is_doc ( ) { message . push_str ( " " ) ; } message . push_str ( " " ) ; match count . 0 { 1 => message . push_str ( " " ) , n => drop ( write ! ( message " " n ) ) , } ; match count . 1 { 0 => { } 1 => message . push_str ( " " ) , n => drop ( write ! ( message " " n ) ) , } // Errors are ignored here because it is tricky to handle them // correctly, and they aren't important. drop ( config . shell ( ) . warn ( message ) ) ; }
Displays a final report of the warnings emitted by a particular job.
Displays a final report of the warnings emitted by a particular job .
&mut self
config
&Config
id
JobId
&mut self
config
&Config
id
JobId