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

add latest batch of ICEs #1348

Merged
merged 1 commit into from
Jul 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions ices/99318.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash

rustc -Zunpretty=hir - <<'EOF'

#![feature(let_else)]

pub fn main() {
let Some(x) = &Some(3) else {
panic!();
};
*x += 1; //~ ERROR: cannot assign to `*x`, which is behind a `&` reference
}

EOF

13 changes: 13 additions & 0 deletions ices/99319.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

rustc -Zunpretty=hir - <<'EOF'

#![feature(let_else)]

fn main() {
let true = true && false else { return }; //~ ERROR a `&&` expression cannot be directly assigned in `let...else`
let true = true || false else { return }; //~ ERROR a `||` expression cannot be directly assigned in `let...else`
}

EOF

18 changes: 18 additions & 0 deletions ices/99325.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash

rustc -Zunpretty=mir - <<'EOF'

#![feature(adt_const_params)]
#![allow(incomplete_features)]

pub fn function_with_bytes<const BYTES: &'static [u8; 4]>() -> &'static [u8] {
BYTES
}

pub fn main() {
assert_eq!(function_with_bytes::<b"AAAA">(), &[0x41, 0x41, 0x41, 0x41]);
assert_eq!(function_with_bytes::<{ &[0x41, 0x41, 0x41, 0x41] }>(), b"AAAA");
}

EOF

10 changes: 10 additions & 0 deletions ices/99331.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash

rustc -Zunpretty=expanded - <<'EOF'

extern "路濫狼á́́" fn foo() {} //~ ERROR invalid ABI

fn main() { }

EOF

25 changes: 25 additions & 0 deletions ices/99348.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#![feature(type_alias_impl_trait)]

struct Concrete;

type Tait = impl Sized;

impl Foo for Concrete {
type Item = Concrete;
}

impl Bar for Concrete {
type Other = Tait;
}

trait Foo {
type Item: Bar<Other = Self>;
}

trait Bar {
type Other;
}

fn tait() -> Tait {}

pub fn main() {}
19 changes: 19 additions & 0 deletions ices/99363.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash

rustc --edition=2021 - <<'EOF'

#![feature(type_alias_impl_trait)]

#[derive(Copy, Clone)]
struct Foo((u32, u32));

fn main() {
type T = impl Copy;
let foo: T = Foo((1u32, 2u32));
let x = move || {
let Foo((a, b)) = foo;
};
}

EOF