-
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
Rollup of 13 pull requests #77040
Closed
Closed
Rollup of 13 pull requests #77040
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Make the following methods unstable const under the `const_pin` feature: - `new` - `new_unchecked` - `into_inner` - `into_inner_unchecked` - `get_ref` - `into_ref` Also adds tests for these methods in a const context. Tracking issue: rust-lang#76654
`const_mut_refs` doesn't actually work in a `const` or `static`
Make the following methods unstable const under the `const_pin` feature: - `into_ref` - `get_mut` - `get_unchecked_mut`
…d reduce nesting (clippy::single_match)
Co-authored-by: David Tolnay <dtolnay@gmail.com>
See https://internals.rust-lang.org/t/need-for-controlling-drop-order-of-fields/12914/21 for the discussion. TL;DR: ManuallyDrop is unsafe and footguny, but you can just ask the compiler to do all the work for you by re-ordering declarations.
The case shouldn't be necessary and implicitly truncating BytePos is not desirable.
If the right-hand iterator has exactly one more element than the left-hand iterator, then both iterators will be fully consumed, but the extra element will never be compared.
Reduce duplicate in liballoc reserve error handling Not sure if it affects compilation time.
Don't use `zip` to compare iterators during pretty-print hack If the right-hand iterator has exactly one more element than the left-hand iterator, then both iterators will be fully consumed, but the extra element will never be compared. Split out from rust-lang#76130
Don't recommend ManuallyDrop to customize drop order See https://internals.rust-lang.org/t/need-for-controlling-drop-order-of-fields/12914/21 for the discussion. TL;DR: ManuallyDrop is unsafe and footguny, but you can just ask the compiler to do all the work for you by re-ordering declarations. Specifically, the original example from the docs is much better written as ```rust struct Peach; struct Banana; struct Melon; struct FruitBox { melon: Melon, // XXX: mind the relative drop order of the fields below peach: Peach, banana: Banana, } ```
…73836, r=dtolnay Implementation of Write for some immutable ref structs Fixes rust-lang#73836
…6, r=jyn514 Add explanation for E0756 r? @pickfire
do not ICE on bound variables, return `TooGeneric` instead fixes rust-lang#73260, fixes rust-lang#74634, fixes rust-lang#76595 r? @nikomatsakis
Make some methods of `Pin` unstable const Make the following methods unstable const under the `const_pin` feature: - `new` - `new_unchecked` - `into_inner` - `into_inner_unchecked` - `get_ref` - `into_ref` - `get_mut` - `get_unchecked_mut` Of these, `into_inner` and `into_inner_unchecked` require the unstable `const_precise_live_drops`. Also adds tests for these methods in a const context. Tracking issue: rust-lang#76654 r? @ecstatic-morse
Only get ImplKind::Impl once With this, the code panics in one place instead of two.
…d-api, r=oli-obk Use const-checking to forbid use of unstable features in const-stable functions First step towards rust-lang#76618. Currently this code isn't ever hit because `qualify_min_const_fn` runs first and catches pretty much everything. One exception is `const_precise_live_drops`, which does not use the newly added code since it runs as part of a separate pass. Also contains some unrelated refactoring, which is split into separate commits. r? @oli-obk
… r=Dylan-DPC use if let instead of single match arm expressions use if let instead of single match arm expressions to compact code and reduce nesting (clippy::single_match)
extend `Ty` and `TyCtxt` lints to self types blocked on rust-lang#76891 r? @ecstatic-morse cc @Aaron1011
Reduce boilerplate for BytePos and CharPos Reduces boilerplate code for BytePos and CharPos by using a macro to implement shared traits.
…vidtwco lint missing docs for extern items fixes rust-lang#76991
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Successful merges:
zip
to compare iterators during pretty-print hack #76131 (Don't usezip
to compare iterators during pretty-print hack)TooGeneric
instead #76581 (do not ICE on bound variables, returnTooGeneric
instead)Pin
unstable const #76655 (Make some methods ofPin
unstable const)Ty
andTyCtxt
lints to self types #76914 (extendTy
andTyCtxt
lints to self types)Failed merges:
r? @ghost