Lines Matching refs:Diagnostic
0 //! Diagnostic data structures.
116 /// The position of a Diagnostic is considered to be the position of the [`Label`] that has the earliest starting position and has the highest style which appears in all the labels of the diagnostic.
119 pub struct Diagnostic<FileId> {
139 impl<FileId> Diagnostic<FileId> {
141 pub fn new(severity: Severity) -> Diagnostic<FileId> {
142 Diagnostic {
154 pub fn bug() -> Diagnostic<FileId> {
155 Diagnostic::new(Severity::Bug)
161 pub fn error() -> Diagnostic<FileId> {
162 Diagnostic::new(Severity::Error)
168 pub fn warning() -> Diagnostic<FileId> {
169 Diagnostic::new(Severity::Warning)
175 pub fn note() -> Diagnostic<FileId> {
176 Diagnostic::new(Severity::Note)
182 pub fn help() -> Diagnostic<FileId> {
183 Diagnostic::new(Severity::Help)
187 pub fn with_code(mut self, code: impl Into<String>) -> Diagnostic<FileId> {
193 pub fn with_message(mut self, message: impl Into<String>) -> Diagnostic<FileId> {
199 pub fn with_labels(mut self, labels: Vec<Label<FileId>>) -> Diagnostic<FileId> {
205 pub fn with_notes(mut self, notes: Vec<String>) -> Diagnostic<FileId> {