Repository navigation
Distinguish between error vs. warning for external macros #57716
Copy link
Copy link
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
Activity
- addedA-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lints
on Jan 17, 2019 - addedT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
on Jan 17, 2019 This can be easily added at
rust/src/librustc_errors/emitter.rs
Lines 850 to 871 in daa53a5
fn fix_multispans_in_std_macros(&mut self, span: &mut MultiSpan, children: &mut Vec<SubDiagnostic>, backtrace: bool) { let mut spans_updated = self.fix_multispan_in_std_macros(span, backtrace); for child in children.iter_mut() { spans_updated |= self.fix_multispan_in_std_macros(&mut child.span, backtrace); } if spans_updated { children.push(SubDiagnostic { level: Level::Note, message: vec![ ("this error originates in a macro outside of the current crate \ (in Nightly builds, run with -Z external-macro-backtrace \ for more info)".to_string(), Style::NoStyle), ], span: MultiSpan::new(), render_span: None, }); } } by looking at the
Diagnostic::codeor, if not available, theDiagnostic::leveland changing the text accordingly.- added 4 commits that reference this issue
on Mar 31, 2019
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
I often see compiler notes for warnings accompanied with this message:
would it be more sensible and correct to say
this _warning_ originates...?Very superficial but I find seeing "error" in compilation logs catches my eye far too often and
its only a warning. Happy to submit PR if it is a valid change.