-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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 7 pull requests #112789
Rollup of 7 pull requests #112789
Conversation
Previously, these were allowed if the function returned `()`, but always led to an ambiguity error.
Usage of `Pin::new_unchecked(&mut …)` is dangerous with `poll_fn`, even though the `!Unpin`-infectiousness has made things smoother. Nonetheless, there are easy ways to avoid the need for any `unsafe` altogether, be it through `Box::pin`ning, or the `pin!` macro. Since the latter only works within an `async` context, showing an example artifically introducing one ought to help people navigate this subtlety with safety and confidence.
…mpossible item bounds
…n-clarifications, r=thomcc [doc] `poll_fn`: explain how to `pin` captured state safely Usage of `Pin::new_unchecked(&mut …)` is dangerous with `poll_fn`, even though the `!Unpin`-infectiousness has made things smoother. Nonetheless, there are easy ways to avoid the need for any `unsafe` altogether, be it through `Box::pin`ning, or the `pin!` macro. Since the latter only works within an `async` context, showing an example artificially introducing one ought to help people navigate this subtlety with safety and confidence. ## Preview https://user-images.githubusercontent.com/9920355/230092494-da22fdcb-0b8f-4ff4-a2ac-aa7d9ead077a.mov `@rustbot` label +A-docs
`#[test]` function signature verification improvements This PR contains two improvements to the expansion of the `#[test]` macro. The first one fixes rust-lang#112360 by correctly recovering item statements if the signature verification fails. The second one forbids non-lifetime generics on `#[test]` functions. These were previously allowed if the function returned `()`, but always caused an inference error: before: ```text error[E0282]: type annotations needed --> src/lib.rs:2:1 | 1 | #[test] | ------- in this procedural macro expansion 2 | fn foo<T>() {} | ^^^^^^^^^^^^^^ cannot infer type ``` after: ```text error: functions used as tests can not have any non-lifetime generic parameters --> src/lib.rs:2:1 | 2 | fn foo<T>() {} | ^^^^^^^^^^^^^^ ``` Also includes some basic tests for test function signature verification, because I couldn't find any (???) in the test suite.
Alter `Display` for `Ipv6Addr` for IPv4-compatible addresses ACP: rust-lang/libs-team#239
…e, r=oli-obk Continue folding in query normalizer on weak aliases Fixes rust-lang#112752 Fixes rust-lang#112731 (same root cause, so didn't make a test for it) fixes rust-lang#112776 r? `@oli-obk`
…erlaps-hidden, r=lcnr Don't consider TAIT normalizable to hidden ty if it would result in impossible item bounds See test for example where we shouldn't consider it possible to alias-relate a TAIT and hidden type. r? `@lcnr`
…ce, r=fee1-dead Don't ICE on bound var in `reject_fn_ptr_impls` We may try to use an impl like `impl<T: FnPtr> PartialEq {}` to satisfy a predicate like `for<T> T: PartialEq` -- don't ICE in that case. Fixes rust-lang#112735
…=jyn514 Add gha problem matcher These regexes capture rustfmt errors, panics and regular Rust errors in CI and automatically add messages in the diff view. This should make it simpler to quickly see what went wrong without having to scroll through CI logs. We can fine tune the regexes or add more matchers after having a look at how it actually works in practice The relevant documentation can be found at https://github.com/actions/toolkit/blob/main/docs/problem-matchers.md r? `@jyn514`
@bors r+ rollup=never p=7 |
🔒 Merge conflict This pull request and the master branch diverged in a way that cannot be automatically merged. Please rebase on top of the latest master branch, and let the reviewer approve again. How do I rebase?Assuming
You may also read Git Rebasing to Resolve Conflicts by Drew Blessing for a short tutorial. Please avoid the "Resolve conflicts" button on GitHub. It uses Sometimes step 4 will complete without asking for resolution. This is usually due to difference between how Error message
|
#112781 seems to need a manual rebase |
☔ The latest upstream changes (presumably #112351) made this pull request unmergeable. Please resolve the merge conflicts. |
Successful merges:
poll_fn
: explain how topin
captured state safely #109970 ([doc]poll_fn
: explain how topin
captured state safely)#[test]
function signature verification improvements #112366 (#[test]
function signature verification improvements)Display
forIpv6Addr
for IPv4-compatible addresses #112606 (AlterDisplay
forIpv6Addr
for IPv4-compatible addresses)reject_fn_ptr_impls
#112783 (Don't ICE on bound var inreject_fn_ptr_impls
)r? @ghost
@rustbot modify labels: rollup
Create a similar rollup