-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
use require_lang_item
over unwrap
.
#72170
Conversation
Could you also cover the one that the issue was reported about? rust/src/librustc_typeck/check/demand.rs Line 637 in 3fe4dd2
|
done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This LGTM. However, this is code that I am not familiar with, so I'd prefer if someone else also took a look. Cc @oli-obk @matthewjasper
Oh, that's a very good idea. I wonder if we can make But we can address this in future work. For now: @bors r+ |
📌 Commit 9001a64 has been approved by |
This looks like a good |
@jonas-schievink Opened #72195 for this, not |
Rollup of 8 pull requests Successful merges: - rust-lang#71910 (Fix unused_parens false positive when using binary operations) - rust-lang#72087 (Fix hang in lexical_region_resolve) - rust-lang#72126 (Change `WorkProduct::saved_files` to an `Option`.) - rust-lang#72127 (add long error explanation for E0228) - rust-lang#72141 (Warn against thread::sleep in async fn) - rust-lang#72170 (use `require_lang_item` over `unwrap`.) - rust-lang#72191 (Clean up E0589 explanation) - rust-lang#72194 (Don't ICE on missing `Unsize` impl) Failed merges: r? @ghost
Remove `lang_items\(\).*\.unwrap\(\)` Follows up rust-lang#72170 to remove the remaining uses of `lang_items\(\).*\.unwrap\(\)` (avoids a bunch of potential ICEs when working in `#![no_core]`). Resolves rust-lang#72195
Remove `lang_items\(\).*\.unwrap\(\)` Follows up rust-lang#72170 to remove the remaining uses of `lang_items\(\).*\.unwrap\(\)` (avoids a bunch of potential ICEs when working in `#![no_core]`). Resolves rust-lang#72195
Remove `lang_items\(\).*\.unwrap\(\)` Follows up rust-lang#72170 to remove the remaining uses of `lang_items\(\).*\.unwrap\(\)` (avoids a bunch of potential ICEs when working in `#![no_core]`). Resolves rust-lang#72195
Remove `lang_items\(\).*\.unwrap\(\)` Follows up rust-lang#72170 to remove the remaining uses of `lang_items\(\).*\.unwrap\(\)` (avoids a bunch of potential ICEs when working in `#![no_core]`). Resolves rust-lang#72195
Remove `lang_items\(\).*\.unwrap\(\)` Follows up rust-lang#72170 to remove the remaining uses of `lang_items\(\).*\.unwrap\(\)` (avoids a bunch of potential ICEs when working in `#![no_core]`). Resolves rust-lang#72195
Does not yet replace all uses of
lang_items\(\)\.*\.unwrap\(\)
, as there are morethan I expected 😅
Fixes #72099
r? @RalfJung
edit: The goal of this this PR is to change ICE from missing lang items to a fatal error.