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

Commit f19817c

Browse files
authored
Merge pull request #1484 from JohnTitor/add-ices-20230109
2 parents f158f02 + 6d82448 commit f19817c

File tree

8 files changed

+99
-0
lines changed

8 files changed

+99
-0
lines changed

ices/102363.sh

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/bash
2+
3+
cat > out.rs << EOF
4+
#![feature(no_core)]
5+
#![no_core]
6+
7+
#[doc(primitive = "usize")]
8+
/// This is the built-in type `usize`.
9+
mod usize {
10+
}
11+
EOF
12+
13+
rustdoc --document-private-items -Zunstable-options --output-format=json out.rs

ices/102446.rs

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#![feature(inline_const)]
2+
#![feature(generic_const_exprs)]
3+
#![allow(incomplete_features)]
4+
5+
use std::mem;
6+
7+
pub union AsBytes<T> {
8+
pub value: mem::ManuallyDrop<T>,
9+
pub as_bytes: [u8; const { mem::size_of::<T>() }],
10+
}
11+
12+
fn main() {}

ices/103666.rs

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#![feature(type_alias_impl_trait)]
2+
3+
type Tait<'b> = impl Sized;
4+
5+
fn foo(f: &dyn Fn(Tait)) {}
6+
7+
fn main() {}

ices/104817.rs

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#![feature(type_alias_impl_trait)]
2+
#![feature(specialization)]
3+
#![allow(incomplete_features, dead_code)]
4+
5+
trait OpaqueTrait {}
6+
impl<T> OpaqueTrait for T {}
7+
type OpaqueType = impl OpaqueTrait;
8+
fn mk_opaque() -> OpaqueType {
9+
|| 0
10+
}
11+
trait AnotherTrait {}
12+
impl<T: Send> AnotherTrait for T {}
13+
impl AnotherTrait for OpaqueType {}
14+
15+
fn main() {}

ices/106077.rs

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#![feature(associated_type_bounds)]
2+
3+
struct Bug<T: ?Sized>(T);
4+
5+
impl Bug<dyn Iterator<Item: Copy>> {}
6+
7+
fn main() {}

ices/106079.sh

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/bash
2+
3+
cat > out.rs << EOF
4+
trait X {
5+
type Y<'a>;
6+
}
7+
8+
const _: () = {
9+
fn f2<'a>(arg : Box<dyn X<Y<1> = &'a ()>>) {}
10+
//~^ ERROR this associated type takes 1 lifetime argument but 0 lifetime arguments
11+
//~| ERROR this associated type takes 0 generic arguments but 1 generic argument
12+
};
13+
14+
fn main() {}
15+
EOF
16+
17+
rustdoc out.rs

ices/106444.sh

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/bash
2+
3+
rustc -Zmir-opt-level=3 --crate-type=lib - <<'EOF'
4+
pub trait A {
5+
type B;
6+
}
7+
8+
pub struct S<T: A>(T::B);
9+
10+
pub fn foo<T: A>(p: *mut S<T>) {
11+
unsafe { core::ptr::drop_in_place(p) };
12+
}
13+
14+
EOF

ices/106473.rs

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#![feature(generic_const_exprs)]
2+
#![allow(incomplete_features)]
3+
4+
const DEFAULT: u32 = 1;
5+
6+
struct V<const U: usize = DEFAULT>
7+
where
8+
[(); U]:;
9+
10+
trait Tr {}
11+
12+
impl Tr for V {}
13+
14+
fn main() {}

0 commit comments

Comments
 (0)