about summary refs log tree commit diff
path: root/compiler/rustc_session/src/errors.rs
diff options
context:
space:
mode:
authorOli Scherer <git-spam-no-reply9815368754983@oli-obk.de>2022-12-06 12:46:10 +0000
committerOli Scherer <git-spam-no-reply9815368754983@oli-obk.de>2022-12-07 20:30:02 +0000
commitd30848b30a4ba328b482e2e601de7517be2e5397 (patch)
treebe88050d57283774710d336c54c0e9961209ba39 /compiler/rustc_session/src/errors.rs
parente60fbaf4ce768d13a6abc048bd34ee12995d18dc (diff)
downloadrust-d30848b30a4ba328b482e2e601de7517be2e5397.tar.gz
rust-d30848b30a4ba328b482e2e601de7517be2e5397.zip
Use `Symbol` for the crate name instead of `String`/`str`
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)]