-
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
ICE: no name for expr ||
#67252
Comments
no name for expr ||
no name for expr ||
ICE occurs in: rust/src/librustc/hir/map/mod.rs Line 1031 in f284f8b
|
Error before:
Regression in 27d6f55 cc #65345 @davidtwco (I'm on a MCVE) |
triage: P-high, removing nomination tag. |
Here we go: use std::future::Future;
use std::pin::Pin;
use std::task::{Context, Poll};
fn spawn<T: Send>(_: T) {}
pub struct AFuture;
impl Future for AFuture{
type Output = ();
fn poll(mut self: Pin<&mut Self>, _: &mut Context<'_>) -> Poll<()> {
unimplemented!()
}
}
async fn foo() {
spawn(async {
let _a = std::ptr::null_mut::<()>(); // `*mut ()` is not `Send`
AFuture.await;
});
}
fn main() {} So |
This comment has been minimized.
This comment has been minimized.
Not sure how to express the |
Fixed output:
|
I wanted to quickly prototype a bit of code involving tokio and some shared state but ran into a rustc panic:
I installed
rustc 1.41.0-nightly (27d6f55f4 2019-12-11) running on x86_64-unknown-linux-gnu
by running rustup update a few hours back.In my code (see below) there seems to be a mistake, having a lock living too long i suppose.
The following code leads to the error (based on https://github.com/tokio-rs/tokio/blob/master/examples/echo.rs) :
Unfortunately I could not remove unnecessary parts of the code without making the panic go away.
Might this has something to do with detecting the lock lifetimes?
The text was updated successfully, but these errors were encountered: