Skip to content

Commit cb73b16

Browse files

File tree

6 files changed

+100
-0
lines changed

6 files changed

+100
-0
lines changed

ices/99318.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
3+
rustc -Zunpretty=hir - <<'EOF'
4+
5+
#![feature(let_else)]
6+
7+
pub fn main() {
8+
let Some(x) = &Some(3) else {
9+
panic!();
10+
};
11+
*x += 1; //~ ERROR: cannot assign to `*x`, which is behind a `&` reference
12+
}
13+
14+
EOF
15+

ices/99319.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/bash
2+
3+
rustc -Zunpretty=hir - <<'EOF'
4+
5+
#![feature(let_else)]
6+
7+
fn main() {
8+
let true = true && false else { return }; //~ ERROR a `&&` expression cannot be directly assigned in `let...else`
9+
let true = true || false else { return }; //~ ERROR a `||` expression cannot be directly assigned in `let...else`
10+
}
11+
12+
EOF
13+

ices/99325.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/bash
2+
3+
rustc -Zunpretty=mir - <<'EOF'
4+
5+
#![feature(adt_const_params)]
6+
#![allow(incomplete_features)]
7+
8+
pub fn function_with_bytes<const BYTES: &'static [u8; 4]>() -> &'static [u8] {
9+
BYTES
10+
}
11+
12+
pub fn main() {
13+
assert_eq!(function_with_bytes::<b"AAAA">(), &[0x41, 0x41, 0x41, 0x41]);
14+
assert_eq!(function_with_bytes::<{ &[0x41, 0x41, 0x41, 0x41] }>(), b"AAAA");
15+
}
16+
17+
EOF
18+

ices/99331.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash
2+
3+
rustc -Zunpretty=expanded - <<'EOF'
4+
5+
extern "路濫狼á́́" fn foo() {} //~ ERROR invalid ABI
6+
7+
fn main() { }
8+
9+
EOF
10+

ices/99348.rs

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#![feature(type_alias_impl_trait)]
2+
3+
struct Concrete;
4+
5+
type Tait = impl Sized;
6+
7+
impl Foo for Concrete {
8+
type Item = Concrete;
9+
}
10+
11+
impl Bar for Concrete {
12+
type Other = Tait;
13+
}
14+
15+
trait Foo {
16+
type Item: Bar<Other = Self>;
17+
}
18+
19+
trait Bar {
20+
type Other;
21+
}
22+
23+
fn tait() -> Tait {}
24+
25+
pub fn main() {}

ices/99363.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/bin/bash
2+
3+
rustc --edition=2021 - <<'EOF'
4+
5+
#![feature(type_alias_impl_trait)]
6+
7+
#[derive(Copy, Clone)]
8+
struct Foo((u32, u32));
9+
10+
fn main() {
11+
type T = impl Copy;
12+
let foo: T = Foo((1u32, 2u32));
13+
let x = move || {
14+
let Foo((a, b)) = foo;
15+
};
16+
}
17+
18+
EOF
19+

0 commit comments

Comments
 (0)