Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 21838d5

Browse files
committedFeb 27, 2025··
add test to reproduce #137687 and fix it
1 parent 96cfc75 commit 21838d5

36 files changed

+320
-153
lines changed
 

‎compiler/rustc_attr_data_structures/src/attributes.rs

+26
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,11 @@ pub enum AttributeKind {
175175
span: Span,
176176
},
177177
ConstStabilityIndirect,
178+
CrateName {
179+
name: Symbol,
180+
name_span: Span,
181+
style: AttrStyle,
182+
},
178183
Deprecation {
179184
deprecation: Deprecation,
180185
span: Span,
@@ -195,3 +200,24 @@ pub enum AttributeKind {
195200
},
196201
// tidy-alphabetical-end
197202
}
203+
204+
impl AttributeKind {
205+
pub fn crate_level(&self) -> Option<(AttrStyle, Span)> {
206+
match self {
207+
AttributeKind::AllowConstFnUnstable(..)
208+
| AttributeKind::AllowInternalUnstable(..)
209+
| AttributeKind::BodyStability { .. }
210+
| AttributeKind::Confusables { .. }
211+
| AttributeKind::ConstStability { .. }
212+
| AttributeKind::ConstStabilityIndirect
213+
| AttributeKind::Deprecation { .. }
214+
| AttributeKind::Diagnostic(..)
215+
| AttributeKind::DocComment { .. }
216+
| AttributeKind::MacroTransparency(..)
217+
| AttributeKind::Repr(..)
218+
| AttributeKind::Stability { .. } => None,
219+
220+
AttributeKind::CrateName { style, name_span, .. } => Some((*style, *name_span)),
221+
}
222+
}
223+
}

‎compiler/rustc_attr_parsing/messages.ftl

+2
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@ attr_parsing_multiple_item =
8787
attr_parsing_multiple_stability_levels =
8888
multiple stability levels
8989
90+
attr_parsing_name_value = malformed `{$name}` attribute: expected to be of the form `#[{$name} = ...]`
91+
9092
attr_parsing_non_ident_feature =
9193
'feature' is not an identifier
9294
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
use rustc_attr_data_structures::AttributeKind;
2+
use rustc_span::{Span, Symbol, sym};
3+
4+
use super::SingleAttributeParser;
5+
use crate::context::AcceptContext;
6+
use crate::parser::ArgParser;
7+
use crate::session_diagnostics::{ExpectedNameValue, IncorrectMetaItem, UnusedMultiple};
8+
9+
pub(crate) struct CratenameParser;
10+
11+
impl SingleAttributeParser for CratenameParser {
12+
const PATH: &'static [Symbol] = &[sym::crate_name];
13+
14+
fn on_duplicate(cx: &AcceptContext<'_>, first_span: Span) {
15+
// FIXME(jdonszelmann): better duplicate reporting (WIP)
16+
cx.emit_err(UnusedMultiple {
17+
this: cx.attr_span,
18+
other: first_span,
19+
name: sym::crate_name,
20+
});
21+
}
22+
23+
fn convert(cx: &AcceptContext<'_>, args: &ArgParser<'_>) -> Option<AttributeKind> {
24+
if let ArgParser::NameValue(n) = args {
25+
if let Some(name) = n.value_as_str() {
26+
Some(AttributeKind::CrateName {
27+
name,
28+
name_span: n.value_span,
29+
style: cx.attr_style,
30+
})
31+
} else {
32+
cx.emit_err(IncorrectMetaItem { span: cx.attr_span, suggestion: None });
33+
34+
None
35+
}
36+
} else {
37+
cx.emit_err(ExpectedNameValue { span: cx.attr_span, name: sym::crate_name });
38+
39+
None
40+
}
41+
}
42+
}

‎compiler/rustc_attr_parsing/src/attributes/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ use crate::parser::ArgParser;
2626
pub(crate) mod allow_unstable;
2727
pub(crate) mod cfg;
2828
pub(crate) mod confusables;
29+
pub(crate) mod crate_name;
2930
pub(crate) mod deprecation;
3031
pub(crate) mod repr;
3132
pub(crate) mod stability;

‎compiler/rustc_attr_parsing/src/attributes/util.rs

+2-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
use rustc_ast::attr::{AttributeExt, first_attr_value_str_by_name};
1+
use rustc_ast::attr::AttributeExt;
22
use rustc_attr_data_structures::RustcVersion;
33
use rustc_feature::is_builtin_attr_name;
4-
use rustc_span::{Symbol, sym};
4+
use rustc_span::Symbol;
55

