Skip to content

Commit fa5729c

Browse files
authored
Unrolled build for #150044
Rollup merge of #150044 - workingjubilee:avoid-suggesting-irrelevant-rename, r=jieyouxu Avoid unhelpful suggestion when crate name is invalid Pointing out they can set the crate's name is non-actionable: their problem is they found out how and set it incorrectly. Remove extraneous information that can only confuse the matter.
2 parents f2c7087 + 25cc98f commit fa5729c

File tree

4 files changed

+0
-6
lines changed

4 files changed

+0
-6
lines changed

compiler/rustc_session/messages.ftl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ session_int_literal_too_large = integer literal is too large
5757
.note = value exceeds limit of `{$limit}`
5858
5959
session_invalid_character_in_crate_name = invalid character {$character} in crate name: `{$crate_name}`
60-
.help = you can either pass `--crate-name` on the command line or add `#![crate_name = "…"]` to set the crate name
6160
6261
session_invalid_float_literal_suffix = invalid suffix `{$suffix}` for float literal
6362
.label = invalid suffix `{$suffix}`

compiler/rustc_session/src/errors.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,8 +238,6 @@ pub(crate) struct InvalidCharacterInCrateName {
238238
pub(crate) span: Option<Span>,
239239
pub(crate) character: char,
240240
pub(crate) crate_name: Symbol,
241-
#[help]
242-
pub(crate) help: Option<()>,
243241
}
244242

245243
#[derive(Subdiagnostic)]

compiler/rustc_session/src/output.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ pub fn validate_crate_name(sess: &Session, crate_name: Symbol, span: Option<Span
6969
span,
7070
character: c,
7171
crate_name,
72-
help: span.is_none().then_some(()),
7372
}));
7473
}
7574

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
error: invalid character '$' in crate name: `need_crate_arg_ignore_tidy$x`
2-
|
3-
= help: you can either pass `--crate-name` on the command line or add `#![crate_name = "…"]` to set the crate name
42

53
error: aborting due to 1 previous error
64

0 commit comments

Comments
 (0)