Skip to content
This repository has been archived by the owner on May 23, 2024. It is now read-only.

Commit

Permalink
ICE dump: Blocked CI edition (#600)
Browse files Browse the repository at this point in the history
Co-authored-by: Yuki Okushi <huyuumi.dev@gmail.com>
  • Loading branch information
fanninpm and JohnTitor committed Dec 31, 2020
1 parent c3fd058 commit de8aec9
Show file tree
Hide file tree
Showing 5 changed files with 106 additions and 0 deletions.
21 changes: 21 additions & 0 deletions ices/80291.rs
Original file line number Diff line number Diff line change
@@ -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(<O as ColumnOutput>::Output) -> u64,
{
f(vec![].pop().unwrap());
}

fn main() {
calc::<C, _>(|_| unimplemented!());
}
9 changes: 9 additions & 0 deletions ices/80371.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
pub struct Header<'a> {
pub value: &'a [u8],
}

pub fn test() {
let headers = [Header{value: &[]}; 128];
}

fn main() {}
32 changes: 32 additions & 0 deletions ices/80409.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
use std::marker::PhantomData;

struct FsmBuilder<TFsm> {
_fsm: PhantomData<TFsm>,
}

impl<TFsm> FsmBuilder<TFsm> {
fn state(&mut self) -> FsmStateBuilder<TFsm> {
todo!()
}
}

struct FsmStateBuilder<TFsm> {
_state: PhantomData<TFsm>,
}

impl<TFsm> FsmStateBuilder<TFsm> {
fn on_entry<TAction: Fn(&mut StateContext<'_, TFsm>)>(&self, _action: TAction) {}
}

trait Fsm {
type Context;
}

struct StateContext<'a, TFsm: Fsm> {
context: &'a mut TFsm::Context,
}

fn main() {
let mut builder: FsmBuilder<usize> = todo!();
builder.state().on_entry(|_| {});
}
22 changes: 22 additions & 0 deletions ices/80433.rs
Original file line number Diff line number Diff line change
@@ -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<Output = usize>) {}

fn main() {
test_simpler(E {});
}
22 changes: 22 additions & 0 deletions ices/80447.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit de8aec9

Please sign in to comment.