about summary refs log tree commit diff
path: root/compiler/rustc_session/src/errors.rs
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2022-12-08 12:57:32 +0100
committerGitHub <noreply@github.com>2022-12-08 12:57:32 +0100
commitfbfc5ada029dd7892cbdb64a7f6cffee7f898385 (patch)
tree6d0c14a26a4b1c031f34dd2341d690520f00e00e /compiler/rustc_session/src/errors.rs
parent2fbde2b028126f20fbf4dbca58a7cdbd7f93a456 (diff)
parentd30848b30a4ba328b482e2e601de7517be2e5397 (diff)
downloadrust-fbfc5ada029dd7892cbdb64a7f6cffee7f898385.tar.gz
rust-fbfc5ada029dd7892cbdb64a7f6cffee7f898385.zip
Rollup merge of #105423 - oli-obk:symbols, r=jackh726
Use `Symbol` for the crate name instead of `String`/`str`

It always got converted to a symbol anyway
Diffstat (limited to 'compiler/rustc_session/src/errors.rs')
-rw-r--r--compiler/rustc_session/src/errors.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_session/src/errors.rs b/compiler/rustc_session/src/errors.rs
index 8cb9e1a6f1a..ee492f802a7 100644
--- a/compiler/rustc_session/src/errors.rs
+++ b/compiler/rustc_session/src/errors.rs
@@ -129,10 +129,10 @@ pub struct FileIsNotWriteable<'a> {
 
 #[derive(Diagnostic)]
 #[diag(session_crate_name_does_not_match)]
-pub struct CrateNameDoesNotMatch<'a> {
+pub struct CrateNameDoesNotMatch {
     #[primary_span]
     pub span: Span,
-    pub s: &'a str,
+    pub s: Symbol,
     pub name: Symbol,
 }
 
@@ -151,11 +151,11 @@ pub struct CrateNameEmpty {
 
 #[derive(Diagnostic)]
 #[diag(session_invalid_character_in_create_name)]
-pub struct InvalidCharacterInCrateName<'a> {
+pub struct InvalidCharacterInCrateName {
     #[primary_span]
     pub span: Option<Span>,
     pub character: char,
-    pub crate_name: &'a str,
+    pub crate_name: Symbol,
 }
 
 #[derive(Subdiagnostic)]