pub fn warning<T>(&mut self, source_id: SourceId, kind: T)
    where
        WarningKind: From<T>,
    {
        if !self.mode.warnings() {
            return;
        }

        let current = Some(self.diagnostics.len());

        self.diagnostics.push(Diagnostic::Warning(Warning {
            last: self.last_warning,
            source_id,
            kind: kind.into(),
        }));

        self.last_warning = current;
    }
/// Push a warning to the collection of diagnostics.
Push a warning to the collection of diagnostics.
Push a warning to the collection of diagnostics .
pub fn warning<T>(&mut self, source_id: SourceId, kind: T)
    where
        WarningKind: From<T>,
    {
        if !self.mode.warnings() {
            return;
        }
        let current = Some(self.diagnostics.len());
        self.diagnostics.push(Diagnostic::Warning(Warning {
            last: self.last_warning,
            source_id,
            kind: kind.into(),
        }));
        self.last_warning = current;
    }
pub fn warning < T > ( & mut self , source_id : SourceId , kind : T ) where WarningKind : From < T > , { if ! self . mode . warnings ( ) { return ; } let current = Some ( self . diagnostics . len ( ) ) ; self . diagnostics . push ( Diagnostic :: Warning ( Warning { last : self . last_warning , source_id , kind : kind . into ( ) , } ) ) ; self . last_warning = current ; }
Push a warning to the collection of diagnostics.
Push a warning to the collection of diagnostics .
&mut self
source_id
SourceId
kind
T
&mut self
source_id
SourceId
kind
T