From de8aec9bb1f53e0baf7cfb8e68fa9efdf0517482 Mon Sep 17 00:00:00 2001 From: 1v1_32 Date: Wed, 30 Dec 2020 19:54:21 -0500 Subject: [PATCH] ICE dump: Blocked CI edition (#600) Co-authored-by: Yuki Okushi --- ices/80291.rs | 21 +++++++++++++++++++++ ices/80371.rs | 9 +++++++++ ices/80409.rs | 32 ++++++++++++++++++++++++++++++++ ices/80433.rs | 22 ++++++++++++++++++++++ ices/80447.sh | 22 ++++++++++++++++++++++ 5 files changed, 106 insertions(+) create mode 100644 ices/80291.rs create mode 100644 ices/80371.rs create mode 100644 ices/80409.rs create mode 100644 ices/80433.rs create mode 100644 ices/80447.sh diff --git a/ices/80291.rs b/ices/80291.rs new file mode 100644 index 00000000..df502432 --- /dev/null +++ b/ices/80291.rs @@ -0,0 +1,21 @@ +trait ColumnOutput<'a> { + type Output; +} + +struct C {} + +impl<'a> ColumnOutput<'a> for C { + type Output = u64; +} + +fn calc<'a, O, F>(f: F) +where + O: ColumnOutput<'a>, + F: Fn(::Output) -> u64, +{ + f(vec![].pop().unwrap()); +} + +fn main() { + calc::(|_| unimplemented!()); +} diff --git a/ices/80371.rs b/ices/80371.rs new file mode 100644 index 00000000..198bb0ab --- /dev/null +++ b/ices/80371.rs @@ -0,0 +1,9 @@ +pub struct Header<'a> { + pub value: &'a [u8], +} + +pub fn test() { + let headers = [Header{value: &[]}; 128]; +} + +fn main() {} diff --git a/ices/80409.rs b/ices/80409.rs new file mode 100644 index 00000000..1d9349cc --- /dev/null +++ b/ices/80409.rs @@ -0,0 +1,32 @@ +use std::marker::PhantomData; + +struct FsmBuilder { + _fsm: PhantomData, +} + +impl FsmBuilder { + fn state(&mut self) -> FsmStateBuilder { + todo!() + } +} + +struct FsmStateBuilder { + _state: PhantomData, +} + +impl FsmStateBuilder { + fn on_entry)>(&self, _action: TAction) {} +} + +trait Fsm { + type Context; +} + +struct StateContext<'a, TFsm: Fsm> { + context: &'a mut TFsm::Context, +} + +fn main() { + let mut builder: FsmBuilder = todo!(); + builder.state().on_entry(|_| {}); +} diff --git a/ices/80433.rs b/ices/80433.rs new file mode 100644 index 00000000..502b9714 --- /dev/null +++ b/ices/80433.rs @@ -0,0 +1,22 @@ +#![allow(incomplete_features)] +#![feature(generic_associated_types)] + +struct E {} + +trait TestMut { + type Output<'a>; + fn test_mut(&mut self) -> Self::Output<'static>; +} + +impl TestMut for E { + type Output<'a> = usize; + fn test_mut(&mut self) -> Self::Output<'static> { + todo!() + } +} + +fn test_simpler(_: impl TestMut) {} + +fn main() { + test_simpler(E {}); +} diff --git a/ices/80447.sh b/ices/80447.sh new file mode 100644 index 00000000..d19bfc85 --- /dev/null +++ b/ices/80447.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +rustc --crate-type=proc-macro - << 'EOF' +extern crate proc_macro; +use proc_macro::TokenStream; +#[proc_macro_attribute] +pub fn mac(_attrs: TokenStream, input: TokenStream) -> TokenStream { + input +} +EOF + +rustc --extern mac=$(ls librust_out.*) - << 'EOF' +pub trait Crash { + #[mac::mac] + fn one(s: () { + } + + fn two(); +} + +fn main () {} +EOF