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

Commit f4e4112

Browse files

File tree

5 files changed

+79
-0
lines changed

5 files changed

+79
-0
lines changed

ices/100878.rs

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#![crate_type = "lib"]
2+
pub fn get_u16_from_unaligned_manual(data: [u8; 1]) -> u8 {
3+
data[0] << 8
4+
}
5+

ices/101001.sh

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/bash
2+
3+
rustc --crate-type lib -Zmeta-stats - <<'EOF'
4+
5+
pub fn a() {}
6+
7+
EOF
8+

ices/101020.rs

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#![feature(generic_associated_types)]
2+
pub trait LendingIterator {
3+
type Item<'a>
4+
where
5+
Self: 'a;
6+
7+
fn consume<F>(self, _f: F)
8+
where
9+
Self: Sized,
10+
for<'a> Self::Item<'a>: FuncInput<'a, Self::Item<'a>>,
11+
{
12+
}
13+
}
14+
15+
impl<I: LendingIterator + ?Sized> LendingIterator for &mut I {
16+
type Item<'a> = I::Item<'a> where Self: 'a;
17+
}
18+
struct EmptyIter;
19+
impl LendingIterator for EmptyIter {
20+
type Item<'a> = &'a mut () where Self:'a;
21+
}
22+
pub trait FuncInput<'a, F>
23+
where
24+
F: Foo<Self>,
25+
Self: Sized,
26+
{
27+
}
28+
impl<'a, T, F: 'a> FuncInput<'a, F> for T where F: Foo<T> {}
29+
trait Foo<T> {}
30+
31+
fn map_test() {
32+
(&mut EmptyIter).consume(());
33+
}

ices/101036.rs

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#![feature(generic_const_exprs)]
2+
3+
const fn t<const N: usize>() -> u8 {
4+
N as u8
5+
}
6+
7+
#[repr(u8)]
8+
enum T<const N: u8 = { T::<0>::A as u8 + T::<0>::B as u8 }>
9+
where
10+
[(); N as usize]:
11+
{
12+
A = t::<N>() as u8, B
13+
}

ices/101076.sh

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/bin/bash
2+
3+
cat > out.rs <<'EOF'
4+
5+
const _: () = {
6+
#[macro_export]
7+
macro_rules! first_macro {
8+
() => {}
9+
}
10+
mod foo {
11+
#[macro_export]
12+
macro_rules! second_macro {
13+
() => {}
14+
}
15+
}
16+
};
17+
18+
EOF
19+
20+
rustdoc out.rs

0 commit comments

Comments
 (0)