-
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
Unexpected build pass with a not Send
future
#108897
Comments
@rustbot label: +T-types |
I think it's a very serious bug, should we revert this change? @lcnr |
@rustbot claim |
minimized trait Handler {}
impl<F, Fut> Handler for F
where
Fut: Send,
F: FnOnce() -> Fut,
{}
fn require_handler<H: Handler>(h: H) {}
async fn handler() {
let a = &1 as *const i32;
async {}.await;
}
fn main() {
require_handler(handler)
} ah, figured out the issue https://github.com/rust-lang/rust/pull/103695/files#r1129308806 how did you catch this bug? |
I try to find the minimized example of #108847. |
WG-prioritization assigning priority (Zulip discussion). @rustbot label -I-prioritize +P-critical |
Isn't this a stable-to-beta regression since nightly just branched? |
fix: evaluate with wrong obligation stack fix rust-lang#108897 r? `@lcnr`
Just to clarify since we're in the confusing week where stable & beta are discontinuous version numbers:
|
I tried this code:
I expected to see this happen:
build failed, because this future doesn't implement Send, so this function shouldn't implement
Handler
Instead, this happened:
build pass
Meta
rustc --version --verbose
:Backtrace
this bug is introduced by this PR #103695.
The text was updated successfully, but these errors were encountered: