File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -60,9 +60,7 @@ pub fn sanitize_name(name: &str) -> String {
6060 let mut name = PackageName :: sanitize ( name, placeholder) . into_inner ( ) ;
6161
6262 loop {
63- if restricted_names:: is_keyword ( & name) {
64- name. push ( placeholder) ;
65- } else if restricted_names:: is_conflicting_artifact_name ( & name) {
63+ if restricted_names:: is_conflicting_artifact_name ( & name) {
6664 // Being an embedded manifest, we always assume it is a `[[bin]]`
6765 name. push ( placeholder) ;
6866 } else {
Original file line number Diff line number Diff line change @@ -728,16 +728,16 @@ fn test_name_is_keyword() {
728728 p. cargo ( "-Zscript -v ./self" )
729729 . masquerade_as_nightly_cargo ( & [ "script" ] )
730730 . with_stdout_data ( str![ [ r#"
731- current_exe: [ROOT]/home/.cargo/build/[HASH]/target/debug/self- [EXE]
731+ current_exe: [ROOT]/home/.cargo/build/[HASH]/target/debug/self[EXE]
732732arg0: [..]
733733args: []
734734
735735"# ] ] )
736736 . with_stderr_data ( str![ [ r#"
737737[WARNING] `package.edition` is unspecified, defaulting to `2024`
738- [COMPILING] self- v0.0.0 ([ROOT]/foo/self)
738+ [COMPILING] self v0.0.0 ([ROOT]/foo/self)
739739[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
740- [RUNNING] `[ROOT]/home/.cargo/build/[HASH]/target/debug/self- [EXE]`
740+ [RUNNING] `[ROOT]/home/.cargo/build/[HASH]/target/debug/self[EXE]`
741741
742742"# ] ] )
743743 . run ( ) ;
You can’t perform that action at this time.
0 commit comments