Skip to content

Commit 3bbc443

Browse files
committed
Auto merge of #77379 - camelid:improve-wording-crate-resolution-error, r=davidtwco
Improve wording for external crate resolution error I think it reads better this way.
2 parents b218b95 + 2c5e2a6 commit 3bbc443

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

compiler/rustc_resolve/src/imports.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1157,7 +1157,7 @@ impl<'a, 'b> ImportResolver<'a, 'b> {
11571157
}
11581158
_ => {
11591159
if !ident.is_path_segment_keyword() {
1160-
format!("no `{}` external crate", ident)
1160+
format!("no external crate `{}`", ident)
11611161
} else {
11621162
// HACK(eddyb) this shows up for `self` & `super`, which
11631163
// should work instead - for now keep the same error message.

src/test/ui/rfc-2126-extern-absolute-paths/non-existent-3.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ error[E0432]: unresolved import `ycrate`
22
--> $DIR/non-existent-3.rs:3:5
33
|
44
LL | use ycrate;
5-
| ^^^^^^ no `ycrate` external crate
5+
| ^^^^^^ no external crate `ycrate`
66

77
error: aborting due to previous error
88

src/test/ui/rfc-2126-extern-absolute-paths/not-allowed.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ error[E0432]: unresolved import `alloc`
22
--> $DIR/not-allowed.rs:5:5
33
|
44
LL | use alloc;
5-
| ^^^^^ no `alloc` external crate
5+
| ^^^^^ no external crate `alloc`
66

77
error: aborting due to previous error
88

0 commit comments

Comments
 (0)