Skip to content

Commit 93e37ea

Browse files
authored
Merge pull request #4645 from rust-lang/rustup-2025-10-23
Automatic Rustup
2 parents e61c206 + 2007b5d commit 93e37ea

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

rust-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
96fe3c31c2ec385f3d3263346bcdde3d118cdaf6
1+
6244effd0372d5d88fc859d3bf17ce1efcc2c9ec

tests/pass/pattern-types.rs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#![feature(pattern_types, pattern_type_macro, sized_hierarchy)]
2+
#![allow(dead_code)]
3+
4+
use std::marker::PointeeSized;
5+
use std::mem::transmute;
6+
7+
pub struct NonNull<T: PointeeSized> {
8+
pointer: std::pat::pattern_type!(*const T is !null),
9+
}
10+
11+
trait Trait {}
12+
impl Trait for () {}
13+
14+
fn main() {
15+
unsafe {
16+
let _: NonNull<dyn Trait> = NonNull { pointer: transmute(&mut () as *mut dyn Trait) };
17+
}
18+
}

0 commit comments

Comments
 (0)