From 5363f350887b1e5b5dd21a86f88c8af9d7fea6da Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:18:25 +0200 Subject: Merging upstream version 1.67.1+dfsg1. Signed-off-by: Daniel Baumann --- compiler/rustc_session/src/parse.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'compiler/rustc_session/src/parse.rs') diff --git a/compiler/rustc_session/src/parse.rs b/compiler/rustc_session/src/parse.rs index a199947eb..f9f4f2979 100644 --- a/compiler/rustc_session/src/parse.rs +++ b/compiler/rustc_session/src/parse.rs @@ -97,6 +97,7 @@ pub fn feature_err<'a>( /// /// This variant allows you to control whether it is a library or language feature. /// Almost always, you want to use this for a language feature. If so, prefer `feature_err`. +#[track_caller] pub fn feature_err_issue<'a>( sess: &'a ParseSess, feature: Symbol, @@ -332,6 +333,7 @@ impl ParseSess { self.proc_macro_quoted_spans.lock().clone() } + #[track_caller] pub fn create_err<'a>( &'a self, err: impl IntoDiagnostic<'a>, @@ -339,10 +341,12 @@ impl ParseSess { err.into_diagnostic(&self.span_diagnostic) } + #[track_caller] pub fn emit_err<'a>(&'a self, err: impl IntoDiagnostic<'a>) -> ErrorGuaranteed { self.create_err(err).emit() } + #[track_caller] pub fn create_warning<'a>( &'a self, warning: impl IntoDiagnostic<'a, ()>, @@ -350,6 +354,7 @@ impl ParseSess { warning.into_diagnostic(&self.span_diagnostic) } + #[track_caller] pub fn emit_warning<'a>(&'a self, warning: impl IntoDiagnostic<'a, ()>) { self.create_warning(warning).emit() } @@ -377,6 +382,7 @@ impl ParseSess { } #[rustc_lint_diagnostics] + #[track_caller] pub fn struct_err( &self, msg: impl Into, -- cgit v1.2.3