-
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
regression: ICE failing to normalize #109743
Comments
searched nightlies: from nightly-2023-01-24 to nightly-2023-03-30 bisected with cargo-bisect-rustc v0.6.5Host triple: x86_64-unknown-linux-gnu cargo bisect-rustc --regress=ice -- build |
#107267 probably just allowed another existing bug to show up, like the other projection issues. I've reduced the use combine::parser::char::spaces;
use combine::Parser;
use combine::{easy, error, stream};
fn mk_type_parser<'a>() -> impl Parser<easy::Stream<&'a str>, Output = ()> {
mk_inner_type_parser().skip(spaces())
}
struct TypeParser<'a>(&'a ());
fn mk_inner_type_parser<'a>() -> TypeParser<'a> {
unimplemented!()
}
impl<'a> Parser<easy::Stream<&'a str>> for TypeParser<'a>
where
easy::Stream<&'a str>: stream::Stream,
{
type Output = ();
type PartialState = ();
fn add_committed_expected_error(
&mut self,
_errors: &mut error::Tracked<<easy::Stream<&'a str> as stream::StreamOnce>::Error>,
) {
let mut parser = mk_type_parser();
let _: &mut dyn Parser<_, Output = _, PartialState = _> = &mut parser;
}
} it still depends on |
WG-prioritization assigning priority (Zulip discussion). @rustbot label -I-prioritize +P-medium |
Wasn't that PR already present in your previous bisection up to nightly-2023-03-30 ? |
Ah, looks like the MCVE is fixed in #108821, but not the original code. |
use std::marker::PhantomData;
pub trait StreamOnce {
type Token;
}
impl StreamOnce for &str {
type Token = ();
}
pub trait Parser<Input: StreamOnce> {
type PartialState: Default;
fn parse_mode(&self, _state: &Self::PartialState) {}
fn parse_mode_impl() {}
}
pub fn parse_bool<'a>() -> impl Parser<&'a str> {
pub struct TokensCmp<C, Input>
where
Input: StreamOnce,
{
_cmp: C,
_marker: PhantomData<Input>,
}
impl<Input, C> Parser<Input> for TokensCmp<C, Input>
where
C: FnMut(Input::Token),
Input: StreamOnce,
{
type PartialState = ();
}
TokensCmp {
_cmp: |_| (),
_marker: PhantomData,
}
}
pub struct ParseBool;
impl<'a> Parser<&'a str> for ParseBool
where
&'a str: StreamOnce,
{
type PartialState = ();
fn parse_mode_impl() {
parse_bool().parse_mode(&Default::default())
}
} @rustbot label -E-needs-mcve +S-has-mcve |
https://crater-reports.s3.amazonaws.com/beta-1.69-3/beta-2023-03-18/gh/jwiegley.motoko_parse/log.txt
The text was updated successfully, but these errors were encountered: