Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reword resolve errors caused by likely missing crate in dep tree #133154

Merged
merged 1 commit into from
Jan 25, 2025

Conversation

estebank
Copy link
Contributor

Reword label and add help:

error[E0432]: unresolved import `some_novel_crate`
 --> f704.rs:1:5
  |
1 | use some_novel_crate::Type;
  |     ^^^^^^^^^^^^^^^^ use of unresolved module or unlinked crate `some_novel_crate`
  |
  = help: if you wanted to use a crate named `some_novel_crate`, use `cargo add some_novel_crate` to add it to your `Cargo.toml`

Fix #133137.

@rustbot
Copy link
Collaborator

rustbot commented Nov 18, 2024

r? @wesleywiser

rustbot has assigned @wesleywiser.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Nov 18, 2024
@rust-log-analyzer

This comment has been minimized.

Copy link
Member

@fmease fmease left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please only suggest Cargo-specific stuff if rustc_session::utils::was_invoked_from_cargo()

@jieyouxu
Copy link
Member

jieyouxu commented Nov 18, 2024

Please only suggest Cargo-specific stuff if rustc_session::utils::was_invoked_from_cargo()

Apparently that detection checks for CARGO_CRATE_NAME and tests have been using

//@ revisions: only-rustc cargo-invoked
//@[only-rustc] unset-rustc-env:CARGO_CRATE_NAME
//@[cargo-invoked] rustc-env:CARGO_CRATE_NAME=foo

which is... clever, almost too clever.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@fmease fmease self-assigned this Dec 21, 2024
@rust-log-analyzer

This comment has been minimized.

@rustbot
Copy link
Collaborator

rustbot commented Dec 21, 2024

The Miri subtree was changed

cc @rust-lang/miri

Copy link
Member

@wesleywiser wesleywiser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm although you may want to clean up the commit history a bit

r=me when you've rebased

@estebank
Copy link
Contributor Author

@bors r=wesleywiser

@bors
Copy link
Contributor

bors commented Jan 22, 2025

📌 Commit e727641 has been approved by wesleywiser

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 22, 2025
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jan 22, 2025
Reword resolve errors caused by likely missing crate in dep tree

Reword label and add `help`:

```
error[E0432]: unresolved import `some_novel_crate`
 --> f704.rs:1:5
  |
1 | use some_novel_crate::Type;
  |     ^^^^^^^^^^^^^^^^ use of unresolved module or unlinked crate `some_novel_crate`
  |
  = help: if you wanted to use a crate named `some_novel_crate`, use `cargo add some_novel_crate` to add it to your `Cargo.toml`
```

Fix rust-lang#133137.
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 22, 2025
…iaskrgr

Rollup of 10 pull requests

Successful merges:

 - rust-lang#132983 (Edit dangling pointers )
 - rust-lang#133154 (Reword resolve errors caused by likely missing crate in dep tree)
 - rust-lang#135409 (Fix ICE-133117: multiple never-pattern arm doesn't have false_edge_start_block)
 - rust-lang#135557 (Point at invalid utf-8 span on user's source code)
 - rust-lang#135596 (Properly note when query stack is being cut off)
 - rust-lang#135794 (Detect missing fields with default values and suggest `..`)
 - rust-lang#135814 (ci: use ghcr buildkit image)
 - rust-lang#135826 (Misc. `rustc_resolve` cleanups)
 - rust-lang#135837 (Remove test panic from File::open)
 - rust-lang#135856 (Library: Finalize dyn compatibility renaming)

r? `@ghost`
`@rustbot` modify labels: rollup
@matthiaskrgr
Copy link
Member

@bors r-
#135891 (comment)

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jan 22, 2025
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 23, 2025
Rollup of 8 pull requests

Successful merges:

 - rust-lang#133154 (Reword resolve errors caused by likely missing crate in dep tree)
 - rust-lang#135366 (Enable `unreachable_pub` lint in `test` and `proc_macro` crates)
 - rust-lang#135638 (Make it possible to build GCC on CI)
 - rust-lang#135648 (support wasm inline assembly in `naked_asm!`)
 - rust-lang#135827 (CI: free disk with in-tree script instead of GitHub Action)
 - rust-lang#135855 (Only assert the `Parser` size on specific arches)
 - rust-lang#135878 (ci: use 8 core arm runner for dist-aarch64-linux)
 - rust-lang#135905 (Enable kernel sanitizers for aarch64-unknown-none-softfloat)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 23, 2025
Rollup of 8 pull requests

Successful merges:

 - rust-lang#133154 (Reword resolve errors caused by likely missing crate in dep tree)
 - rust-lang#135366 (Enable `unreachable_pub` lint in `test` and `proc_macro` crates)
 - rust-lang#135638 (Make it possible to build GCC on CI)
 - rust-lang#135648 (support wasm inline assembly in `naked_asm!`)
 - rust-lang#135827 (CI: free disk with in-tree script instead of GitHub Action)
 - rust-lang#135855 (Only assert the `Parser` size on specific arches)
 - rust-lang#135878 (ci: use 8 core arm runner for dist-aarch64-linux)
 - rust-lang#135905 (Enable kernel sanitizers for aarch64-unknown-none-softfloat)

