Comments (4)
The ICE happens in diagnostics because of a lack of usable name for a suggestion, error: internal compiler error: compiler/rustc_middle/src/ty/mod.rs:2212:13: item_name: no name for DefPath
.
It is on stable and started appearing in 1.77, technically becoming visible in #119869 cc @oli-obk as my due diligence, but that likely just bubbled up the issue. The closure error is now emitted multiple times, but that could be the ICE messing with deduplication (the spans are different tho...).
from rust.
Reduced a bit so we can see it's not related to async.
pub trait ContFn<T>: Fn(T) -> Self::Future {
type Future;
}
impl<T, F> ContFn<T> for F
where
F: Fn(T),
{
type Future = ();
}
pub trait SeqHandler {
type Requires;
fn process<F: ContFn<Self::Requires>>() -> impl Sized;
}
pub struct ConvertToU64;
impl SeqHandler for ConvertToU64 {
type Requires = u64;
fn process<F: ContFn<Self::Requires>>() -> impl Sized {}
}
fn main() {}
from rust.
Whatever is easier for you. People looking at this issue will find it either way, don't worry :)
from rust.
Reduced a bit so we can see it's not related to async.
pub trait ContFn<T>: Fn(T) -> Self::Future { type Future; } impl<T, F> ContFn<T> for F where F: Fn(T), { type Future = (); } pub trait SeqHandler { type Requires; fn process<F: ContFn<Self::Requires>>() -> impl Sized; } pub struct ConvertToU64; impl SeqHandler for ConvertToU64 { type Requires = u64; fn process<F: ContFn<Self::Requires>>() -> impl Sized {} } fn main() {}
Should I update issue's example to this one?
from rust.
Related Issues (20)
- run-make-support: investigate if it's possible to add code completion support for rmake.rs files
- run-make-support: add helpers for `tmp_dir().join()` and fs operations HOT 1
- Tracking Issue for RFC 3467: UnsafePinned
- Unhelpful error on mismatched types for anonymous futures
- More instructions generated for `Ord::clamp` than manual `max(X).min(Y)` for saturating truncating cast from `i32` to `u8`
- run-make-support: use a `CommandWrapper` trait instead of `impl_helper_methods` macro HOT 2
- Tracking Issue for `duration_new_checked`
- ICE: `called Option::unwrap() on a None value` in `compiler/rustc_infer/src/infer/error_reporting/note_and_explain.rs` HOT 2
- ICE: `SizeSkeleton::compute` layout errored in `layout.rs`
- ICE: `assertion failed: !value.has_infer()` in `rustc_hir_typeck/src/writeback.rs`
- Illegal instruction when cross compile HOT 6
- conflicting impl since nightly-2024-05-01 HOT 9
- flaky aborts with `lto=thin` on Windows in `--release` HOT 11
- ICE: `!self.intercrate` HOT 4
- ICE: `invalid asymmetric binary op`
- ICE: `FloatToFloat/FloatToInt cast: source type usize is not a float type` HOT 2
- ICE; `tried to combine ConstKind::Infer/ConstKind::Infer(InferConst::Var): ?0e: bool and ?0c: Dimension` HOT 1
- ICE: `layout mismatch for result of MulWithOverflow`
- Unexpected float value when casted from `f32` to `f64` HOT 4
- inline-asm x86 CR0 register not recognized depending on the instruction used HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rust.