File tree Expand file tree Collapse file tree 7 files changed +87
-0
lines changed Expand file tree Collapse file tree 7 files changed +87
-0
lines changed Original file line number Diff line number Diff line change
1
+ //@ known-bug: rust-lang/rust#128094
2
+ //@ compile-flags: -Zmir-opt-level=5 --edition=2018
3
+
4
+ pub enum Request {
5
+ TestSome(T),
6
+ }
7
+
8
+ pub async fn handle_event(event: Request) {
9
+ async move {
10
+ static instance: Request = Request { bar: 17 };
11
+ &instance
12
+ }
13
+ .await;
14
+ }
Original file line number Diff line number Diff line change
1
+ //@ known-bug: rust-lang/rust#128176
2
+
3
+ #![feature(generic_const_exprs)]
4
+ #![feature(object_safe_for_dispatch)]
5
+ trait X {
6
+ type Y<const N: i16>;
7
+ }
8
+
9
+ const _: () = {
10
+ fn f2<'a>(arg: Box<dyn X<Y<1> = &'a ()>>) {}
11
+ };
12
+
13
+ fn main() {}
Original file line number Diff line number Diff line change
1
+ //@ known-bug: rust-lang/rust#128190
2
+
3
+ fn a(&self) {
4
+ 15
5
+ }
6
+
7
+ reuse a as b { struct S; }
Original file line number Diff line number Diff line change
1
+ //@ known-bug: rust-lang/rust#128327
2
+
3
+ use std::ops::Deref;
4
+ struct Apple((Apple, <&'static [f64] as Deref>::Target(Banana ? Citron)));
5
+ fn main(){}
Original file line number Diff line number Diff line change
1
+ //@ known-bug: rust-lang/rust#128346
2
+
3
+ macro_rules! one_rep {
4
+ ( $($a:ident)* ) => {
5
+ A(
6
+ const ${concat($a, Z)}: i32 = 3;
7
+ )*
8
+ };
9
+ }
10
+
11
+ fn main() {
12
+ one_rep!(A B C);
13
+ }
Original file line number Diff line number Diff line change
1
+ //@ known-bug: rust-lang/rust#128621
2
+
3
+ #![feature(ptr_metadata)]
4
+ use std::{ops::FnMut, ptr::Pointee};
5
+
6
+ pub type EmplacerFn<'a, T> = dyn for<'b> FnMut(<T as Pointee>::Metadata) + 'a;
7
+
8
+ pub struct Emplacer<'a, T>(EmplacerFn<'a, T>);
9
+
10
+ impl<'a, T> Emplacer<'a, T> {
11
+ pub unsafe fn from_fn<'b>(emplacer_fn: &'b mut EmplacerFn<'a, T>) -> &'b mut Self {
12
+ unsafe { &mut *((emplacer_fn as *mut EmplacerFn<'a, T>) as *mut Self) }
13
+ }
14
+ }
15
+
16
+ pub fn main() {}
Original file line number Diff line number Diff line change
1
+ //@ known-bug: rust-lang/rust#128621
2
+
3
+ trait Trait {
4
+ type Associated;
5
+ }
6
+
7
+ impl Trait for i32 {
8
+ type Associated = i64;
9
+ }
10
+
11
+ trait Generic<T> {}
12
+
13
+ type TraitObject = dyn Generic<<i32 as Trait>::Associated>;
14
+
15
+ struct Wrap(TraitObject);
16
+
17
+ fn cast(x: *mut TraitObject) {
18
+ x as *mut Wrap;
19
+ }
You can’t perform that action at this time.
0 commit comments