mirror of
https://github.com/allankoechke/rust.git
synced 2026-11-30 11:05:36 +00:00
Auto merge of #158525 - zedddie:gsoc-batch-17-meow, r=Teapot4195
Reorganize `tests/ui/issues` [17/N] Part of [GSoC'26 project](https://rust-lang.zulipchat.com/#narrow/channel/421156-gsoc/topic/Project.3A.20Reorganizing.20tests.2Fui.2Fissues) r? Kivooeo @Teapot4195
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
//! Regression test for <https://github.com/rust-lang/rust/issues/30530>.
|
||||
//!
|
||||
//! alloca's created for storing intermediate scratch values during
|
||||
//! brace-less match arms need to be initialized with their drop-flag
|
||||
//! set to "dropped" (or else we end up running the destructors on garbage
|
||||
//! data at the end of the function).
|
||||
//@ run-pass
|
||||
// Regression test for Issue #30530: alloca's created for storing
|
||||
// intermediate scratch values during brace-less match arms need to be
|
||||
// initialized with their drop-flag set to "dropped" (or else we end
|
||||
// up running the destructors on garbage data at the end of the
|
||||
// function).
|
||||
|
||||
pub enum Handler {
|
||||
Default,
|
||||
@@ -1,7 +1,7 @@
|
||||
//! Regression test for <https://github.com/rust-lang/rust/issues/29092>.
|
||||
//! Drop glue for match expression `*t.clone()` ran when arm was never taken,
|
||||
//! causing segfault.
|
||||
//@ run-pass
|
||||
// Regression test for Issue #29092.
|
||||
//
|
||||
// (Possibly redundant with regression test run-pass/issue-30530.rs)
|
||||
|
||||
use self::Term::*;
|
||||
|
||||
@@ -12,7 +12,6 @@ pub enum Term {
|
||||
B(Box<Term>),
|
||||
}
|
||||
|
||||
// a small-step evaluator
|
||||
pub fn small_eval(v: Term) -> Term {
|
||||
match v {
|
||||
A(t) => *t.clone(),
|
||||
@@ -1,5 +1,6 @@
|
||||
//! Regression test for <https://github.com/rust-lang/rust/issues/29663>.
|
||||
//! `write_volatile` caused an LLVM assert with composite types.
|
||||
//@ run-pass
|
||||
// write_volatile causes an LLVM assert with composite types
|
||||
|
||||
use std::ptr::{read_volatile, write_volatile};
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
//@ check-pass
|
||||
#![allow(dead_code)]
|
||||
#![allow(non_upper_case_globals)]
|
||||
|
||||
fn ret() -> u32 {
|
||||
static x: u32 = 10;
|
||||
x & if true { 10u32 } else { 20u32 } & x
|
||||
}
|
||||
|
||||
fn ret2() -> &'static u32 {
|
||||
static x: u32 = 10;
|
||||
if true { 10u32; } else { 20u32; }
|
||||
&x
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
@@ -1,5 +0,0 @@
|
||||
//@ check-pass
|
||||
#![allow(dead_code)]
|
||||
struct S([u8; { struct Z; 0 }]);
|
||||
|
||||
fn main() {}
|
||||
@@ -1,4 +1,7 @@
|
||||
//! Regression test for <https://github.com/rust-lang/rust/issues/29048>.
|
||||
//! This produced incorrect warning.
|
||||
//@ check-pass
|
||||
|
||||
pub struct Chan;
|
||||
pub struct ChanSelect<'c, T> {
|
||||
chans: Vec<(&'c Chan, T)>,
|
||||
@@ -1,5 +1,19 @@
|
||||
//! Regression test for <https://github.com/rust-lang/rust/issues/29071>.
|
||||
//@ run-pass
|
||||
#![allow(dead_code)]
|
||||
|
||||
#![allow(non_upper_case_globals, dead_code)]
|
||||
|
||||
fn ret() -> u32 {
|
||||
static x: u32 = 10;
|
||||
x & if true { 10u32 } else { 20u32 } & x
|
||||
}
|
||||
|
||||
fn ret2() -> &'static u32 {
|
||||
static x: u32 = 10;
|
||||
if true { 10u32; } else { 20u32; }
|
||||
&x
|
||||
}
|
||||
|
||||
fn t1() -> u32 {
|
||||
let x;
|
||||
x = if true { [1, 2, 3] } else { [2, 3, 4] }[0];
|
||||
@@ -1,7 +1,7 @@
|
||||
//! Regression test for <https://github.com/rust-lang/rust/issues/29466>.
|
||||
//! This used to overflow stack.
|
||||
// ignore-tidy-filelength
|
||||
//
|
||||
//@ run-pass
|
||||
|
||||
// FIXME(#61117): Respect debuginfo-level-tests, do not force debuginfo-level=0
|
||||
//@ compile-flags: -Cdebuginfo=0
|
||||
|
||||
8
tests/ui/structs/item-definition-in-field.rs
Normal file
8
tests/ui/structs/item-definition-in-field.rs
Normal file
@@ -0,0 +1,8 @@
|
||||
//! Regression test for <https://github.com/rust-lang/rust/issues/29276>.
|
||||
//! Item definitions in fields ICE'd.
|
||||
//@ check-pass
|
||||
|
||||
#![allow(dead_code)]
|
||||
struct S([u8; { struct Z; 0 }]);
|
||||
|
||||
fn main() {}
|
||||
@@ -1,3 +1,6 @@
|
||||
//! Regression test for <https://github.com/rust-lang/rust/issues/29147>.
|
||||
//! This used to compile for over 30 seconds.
|
||||
|
||||
#![recursion_limit="1024"]
|
||||
#![allow(dead_code)]
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
error[E0283]: type annotations needed
|
||||
--> $DIR/issue-29147.rs:22:14
|
||||
--> $DIR/method-on-deeply-nested-struct-perf-2.rs:25:14
|
||||
|
|
||||
LL | let _ = <S5<_>>::xxx;
|
||||
| ^^^^^ cannot infer type for struct `S5<_>`
|
||||
|
|
||||
note: multiple `impl`s satisfying `S5<_>: Foo` found
|
||||
--> $DIR/issue-29147.rs:18:1
|
||||
--> $DIR/method-on-deeply-nested-struct-perf-2.rs:21:1
|
||||
|
|
||||
LL | impl Foo for S5<u32> { fn xxx(&self) {} }
|
||||
| ^^^^^^^^^^^^^^^^^^^^
|
||||
@@ -1,4 +1,7 @@
|
||||
//! Regression test for <https://github.com/rust-lang/rust/issues/29147>.
|
||||
//! This used to compile for over 30 seconds.
|
||||
//@ run-pass
|
||||
|
||||
#![recursion_limit="1024"]
|
||||
#![allow(dead_code)]
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
//! Regression test for <https://github.com/rust-lang/rust/issues/29037>.
|
||||
//! This test ensures that each pointer type `P<X>` is covariant in `X`.
|
||||
//@ check-pass
|
||||
#![allow(dead_code)]
|
||||
// This test ensures that each pointer type `P<X>` is covariant in `X`.
|
||||
|
||||
use std::rc::Rc;
|
||||
use std::sync::Arc;
|
||||
Reference in New Issue
Block a user