session: diagnostic migration lint on more fns
Apply the diagnostic migration lint to more functions on `Session`. Signed-off-by: David Wood <david.wood@huawei.com>
This commit is contained in:
parent
d45004806d
commit
2575b1abc9
33 changed files with 510 additions and 162 deletions
|
@ -4,7 +4,7 @@ use crate::errors::{
|
|||
ArgumentNotAttributes, AttrNoArguments, AttributeMetaItem, AttributeSingleWord,
|
||||
AttributesWrongForm, CannotBeNameOfMacro, ExpectedCommaInList, HelperAttributeNameInvalid,
|
||||
MacroBodyStability, MacroConstStability, NotAMetaItem, OnlyOneArgument, OnlyOneWord,
|
||||
ResolveRelativePath, TakesNoArguments,
|
||||
ResolveRelativePath, TakesNoArguments, TraceMacro,
|
||||
};
|
||||
use crate::expand::{self, AstFragment, Invocation};
|
||||
use crate::module::DirOwnership;
|
||||
|
@ -1142,8 +1142,8 @@ impl<'a> ExtCtxt<'a> {
|
|||
self.sess.parse_sess.span_diagnostic.span_bug(sp, msg);
|
||||
}
|
||||
pub fn trace_macros_diag(&mut self) {
|
||||
for (sp, notes) in self.expansions.iter() {
|
||||
let mut db = self.sess.parse_sess.span_diagnostic.span_note_diag(*sp, "trace_macro");
|
||||
for (span, notes) in self.expansions.iter() {
|
||||
let mut db = self.sess.parse_sess.create_note(TraceMacro { span: *span });
|
||||
for note in notes {
|
||||
db.note(note);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue