Skip to content

Commit

Permalink
add 4 ices
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiaskrgr committed Sep 18, 2022
1 parent 5ca315a commit c117519
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 0 deletions.
24 changes: 24 additions & 0 deletions ices/101739.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash

rustc -Zsave-analysis - <<'EOF'
#![feature(transmutability)]
mod assert {
use std::mem::BikeshedIntrinsicFrom;
pub fn is_transmutable<Src, Context, const ASSUME_ALIGNMENT: bool>()
where
Dst: BikeshedIntrinsicFrom<Src, Context, ASSUME_ALIGNMENT>,
{}
}
fn via_const() {
struct Context;
struct Src;
assert::is_transmutable::<Src, Context, false>();
}
EOF

10 changes: 10 additions & 0 deletions ices/101852.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
pub fn ice(
x: impl AsRef<str>,
) -> impl IntoIterator<Item = ()> {
vec![].append(&mut ice(x.as_ref()));

Vec::new()
}

fn main() {
}
19 changes: 19 additions & 0 deletions ices/101940.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
pub trait Trait {
type Fut<'a> where Self: 'a;
fn fun<'a, 'b>(&'a self, x: &'_ mut &'b ()) -> Self::Fut<'a>
where
'b: 'a;
}
impl Trait for () {
type Fut<'a> = impl ::std::future::Future + 'a
where
Self: 'a;
fn fun<'a, 'b>(&'a self, x: &'_ mut &'b ()) -> Self::Fut<'a>
where
'b: 'a,
{
async { }
}
}

pub fn main() {}
9 changes: 9 additions & 0 deletions ices/101962.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#![feature(core_intrinsics)]

pub fn wrapping<T: Copy>(a: T, b: T) {
let _z = core::intrinsics::wrapping_mul(a, b);
}

pub fn main() {
wrapping(1,2);
}

0 comments on commit c117519

Please sign in to comment.