diff --git a/ices/102363.sh b/ices/102363.sh new file mode 100644 index 00000000..fded662a --- /dev/null +++ b/ices/102363.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +cat > out.rs << EOF +#![feature(no_core)] +#![no_core] + +#[doc(primitive = "usize")] +/// This is the built-in type `usize`. +mod usize { +} +EOF + +rustdoc --document-private-items -Zunstable-options --output-format=json out.rs diff --git a/ices/102446.rs b/ices/102446.rs new file mode 100644 index 00000000..1cb609b1 --- /dev/null +++ b/ices/102446.rs @@ -0,0 +1,12 @@ +#![feature(inline_const)] +#![feature(generic_const_exprs)] +#![allow(incomplete_features)] + +use std::mem; + +pub union AsBytes { + pub value: mem::ManuallyDrop, + pub as_bytes: [u8; const { mem::size_of::() }], +} + +fn main() {} diff --git a/ices/103666.rs b/ices/103666.rs new file mode 100644 index 00000000..98c287c6 --- /dev/null +++ b/ices/103666.rs @@ -0,0 +1,7 @@ +#![feature(type_alias_impl_trait)] + +type Tait<'b> = impl Sized; + +fn foo(f: &dyn Fn(Tait)) {} + +fn main() {} diff --git a/ices/104817.rs b/ices/104817.rs new file mode 100644 index 00000000..d29395c1 --- /dev/null +++ b/ices/104817.rs @@ -0,0 +1,15 @@ +#![feature(type_alias_impl_trait)] +#![feature(specialization)] +#![allow(incomplete_features, dead_code)] + +trait OpaqueTrait {} +impl OpaqueTrait for T {} +type OpaqueType = impl OpaqueTrait; +fn mk_opaque() -> OpaqueType { + || 0 +} +trait AnotherTrait {} +impl AnotherTrait for T {} +impl AnotherTrait for OpaqueType {} + +fn main() {} diff --git a/ices/106077.rs b/ices/106077.rs new file mode 100644 index 00000000..6cffd696 --- /dev/null +++ b/ices/106077.rs @@ -0,0 +1,7 @@ +#![feature(associated_type_bounds)] + +struct Bug(T); + +impl Bug> {} + +fn main() {} diff --git a/ices/106079.sh b/ices/106079.sh new file mode 100644 index 00000000..e865a700 --- /dev/null +++ b/ices/106079.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +cat > out.rs << EOF +trait X { + type Y<'a>; +} + +const _: () = { + fn f2<'a>(arg : Box = &'a ()>>) {} + //~^ ERROR this associated type takes 1 lifetime argument but 0 lifetime arguments + //~| ERROR this associated type takes 0 generic arguments but 1 generic argument +}; + +fn main() {} +EOF + +rustdoc out.rs diff --git a/ices/106444.sh b/ices/106444.sh new file mode 100644 index 00000000..880e174a --- /dev/null +++ b/ices/106444.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +rustc -Zmir-opt-level=3 --crate-type=lib - <<'EOF' +pub trait A { + type B; +} + +pub struct S(T::B); + +pub fn foo(p: *mut S) { + unsafe { core::ptr::drop_in_place(p) }; +} + +EOF diff --git a/ices/106473.rs b/ices/106473.rs new file mode 100644 index 00000000..214b305b --- /dev/null +++ b/ices/106473.rs @@ -0,0 +1,14 @@ +#![feature(generic_const_exprs)] +#![allow(incomplete_features)] + +const DEFAULT: u32 = 1; + +struct V +where + [(); U]:; + +trait Tr {} + +impl Tr for V {} + +fn main() {}