-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8c2c9a9
commit 9d761ea
Showing
9 changed files
with
93 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
//@ known-bug: rust-lang/rust#129262 | ||
//@ compile-flags: -Zvalidate-mir --edition=2018 --crate-type=lib -Copt-level=3 | ||
|
||
#![feature(async_closure)] | ||
|
||
fn main() {} | ||
|
||
fn needs_fn_mut<T>(mut x: impl FnMut() -> T) { | ||
x(); | ||
} | ||
|
||
fn hello(x: Ty) { | ||
needs_fn_mut(async || { | ||
x.hello(); | ||
}); | ||
} | ||
|
||
struct Ty; | ||
impl Ty { | ||
fn hello(self) {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
//@ known-bug: rust-lang/rust#129850 | ||
|
||
pub trait Foo2 { | ||
fn bar<'a: 'a>(&'a mut self) -> impl Sized + use<'static>; | ||
} | ||
|
||
impl Foo2 for () { | ||
fn bar<'a: 'a>(&'a mut self) -> impl Sized + 'a {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
//@ known-bug: rust-lang/rust#130104 | ||
|
||
fn main() { | ||
let non_secure_function = | ||
core::mem::transmute::<fn() -> _, extern "C-cmse-nonsecure-call" fn() -> _>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
//@ known-bug: rust-lang/rust#130310 | ||
|
||
use std::marker::PhantomData; | ||
|
||
#[repr(C)] | ||
struct A<T> { | ||
a: *const A<A<T>>, | ||
p: PhantomData<T>, | ||
} | ||
|
||
extern "C" { | ||
fn f(a: *const A<()>); | ||
} | ||
|
||
fn main() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
//@ known-bug: rust-lang/rust#130346 | ||
|
||
#![feature(non_lifetime_binders)] | ||
#![allow(unused)] | ||
|
||
trait A<T>: Iterator<Item = T> {} | ||
|
||
fn demo(x: &mut impl for<U> A<U>) { | ||
let _: Option<u32> = x.next(); // Removing this line stops the ICE | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
//@ known-bug: rust-lang/rust#130372 | ||
|
||
pub fn variadic_fn(n: usize, mut args: ...) {} | ||
|
||
reuse variadic_fn; | ||
|
||
fn main() { | ||
variadic_fn(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
//@ known-bug: rust-lang/rust#130372 | ||
|
||
pub fn test_va_copy(_: u64, mut ap: ...) {} | ||
|
||
pub fn main() { | ||
unsafe { | ||
test_va_copy(); | ||
|
||
call(x); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
//@ known-bug: rust-lang/rust#130372 | ||
|
||
fn bar() -> impl Fn() { | ||
wrap() | ||
} | ||
|
||
fn wrap(...: impl ...) -> impl Fn() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
//@ known-bug: rust-lang/rust#130399 | ||
|
||
fn elided(main: &()) -> impl Sized + use<main> {} | ||
|
||
fn main() {} |