Checkpoint
This commit is contained in:
@@ -85,9 +85,9 @@ impl Location {
|
||||
/// the user with some guidance. That being said, you still might want to add
|
||||
/// even more information to ut, using [`Diagnostic::with_labels`],
|
||||
/// [`Diagnostic::with_notes`], or [`Diagnostic::with_code`].
|
||||
pub fn labelled_error(&self, msg: &str) -> Diagnostic<usize> {
|
||||
pub fn labelled_error<T: AsRef<str>>(&self, msg: T) -> Diagnostic<usize> {
|
||||
Diagnostic::error().with_labels(vec![
|
||||
Label::primary(self.file_idx, self.location.clone()).with_message(msg)
|
||||
Label::primary(self.file_idx, self.location.clone()).with_message(msg.as_ref())
|
||||
])
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user