-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Rollup of 13 pull requests #55425
Rollup of 13 pull requests #55425
Conversation
Initially landed in rust-lang#48292 and reverted in rust-lang#50401. This time, use `std::string::ParseError` as suggested in rust-lang#44431 (comment)
Sometimes it *is* initialized!
Use the new `BoundVarReplacer` to perform canonical substitutions.
This commit extends existing path suggestions to link to documentation on the changed semantics of `use` in Rust 2018.
nll (and thus the algorithm for actual promotion) don't know about some casts anymore
remove unused variable i in example String::with_capacity()
This is just for the `reason =` name-value meta-item; the `#[expect(lint)]` attribute also described in the RFC is a problem for another day. The place where we were directly calling `emit()` on a match block (whose arms returned a mutable reference to a diagnostic-builder) was admittedly cute, but no longer plausibly natural after adding the if-let to the end of the `LintSource::Node` arm. This regards rust-lang#54503.
We take stability seriously, so we shy away from making even seemingly "trivial" features insta-stable.
Vadim Petrochenkov suggested this in review ("an error? just to be conservative"), and it turns out to be convenient from the implementer's perspective: in the initial proposed implementation (or `HEAD~2`, as some might prefer to call it), we were doing an entire whole iteration over the meta items just to find the reason (before iterating over them to set the actual lint levels). This way, we can just peek at the end rather than adding that extra loop (or restructuring the existing code). The RFC doesn't seem to take a position on this, and there's some precedent for restricting things to be at the end of a sequence (we only allow `..` at the end of a struct pattern, even if it would be possible to let it appear anywhere in the sequence).
We avoid an ICE by checking for an empty meta-item list before we index into the meta-items, and leave commentary about where we'd like to issue unused-attributes lints in the future. Note that empty lint attributes are already accepted by the stable compiler; generalizing this to weird reason-only lint attributes seems like the conservative/consilient generalization.
…r=petrochenkov lint reasons (RFC 2883, part 1) This implements the `reason =` functionality described in [the RFC](https://github.com/rust-lang/rfcs/blob/master/text/2383-lint-reasons.md) under a `lint_reasons` feature gate. ![lint_reasons_pt_1](https://user-images.githubusercontent.com/1076988/46252097-eed51000-c418-11e8-8212-939d3f02f95d.png)
Implement FromStr for PathBuf Initially landed in rust-lang#48292 and reverted in rust-lang#50401. This time, use `std::string::ParseError` as suggested in rust-lang#44431 (comment)
path suggestions in Rust 2018 should point out the change in semantics Fixes rust-lang#55130. This commit extends existing path suggestions to link to documentation on the changed semantics of `use` in Rust 2018. r? @nikomatsakis
Add MaybeUninit::new Sometimes it *is* initialized!
Allow extern statics with an extern type Fixes rust-lang#55239
…lfJung Change the ICE from rust-lang#55223 to a hard error cc @SimonSapin r? @RalfJung
Add support for bound types This PR may have some slight performance impacts, I don't know how hot is the code I touched. Also, this breaks clippy and miri. r? @nikomatsakis
…ion_mono_items, r=oli-obk Move collect_and_partition_mono_items to rustc_mir Most of the logic of it is inside rustc_mir anyway. Also removes the single function crate rustc_metadata_utils. Based on rust-lang#55225
Remove unnecessary mut in iterator.find_map documentation example, R… Relates to rust-lang#49098 Removes a mut that could induce newcomers to put a mut in their code that the compiler would comply about. https://github.com/rust-lang/rust/pull/49098/files#r227422388
Update string.rs remove unused variable i in example String::with_capacity()
Fix an ICE in the min_const_fn analysis fixes rust-lang#55395 cc @Centril
@bors r+ p=5 |
📌 Commit 25be4f6 has been approved by |
⌛ Testing commit 25be4f6 with merge a3f556db789987a221401962cf7fc33acaf884a4... |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
💔 Test failed - status-appveyor |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
☔ The latest upstream changes (presumably #55297) made this pull request unmergeable. Please resolve the merge conflicts. |
Successful merges:
Failed merges:
r? @ghost