@@ -119,7 +119,8 @@ fn invalid_characters() {
119
119
. with_stderr (
120
120
"\
121
121
[ERROR] invalid character `.` in crate name: `foo.rs`, [..]
122
- use --name to override crate name" ,
122
+ If you need a crate name to not match the directory name, consider using --name flag.
123
+ " ,
123
124
)
124
125
. run ( ) ;
125
126
}
@@ -131,7 +132,8 @@ fn reserved_name() {
131
132
. with_stderr (
132
133
"\
133
134
[ERROR] the name `test` cannot be used as a crate name, it conflicts [..]
134
- use --name to override crate name" ,
135
+ If you need a crate name to not match the directory name, consider using --name flag.
136
+ " ,
135
137
)
136
138
. run ( ) ;
137
139
}
@@ -143,7 +145,8 @@ fn reserved_binary_name() {
143
145
. with_stderr (
144
146
"\
145
147
[ERROR] the name `incremental` cannot be used as a crate name, it conflicts [..]
146
- use --name to override crate name" ,
148
+ If you need a crate name to not match the directory name, consider using --name flag.
149
+ " ,
147
150
)
148
151
. run ( ) ;
149
152
@@ -166,7 +169,8 @@ fn keyword_name() {
166
169
. with_stderr (
167
170
"\
168
171
[ERROR] the name `pub` cannot be used as a crate name, it is a Rust keyword
169
- use --name to override crate name" ,
172
+ If you need a crate name to not match the directory name, consider using --name flag.
173
+ " ,
170
174
)
171
175
. run ( ) ;
172
176
}
@@ -539,7 +543,9 @@ fn restricted_windows_name() {
539
543
. with_stderr (
540
544
"\
541
545
[ERROR] cannot use name `nul`, it is a reserved Windows filename
542
- use --name to override crate name" ,
546
+ If you need a crate name to not match the directory name, consider using --name fla
547
+ g.
548
+ " ,
543
549
)
544
550
. run ( ) ;
545
551
} else {
@@ -580,7 +586,8 @@ fn non_ascii_name_invalid() {
580
586
"\
581
587
[ERROR] invalid character `Ⓐ` in crate name: `ⒶⒷⒸ`, \
582
588
the first character must be a Unicode XID start character (most letters or `_`)
583
- use --name to override crate name" ,
589
+ If you need a crate name to not match the directory name, consider using --name flag.
590
+ " ,
584
591
)
585
592
. run ( ) ;
586
593
@@ -591,7 +598,8 @@ use --name to override crate name",
591
598
"\
592
599
[ERROR] invalid character `¼` in crate name: `a¼`, \
593
600
characters must be Unicode XID characters (numbers, `-`, `_`, or most letters)
594
- use --name to override crate name" ,
601
+ If you need a crate name to not match the directory name, consider using --name flag.
602
+ " ,
595
603
)
596
604
. run ( ) ;
597
605
}
0 commit comments