diff --git a/ices/97695.sh b/ices/97695.sh new file mode 100755 index 00000000..c9a79806 --- /dev/null +++ b/ices/97695.sh @@ -0,0 +1,27 @@ +#!/bin/sh + +rustc -Zmir-opt-level=3 --emit=mir - << EOF + +pub trait Associate { + type Associated; +} + +pub struct Wrap<'a> { + pub field: &'a i32, +} + +pub trait Create { + fn create() -> Self; +} + +pub fn oh_no<'a, T>() +where + Wrap<'a>: Associate, + as Associate>::Associated: Create, +{ + as Associate>::Associated::create(); +} + +pub fn main() {} + +EOF diff --git a/ices/97698.rs b/ices/97698.rs new file mode 100644 index 00000000..a7b058c6 --- /dev/null +++ b/ices/97698.rs @@ -0,0 +1,9 @@ +use std::ffi::CString; + +impl Lock { + pub fn new() { + if () == -1 { + CString::new(); + } + } +} diff --git a/ices/97706.rs b/ices/97706.rs new file mode 100644 index 00000000..c34b5709 --- /dev/null +++ b/ices/97706.rs @@ -0,0 +1,24 @@ +pub fn compose( + f1: impl FnOnce(f64) -> f64 + Clone, + f2: impl FnOnce(f64) -> f64 + Clone, +) -> impl FnOnce(f64) -> f64 + Clone { + move |x| f1(f2(x)) +} + +pub fn double(f: impl FnOnce(f64) -> f64 + Clone) -> impl FnOnce(f64) -> f64 + Clone { + compose(f.clone(), f) +} + + +fn repeat_helper(f: impl FnOnce(f64) -> f64 + Clone, res: impl FnOnce(f64) -> f64 + Clone, times: usize) -> impl FnOnce(f64) -> f64 + Clone { + if times == 1 { + return res; + } + repeat_helper(f.clone(), compose(f, res), times - 1) +} + +pub fn repeat(f: impl FnOnce(f64) -> f64 + Clone, times: usize) -> impl FnOnce(f64) -> f64 + Clone { + repeat_helper(f.clone(), f, times) +} + +pub fn main() {}