Skip to content

Commit

Permalink
add ices
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiaskrgr committed Jul 28, 2022
1 parent 59c8820 commit c9014fc
Show file tree
Hide file tree
Showing 8 changed files with 92 additions and 0 deletions.
14 changes: 14 additions & 0 deletions ices/99665-1.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
pub trait MyComponent {
type Properties;
}

impl<M> MyComponent for M
where
M: 'static,
{
type Properties = ();
}

fn main() {
|_: <&u8 as MyComponent>::Properties| {};
}
21 changes: 21 additions & 0 deletions ices/99665-2.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
pub trait MyComponent {
type Properties;
}

impl<M> MyComponent for M
where
M: 'static,
{
type Properties = TableProps<M>;
}

pub struct TableProps<M>
where
M: 'static,
{
pub entries: M,
}

fn main() {
|_: <&u32 as MyComponent>::Properties| {};
}
15 changes: 15 additions & 0 deletions ices/99734.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash

cat > out.rs <<'EOF'
pub use std::*;
pub mod task {}
pub fn main() {
println!("Hello, world!");
}
EOF

rustdoc out.rs
4 changes: 4 additions & 0 deletions ices/99777-1.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
pub fn test() {
#[doc(alias = "test")]
let num_flags = 0;
}
4 changes: 4 additions & 0 deletions ices/99777-2.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
pub fn test() {
#[doc(alias = "test")]
let num_flags = 0;
}
6 changes: 6 additions & 0 deletions ices/99777-3.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
fn main() {
match () {
#[doc(alias = "foo")]
_ => {}
}
}
19 changes: 19 additions & 0 deletions ices/99820.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#![feature(const_trait_impl)]
#![feature(fn_traits)]
#![feature(unboxed_closures)]

struct Closure;

impl const FnOnce<&usize> for Closure {
type Output = usize;

extern "rust-call" fn call_once(self, arg: &usize) -> Self::Output {
*arg
}
}

enum Bug<T = [(); Closure.call_once(&0) ]> {
V(T),
}

fn main() {}
9 changes: 9 additions & 0 deletions ices/99828.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
fn get_iter(vec: &[i32]) -> impl Iterator<Item = {}> + '_ {
vec.iter()
}

fn main() {
let vec = Vec::new();
let mut iter = get_iter(&vec);
iter.next();
}

0 comments on commit c9014fc

Please sign in to comment.