66
/// Parse a rustc version number written inside string literal in an attribute,
77
/// like appears in `since = "1.0.0"`. Suffixes like "-dev" and "-nightly" are
@@ -22,7 +22,3 @@ pub fn parse_version(s: Symbol) -> Option<RustcVersion> {
2222
pub fn is_builtin_attr(attr: &impl AttributeExt) -> bool {
2323
attr.is_doc_comment() || attr.ident().is_some_and(|ident| is_builtin_attr_name(ident.name))
2424
}
25-
26-
pub fn find_crate_name(attrs: &[impl AttributeExt]) -> Option<Symbol> {
27-
first_attr_value_str_by_name(attrs, sym::crate_name)
28-
}

‎compiler/rustc_attr_parsing/src/context.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use std::collections::BTreeMap;
33
use std::ops::Deref;
44
use std::sync::LazyLock;
55

6-
use rustc_ast::{self as ast, DelimArgs};
6+
use rustc_ast::{self as ast, AttrStyle, DelimArgs};
77
use rustc_attr_data_structures::AttributeKind;
88
use rustc_errors::{DiagCtxtHandle, Diagnostic};
99
use rustc_feature::Features;
@@ -14,6 +14,7 @@ use rustc_span::{DUMMY_SP, ErrorGuaranteed, Span, Symbol, sym};
1414

1515
use crate::attributes::allow_unstable::{AllowConstFnUnstableParser, AllowInternalUnstableParser};
1616
use crate::attributes::confusables::ConfusablesParser;
17+
use crate::attributes::crate_name::CratenameParser;
1718
use crate::attributes::deprecation::DeprecationParser;
1819
use crate::attributes::repr::ReprParser;
1920
use crate::attributes::stability::{
@@ -76,6 +77,7 @@ attribute_groups!(
7677

7778
// tidy-alphabetical-start
7879
Single<ConstStabilityIndirectParser>,
80+
Single<CratenameParser>,
7981
Single<DeprecationParser>,
8082
Single<TransparencyParser>,
8183
// tidy-alphabetical-end
@@ -89,6 +91,7 @@ pub(crate) struct AcceptContext<'a> {
8991
pub(crate) group_cx: &'a FinalizeContext<'a>,
9092
/// The span of the attribute currently being parsed
9193
pub(crate) attr_span: Span,
94+
pub(crate) attr_style: AttrStyle,
9295
}
9396

9497
impl<'a> AcceptContext<'a> {
@@ -269,6 +272,7 @@ impl<'sess> AttributeParser<'sess> {
269272
let cx = AcceptContext {
270273
group_cx: &group_cx,
271274
attr_span: lower_span(attr.span),
275+
attr_style: attr.style,
272276
};
273277

274278
f(&cx, &args)

‎compiler/rustc_attr_parsing/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ pub mod parser;
9090
mod session_diagnostics;
9191

9292
pub use attributes::cfg::*;
93-
pub use attributes::util::{find_crate_name, is_builtin_attr, parse_version};
93+
pub use attributes::util::{is_builtin_attr, parse_version};
9494
pub use context::{AttributeParser, OmitDoc};
9595
pub use rustc_attr_data_structures::*;
9696

‎compiler/rustc_attr_parsing/src/session_diagnostics.rs

+8
Original file line numberDiff line numberDiff line change
@@ -479,3 +479,11 @@ pub(crate) struct UnrecognizedReprHint {
479479
#[primary_span]
480480
pub span: Span,
481481
}
482+
483+
#[derive(Diagnostic)]
484+
#[diag(attr_parsing_name_value, code = E0539)]
485+
pub(crate) struct ExpectedNameValue {
486+
#[primary_span]
487+
pub span: Span,
488+
pub name: Symbol,
489+
}

‎compiler/rustc_driver_impl/src/lib.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ use rustc_errors::emitter::stderr_destination;
4444
use rustc_errors::registry::Registry;
4545
use rustc_errors::{ColorConfig, DiagCtxt, ErrCode, FatalError, PResult, markdown};
4646
use rustc_feature::find_gated_cfg;
47+
use rustc_interface::passes::get_crate_name;
4748
use rustc_interface::util::{self, get_codegen_backend};
4849
use rustc_interface::{Linker, create_and_enter_global_ctxt, interface, passes};
4950
use rustc_lint::unerased_lint_store;
@@ -667,7 +668,8 @@ fn print_crate_info(
667668
return Compilation::Continue;
668669
};
669670
let t_outputs = rustc_interface::util::build_output_filenames(attrs, sess);
670-
let crate_name = passes::get_crate_name(sess, attrs);
671+
let crate_name = get_crate_name(sess, attrs);
672+
671673
let crate_types = collect_crate_types(sess, attrs);
672674
for &style in &crate_types {
673675
let fname = rustc_session::output::filename_for_input(
@@ -681,7 +683,7 @@ fn print_crate_info(
681683
// no crate attributes, print out an error and exit
682684
return Compilation::Continue;
683685
};
684-
println_info!("{}", passes::get_crate_name(sess, attrs));
686+
println_info!("{}", get_crate_name(sess, attrs));
685687
}
686688
Cfg => {
687689
let mut cfgs = sess

‎compiler/rustc_interface/src/passes.rs

+17-3
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ use std::sync::{Arc, LazyLock};
66
use std::{env, fs, iter};
77

88
use rustc_ast as ast;
9+
use rustc_attr_parsing::{AttributeKind, AttributeParser};
910
use rustc_codegen_ssa::traits::CodegenBackend;
1011
use rustc_data_structures::parallel;
1112
use rustc_data_structures::steal::Steal;
@@ -32,7 +33,7 @@ use rustc_session::output::{collect_crate_types, filename_for_input};
3233
use rustc_session::search_paths::PathKind;
3334
use rustc_session::{Limit, Session};
3435
use rustc_span::{
35-
ErrorGuaranteed, FileName, SourceFileHash, SourceFileHashAlgorithm, Span, Symbol, sym,
36+
DUMMY_SP, ErrorGuaranteed, FileName, SourceFileHash, SourceFileHashAlgorithm, Span, Symbol, sym,
3637
};
3738
use rustc_target::spec::PanicStrategy;
3839
use rustc_trait_selection::traits;
@@ -1119,6 +1120,20 @@ pub(crate) fn start_codegen<'tcx>(
11191120
codegen
11201121
}
11211122

1123+
pub(crate) fn parse_crate_name(
1124+
sess: &Session,
1125+
attrs: &[ast::Attribute],
1126+
limit_diagnostics: bool,
1127+
) -> Option<(Symbol, Span)> {
1128+
let rustc_hir::Attribute::Parsed(AttributeKind::CrateName { name, name_span, .. }) =
1129+
AttributeParser::parse_limited(sess, &attrs, sym::crate_name, DUMMY_SP, limit_diagnostics)?
1130+
else {
1131+
unreachable!("crate_name is the only attr we could've parsed here");
1132+
};
1133+
1134+
Some((name, name_span))
1135+
}
1136+
11221137
/// Compute and validate the crate name.
11231138
pub fn get_crate_name(sess: &Session, krate_attrs: &[ast::Attribute]) -> Symbol {
11241139
// We validate *all* occurrences of `#![crate_name]`, pick the first find and
@@ -1128,8 +1143,7 @@ pub fn get_crate_name(sess: &Session, krate_attrs: &[ast::Attribute]) -> Symbol
11281143
// in all code paths that require the crate name very early on, namely before
11291144
// macro expansion.
11301145

1131-
let attr_crate_name =
1132-
validate_and_find_value_str_builtin_attr(sym::crate_name, sess, krate_attrs);
1146+
let attr_crate_name = parse_crate_name(sess, krate_attrs, false);
11331147

11341148
let validate = |name, span| {
11351149
rustc_session::output::validate_crate_name(sess, name, span);

‎compiler/rustc_interface/src/util.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ use rustc_target::spec::Target;
2323
use tracing::info;
2424

2525
use crate::errors;
26+
use crate::passes::parse_crate_name;
2627

2728
/// Function pointer type that constructs a new CodegenBackend.
2829
type MakeBackendFn = fn() -> Box<dyn CodegenBackend>;
@@ -485,7 +486,7 @@ pub fn build_output_filenames(attrs: &[ast::Attribute], sess: &Session) -> Outpu
485486
.opts
486487
.crate_name
487488
.clone()
488-
.or_else(|| rustc_attr_parsing::find_crate_name(attrs).map(|n| n.to_string()));
489+
.or_else(|| parse_crate_name(sess, attrs, true).map(|i| i.0.to_string()));
489490

490491
match sess.io.output_file {
491492
None => {

‎compiler/rustc_lint/src/nonstandard_style.rs

+23-31
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
use rustc_abi::ExternAbi;
2-
use rustc_attr_parsing::{AttributeKind, AttributeParser, ReprAttr};
2+
use rustc_attr_parsing::{AttributeKind, AttributeParser, ReprAttr, find_attr};
33
use rustc_hir::def::{DefKind, Res};
44
use rustc_hir::intravisit::FnKind;
5-
use rustc_hir::{AttrArgs, AttrItem, Attribute, GenericParamKind, PatExprKind, PatKind};
5+
use rustc_hir::{Attribute, GenericParamKind, PatExprKind, PatKind};
66
use rustc_middle::ty;
77
use rustc_session::config::CrateType;
88
use rustc_session::{declare_lint, declare_lint_pass};
@@ -342,35 +342,27 @@ impl<'tcx> LateLintPass<'tcx> for NonSnakeCase {
342342
let crate_ident = if let Some(name) = &cx.tcx.sess.opts.crate_name {
343343
Some(Ident::from_str(name))
344344
} else {
345-
ast::attr::find_by_name(cx.tcx.hir().attrs(hir::CRATE_HIR_ID), sym::crate_name)
346-
.and_then(|attr| {
347-
if let Attribute::Unparsed(n) = attr
348-
&& let AttrItem { args: AttrArgs::Eq { eq_span: _, expr: lit }, .. } =
349-
n.as_ref()
350-
&& let ast::LitKind::Str(name, ..) = lit.kind
351-
{
352-
// Discard the double quotes surrounding the literal.
353-
let sp = cx
354-
.sess()
355-
.source_map()
356-
.span_to_snippet(lit.span)
357-
.ok()
358-
.and_then(|snippet| {
359-
let left = snippet.find('"')?;
360-
let right = snippet.rfind('"').map(|pos| snippet.len() - pos)?;
361-
362-
Some(
363-
lit.span
364-
.with_lo(lit.span.lo() + BytePos(left as u32 + 1))
365-
.with_hi(lit.span.hi() - BytePos(right as u32)),
366-
)
367-
})
368-
.unwrap_or(lit.span);
369-
370-
Some(Ident::new(name, sp))
371-
} else {
372-
None
373-
}
345+
find_attr!(cx.tcx.hir().attrs(hir::CRATE_HIR_ID), AttributeKind::CrateName{name, name_span,..} => (name, name_span))
346+
.and_then(|(&name, &span)| {
347+
// Discard the double quotes surrounding the literal.
348+
let sp = cx
349+
.sess()
350+
.source_map()
351+
.span_to_snippet(span)
352+
.ok()
353+
.and_then(|snippet| {
354+
let left = snippet.find('"')?;
355+
let right = snippet.rfind('"').map(|pos| snippet.len() - pos)?;
356+
357+
Some(
358+
span
359+
.with_lo(span.lo() + BytePos(left as u32 + 1))
360+
.with_hi(span.hi() - BytePos(right as u32)),
361+
)
362+
})
363+
.unwrap_or(span);
364+
365+
Some(Ident::new(name, sp))
374366
})
375367
};
376368

‎compiler/rustc_parse/src/validate_attr.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,9 @@ pub fn check_builtin_meta_item(
217217
) {
218218
// Some special attributes like `cfg` must be checked
219219
// before the generic check, so we skip them here.
220-
let should_skip = |name| name == sym::cfg;
220+
//
221+
// Also, attributes that have a new-style parser don't need to be checked here anymore
222+
let should_skip = |name| name == sym::cfg || name == sym::crate_name;
221223

222224
if !should_skip(name) && !is_attr_template_compatible(&template, &meta.kind) {
223225
emit_malformed_attribute(psess, style, meta.span, name, template);

‎compiler/rustc_passes/src/check_attr.rs

+37-16
Original file line numberDiff line numberDiff line change
@@ -315,22 +315,43 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
315315
let builtin = attr.ident().and_then(|ident| BUILTIN_ATTRIBUTE_MAP.get(&ident.name));
316316

317317
if hir_id != CRATE_HIR_ID {
318-
if let Some(BuiltinAttribute { type_: AttributeType::CrateLevel, .. }) =
319-
attr.ident().and_then(|ident| BUILTIN_ATTRIBUTE_MAP.get(&ident.name))
320-
{
321-
match attr.style() {
322-
ast::AttrStyle::Outer => self.tcx.emit_node_span_lint(
323-
UNUSED_ATTRIBUTES,
324-
hir_id,
325-
attr.span(),
326-
errors::OuterCrateLevelAttr,
327-
),
328-
ast::AttrStyle::Inner => self.tcx.emit_node_span_lint(
329-
UNUSED_ATTRIBUTES,
330-
hir_id,
331-
attr.span(),
332-
errors::InnerCrateLevelAttr,
333-
),
318+
if let Attribute::Parsed(attr) = attr {
319+
if let Some((style, span)) = attr.crate_level() {
320+
match style {
321+
ast::AttrStyle::Outer => self.tcx.emit_node_span_lint(
322+
UNUSED_ATTRIBUTES,
323+
hir_id,
324+
span,
325+
errors::OuterCrateLevelAttr,
326+
),
327+
ast::AttrStyle::Inner => self.tcx.emit_node_span_lint(
328+
UNUSED_ATTRIBUTES,
329+
hir_id,
330+
span,
331+
errors::InnerCrateLevelAttr,
332+
),
333+
}
334+
}
335+
} else {
336+
// FIXME(jdonszelmann): remove once all crate-level attrs are parsed and caught by
337+
// the above
338+
if let Some(BuiltinAttribute { type_: AttributeType::CrateLevel, .. }) =
339+
attr.ident().and_then(|ident| BUILTIN_ATTRIBUTE_MAP.get(&ident.name))
340+
{
341+
match attr.style() {
342+
ast::AttrStyle::Outer => self.tcx.emit_node_span_lint(
343+
UNUSED_ATTRIBUTES,
344+
hir_id,
345+
attr.span(),
346+
errors::OuterCrateLevelAttr,
347+
),
348+
ast::AttrStyle::Inner => self.tcx.emit_node_span_lint(
349+
UNUSED_ATTRIBUTES,
350+
hir_id,
351+
attr.span(),
352+
errors::InnerCrateLevelAttr,
353+
),
354+
}
334355
}
335356
}
336357
}
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// issue: rust-lang/rust#122001
22
// Ensure we reject macro calls inside `#![crate_name]` as their result wouldn't get honored anyway.
33

4-
#![crate_name = concat!("my", "crate")] //~ ERROR malformed `crate_name` attribute input
4+
#![crate_name = concat!("my", "crate")] //~ ERROR expected a quoted string literal
55

66
fn main() {}
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
error: malformed `crate_name` attribute input
1+
error[E0539]: expected a quoted string literal
22
--> $DIR/crate-name-macro-call.rs:4:1
33
|
44
LL | #![crate_name = concat!("my", "crate")]
5-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#![crate_name = "name"]`
5+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
66

77
error: aborting due to 1 previous error
88

9+
For more information about this error, try `rustc --explain E0539`.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
//@compile-flags: --crate-type=lib
2+
// reproduces #137687
3+
#[crate_name = concat!("Cloneb")] //~ ERROR expected a quoted string literal
4+
5+
6+
macro_rules! inline {
7+
() => {};
8+
}
9+
10+
#[crate_name] //~ ERROR malformed `crate_name` attribute: expected to be of the form `#[crate_name = ...]`
11+
mod foo {}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
error[E0539]: expected a quoted string literal
2+
--> $DIR/crate_name_on_other_items.rs:3:1
3+
|
4+
LL | #[crate_name = concat!("Cloneb")]
5+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6+
7+
error[E0539]: malformed `crate_name` attribute: expected to be of the form `#[crate_name = ...]`
8+
--> $DIR/crate_name_on_other_items.rs:10:1
9+
|
10+
LL | #[crate_name]
11+
| ^^^^^^^^^^^^^
12+
13+
error: aborting due to 2 previous errors
14+
15+
For more information about this error, try `rustc --explain E0539`.

‎tests/ui/crate-name-mismatch.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
error: `--crate-name` and `#[crate_name]` are required to match, but `foo` != `bar`
2-
--> $DIR/crate-name-mismatch.rs:3:1
2+
--> $DIR/crate-name-mismatch.rs:3:17
33
|
44
LL | #![crate_name = "bar"]
5-
| ^^^^^^^^^^^^^^^^^^^^^^
5+
| ^^^^^
66

77
error: aborting due to 1 previous error
88

‎tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs.stderr

+12-12
Original file line numberDiff line numberDiff line change
@@ -320,10 +320,10 @@ LL | #[windows_subsystem = "windows"]
320320
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
321321

322322
warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
323-
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:629:1
323+
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:629:16
324324
|
325325
LL | #[crate_name = "0900"]
326-
| ^^^^^^^^^^^^^^^^^^^^^^
326+
| ^^^^^^
327327

328328
warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
329329
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:648:1
@@ -940,34 +940,34 @@ LL | #[windows_subsystem = "windows"] impl S { }
940940
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
941941

942942
warning: crate-level attribute should be in the root module
943-
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:632:17
943+
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:632:31
944944
|
945945
LL | mod inner { #![crate_name="0900"] }
946-
| ^^^^^^^^^^^^^^^^^^^^^
946+
| ^^^^^^
947947

948948
warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
949-
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:635:5
949+
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:635:20
950950
|
951951
LL | #[crate_name = "0900"] fn f() { }
952-
| ^^^^^^^^^^^^^^^^^^^^^^
952+
| ^^^^^^
953953

954954
warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
955-
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:638:5
955+
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:638:20
956956
|
957957
LL | #[crate_name = "0900"] struct S;
958-
| ^^^^^^^^^^^^^^^^^^^^^^
958+
| ^^^^^^
959959

960960
warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
961-
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:641:5
961+
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:641:20
962962
|
963963
LL | #[crate_name = "0900"] type T = S;
964-
| ^^^^^^^^^^^^^^^^^^^^^^
964+
| ^^^^^^
965965

966966
warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
967-
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:644:5
967+
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:644:20
968968
|
969969
LL | #[crate_name = "0900"] impl S { }
970-
| ^^^^^^^^^^^^^^^^^^^^^^
970+
| ^^^^^^
971971

972972
warning: crate-level attribute should be in the root module
973973
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:651:17

‎tests/ui/invalid-compile-flags/print-crate-name-request-malformed-crate-name.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
// See also <https://github.com/rust-lang/rust/issues/122001>.
33

44
//@ compile-flags: --print=crate-name
5-
#![crate_name = concat!("wrapped")] //~ ERROR malformed `crate_name` attribute input
5+
#![crate_name = concat!("wrapped")] //~ ERROR expected a quoted string literal
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
error: malformed `crate_name` attribute input
1+
error[E0539]: expected a quoted string literal
22
--> $DIR/print-crate-name-request-malformed-crate-name.rs:5:1
33
|
44
LL | #![crate_name = concat!("wrapped")]
5-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#![crate_name = "name"]`
5+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
66

77
error: aborting due to 1 previous error
88

9+
For more information about this error, try `rustc --explain E0539`.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
print_crate_name_request_malformed_crate_name
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
// Ensure we validate `#![crate_name]` on print requests.
22

33
//@ compile-flags: --print=file-names
4-
#![crate_name] //~ ERROR malformed `crate_name` attribute input
4+
#![crate_name] //~ ERROR malformed `crate_name` attribute: expected to be of the form `#[crate_name = ...]`
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
error: malformed `crate_name` attribute input
1+
error[E0539]: malformed `crate_name` attribute: expected to be of the form `#[crate_name = ...]`
22
--> $DIR/print-file-names-request-malformed-crate-name-1.rs:4:1
33
|
44
LL | #![crate_name]
5-
| ^^^^^^^^^^^^^^ help: must be of the form: `#![crate_name = "name"]`
5+
| ^^^^^^^^^^^^^^
66

77
error: aborting due to 1 previous error
88

9+
For more information about this error, try `rustc --explain E0539`.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
print-file-names-request-malformed-crate-name-1

‎tests/ui/invalid-compile-flags/print-file-names-request-malformed-crate-name-2.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,4 @@
33
// See also <https://github.com/rust-lang/rust/issues/122001>.
44

55
//@ compile-flags: --print=file-names
6-
#![crate_name = "this_one_is_okay"]
7-
#![crate_name = concat!("this_one_is_not")] //~ ERROR malformed `crate_name` attribute input
6+
#![crate_name = concat!("this_one_is_not")] //~ ERROR expected a quoted string literal
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
error: malformed `crate_name` attribute input
2-
--> $DIR/print-file-names-request-malformed-crate-name-2.rs:7:1
1+
error[E0539]: expected a quoted string literal
2+
--> $DIR/print-file-names-request-malformed-crate-name-2.rs:6:1
33
|
44
LL | #![crate_name = concat!("this_one_is_not")]
5-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#![crate_name = "name"]`
5+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
66

77
error: aborting due to 1 previous error
88

9+
For more information about this error, try `rustc --explain E0539`.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
print-file-names-request-malformed-crate-name-2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// Ensure that we validate *all* `#![crate_name]`s on print requests, not just the first,
2+
// and that we reject macro calls inside of them.
3+
// See also <https://github.com/rust-lang/rust/issues/122001>.
4+
5+
//@check-pass
6+
//@ compile-flags: --print=file-names
7+
#![crate_name = "this_one_is_okay"]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
this_one_is_okay

‎tests/ui/invalid-compile-flags/print-file-names-request-malformed-crate-name.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
// See also <https://github.com/rust-lang/rust/issues/122001>.
33

44
//@ compile-flags: --print=file-names
5-
#![crate_name = concat!("wrapped")] //~ ERROR malformed `crate_name` attribute input
5+
#![crate_name = concat!("wrapped")] //~ ERROR expected a quoted string literal
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
error: malformed `crate_name` attribute input
1+
error[E0539]: expected a quoted string literal
22
--> $DIR/print-file-names-request-malformed-crate-name.rs:5:1
33
|
44
LL | #![crate_name = concat!("wrapped")]
5-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#![crate_name = "name"]`
5+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
66

77
error: aborting due to 1 previous error
88

9+
For more information about this error, try `rustc --explain E0539`.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
print-file-names-request-malformed-crate-name

‎tests/ui/lint/unused/unused-attr-duplicate.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,10 @@
1111
// - no_main: extra setup
1212
#![deny(unused_attributes)]
1313
#![crate_name = "unused_attr_duplicate"]
14-
#![crate_name = "unused_attr_duplicate2"] //~ ERROR unused attribute
15-
//~^ WARN this was previously accepted
14+
#![crate_name = "unused_attr_duplicate2"] //~ ERROR multiple `crate_name` attributes
15+
//~^ ERROR multiple `crate_name` attributes
16+
// FIXME(jdonszelmann) this error is given twice now. I'll fix this in the near future redoing how
17+
// duplicates are checked.
1618
#![recursion_limit = "128"]
1719
#![recursion_limit = "256"] //~ ERROR unused attribute
1820
//~^ WARN this was previously accepted
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,36 @@
1+
error: multiple `crate_name` attributes
2+
--> $DIR/unused-attr-duplicate.rs:14:1
3+
|
4+
LL | #![crate_name = "unused_attr_duplicate2"]
5+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove this attribute
6+
|
7+
note: attribute also specified here
8+
--> $DIR/unused-attr-duplicate.rs:13:1
9+
|
10+
LL | #![crate_name = "unused_attr_duplicate"]
11+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
12+
13+
error: multiple `crate_name` attributes
14+
--> $DIR/unused-attr-duplicate.rs:14:1
15+
|
16+
LL | #![crate_name = "unused_attr_duplicate2"]
17+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove this attribute
18+
|
19+
note: attribute also specified here
20+
--> $DIR/unused-attr-duplicate.rs:13:1
21+
|
22+
LL | #![crate_name = "unused_attr_duplicate"]
23+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
24+
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
25+
126
error: unused attribute
2-
--> $DIR/unused-attr-duplicate.rs:33:1
27+
--> $DIR/unused-attr-duplicate.rs:35:1
328
|
429
LL | #[no_link]
530
| ^^^^^^^^^^ help: remove this attribute
631
|
732
note: attribute also specified here
8-
--> $DIR/unused-attr-duplicate.rs:32:1
33+
--> $DIR/unused-attr-duplicate.rs:34:1
934
|
1035
LL | #[no_link]
1136
| ^^^^^^^^^^
@@ -16,278 +41,265 @@ LL | #![deny(unused_attributes)]
1641
| ^^^^^^^^^^^^^^^^^
1742

1843
error: unused attribute
19-
--> $DIR/unused-attr-duplicate.rs:37:1
44+
--> $DIR/unused-attr-duplicate.rs:39:1
2045
|
2146
LL | #[macro_use]
2247
| ^^^^^^^^^^^^ help: remove this attribute
2348
|
2449
note: attribute also specified here
25-
--> $DIR/unused-attr-duplicate.rs:36:1
50+
--> $DIR/unused-attr-duplicate.rs:38:1
2651
|
2752
LL | #[macro_use]
2853
| ^^^^^^^^^^^^
2954

3055
error: unused attribute
31-
--> $DIR/unused-attr-duplicate.rs:47:1
56+
--> $DIR/unused-attr-duplicate.rs:49:1
3257
|
3358
LL | #[path = "bar.rs"]
3459
| ^^^^^^^^^^^^^^^^^^ help: remove this attribute
3560
|
3661
note: attribute also specified here
37-
--> $DIR/unused-attr-duplicate.rs:46:1
62+
--> $DIR/unused-attr-duplicate.rs:48:1
3863
|
3964
LL | #[path = "auxiliary/lint_unused_extern_crate.rs"]
4065
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4166
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
4267

4368
error: unused attribute
44-
--> $DIR/unused-attr-duplicate.rs:53:1
69+
--> $DIR/unused-attr-duplicate.rs:55:1
4570
|
4671
LL | #[ignore = "some text"]
4772
| ^^^^^^^^^^^^^^^^^^^^^^^ help: remove this attribute
4873
|
4974
note: attribute also specified here
50-
--> $DIR/unused-attr-duplicate.rs:52:1
75+
--> $DIR/unused-attr-duplicate.rs:54:1
5176
|
5277
LL | #[ignore]
5378
| ^^^^^^^^^
5479

5580
error: unused attribute
56-
--> $DIR/unused-attr-duplicate.rs:55:1
81+
--> $DIR/unused-attr-duplicate.rs:57:1
5782
|
5883
LL | #[should_panic(expected = "values don't match")]
5984
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove this attribute
6085
|
6186
note: attribute also specified here
62-
--> $DIR/unused-attr-duplicate.rs:54:1
87+
--> $DIR/unused-attr-duplicate.rs:56:1
6388
|
6489
LL | #[should_panic]
6590
| ^^^^^^^^^^^^^^^
6691
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
6792

6893
error: unused attribute
69-
--> $DIR/unused-attr-duplicate.rs:60:1
94+
--> $DIR/unused-attr-duplicate.rs:62:1
7095
|
7196
LL | #[must_use = "some message"]
7297
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove this attribute
7398
|
7499
note: attribute also specified here
75-
--> $DIR/unused-attr-duplicate.rs:59:1
100+
--> $DIR/unused-attr-duplicate.rs:61:1
76101
|
77102
LL | #[must_use]
78103
| ^^^^^^^^^^^
79104
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
80105

81106
error: unused attribute
82-
--> $DIR/unused-attr-duplicate.rs:66:1
107+
--> $DIR/unused-attr-duplicate.rs:68:1
83108
|
84109
LL | #[non_exhaustive]
85110
| ^^^^^^^^^^^^^^^^^ help: remove this attribute
86111
|
87112
note: attribute also specified here
88-
--> $DIR/unused-attr-duplicate.rs:65:1
113+
--> $DIR/unused-attr-duplicate.rs:67:1
89114
|
90115
LL | #[non_exhaustive]
91116
| ^^^^^^^^^^^^^^^^^
92117

93118
error: unused attribute
94-
--> $DIR/unused-attr-duplicate.rs:70:1
119+
--> $DIR/unused-attr-duplicate.rs:72:1
95120
|
96121
LL | #[automatically_derived]
97122
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: remove this attribute
98123
|
99124
note: attribute also specified here
100-
--> $DIR/unused-attr-duplicate.rs:69:1
125+
--> $DIR/unused-attr-duplicate.rs:71:1
101126
|
102127
LL | #[automatically_derived]
103128
| ^^^^^^^^^^^^^^^^^^^^^^^^
104129

105130
error: unused attribute
106-
--> $DIR/unused-attr-duplicate.rs:74:1
131+
--> $DIR/unused-attr-duplicate.rs:76:1
107132
|
108133
LL | #[inline(never)]
109134
| ^^^^^^^^^^^^^^^^ help: remove this attribute
110135
|
111136
note: attribute also specified here
112-
--> $DIR/unused-attr-duplicate.rs:73:1
137+
--> $DIR/unused-attr-duplicate.rs:75:1
113138
|
114139
LL | #[inline(always)]
115140
| ^^^^^^^^^^^^^^^^^
116141
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
117142

118143
error: unused attribute
119-
--> $DIR/unused-attr-duplicate.rs:77:1
144+
--> $DIR/unused-attr-duplicate.rs:79:1
120145
|
121146
LL | #[cold]
122147
| ^^^^^^^ help: remove this attribute
123148
|
124149
note: attribute also specified here
125-
--> $DIR/unused-attr-duplicate.rs:76:1
150+
--> $DIR/unused-attr-duplicate.rs:78:1
126151
|
127152
LL | #[cold]
128153
| ^^^^^^^
129154

130155
error: unused attribute
131-
--> $DIR/unused-attr-duplicate.rs:79:1
156+
--> $DIR/unused-attr-duplicate.rs:81:1
132157
|
133158
LL | #[track_caller]
134159
| ^^^^^^^^^^^^^^^ help: remove this attribute
135160
|
136161
note: attribute also specified here
137-
--> $DIR/unused-attr-duplicate.rs:78:1
162+
--> $DIR/unused-attr-duplicate.rs:80:1
138163
|
139164
LL | #[track_caller]
140165
| ^^^^^^^^^^^^^^^
141166

142167
error: unused attribute
143-
--> $DIR/unused-attr-duplicate.rs:92:1
168+
--> $DIR/unused-attr-duplicate.rs:94:1
144169
|
145170
LL | #[export_name = "exported_symbol_name"]
146171
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove this attribute
147172
|
148173
note: attribute also specified here
149-
--> $DIR/unused-attr-duplicate.rs:94:1
174+
--> $DIR/unused-attr-duplicate.rs:96:1
150175
|
151176
LL | #[export_name = "exported_symbol_name2"]
152177
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
153178
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
154179

155180
error: unused attribute
156-
--> $DIR/unused-attr-duplicate.rs:98:1
181+
--> $DIR/unused-attr-duplicate.rs:100:1
157182
|
158183
LL | #[no_mangle]
159184
| ^^^^^^^^^^^^ help: remove this attribute
160185
|
161186
note: attribute also specified here
162-
--> $DIR/unused-attr-duplicate.rs:97:1
187+
--> $DIR/unused-attr-duplicate.rs:99:1
163188
|
164189
LL | #[no_mangle]
165190
| ^^^^^^^^^^^^
166191

167192
error: unused attribute
168-
--> $DIR/unused-attr-duplicate.rs:102:1
193+
--> $DIR/unused-attr-duplicate.rs:104:1
169194
|
170195
LL | #[used]
171196
| ^^^^^^^ help: remove this attribute
172197
|
173198
note: attribute also specified here
174-
--> $DIR/unused-attr-duplicate.rs:101:1
199+
--> $DIR/unused-attr-duplicate.rs:103:1
175200
|
176201
LL | #[used]
177202
| ^^^^^^^
178203

179204
error: unused attribute
180-
--> $DIR/unused-attr-duplicate.rs:86:5
205+
--> $DIR/unused-attr-duplicate.rs:88:5
181206
|
182207
LL | #[link_name = "this_does_not_exist"]
183208
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove this attribute
184209
|
185210
note: attribute also specified here
186-
--> $DIR/unused-attr-duplicate.rs:88:5
211+
--> $DIR/unused-attr-duplicate.rs:90:5
187212
|
188213
LL | #[link_name = "rust_dbg_extern_identity_u32"]
189214
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
190215
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
191216

192217
error: unused attribute
193-
--> $DIR/unused-attr-duplicate.rs:14:1
194-
|
195-
LL | #![crate_name = "unused_attr_duplicate2"]
196-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove this attribute
197-
|
198-
note: attribute also specified here
199-
--> $DIR/unused-attr-duplicate.rs:13:1
200-
|
201-
LL | #![crate_name = "unused_attr_duplicate"]
202-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
203-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
204-
205-
error: unused attribute
206-
--> $DIR/unused-attr-duplicate.rs:17:1
218+
--> $DIR/unused-attr-duplicate.rs:19:1
207219
|
208220
LL | #![recursion_limit = "256"]
209221
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove this attribute
210222
|
211223
note: attribute also specified here
212-
--> $DIR/unused-attr-duplicate.rs:16:1
224+
--> $DIR/unused-attr-duplicate.rs:18:1
213225
|
214226
LL | #![recursion_limit = "128"]
215227
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
216228
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
217229

218230
error: unused attribute
219-
--> $DIR/unused-attr-duplicate.rs:20:1
231+
--> $DIR/unused-attr-duplicate.rs:22:1
220232
|
221233
LL | #![type_length_limit = "1"]
222234
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove this attribute
223235
|
224236
note: attribute also specified here
225-
--> $DIR/unused-attr-duplicate.rs:19:1
237+
--> $DIR/unused-attr-duplicate.rs:21:1
226238
|
227239
LL | #![type_length_limit = "1048576"]
228240
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
229241
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
230242

231243
error: unused attribute
232-
--> $DIR/unused-attr-duplicate.rs:23:1
244+
--> $DIR/unused-attr-duplicate.rs:25:1
233245
|
234246
LL | #![no_std]
235247
| ^^^^^^^^^^ help: remove this attribute
236248
|
237249
note: attribute also specified here
238-
--> $DIR/unused-attr-duplicate.rs:22:1
250+
--> $DIR/unused-attr-duplicate.rs:24:1
239251
|
240252
LL | #![no_std]
241253
| ^^^^^^^^^^
242254

243255
error: unused attribute
244-
--> $DIR/unused-attr-duplicate.rs:25:1
256+
--> $DIR/unused-attr-duplicate.rs:27:1
245257
|
246258
LL | #![no_implicit_prelude]
247259
| ^^^^^^^^^^^^^^^^^^^^^^^ help: remove this attribute
248260
|
249261
note: attribute also specified here
250-
--> $DIR/unused-attr-duplicate.rs:24:1
262+
--> $DIR/unused-attr-duplicate.rs:26:1
251263
|
252264
LL | #![no_implicit_prelude]
253265
| ^^^^^^^^^^^^^^^^^^^^^^^
254266

255267
error: unused attribute
256-
--> $DIR/unused-attr-duplicate.rs:27:1
268+
--> $DIR/unused-attr-duplicate.rs:29:1
257269
|
258270
LL | #![windows_subsystem = "windows"]
259271
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove this attribute
260272
|
261273
note: attribute also specified here
262-
--> $DIR/unused-attr-duplicate.rs:26:1
274+
--> $DIR/unused-attr-duplicate.rs:28:1
263275
|
264276
LL | #![windows_subsystem = "console"]
265277
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
266278
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
267279

268280
error: unused attribute
269-
--> $DIR/unused-attr-duplicate.rs:30:1
281+
--> $DIR/unused-attr-duplicate.rs:32:1
270282
|
271283
LL | #![no_builtins]
272284
| ^^^^^^^^^^^^^^^ help: remove this attribute
273285
|
274286
note: attribute also specified here
275-
--> $DIR/unused-attr-duplicate.rs:29:1
287+
--> $DIR/unused-attr-duplicate.rs:31:1
276288
|
277289
LL | #![no_builtins]
278290
| ^^^^^^^^^^^^^^^
279291

280292
error: unused attribute
281-
--> $DIR/unused-attr-duplicate.rs:40:5
293+
--> $DIR/unused-attr-duplicate.rs:42:5
282294
|
283295
LL | #[macro_export]
284296
| ^^^^^^^^^^^^^^^ help: remove this attribute
285297
|
286298
note: attribute also specified here
287-
--> $DIR/unused-attr-duplicate.rs:39:5
299+
--> $DIR/unused-attr-duplicate.rs:41:5
288300
|
289301
LL | #[macro_export]
290302
| ^^^^^^^^^^^^^^^
291303

292-
error: aborting due to 23 previous errors
304+
error: aborting due to 24 previous errors
293305

0 commit comments

Comments
 (0)
Please sign in to comment.