-
Notifications
You must be signed in to change notification settings - Fork 13.3k
[bug] When I Use tauri-plugin-http and reqwest either, I got a panic #138274
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
Comments
You've chopped off the useful part of the error message. Please provide the entire error message, or as much as you are allowed. |
I'm sorry, here is the full trace with RUST_BACKTRACE=1
|
Minimized to only depend on pin-project-lite: # Cargo.toml
[package]
name = "rustc-bug1"
version = "0.1.0"
edition = "2021"
[lib]
[dependencies]
pin-project-lite = "0.2.11" // lib.rs
use std::future::Future;
use std::pin::Pin;
use std::task::{Context, Poll};
use pin_project_lite::pin_project;
type CancelableResponseFuture = Pin<Box<dyn Future<Output = ()> + Send + Sync>>;
pin_project! {
pub struct Root {
#[pin]
inner: InnerA,
}
}
pin_project! {
pub struct InnerA {
#[pin]
in_flight: InnerB,
}
}
pub struct InnerB {
inner: Pin<Box<dyn Future<Output = ()> + Send>>,
}
impl Root{
fn new() -> Self{todo!()}
}
impl Future for Root {
type Output = ();
fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output> {
todo!();
}
}
pub async fn fetch() {
let fut = async move {
Root::new().await;
};
let b: CancelableResponseFuture = Box::pin(fut);
} Given the words "optimizing mir" in the ICE, probably #130735 (??) |
I'll take a look anyways |
smaller and self-contained: // rustc --crate-type=lib --edition=2021
use std::future::Future;
use std::pin::Pin;
use std::task::{Context, Poll};
struct Root {
inner: InnerB,
}
struct InnerB {
inner: Pin<Box<dyn Future<Output = ()>>>,
}
impl Root {
fn new() -> Self {
todo!()
}
}
impl Future for Root {
type Output = ();
fn poll(self: Pin<&mut Self>, _: &mut Context) -> Poll<Self::Output> {
todo!();
}
}
async fn fetch() {
let fut = async {
Root::new().await;
};
let _: Pin<Box<dyn Future<Output = ()> + Send>> = Box::pin(fut);
} @rustbot label: +S-has-mcve +S-has-bisection +regression-from-stable-to-stable +T-types -needs-triage +A-coercions +A-pin |
Smaller: trait Trait {}
fn foo() -> Box<dyn Trait> {
todo!()
}
fn fetch() {
async {
let fut = async {
let _x = foo();
async {}.await;
};
let _: Box<dyn Send> = Box::new(fut);
};
} @rustbot labels -A-pin +A-auto-traits +A-async-await +A-trait-objects |
Assigning priority (discussion on Zulip). So, one issue is the ICE, which seems to be on stable since long as per the previous bisection. The other thing I am not sure about is if the code created by the Tauri template should compile or is it correct that exits with an error. @rustbot label -I-prioritize +P-medium |
pretty sure this is a duplicate of #137916 |
Code
just follow next steps
Meta
rustc --version --verbose
:Error output
The text was updated successfully, but these errors were encountered: