Skip to content

Commit 7de5c65

Browse files
committed
resolve conflicts
1 parent 5c89b70 commit 7de5c65

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

compiler/rustc_attr/src/session_diagnostics.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -408,8 +408,8 @@ impl<G: EmissionGuarantee> IntoDiagnostic<'_, G> for InvalidAttrAtCrateLevel {
408408
#[track_caller]
409409
fn into_diagnostic(self, dcx: &'_ DiagCtxt, level: Level) -> DiagnosticBuilder<'_, G> {
410410
let mut diag = DiagnosticBuilder::new(dcx, level, fluent::attr_invalid_attr_at_crate_level);
411-
diag.set_span(self.span);
412-
diag.set_arg("name", self.name);
411+
diag.span(self.span);
412+
diag.arg("name", self.name);
413413
// Only emit an error with a suggestion if we can create a string out
414414
// of the attribute span
415415
if let Some(span) = self.sugg_span {
@@ -421,7 +421,7 @@ impl<G: EmissionGuarantee> IntoDiagnostic<'_, G> for InvalidAttrAtCrateLevel {
421421
);
422422
}
423423
if let Some(item) = self.item {
424-
diag.set_arg("kind", item.kind);
424+
diag.arg("kind", item.kind);
425425
diag.span_label(item.span, fluent::attr_invalid_attr_at_crate_level_item);
426426
}
427427
diag

compiler/rustc_resolve/src/macros.rs

+8-8
Original file line numberDiff line numberDiff line change
@@ -748,16 +748,16 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
748748
if this.is_builtin_macro(res)
749749
|| this.builtin_attrs_bindings.values().any(|b| b.res() == res)
750750
{
751-
if !this.report_invalid_crate_level_attr(&krate.attrs, path[0].ident.name) {
751+
if this.report_invalid_crate_level_attr(&krate.attrs, path[0].ident.name) {
752752
return;
753753
}
754-
if this.tcx.dcx().has_errors().is_none() {
755-
this.dcx().emit_err(CannotDetermineMacroResolution {
756-
span,
757-
kind: kind.descr(),
758-
path: Segment::names_to_string(path),
759-
});
760-
}
754+
}
755+
if this.tcx.dcx().has_errors().is_none() {
756+
this.dcx().emit_err(CannotDetermineMacroResolution {
757+
span,
758+
kind: kind.descr(),
759+
path: Segment::names_to_string(path),
760+
});
761761
}
762762
}
763763
}

0 commit comments

Comments
 (0)