diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-09-28 22:12:01 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-09-28 22:12:01 +0200 |
| commit | 05881d046eae6eda799a2778ca6bd66477d41b80 (patch) | |
| tree | 475abff76f301d15ae0681e2ad325c958d815ab9 /src/test/ui/panic-handler | |
| parent | 55a3eada4dddefce8d28ab0435ce5e2f219946b4 (diff) | |
| parent | ac9aed56e4dc62c4959ae0c14cec585994302c93 (diff) | |
| download | rust-05881d046eae6eda799a2778ca6bd66477d41b80.tar.gz rust-05881d046eae6eda799a2778ca6bd66477d41b80.zip | |
Rollup merge of #64678 - tomtau:fix/no-std-error, r=matthewjasper
added more context for duplicate lang item errors (fixes #60561) Some more information about #60561 -- these errors are pretty common when one works in restrictive environments with `no_std` or customized `std`, but they don't provide much context for debugging, as any transitive dependency could have brought in `std` crate. With that, currently, one needs to use something like `cargo tree` and investigate transitive dependencies one by one. It'll be more helpful to know at least the crate that uses `std` (which `cargo tree` doesn't show) to pin down this investigation when debugging. I'm not sure what the best way to get this context is inside rustc internals (I'm new to them). I found that `all_crate_nums` query returns the crates in some dependency order, so printing out the name of the preceding crate seems to do the trick. But I welcome suggestions if this can be done in a better way.
Diffstat (limited to 'src/test/ui/panic-handler')
| -rw-r--r-- | src/test/ui/panic-handler/panic-handler-std.stderr | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/ui/panic-handler/panic-handler-std.stderr b/src/test/ui/panic-handler/panic-handler-std.stderr index 32240311116..e6d24348ca8 100644 --- a/src/test/ui/panic-handler/panic-handler-std.stderr +++ b/src/test/ui/panic-handler/panic-handler-std.stderr @@ -6,7 +6,7 @@ LL | | loop {} LL | | } | |_^ | - = note: first defined in crate `std`. + = note: first defined in crate `std` (which `panic_handler_std` depends on). error: argument should be `&PanicInfo` --> $DIR/panic-handler-std.rs:7:16 |
