-
Notifications
You must be signed in to change notification settings - Fork 13k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of #135061 - matthiaskrgr:crashes_jan, r=lqd
crashes: add latest batch of tests try-job: aarch64-apple try-job: x86_64-msvc try-job: x86_64-gnu try-job: dist-i586-gnu-i586-i686-musl
- Loading branch information
Showing
11 changed files
with
184 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,11 @@ | ||
//@ known-bug: #134336 | ||
#![expect(incomplete_features)] | ||
#![feature(explicit_tail_calls)] | ||
|
||
trait Tr { | ||
fn f(); | ||
} | ||
|
||
fn g<T: Tr>() { | ||
become T::f(); | ||
} |
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: #134355 | ||
|
||
//@compile-flags: --crate-type=lib | ||
fn digit() -> str { | ||
return { i32::MIN }; | ||
} |
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,24 @@ | ||
//@ known-bug: #134479 | ||
//@ compile-flags: -Csymbol-mangling-version=v0 -Cdebuginfo=1 | ||
|
||
#![feature(generic_const_exprs)] | ||
|
||
fn main() { | ||
test::<2>(); | ||
} | ||
|
||
struct Test<const N: usize>; | ||
|
||
fn new<const N: usize>() -> Test<N> | ||
where | ||
[(); N * 1]: Sized, | ||
{ | ||
Test | ||
} | ||
|
||
fn test<const N: usize>() -> Test<{ N - 1 }> | ||
where | ||
[(); (N - 1) * 1]: Sized, | ||
{ | ||
new() | ||
} |
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,27 @@ | ||
//@ known-bug: #134587 | ||
|
||
use std::ops::Add; | ||
|
||
pub fn foo<T>(slf: *const T) | ||
where | ||
*const T: Add, | ||
{ | ||
slf + slf; | ||
} | ||
|
||
pub fn foo2<T>(slf: *const T) | ||
where | ||
*const T: Add<u8>, | ||
{ | ||
slf + 1_u8; | ||
} | ||
|
||
|
||
pub trait TimesTwo | ||
where *const Self: Add<*const Self>, | ||
{ | ||
extern "C" fn t2_ptr(slf: *const Self) | ||
-> <*const Self as Add<*const Self>>::Output { | ||
slf + slf | ||
} | ||
} |
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,16 @@ | ||
//@ known-bug: #134615 | ||
|
||
#![feature(generic_const_exprs)] | ||
|
||
trait Trait { | ||
const CONST: usize; | ||
} | ||
|
||
fn f() | ||
where | ||
for<'a> (): Trait, | ||
[(); <() as Trait>::CONST]:, | ||
{ | ||
} | ||
|
||
pub 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,13 @@ | ||
//@ known-bug: #134641 | ||
#![feature(associated_const_equality)] | ||
|
||
pub trait IsVoid { | ||
const IS_VOID: bool; | ||
} | ||
impl IsVoid for () { | ||
const IS_VOID: bool = true; | ||
} | ||
|
||
pub trait Maybe {} | ||
impl Maybe for () {} | ||
impl Maybe for () where (): IsVoid<IS_VOID = true> {} |
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,12 @@ | ||
//@ known-bug: #134654 | ||
//@ compile-flags: -Zmir-enable-passes=+GVN -Zmir-enable-passes=+Inline -Zvalidate-mir | ||
//@ only-x86_64 | ||
|
||
fn function_with_bytes<const BYTES: | ||
&'static [u8; 0xa9008fb6c9d81e42_0e25730562a601c8_u128]>() -> &'static [u8] { | ||
BYTES | ||
} | ||
|
||
fn main() { | ||
function_with_bytes::<b"aa">() == &[]; | ||
} |
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,14 @@ | ||
//@ known-bug: #134838 | ||
#![feature(type_ascription)] | ||
#![allow(dead_code)] | ||
|
||
struct Ty(()); | ||
|
||
fn mk() -> impl Sized { | ||
if false { | ||
let _ = type_ascribe!(mk(), Ty).0; | ||
} | ||
Ty(()) | ||
} | ||
|
||
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,16 @@ | ||
//@ known-bug: #134905 | ||
|
||
trait Iterate<'a> { | ||
type Ty: Valid; | ||
} | ||
impl<'a, T> Iterate<'a> for T | ||
where | ||
T: Check, | ||
{ | ||
default type Ty = (); | ||
} | ||
|
||
trait Check {} | ||
impl<'a, T> Eq for T where <T as Iterate<'a>>::Ty: Valid {} | ||
|
||
trait Valid {} |
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: #135020 | ||
|
||
pub fn problem_thingy(items: &mut impl Iterator<Item = str>) { | ||
let mut peeker = items.peekable(); | ||
match peeker.peek() { | ||
Some(_) => (), | ||
None => return (), | ||
} | ||
} | ||
|
||
pub 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,34 @@ | ||
//@ known-bug: #135039 | ||
//@ edition:2021 | ||
|
||
pub type UserId<Backend> = <<Backend as AuthnBackend>::User as AuthUser>::Id; | ||
|
||
pub trait AuthUser { | ||
type Id; | ||
} | ||
|
||
pub trait AuthnBackend { | ||
type User: AuthUser; | ||
} | ||
|
||
pub struct AuthSession<Backend: AuthnBackend> { | ||
user: Option<Backend::User>, | ||
data: Option<UserId<Backend>>, | ||
} | ||
|
||
pub trait Authz: Sized { | ||
type AuthnBackend: AuthnBackend<User = Self>; | ||
} | ||
|
||
pub trait Query<User: Authz> { | ||
type Output; | ||
async fn run(&self) -> Result<Self::Output, ()>; | ||
} | ||
|
||
pub async fn run_query<User: Authz, Q: Query<User> + 'static>( | ||
auth: AuthSession<User::AuthnBackend>, | ||
query: Q, | ||
) -> Result<Q::Output, ()> { | ||
let user = auth.user; | ||
query.run().await | ||
} |