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

add 3 ices #1321

Merged
merged 1 commit into from
Jun 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions ices/98594.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/bash

rustc -Zverbose - <<'EOF'


#![allow(unused_parens)]
trait Foo {
type Assoc;
}

fn called()
where
for<'b> fn(&'b ()): Foo,
{
}

fn caller()
where
(for<'a> fn(&'a ())): Foo,
{
called()
}

fn main() {}
EOF

19 changes: 19 additions & 0 deletions ices/98598.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
pub trait Foo {
type Output: Foo;

fn baz() -> Self::Output;
}

pub struct Bar;

impl Foo for &Bar {
type Output = Bar;

fn baz() -> Self::Output {
Foo::baz();

Self::Output {}
}
}

pub fn main() {}
17 changes: 17 additions & 0 deletions ices/98604.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash

rustc --edition=2021 - <<'EOF'

type AsyncFnPtr = Box<
dyn Fn() -> std::pin::Pin<Box<dyn std::future::Future<Output = ()>>>,
>;

async fn test() {}

#[allow(unused_must_use)]
fn main() {
Box::new(test) as AsyncFnPtr;
}

EOF