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

Commit

Permalink
Merge pull request #1183 from matthiaskrgr/ices_mar_25
Browse files Browse the repository at this point in the history
add 5 ices
  • Loading branch information
Alexendoo authored Mar 26, 2022
2 parents c17432a + a63e16c commit 55da73c
Show file tree
Hide file tree
Showing 6 changed files with 243 additions and 0 deletions.
15 changes: 15 additions & 0 deletions ices/95271.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
rustc --crate-type lib --edition=2021 - 2>&1 << EOF
enum Foo {
Foo(i32),
}
fn bar(foo: Foo) {
|| {
// `let foo = foo;` makes the ICE disappear
let Foo::Foo(baz) = foo;
};
}
pub fn main() {}
EOF
21 changes: 21 additions & 0 deletions ices/95303.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
rustc --crate-type lib - 2>&1 << EOF
#![feature(no_core)]
#![feature(lang_items)]
#![no_core]
#[no_mangle]
pub fn add(a: u32) -> u32 {
a
}
#[lang = "sized"]
pub trait Sized {}
#[lang = "copy"]
pub trait Copy {}
EOF
8 changes: 8 additions & 0 deletions ices/95307.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
pub trait C{async fn new(val: T) -> [u8; _];
as Trait<&'a u32> Collate<MASK> for () = [0u8; 4];
use std::mem;

fn foo<T: Tr>() -> usize {
macro ice(){}

fn main(){}
28 changes: 28 additions & 0 deletions ices/95310.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
rustc --crate-type lib --edition=2021 - 2>&1 << EOF
#![feature(generators)]
#![feature(generic_associated_types)]
#![feature(type_alias_impl_trait)]
trait Service {
type Future<'f>: std::future::Future + 'f
where
Self: 'f;
fn spawn<'f>(&'f mut self) -> Self::Future<'f>;
}
struct Blah;
impl Service for Blah {
type Future<'f> = impl std::future::Future<Output = &'static i32> + 'f;
fn spawn<'f>(&'f mut self) -> Self::Future<'f> {
async move {
yield &1;
}
}
}
EOF
15 changes: 15 additions & 0 deletions ices/95311.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#![feature(ptr_metadata)]

trait Bar: Sized + 'static { }

struct Foo<B: Bar> {
marker: std::marker::PhantomData<B>,
}

impl<B: Bar> Foo<B> {
fn foo<T: ?Sized>(value: &T) {
std::ptr::metadata(value);
}
}

pub fn main() {}
156 changes: 156 additions & 0 deletions ices/95327.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,156 @@
fn reflow_list_node_with_rule(node: &CompoundNode, rule: &Rule, args: &[Arg], shape: &Shape)
where
T: FOo,
U: Bar,
{
let mut effects = HashMap::new();
}

fn reflow_list_node_with_rule(node: &CompoundNode, rule: &Rule, args: &[Arg], shape: &Shape)
where
T: FOo,
{
let mut effects = HashMap::new();
}

fn reflow_list_node_with_rule(
node: &CompoundNode,
rule: &Rule,
args: &[Arg],
shape: &Shape,
shape: &Shape,
) where
T: FOo,
U: Bar,
{
let mut effects = HashMap::new();
}

fn reflow_list_node_with_rule(
node: &CompoundNode,
rule: &Rule,
args: &[Arg],
shape: &Shape,
shape: &Shape,
) where
T: FOo,
{
let mut effects = HashMap::new();
}

fn reflow_list_node_with_rule(
node: &CompoundNode,
rule: &Rule,
args: &[Arg],
shape: &Shape,
) -> Option<String>
where
T: FOo,
U: Bar,
{
let mut effects = HashMap::new();
}

fn reflow_list_node_with_rule(
node: &CompoundNode,
rule: &Rule,
args: &[Arg],
shape: &Shape,
) -> Option<String>
where
T: FOo,
{
let mut effects = HashMap::new();
}

pub trait Test {
fn very_long_method_name<F>(self, f: F) -> MyVeryLongReturnType
where
F: FnMut(Self::Item) -> bool;

fn exactly_100_chars1<F>(self, f: F) -> MyVeryLongReturnType
where
F: FnMut(Self::Item) -> bool;
}

fn very_long_function_name<F>(very_long_argument: F) -> MyVeryLongReturnType
where
F: FnMut(Self::Item) -> bool,
{
}

struct VeryLongTupleStructName<A, B, C, D, E>(LongLongTypename, LongLongTypename, i32, i32)
where
A: LongTrait;

struct Exactly100CharsToSemicolon<A, B, C, D, E>(LongLongTypename, i32, i32)
where
A: LongTrait1234;

struct AlwaysOnNextLine<LongLongTypename, LongTypename, A, B, C, D, E, F>
where
A: LongTrait,
{
x: i32,
}

pub trait SomeTrait<T>
where
T: Something
+ Sync
+ Send
+ Display
+ Debug
+ Copy
+ Hash
+ Debug
+ Display
+ Write
+ Read
+ FromStr,
{
}

// #2020
impl<'a, 'gcx, 'tcx> ProbeContext<'a, 'gcx, 'tcx> {
fn elaborate_bounds<F>(&mut self, bounds: &[ty::PolyTraitRef<'tcx>], mut mk_cand: F)
where
F: for<'b> FnMut(
&mut ProbeContext<'b, 'gcx, 'tcx>,
ty::PolyTraitRef<'tcx>,
ty::AssociatedItem,
),
{
// ...
}
}

// #2497
fn handle_update<'a, Tab, Conn, R, C>(
executor: &Executor<PooledConnection<ConnectionManager<Conn>>>,
change_set: &'a C,
) -> ExecutionResult
where
&'a C: Identifiable + AsChangeset<Target = Tab> + HasTable<Table = Tab>,
<&'a C as AsChangeset>::Changeset: QueryFragment<Conn::Backend>,
Tab: Table + HasTable<Table = Tab>,
Tab::PrimaryKey: EqAll<<&'a C as Identifiable>::Id>,
Tab::FromClause: QueryFragment<Conn::Backend>,
Tab: FindDsl<<&'a C as Identifiable>::Id>,
Find<Tab, <&'a C as Identifiable>::Id>: IntoUpdateTarget<Table = Tab>,
<Find<Tab, <&'a C as Identifiable>::Id> as IntoUpdateTarget>::WhereClause:
QueryFragment<Conn::Backend>,
Tab::Query: FilterDsl<<Tab::PrimaryKey as EqAll<<&'a C as Identifiable>::Id>>::Output>,
Filter<Tab::Query, <Tab::PrimaryKey as EqAll<<&'a C as Identifiable>::Id>>::Output>: LimitDsl,
Limit<Filter<Tab::Query, <Tab::PrimaryKey as EqAll<<&'a C as Identifiable>::Id>>::Output>>:
QueryDsl
+ BoxedDsl<
'a,
Conn::Backend,
Output = BoxedSelectStatement<'a, R::SqlType, Tab, Conn::Backend>,
>,
R: LoadingHandler<Conn, Table = Tab, SqlType = Tab::SqlType>
+ GraphQLType<TypeInfo = (), Context = ()>,
{
unimplemented!()
}

0 comments on commit 55da73c

Please sign in to comment.