r? `@ghost`
`@rustbot` modify labels: rollup
@matthiaskrgr
Copy link
Member

@bors r- rollup=iffy
#135925 (comment)

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jan 23, 2025
```
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`
```
@estebank
Copy link
Contributor Author

These rewording PRs are always a pain :-/

@fmease fmease removed their assignment Jan 24, 2025
@estebank
Copy link
Contributor Author

@bors r=wesleywiser

@bors
Copy link
Contributor

bors commented Jan 24, 2025

📌 Commit dd52bfc has been approved by wesleywiser

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jan 24, 2025
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jan 25, 2025
Reword resolve errors caused by likely missing crate in dep tree

Reword label and add `help`:

```
error[E0432]: unresolved import `some_novel_crate`
 --> f704.rs:1:5
  |
1 | use some_novel_crate::Type;
  |     ^^^^^^^^^^^^^^^^ use of unresolved module or unlinked crate `some_novel_crate`
  |
  = help: if you wanted to use a crate named `some_novel_crate`, use `cargo add some_novel_crate` to add it to your `Cargo.toml`
```

Fix rust-lang#133137.
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 25, 2025
Rollup of 7 pull requests

Successful merges:

 - rust-lang#130808 (Fix linking for symbols starting with ? on i686-pc-windows-msvc)
 - rust-lang#133138 (Target modifiers (special marked options) are recorded in metainfo)
 - rust-lang#133154 (Reword resolve errors caused by likely missing crate in dep tree)
 - rust-lang#135707 (Shorten linker output even more when `--verbose` is not present)
 - rust-lang#135764 (Fix tests on LLVM 20)
 - rust-lang#135785 (use `PassMode::Direct` for vector types on `s390x`)
 - rust-lang#135818 (tests: Port `translation` to rmake.rs)

Failed merges:

 - rust-lang#133951 (Make the wasm_c_abi future compat warning a hard error)

r? `@ghost`
`@rustbot` modify labels: rollup

try-job: aarch64-apple
try-job: i686-mingw
try-job: x86_64-gnu-llvm-19-3
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jan 25, 2025
Reword resolve errors caused by likely missing crate in dep tree

Reword label and add `help`:

```
error[E0432]: unresolved import `some_novel_crate`
 --> f704.rs:1:5
  |
1 | use some_novel_crate::Type;
  |     ^^^^^^^^^^^^^^^^ use of unresolved module or unlinked crate `some_novel_crate`
  |
  = help: if you wanted to use a crate named `some_novel_crate`, use `cargo add some_novel_crate` to add it to your `Cargo.toml`
```

Fix rust-lang#133137.
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 25, 2025
Rollup of 6 pull requests

Successful merges:

 - rust-lang#130808 (Fix linking for symbols starting with ? on i686-pc-windows-msvc)
 - rust-lang#133154 (Reword resolve errors caused by likely missing crate in dep tree)
 - rust-lang#135707 (Shorten linker output even more when `--verbose` is not present)
 - rust-lang#135764 (Fix tests on LLVM 20)
 - rust-lang#135785 (use `PassMode::Direct` for vector types on `s390x`)
 - rust-lang#135818 (tests: Port `translation` to rmake.rs)

r? `@ghost`
`@rustbot` modify labels: rollup

try-job: aarch64-apple
try-job: i686-mingw
try-job: x86_64-gnu-llvm-19-3
@bors
Copy link
Contributor

bors commented Jan 25, 2025

⌛ Testing commit dd52bfc with merge 203e6c1...

@bors
Copy link
Contributor

bors commented Jan 25, 2025

☀️ Test successful - checks-actions
Approved by: wesleywiser
Pushing 203e6c1 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jan 25, 2025
@bors bors merged commit 203e6c1 into rust-lang:master Jan 25, 2025
7 checks passed
@rustbot rustbot added this to the 1.86.0 milestone Jan 25, 2025
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (203e6c1): comparison URL.

Overall result: ❌✅ regressions and improvements - no action needed

@rustbot label: -perf-regression

Instruction count

This is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.2% [0.2%, 0.2%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.2% [-0.2%, -0.2%] 1
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (primary 2.9%, secondary -0.5%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
2.9% [2.9%, 2.9%] 1
Regressions ❌
(secondary)
2.3% [2.3%, 2.3%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-3.4% [-3.4%, -3.4%] 1
All ❌✅ (primary) 2.9% [2.9%, 2.9%] 1

Cycles

This benchmark run did not return any relevant results for this metric.

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 771.063s -> 770.579s (-0.06%)
Artifact size: 325.77 MiB -> 325.79 MiB (0.00%)

ehuss added a commit to ehuss/cargo that referenced this pull request Jan 26, 2025
The text of the message was changed in rust-lang/rust#133154
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

short diagnostic for E0432 incorrectly describes the problem
9 participants