From bae89cd0bcc26a38046c2e27f827cee14481f329 Mon Sep 17 00:00:00 2001 From: Padraic Fanning Date: Thu, 17 Dec 2020 11:41:32 -0500 Subject: [PATCH] Add 67684 Issue: rust-lang/rust#67684 --- ices/67684.sh | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 ices/67684.sh diff --git a/ices/67684.sh b/ices/67684.sh new file mode 100644 index 00000000..1c424de1 --- /dev/null +++ b/ices/67684.sh @@ -0,0 +1,41 @@ +#!/bin/bash + +rustc -C embed-bitcode=no -C codegen-units=1 -C debuginfo=2 --crate-type lib - << 'EOF' +trait ParseError { + type StreamError; +} +impl ParseError for T { + type StreamError = (); +} +trait Stream { + type Error; +} +trait Parser +where + ::PartialState: Default, +{ + type PartialState; + fn parse_mode(&Self, Self::PartialState) {} +} +struct AndThen(core::marker::PhantomData<(A, B)>); +impl Parser for AndThen +where + A: Stream, + B: Into<::StreamError>, +{ + type PartialState = (); +} +fn expr() -> impl Parser +where + A: Stream, +{ + AndThen::(core::marker::PhantomData) +} +fn parse_mode_impl() +where + A::Error: ParseError, + A: Stream, +{ + Parser::parse_mode(&expr::(), Default::default()) +} +EOF