diff --git a/fixed/100878.rs b/fixed/100878.rs new file mode 100644 index 00000000..ec4077a8 --- /dev/null +++ b/fixed/100878.rs @@ -0,0 +1,5 @@ +#![crate_type = "lib"] +pub fn get_u16_from_unaligned_manual(data: [u8; 1]) -> u8 { + data[0] << 8 +} + diff --git a/ices/101001.sh b/ices/101001.sh new file mode 100755 index 00000000..83862e9c --- /dev/null +++ b/ices/101001.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +rustc --crate-type lib -Zmeta-stats - <<'EOF' + +pub fn a() {} + +EOF + diff --git a/ices/101020.rs b/ices/101020.rs new file mode 100644 index 00000000..54b7ed69 --- /dev/null +++ b/ices/101020.rs @@ -0,0 +1,33 @@ +#![feature(generic_associated_types)] +pub trait LendingIterator { + type Item<'a> + where + Self: 'a; + + fn consume<F>(self, _f: F) + where + Self: Sized, + for<'a> Self::Item<'a>: FuncInput<'a, Self::Item<'a>>, + { + } +} + +impl<I: LendingIterator + ?Sized> LendingIterator for &mut I { + type Item<'a> = I::Item<'a> where Self: 'a; +} +struct EmptyIter; +impl LendingIterator for EmptyIter { + type Item<'a> = &'a mut () where Self:'a; +} +pub trait FuncInput<'a, F> +where + F: Foo<Self>, + Self: Sized, +{ +} +impl<'a, T, F: 'a> FuncInput<'a, F> for T where F: Foo<T> {} +trait Foo<T> {} + +fn map_test() { + (&mut EmptyIter).consume(()); +} diff --git a/ices/101036.rs b/ices/101036.rs new file mode 100644 index 00000000..8d320ee2 --- /dev/null +++ b/ices/101036.rs @@ -0,0 +1,13 @@ +#![feature(generic_const_exprs)] + +const fn t<const N: usize>() -> u8 { + N as u8 +} + +#[repr(u8)] +enum T<const N: u8 = { T::<0>::A as u8 + T::<0>::B as u8 }> +where + [(); N as usize]: +{ + A = t::<N>() as u8, B +} diff --git a/ices/101076.sh b/ices/101076.sh new file mode 100755 index 00000000..3ab61a75 --- /dev/null +++ b/ices/101076.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +cat > out.rs <<'EOF' + +const _: () = { + #[macro_export] + macro_rules! first_macro { + () => {} + } + mod foo { + #[macro_export] + macro_rules! second_macro { + () => {} + } + } +}; + +EOF + +rustdoc out.rs