Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
de0cb6c
Start work on dangling pointers lint
Anthony-Eid Nov 13, 2024
6d95b5b
Update compiler/rustc_lint/src/lints.rs
Anthony-Eid Dec 5, 2024
bab8a41
Update compiler/rustc_lint/messages.ftl
Anthony-Eid Dec 5, 2024
3a83422
Fix ICE-133063
Shunpoco Jan 12, 2025
8a57fa6
Fix ICE-133117
Shunpoco Jan 12, 2025
8c0c149
Remove solved crashes
Shunpoco Jan 12, 2025
0385dd4
Fix ICE-130779
Shunpoco Jan 12, 2025
be56f10
Properly note when query stack is being cut off
compiler-errors Jan 16, 2025
cd9dcfc
ci: use ghcr buildkit image
marcoieni Jan 21, 2025
a93616a
rustc_resolve: remove unneeded `return`s
yotamofek Jan 18, 2025
cf91a93
rustc_resolve: flatten nested `if`s
yotamofek Jan 20, 2025
ae87d00
rustc_resolve: reduce rightwards drift with `let..else` 👉💨
yotamofek Jan 20, 2025
6f22dfe
rustc_resolve: use `Iterator` combinators instead of `for` loops wher…
yotamofek Jan 20, 2025
efabee2
rustc_resolve: don't open-code `Option::filter`
yotamofek Jan 21, 2025
fed5f98
Remove test panic from File::open
ChrisDenton Jan 21, 2025
922e6bb
Detect missing fields with default values and suggest `..`
estebank Jan 20, 2025
e727641
Reword "crate not found" resolve message
estebank Nov 18, 2024
57dd42d
Point at invalid utf-8 span on user's source code
estebank Jan 15, 2025
e7db092
address review: modify ICE-133117-duplicated-never-arm.rs
Shunpoco Jan 22, 2025
d8a216b
address review: modify ICE-133063-never-arm-no-otherwise-block.rs
Shunpoco Jan 22, 2025
481ed2d
address review: modify matches/mod.rs
Shunpoco Jan 22, 2025
7275bdf
modify comment
Shunpoco Jan 22, 2025
9e98d25
Library: Finalize dyn compatibility renaming
fmease Jan 22, 2025
12214db
Update lint tests with new dangling pointers message
Anthony-Eid Jan 22, 2025
5a36359
Rollup merge of #132983 - Anthony-Eid:dangling-pointers-lint, r=Urgau
matthiaskrgr Jan 22, 2025
f699947
Rollup merge of #133154 - estebank:issue-133137, r=wesleywiser
matthiaskrgr Jan 22, 2025
c2ea5ba
Rollup merge of #135409 - Shunpoco:issue-133117-ICE-never-false-edge-…
matthiaskrgr Jan 22, 2025
3cf5a81
Rollup merge of #135557 - estebank:wtf8, r=fee1-dead
matthiaskrgr Jan 22, 2025
b1285e1
Rollup merge of #135596 - compiler-errors:stack, r=oli-obk
matthiaskrgr Jan 22, 2025
8723964
Rollup merge of #135794 - estebank:non-exhaustive-dfv-ctor, r=jieyouxu
matthiaskrgr Jan 22, 2025
a634c4c
Rollup merge of #135814 - marcoieni:use-buildkit-ghcr, r=Kobzol
matthiaskrgr Jan 22, 2025
e98d9f5
Rollup merge of #135826 - yotamofek:resolve-cleanups4, r=petrochenkov
matthiaskrgr Jan 22, 2025
caf38c7
Rollup merge of #135837 - ChrisDenton:trunc, r=Noratrieb
matthiaskrgr Jan 22, 2025
578f0d7
Rollup merge of #135856 - fmease:library-mv-obj-save-dyn-compat-ii, r…
matthiaskrgr Jan 22, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Reword "crate not found" resolve message
```
error[E0432]: unresolved import `some_novel_crate`
 --> file.rs:1:5
  |
1 | use some_novel_crate::Type;
  |     ^^^^^^^^^^^^^^^^ use of unresolved module or unlinked crate `some_novel_crate`
```

