-
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
[Nightly RustC -- Debug only] Type check fails in async functions when compiling to debug. #72442
Labels
A-incr-comp
Area: Incremental compilation
C-bug
Category: This is a bug.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
P-high
High priority
regression-from-stable-to-nightly
Performance or correctness regression from stable to nightly.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Comments
vicky5124
added
C-bug
Category: This is a bug.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
labels
May 21, 2020
jonas-schievink
added
the
regression-from-stable-to-nightly
Performance or correctness regression from stable to nightly.
label
May 21, 2020
rustbot
added
the
I-prioritize
Issue: Indicates that prioritization has been requested for this issue.
label
May 21, 2020
@doctorn @nitsuga5124 oh, sorry, my bad, investigating. |
JohnTitor
added
the
E-needs-mcve
Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example
label
May 21, 2020
Merged
csmoe
removed
the
E-needs-mcve
Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example
label
May 22, 2020
Kind of strange, this ice only triggered with here is a mcve: use std::fs::File;
use std::future::Future;
use std::io::prelude::*;
fn main() -> Result<(), Box<dyn std::error::Error>> {
block_on(async {
{
let path = std::path::Path::new(".");
let mut f = File::open(path.to_str())?;
//~^ ERROR the trait bound `std::option::Option<&str>: std::convert::AsRef<std::path::Path>` is not satisfied
let mut src = String::new();
f.read_to_string(&mut src)?;
Ok(())
}
})
}
fn block_on<F>(f: F) -> Result<(), ()>
where
F: Future<Output = Result<(), Box<dyn std::error::Error>>>,
{
Ok(())
} ICE: |
wesleywiser
added
P-high
High priority
and removed
I-prioritize
Issue: Indicates that prioritization has been requested for this issue.
labels
May 22, 2020
Dylan-DPC-zz
pushed a commit
to Dylan-DPC-zz/rust
that referenced
this issue
May 25, 2020
Fix ice-rust-lang#72442 Closes rust-lang#72442 Closes rust-lang#72426 r? @oli-obk
bors
added a commit
to rust-lang-ci/rust
that referenced
this issue
May 25, 2020
Rollup of 5 pull requests Successful merges: - rust-lang#72061 (add regression tests for stalled_on const vars) - rust-lang#72424 (fix ICE when debug-printing MIR) - rust-lang#72450 (Fix ice-rust-lang#72442) - rust-lang#72451 (Perform MIR NRVO even if types don't match) - rust-lang#72538 (Removed all instances of const_field.) Failed merges: r? @ghost
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-incr-comp
Area: Incremental compilation
C-bug
Category: This is a bug.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
P-high
High priority
regression-from-stable-to-nightly
Performance or correctness regression from stable to nightly.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
The rustc compiler panics for being unable to check the type of an object.
In the example, it's shown in the form of
path.to_str()
returning an Option, andFile::open()
being unable to take Option as a parameter type.This would be the expected compilation error for that snippet of code, but instead of that, the compiler just panics.
This error only occurs on asynchronous functions and in nightly.
It also only happens when not compiling with --release, only in debug.
Code
Meta
rustc --version --verbose
:Error output
Backtrace
https://pastebin.com/6WaHRfij
RUST_BACKTRACE=1 cargo run --verbose
The text was updated successfully, but these errors were encountered: