-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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: combine tests: Ty::fn_sig() called on non-fn type: _ #102289
Comments
Hmm... this will be fun to minimize, lol. |
Ok this is due to #100096. I'll probably revert that due to its existing perf regression and this ICE. I may also work on a test, but it might be hard to minimize. I'll see. |
searched nightlies: from nightly-2022-06-01 to nightly-2022-09-25 bisected with cargo-bisect-rustc v0.6.3Host triple: x86_64-unknown-linux-gnu cargo bisect-rustc --start=2022-06-01 -- test |
95 line minimisation. It's probably possible to go smaller, but I can't figure out how |
down to ~50 lines pub(crate) trait Parser: Sized {
type Output;
fn parse(&mut self, _input: &str) -> Result<(), ()> {
loop {}
}
fn map<F, B>(self, _f: F) -> Map<Self, F>
where
F: FnMut(Self::Output) -> B,
{
todo!()
}
}
pub(crate) struct Chainl1<P, Op>(P, Op);
impl<P, Op> Parser for Chainl1<P, Op>
where
P: Parser,
Op: Parser,
Op::Output: FnOnce(P::Output, P::Output) -> P::Output,
{
type Output = P::Output;
}
pub(crate) fn chainl1<P, Op>(_parser: P, _op: Op) -> Chainl1<P, Op>
where
P: Parser,
Op: Parser,
Op::Output: FnOnce(P::Output, P::Output) -> P::Output,
{
loop {}
}
pub(crate) struct Map<P, F>(P, F);
impl<A, B, P, F> Parser for Map<P, F>
where
P: Parser<Output = A>,
F: FnMut(A) -> B,
{
type Output = B;
}
impl Parser for u32 {
type Output = ();
}
pub fn chainl1_error_consume() {
fn first<T, U>(t: T, _: U) -> T {
t
}
let _ = chainl1(1, 1.map(|_| first)).parse("");
} |
…ckh726 Use already resolved `self_ty` in `confirm_fn_pointer_candidate` Fixes rust-lang#102289
Code
This happens inside https://github.com/Marwes/combine
The ice seems to come from this test function https://github.com/Marwes/combine/blob/master/src/lib.rs#L637
Meta
rustc --version --verbose
:Error output
Backtrace
The text was updated successfully, but these errors were encountered: