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

Commit 55da73c

Browse files
authored
Merge pull request #1183 from matthiaskrgr/ices_mar_25
add 5 ices
2 parents c17432a + a63e16c commit 55da73c

File tree

6 files changed

+243
-0
lines changed

6 files changed

+243
-0
lines changed

ices/95271.sh

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
rustc --crate-type lib --edition=2021 - 2>&1 << EOF
2+
3+
enum Foo {
4+
Foo(i32),
5+
}
6+
7+
fn bar(foo: Foo) {
8+
|| {
9+
// `let foo = foo;` makes the ICE disappear
10+
let Foo::Foo(baz) = foo;
11+
};
12+
}
13+
pub fn main() {}
14+
15+
EOF

ices/95303.sh

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
rustc --crate-type lib - 2>&1 << EOF
2+
3+
4+
#![feature(no_core)]
5+
#![feature(lang_items)]
6+
7+
#![no_core]
8+
9+
#[no_mangle]
10+
pub fn add(a: u32) -> u32 {
11+
a
12+
}
13+
14+
#[lang = "sized"]
15+
pub trait Sized {}
16+
17+
#[lang = "copy"]
18+
pub trait Copy {}
19+
20+
21+
EOF

ices/95307.rs

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
pub trait C{async fn new(val: T) -> [u8; _];
2+
as Trait<&'a u32> Collate<MASK> for () = [0u8; 4];
3+
use std::mem;
4+
5+
fn foo<T: Tr>() -> usize {
6+
macro ice(){}
7+
8+
fn main(){}

ices/95310.sh

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
rustc --crate-type lib --edition=2021 - 2>&1 << EOF
2+
3+
#![feature(generators)]
4+
#![feature(generic_associated_types)]
5+
#![feature(type_alias_impl_trait)]
6+
7+
trait Service {
8+
type Future<'f>: std::future::Future + 'f
9+
where
10+
Self: 'f;
11+
12+
fn spawn<'f>(&'f mut self) -> Self::Future<'f>;
13+
}
14+
15+
struct Blah;
16+
17+
impl Service for Blah {
18+
type Future<'f> = impl std::future::Future<Output = &'static i32> + 'f;
19+
20+
fn spawn<'f>(&'f mut self) -> Self::Future<'f> {
21+
async move {
22+
yield &1;
23+
}
24+
}
25+
}
26+
27+
28+
EOF

ices/95311.rs

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#![feature(ptr_metadata)]
2+
3+
trait Bar: Sized + 'static { }
4+
5+
struct Foo<B: Bar> {
6+
marker: std::marker::PhantomData<B>,
7+
}
8+
9+
impl<B: Bar> Foo<B> {
10+
fn foo<T: ?Sized>(value: &T) {
11+
std::ptr::metadata(value);
12+
}
13+
}
14+
15+
pub fn main() {}

ices/95327.rs

+156
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,156 @@
1+
fn reflow_list_node_with_rule(node: &CompoundNode, rule: &Rule, args: &[Arg], shape: &Shape)
2+
where
3+
T: FOo,
4+
U: Bar,
5+
{
6+
let mut effects = HashMap::new();
7+
}
8+
9+
fn reflow_list_node_with_rule(node: &CompoundNode, rule: &Rule, args: &[Arg], shape: &Shape)
10+
where
11+
T: FOo,
12+
{
13+
let mut effects = HashMap::new();
14+
}
15+
16+
fn reflow_list_node_with_rule(
17+
node: &CompoundNode,
18+
rule: &Rule,
19+
args: &[Arg],
20+
shape: &Shape,
21+
shape: &Shape,
22+
) where
23+
T: FOo,
24+
U: Bar,
25+
{
26+
let mut effects = HashMap::new();
27+
}
28+
29+
fn reflow_list_node_with_rule(
30+
node: &CompoundNode,
31+
rule: &Rule,
32+
args: &[Arg],
33+
shape: &Shape,
34+
shape: &Shape,
35+
) where
36+
T: FOo,
37+
{
38+
let mut effects = HashMap::new();
39+
}
40+
41+
fn reflow_list_node_with_rule(
42+
node: &CompoundNode,
43+
rule: &Rule,
44+
args: &[Arg],
45+
shape: &Shape,
46+
) -> Option<String>
47+
where
48+
T: FOo,
49+
U: Bar,
50+
{
51+
let mut effects = HashMap::new();
52+
}
53+
54+
fn reflow_list_node_with_rule(
55+
node: &CompoundNode,
56+
rule: &Rule,
57+
args: &[Arg],
58+
shape: &Shape,
59+
) -> Option<String>
60+
where
61+
T: FOo,
62+
{
63+
let mut effects = HashMap::new();
64+
}
65+
66+
pub trait Test {
67+
fn very_long_method_name<F>(self, f: F) -> MyVeryLongReturnType
68+
where
69+
F: FnMut(Self::Item) -> bool;
70+
71+
fn exactly_100_chars1<F>(self, f: F) -> MyVeryLongReturnType
72+
where
73+
F: FnMut(Self::Item) -> bool;
74+
}
75+
76+
fn very_long_function_name<F>(very_long_argument: F) -> MyVeryLongReturnType
77+
where
78+
F: FnMut(Self::Item) -> bool,
79+
{
80+
}
81+
82+
struct VeryLongTupleStructName<A, B, C, D, E>(LongLongTypename, LongLongTypename, i32, i32)
83+
where
84+
A: LongTrait;
85+
86+
struct Exactly100CharsToSemicolon<A, B, C, D, E>(LongLongTypename, i32, i32)
87+
where
88+
A: LongTrait1234;
89+
90+
struct AlwaysOnNextLine<LongLongTypename, LongTypename, A, B, C, D, E, F>
91+
where
92+
A: LongTrait,
93+
{
94+
x: i32,
95+
}
96+
97+
pub trait SomeTrait<T>
98+
where
99+
T: Something
100+
+ Sync
101+
+ Send
102+
+ Display
103+
+ Debug
104+
+ Copy
105+
+ Hash
106+
+ Debug
107+
+ Display
108+
+ Write
109+
+ Read
110+
+ FromStr,
111+
{
112+
}
113+
114+
// #2020
115+
impl<'a, 'gcx, 'tcx> ProbeContext<'a, 'gcx, 'tcx> {
116+
fn elaborate_bounds<F>(&mut self, bounds: &[ty::PolyTraitRef<'tcx>], mut mk_cand: F)
117+
where
118+
F: for<'b> FnMut(
119+
&mut ProbeContext<'b, 'gcx, 'tcx>,
120+
ty::PolyTraitRef<'tcx>,
121+
ty::AssociatedItem,
122+
),
123+
{
124+
// ...
125+
}
126+
}
127+
128+
// #2497
129+
fn handle_update<'a, Tab, Conn, R, C>(
130+
executor: &Executor<PooledConnection<ConnectionManager<Conn>>>,
131+
change_set: &'a C,
132+
) -> ExecutionResult
133+
where
134+
&'a C: Identifiable + AsChangeset<Target = Tab> + HasTable<Table = Tab>,
135+
<&'a C as AsChangeset>::Changeset: QueryFragment<Conn::Backend>,
136+
Tab: Table + HasTable<Table = Tab>,
137+
Tab::PrimaryKey: EqAll<<&'a C as Identifiable>::Id>,
138+
Tab::FromClause: QueryFragment<Conn::Backend>,
139+
Tab: FindDsl<<&'a C as Identifiable>::Id>,
140+
Find<Tab, <&'a C as Identifiable>::Id>: IntoUpdateTarget<Table = Tab>,
141+
<Find<Tab, <&'a C as Identifiable>::Id> as IntoUpdateTarget>::WhereClause:
142+
QueryFragment<Conn::Backend>,
143+
Tab::Query: FilterDsl<<Tab::PrimaryKey as EqAll<<&'a C as Identifiable>::Id>>::Output>,
144+
Filter<Tab::Query, <Tab::PrimaryKey as EqAll<<&'a C as Identifiable>::Id>>::Output>: LimitDsl,
145+
Limit<Filter<Tab::Query, <Tab::PrimaryKey as EqAll<<&'a C as Identifiable>::Id>>::Output>>:
146+
QueryDsl
147+
+ BoxedDsl<
148+
'a,
149+
Conn::Backend,
150+
Output = BoxedSelectStatement<'a, R::SqlType, Tab, Conn::Backend>,
151+
>,
152+
R: LoadingHandler<Conn, Table = Tab, SqlType = Tab::SqlType>
153+
+ GraphQLType<TypeInfo = (), Context = ()>,
154+
{
155+
unimplemented!()
156+
}

0 commit comments

Comments
 (0)