On resolve errors where there might be a missing crate, mention `cargo add foo`:

```
error[E0433]: failed to resolve: use of unresolved module or unlinked crate `nope`
  --> $DIR/conflicting-impl-with-err.rs:4:11
   |
LL | impl From<nope::Thing> for Error {
   |           ^^^^ use of unresolved module or unlinked crate `nope`
   |
   = help: if you wanted to use a crate named `nope`, use `cargo add nope` to add it to your `Cargo.toml`
```
  • Loading branch information
estebank committed Jan 21, 2025
commit e72764154205dafb465f9e8f80057459897079e4
36 changes: 32 additions & 4 deletions compiler/rustc_resolve/src/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ use rustc_session::lint::builtin::{
MACRO_EXPANDED_MACRO_EXPORTS_ACCESSED_BY_ABSOLUTE_PATHS,
};
use rustc_session::lint::{AmbiguityErrorDiag, BuiltinLintDiag};
use rustc_session::utils::was_invoked_from_cargo;
use rustc_span::edit_distance::find_best_match_for_name;
use rustc_span::edition::Edition;
use rustc_span::hygiene::MacroKind;
Expand Down Expand Up @@ -809,7 +810,6 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
}
err.multipart_suggestion(msg, suggestions, applicability);
}

if let Some(ModuleOrUniformRoot::Module(module)) = module
&& let Some(module) = module.opt_def_id()
&& let Some(segment) = segment
Expand Down Expand Up @@ -2044,13 +2044,23 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
(format!("`_` is not a valid crate or module name"), None)
} else if self.tcx.sess.is_rust_2015() {
(
format!("you might be missing crate `{ident}`"),
format!("use of unresolved module or unlinked crate `{ident}`"),
Some((
vec![(
self.current_crate_outer_attr_insert_span,
format!("extern crate {ident};\n"),
)],
format!("consider importing the `{ident}` crate"),
if was_invoked_from_cargo() {
format!(
"if you wanted to use a crate named `{ident}`, use `cargo add {ident}` \
to add it to your `Cargo.toml` and import it in your code",
)
} else {
format!(
"you might be missing a crate named `{ident}`, add it to your \
project and import it in your code",
)
},
Applicability::MaybeIncorrect,
)),
)
Expand Down Expand Up @@ -2229,7 +2239,25 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
let descr = binding.res().descr();
(format!("{descr} `{ident}` is not a crate or module"), suggestion)
} else {
(format!("use of undeclared crate or module `{ident}`"), suggestion)
let suggestion = if suggestion.is_some() {
suggestion
} else if was_invoked_from_cargo() {
Some((
vec![],
format!(
"if you wanted to use a crate named `{ident}`, use `cargo add {ident}` \
to add it to your `Cargo.toml`",
),
Applicability::MaybeIncorrect,
))
} else {
Some((
vec![],
format!("you might be missing a crate named `{ident}`",),
Applicability::MaybeIncorrect,
))
};
(format!("use of unresolved module or unlinked crate `{ident}`"), suggestion)
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/tools/miri/tests/fail/rustc-error2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ struct Struct<T>(T);
impl<T> std::ops::Deref for Struct<T> {
type Target = dyn Fn(T);
fn deref(&self) -> &assert_mem_uninitialized_valid::Target {
//~^ERROR: undeclared crate or module
//~^ERROR: use of unresolved module or unlinked crate
unimplemented!()
}
}
Expand Down
6 changes: 4 additions & 2 deletions src/tools/miri/tests/fail/rustc-error2.stderr
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
error[E0433]: failed to resolve: use of undeclared crate or module `assert_mem_uninitialized_valid`
error[E0433]: failed to resolve: use of unresolved module or unlinked crate `assert_mem_uninitialized_valid`
--> tests/fail/rustc-error2.rs:LL:CC
|
LL | fn deref(&self) -> &assert_mem_uninitialized_valid::Target {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ use of undeclared crate or module `assert_mem_uninitialized_valid`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ use of unresolved module or unlinked crate `assert_mem_uninitialized_valid`
|
= help: you might be missing a crate named `assert_mem_uninitialized_valid`

error: aborting due to 1 previous error

Expand Down
4 changes: 2 additions & 2 deletions tests/rustdoc-ui/ice-unresolved-import-100241.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ error[E0432]: unresolved import `inner`
--> $DIR/ice-unresolved-import-100241.rs:9:13
|
LL | pub use inner::S;
| ^^^^^ you might be missing crate `inner`
| ^^^^^ use of unresolved module or unlinked crate `inner`
|
help: consider importing the `inner` crate
help: you might be missing a crate named `inner`, add it to your project and import it in your code
|
LL + extern crate inner;
|
Expand Down
6 changes: 3 additions & 3 deletions tests/rustdoc-ui/intra-doc/unresolved-import-recovery.stderr
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
error[E0433]: failed to resolve: you might be missing crate `unresolved_crate`
error[E0433]: failed to resolve: use of unresolved module or unlinked crate `unresolved_crate`
--> $DIR/unresolved-import-recovery.rs:3:5
|
LL | use unresolved_crate::module::Name;
| ^^^^^^^^^^^^^^^^ you might be missing crate `unresolved_crate`
| ^^^^^^^^^^^^^^^^ use of unresolved module or unlinked crate `unresolved_crate`
|
help: consider importing the `unresolved_crate` crate
help: you might be missing a crate named `unresolved_crate`, add it to your project and import it in your code
|
LL + extern crate unresolved_crate;
|
Expand Down
2 changes: 1 addition & 1 deletion tests/rustdoc-ui/issues/issue-61732.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// This previously triggered an ICE.

pub(in crate::r#mod) fn main() {}
//~^ ERROR failed to resolve: you might be missing crate `r#mod`
//~^ ERROR failed to resolve: use of unresolved module or unlinked crate `r#mod`
6 changes: 3 additions & 3 deletions tests/rustdoc-ui/issues/issue-61732.stderr
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
error[E0433]: failed to resolve: you might be missing crate `r#mod`
error[E0433]: failed to resolve: use of unresolved module or unlinked crate `r#mod`
--> $DIR/issue-61732.rs:3:15
|
LL | pub(in crate::r#mod) fn main() {}
| ^^^^^ you might be missing crate `r#mod`
| ^^^^^ use of unresolved module or unlinked crate `r#mod`
|
help: consider importing the `r#mod` crate
help: you might be missing a crate named `r#mod`, add it to your project and import it in your code
|
LL + extern crate r#mod;
|
Expand Down
12 changes: 6 additions & 6 deletions tests/ui/attributes/check-builtin-attr-ice.stderr
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
error[E0433]: failed to resolve: use of undeclared crate or module `should_panic`
error[E0433]: failed to resolve: use of unresolved module or unlinked crate `should_panic`
--> $DIR/check-builtin-attr-ice.rs:43:7
|
LL | #[should_panic::skip]
| ^^^^^^^^^^^^ use of undeclared crate or module `should_panic`
| ^^^^^^^^^^^^ use of unresolved module or unlinked crate `should_panic`

error[E0433]: failed to resolve: use of undeclared crate or module `should_panic`
error[E0433]: failed to resolve: use of unresolved module or unlinked crate `should_panic`
--> $DIR/check-builtin-attr-ice.rs:47:7
|
LL | #[should_panic::a::b::c]
| ^^^^^^^^^^^^ use of undeclared crate or module `should_panic`
| ^^^^^^^^^^^^ use of unresolved module or unlinked crate `should_panic`

error[E0433]: failed to resolve: use of undeclared crate or module `deny`
error[E0433]: failed to resolve: use of unresolved module or unlinked crate `deny`
--> $DIR/check-builtin-attr-ice.rs:55:7
|
LL | #[deny::skip]
| ^^^^ use of undeclared crate or module `deny`
| ^^^^ use of unresolved module or unlinked crate `deny`

error: aborting due to 3 previous errors

Expand Down
52 changes: 26 additions & 26 deletions tests/ui/attributes/check-cfg_attr-ice.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -17,83 +17,83 @@ LL | #[cfg_attr::no_such_thing]
= help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date

error[E0433]: failed to resolve: use of undeclared crate or module `cfg_attr`
error[E0433]: failed to resolve: use of unresolved module or unlinked crate `cfg_attr`
--> $DIR/check-cfg_attr-ice.rs:52:3
|
LL | #[cfg_attr::no_such_thing]
| ^^^^^^^^ use of undeclared crate or module `cfg_attr`
| ^^^^^^^^ use of unresolved module or unlinked crate `cfg_attr`

error[E0433]: failed to resolve: use of undeclared crate or module `cfg_attr`
error[E0433]: failed to resolve: use of unresolved module or unlinked crate `cfg_attr`
--> $DIR/check-cfg_attr-ice.rs:55:7
|
LL | #[cfg_attr::no_such_thing]
| ^^^^^^^^ use of undeclared crate or module `cfg_attr`
| ^^^^^^^^ use of unresolved module or unlinked crate `cfg_attr`

error[E0433]: failed to resolve: use of undeclared crate or module `cfg_attr`
error[E0433]: failed to resolve: use of unresolved module or unlinked crate `cfg_attr`
--> $DIR/check-cfg_attr-ice.rs:57:17
|
LL | GiveYouUp(#[cfg_attr::no_such_thing] u8),
| ^^^^^^^^ use of undeclared crate or module `cfg_attr`
| ^^^^^^^^ use of unresolved module or unlinked crate `cfg_attr`

error[E0433]: failed to resolve: use of undeclared crate or module `cfg_attr`
error[E0433]: failed to resolve: use of unresolved module or unlinked crate `cfg_attr`
--> $DIR/check-cfg_attr-ice.rs:64:11
|
LL | #[cfg_attr::no_such_thing]
| ^^^^^^^^ use of undeclared crate or module `cfg_attr`
| ^^^^^^^^ use of unresolved module or unlinked crate `cfg_attr`

error[E0433]: failed to resolve: use of undeclared crate or module `cfg_attr`
error[E0433]: failed to resolve: use of unresolved module or unlinked crate `cfg_attr`
--> $DIR/check-cfg_attr-ice.rs:41:7
|
LL | #[cfg_attr::no_such_thing]
| ^^^^^^^^ use of undeclared crate or module `cfg_attr`
| ^^^^^^^^ use of unresolved module or unlinked crate `cfg_attr`

error[E0433]: failed to resolve: use of undeclared crate or module `cfg_attr`
error[E0433]: failed to resolve: use of unresolved module or unlinked crate `cfg_attr`
--> $DIR/check-cfg_attr-ice.rs:43:15
|
LL | fn from(#[cfg_attr::no_such_thing] any_other_guy: AnyOtherGuy) -> This {
| ^^^^^^^^ use of undeclared crate or module `cfg_attr`
| ^^^^^^^^ use of unresolved module or unlinked crate `cfg_attr`

error[E0433]: failed to resolve: use of undeclared crate or module `cfg_attr`
error[E0433]: failed to resolve: use of unresolved module or unlinked crate `cfg_attr`
--> $DIR/check-cfg_attr-ice.rs:45:11
|
LL | #[cfg_attr::no_such_thing]
| ^^^^^^^^ use of undeclared crate or module `cfg_attr`
| ^^^^^^^^ use of unresolved module or unlinked crate `cfg_attr`

error[E0433]: failed to resolve: use of undeclared crate or module `cfg_attr`
error[E0433]: failed to resolve: use of unresolved module or unlinked crate `cfg_attr`
--> $DIR/check-cfg_attr-ice.rs:32:3
|
LL | #[cfg_attr::no_such_thing]
| ^^^^^^^^ use of undeclared crate or module `cfg_attr`
| ^^^^^^^^ use of unresolved module or unlinked crate `cfg_attr`

error[E0433]: failed to resolve: use of undeclared crate or module `cfg_attr`
error[E0433]: failed to resolve: use of unresolved module or unlinked crate `cfg_attr`
--> $DIR/check-cfg_attr-ice.rs:24:3
|
LL | #[cfg_attr::no_such_thing]
| ^^^^^^^^ use of undeclared crate or module `cfg_attr`
| ^^^^^^^^ use of unresolved module or unlinked crate `cfg_attr`

error[E0433]: failed to resolve: use of undeclared crate or module `cfg_attr`
error[E0433]: failed to resolve: use of unresolved module or unlinked crate `cfg_attr`
--> $DIR/check-cfg_attr-ice.rs:27:7
|
LL | #[cfg_attr::no_such_thing]
| ^^^^^^^^ use of undeclared crate or module `cfg_attr`
| ^^^^^^^^ use of unresolved module or unlinked crate `cfg_attr`

error[E0433]: failed to resolve: use of undeclared crate or module `cfg_attr`
error[E0433]: failed to resolve: use of unresolved module or unlinked crate `cfg_attr`
--> $DIR/check-cfg_attr-ice.rs:16:3
|
LL | #[cfg_attr::no_such_thing]
| ^^^^^^^^ use of undeclared crate or module `cfg_attr`
| ^^^^^^^^ use of unresolved module or unlinked crate `cfg_attr`

error[E0433]: failed to resolve: use of undeclared crate or module `cfg_attr`
error[E0433]: failed to resolve: use of unresolved module or unlinked crate `cfg_attr`
--> $DIR/check-cfg_attr-ice.rs:19:7
|
LL | #[cfg_attr::no_such_thing]
| ^^^^^^^^ use of undeclared crate or module `cfg_attr`
| ^^^^^^^^ use of unresolved module or unlinked crate `cfg_attr`

error[E0433]: failed to resolve: use of undeclared crate or module `cfg_attr`
error[E0433]: failed to resolve: use of unresolved module or unlinked crate `cfg_attr`
--> $DIR/check-cfg_attr-ice.rs:12:3
|
LL | #[cfg_attr::no_such_thing]
| ^^^^^^^^ use of undeclared crate or module `cfg_attr`
| ^^^^^^^^ use of unresolved module or unlinked crate `cfg_attr`

error: aborting due to 15 previous errors

Expand Down
12 changes: 6 additions & 6 deletions tests/ui/attributes/field-attributes-vis-unresolved.stderr
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
error[E0433]: failed to resolve: you might be missing crate `nonexistent`
error[E0433]: failed to resolve: use of unresolved module or unlinked crate `nonexistent`
--> $DIR/field-attributes-vis-unresolved.rs:17:12
|
LL | pub(in nonexistent) field: u8
| ^^^^^^^^^^^ you might be missing crate `nonexistent`
| ^^^^^^^^^^^ use of unresolved module or unlinked crate `nonexistent`
|
help: consider importing the `nonexistent` crate
help: you might be missing a crate named `nonexistent`, add it to your project and import it in your code
|
LL + extern crate nonexistent;
|

error[E0433]: failed to resolve: you might be missing crate `nonexistent`
error[E0433]: failed to resolve: use of unresolved module or unlinked crate `nonexistent`
--> $DIR/field-attributes-vis-unresolved.rs:22:12
|
LL | pub(in nonexistent) u8
| ^^^^^^^^^^^ you might be missing crate `nonexistent`
| ^^^^^^^^^^^ use of unresolved module or unlinked crate `nonexistent`
|
help: consider importing the `nonexistent` crate
help: you might be missing a crate named `nonexistent`, add it to your project and import it in your code
|
LL + extern crate nonexistent;
|
Expand Down
12 changes: 8 additions & 4 deletions tests/ui/coherence/conflicting-impl-with-err.stderr
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
error[E0433]: failed to resolve: use of undeclared crate or module `nope`
error[E0433]: failed to resolve: use of unresolved module or unlinked crate `nope`
--> $DIR/conflicting-impl-with-err.rs:4:11
|
LL | impl From<nope::Thing> for Error {
| ^^^^ use of undeclared crate or module `nope`
| ^^^^ use of unresolved module or unlinked crate `nope`
|
= help: you might be missing a crate named `nope`

error[E0433]: failed to resolve: use of undeclared crate or module `nope`
error[E0433]: failed to resolve: use of unresolved module or unlinked crate `nope`
--> $DIR/conflicting-impl-with-err.rs:5:16
|
LL | fn from(_: nope::Thing) -> Self {
| ^^^^ use of undeclared crate or module `nope`
| ^^^^ use of unresolved module or unlinked crate `nope`
|
= help: you might be missing a crate named `nope`

error: aborting due to 2 previous errors

Expand Down
2 changes: 1 addition & 1 deletion tests/ui/delegation/bad-resolve.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ impl Trait for S {
}

mod prefix {}
reuse unresolved_prefix::{a, b, c}; //~ ERROR use of undeclared crate or module `unresolved_prefix`
reuse unresolved_prefix::{a, b, c}; //~ ERROR use of unresolved module or unlinked crate
reuse prefix::{self, super, crate}; //~ ERROR `crate` in paths can only be used in start position

fn main() {}
6 changes: 4 additions & 2 deletions tests/ui/delegation/bad-resolve.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,13 @@ LL | type Type;
LL | impl Trait for S {
| ^^^^^^^^^^^^^^^^ missing `Type` in implementation

error[E0433]: failed to resolve: use of undeclared crate or module `unresolved_prefix`
error[E0433]: failed to resolve: use of unresolved module or unlinked crate `unresolved_prefix`
--> $DIR/bad-resolve.rs:43:7
|
LL | reuse unresolved_prefix::{a, b, c};
| ^^^^^^^^^^^^^^^^^ use of undeclared crate or module `unresolved_prefix`
| ^^^^^^^^^^^^^^^^^ use of unresolved module or unlinked crate `unresolved_prefix`
|
= help: you might be missing a crate named `unresolved_prefix`

error[E0433]: failed to resolve: `crate` in paths can only be used in start position
--> $DIR/bad-resolve.rs:44:29
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/delegation/glob-bad-path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ trait Trait {}
struct S;

impl Trait for u8 {
reuse unresolved::*; //~ ERROR failed to resolve: use of undeclared crate or module `unresolved`
reuse unresolved::*; //~ ERROR failed to resolve: use of unresolved module or unlinked crate `unresolved`
reuse S::*; //~ ERROR expected trait, found struct `S`
}

Expand Down
4 changes: 2 additions & 2 deletions tests/ui/delegation/glob-bad-path.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ error: expected trait, found struct `S`
LL | reuse S::*;
| ^ not a trait

error[E0433]: failed to resolve: use of undeclared crate or module `unresolved`
error[E0433]: failed to resolve: use of unresolved module or unlinked crate `unresolved`
--> $DIR/glob-bad-path.rs:8:11
|
LL | reuse unresolved::*;
| ^^^^^^^^^^ use of undeclared crate or module `unresolved`
| ^^^^^^^^^^ use of unresolved module or unlinked crate `unresolved`

error: aborting due to 2 previous errors

Expand Down
4 changes: 2 additions & 2 deletions tests/ui/error-codes/E0432.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ error[E0432]: unresolved import `something`
--> $DIR/E0432.rs:1:5
|
LL | use something::Foo;
| ^^^^^^^^^ you might be missing crate `something`
| ^^^^^^^^^ use of unresolved module or unlinked crate `something`
|
help: consider importing the `something` crate
help: you might be missing a crate named `something`, add it to your project and import it in your code
|
LL + extern crate something;
|
Expand Down
6 changes: 4 additions & 2 deletions tests/ui/extern-flag/multiple-opts.stderr
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
error[E0433]: failed to resolve: use of undeclared crate or module `somedep`
error[E0433]: failed to resolve: use of unresolved module or unlinked crate `somedep`
--> $DIR/multiple-opts.rs:19:5
|
LL | somedep::somefun();
| ^^^^^^^ use of undeclared crate or module `somedep`
| ^^^^^^^ use of unresolved module or unlinked crate `somedep`
|
= help: you might be missing a crate named `somedep`

error: aborting due to 1 previous error

Expand Down
Loading
Loading