Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
estebank committed Dec 21, 2024
1 parent 68af421 commit fd5db02
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 10 deletions.
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
2 changes: 1 addition & 1 deletion tests/rustdoc-ui/ice-unresolved-import-100241.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ error[E0432]: unresolved import `inner`
LL | pub use inner::S;
| ^^^^^ use of unresolved module or unlinked crate `inner`
|
help: if you wanted to use a crate named `inner`, use `cargo add inner` to add it to your `Cargo.toml` and import it in your code
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
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ error[E0433]: failed to resolve: use of unresolved module or unlinked crate `unr
LL | use unresolved_crate::module::Name;
| ^^^^^^^^^^^^^^^^ use of unresolved module or unlinked crate `unresolved_crate`
|
help: if you wanted to use a crate named `unresolved_crate`, use `cargo add unresolved_crate` to add it to your `Cargo.toml` and import it in your code
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.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ error[E0433]: failed to resolve: use of unresolved module or unlinked crate `r#m
LL | pub(in crate::r#mod) fn main() {}
| ^^^^^ use of unresolved module or unlinked crate `r#mod`
|
help: if you wanted to use a crate named `r#mod`, use `cargo add r#mod` to add it to your `Cargo.toml` and import it in your code
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
6 changes: 3 additions & 3 deletions tests/ui-fulldeps/session-diagnostic/diagnostic-derive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ enum DiagnosticOnEnum {
#[derive(Diagnostic)]
#[diag(no_crate_example, code = E0123)]
#[diag = "E0123"]
//~^ ERROR failed to resolve: you might be missing crate `core`
//~^ ERROR failed to resolve: you might be missing crate `core`
struct WrongStructAttrStyle {}

#[derive(Diagnostic)]
Expand Down Expand Up @@ -801,15 +801,15 @@ struct SuggestionsNoItem {
struct SuggestionsInvalidItem {
#[suggestion(code(foo))]
//~^ ERROR `code(...)` must contain only string literals
//~| ERROR failed to resolve: you might be missing crate `core`
//~| ERROR failed to resolve: you might be missing crate `core`
sub: Span,
}

#[derive(Diagnostic)] //~ ERROR cannot find value `__code_34` in this scope
#[diag(no_crate_example)]
struct SuggestionsInvalidLiteral {
#[suggestion(code = 3)]
//~^ ERROR failed to resolve: you might be missing crate `core`
//~^ ERROR failed to resolve: you might be missing crate `core`
sub: Span,
}

Expand Down
2 changes: 1 addition & 1 deletion tests/ui/typeck/path-to-method-sugg-unresolved-expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ fn main() {
let page_size = page_size::get();
//~^ ERROR failed to resolve: use of unresolved module or unlinked crate `page_size`
//~| NOTE use of unresolved module or unlinked crate `page_size`
//@[cargo-invoked]~^^^ HELP if you wanted to use a crate named `page_size`, use `cargo add page_size` to add it to your `Cargo.toml`
//@[cargo-invoked]~^^^ HELP if you wanted to use a crate named `page_size`, use `cargo add
//@[only-rustc]~^^^^ HELP you might be missing a crate named `page_size`
}

0 comments on commit fd5db02

Please sign in to comment.