Skip to content

Commit ff90b09

Browse files
committed
resolve conflicts
1 parent 5c89b70 commit ff90b09

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
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

+1-1
Original file line numberDiff line numberDiff line change
@@ -748,7 +748,7 @@ 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
}
754754
if this.tcx.dcx().has_errors().is_none() {

0 commit comments

Comments
 (0)