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:
bors
2026-07-02 01:09:07 +00:00
13 changed files with 49 additions and 37 deletions

View File

@@ -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,

View File

@@ -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(),

View File

@@ -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};

View File

@@ -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() {}

View File

@@ -1,5 +0,0 @@
//@ check-pass
#![allow(dead_code)]
struct S([u8; { struct Z; 0 }]);
fn main() {}

View File

@@ -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)>,

View File

@@ -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];

View File

@@ -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

View 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() {}

View File

@@ -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)]

View File

@@ -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) {} }
| ^^^^^^^^^^^^^^^^^^^^

View File

@@ -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)]

View File

@@ -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;