Skip to content

Rehome 35 tests/ui/issues/ tests to other subdirectories under tests/ui/ #144089

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 26, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ pub fn main() {
let stdout = &mut io::stdout() as &mut dyn io::Write;
stdout.write(b"Hello!");
}

// https://github.com/rust-lang/rust/issues/4333
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remark: hm, I think I would still prefer having these comments at the top of the test, and keep two commits {move, edits}. It's fine for this PR, but I do still think it's nicer to have the doc comments / backlinks on start of file.

Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,5 @@ fn main() {
size_of_unsized = mem::size_of_val::<Ack<_>>(&y);
assert_eq!(size_of_sized, size_of_unsized);
}

// https://github.com/rust-lang/rust/issues/36278
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@ fn m<M: Mat>() {
}
fn main() {
}

// https://github.com/rust-lang/rust/issues/39211
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
error: constant expression depends on a generic parameter
--> $DIR/issue-39211.rs:9:17
--> $DIR/generic-parameter-in-const-expression-39211.rs:9:17
|
LL | let a = [3; M::Row::DIM];
| ^^^^^^^^^^^
|
= note: this may fail depending on what value the parameter takes

error: constant expression depends on a generic parameter
--> $DIR/issue-39211.rs:9:13
--> $DIR/generic-parameter-in-const-expression-39211.rs:9:13
|
LL | let a = [3; M::Row::DIM];
| ^^^^^^^^^^^^^^^^
Expand Down
15 changes: 15 additions & 0 deletions tests/ui/cross-crate/exporting-impl-from-root-causes-ice-2472.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
//@ run-pass
//@ aux-build:exporting-impl-from-root-causes-ice-2472-b.rs


extern crate exporting_impl_from_root_causes_ice_2472_b as lib;

use lib::{S, T};

pub fn main() {
let s = S(());
s.foo();
s.bar();
}

// https://github.com/rust-lang/rust/issues/2472
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
//~^ ERROR can't compare `Comparable`

fn main() {}

// https://github.com/rust-lang/rust/issues/34229
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0277]: can't compare `Comparable` with `Comparable`
--> $DIR/issue-34229.rs:2:46
--> $DIR/invalid-derive-comparison-34229.rs:2:46
|
LL | #[derive(PartialEq, PartialOrd)] struct Nope(Comparable);
| ---------- ^^^^^^^^^^ no implementation for `Comparable < Comparable` and `Comparable > Comparable`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,5 @@ pub fn main() {
Wrapper::new("Bob".to_string()).say_hi();
}
}

// https://github.com/rust-lang/rust/issues/9446
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ enum Expr { //~ ERROR E0072
}

fn main() { }

// https://github.com/rust-lang/rust/issues/32326
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0072]: recursive type `Expr` has infinite size
--> $DIR/issue-32326.rs:5:1
--> $DIR/recursive-enum-memory-32326.rs:5:1
|
LL | enum Expr {
| ^^^^^^^^^
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@
// expression that autoderefs through an overloaded generic deref
// impl.

//@ aux-build:issue-18514.rs
//@ aux-build:generic-impl-method-match-autoderef-18514.rs

extern crate issue_18514 as ice;
extern crate generic_impl_method_match_autoderef_18514 as ice;
use ice::{Tr, St};

fn main() {
let st: St<()> = St(vec![]);
st.tr();
}

// https://github.com/rust-lang/rust/issues/18514
13 changes: 0 additions & 13 deletions tests/ui/issues/issue-2472.rs

This file was deleted.

9 changes: 0 additions & 9 deletions tests/ui/issues/issue-49544.rs

This file was deleted.

11 changes: 11 additions & 0 deletions tests/ui/iterators/iterator-adapter-undeclared-type-49544.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
//@ aux-build:iterator-adapter-undeclared-type-49544.rs
//@ check-pass

extern crate iterator_adapter_undeclared_type_49544 as lib;
use lib::foo;

fn main() {
let _ = foo();
}

// https://github.com/rust-lang/rust/issues/49544
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,5 @@ fn g() {
}

fn main() {}

// https://github.com/rust-lang/rust/issues/34418
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,5 @@ impl !Send for TestType<i32> {}
//~^ ERROR `!Send` impls cannot be specialized

fn main() {}

// https://github.com/rust-lang/rust/issues/106755
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0751]: found both positive and negative implementation of trait `Send` for type `TestType<_>`:
--> $DIR/issue-106755.rs:13:1
--> $DIR/conflicting-send-impls-for-marker-trait-106755.rs:13:1
|
LL | unsafe impl<T: MyTrait + 'static> Send for TestType<T> {}
| ------------------------------------------------------ positive implementation here
Expand All @@ -8,7 +8,7 @@ LL | impl<T: MyTrait> !Send for TestType<T> {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ negative implementation here

error[E0119]: conflicting implementations of trait `Send` for type `TestType<_>`
--> $DIR/issue-106755.rs:17:1
--> $DIR/conflicting-send-impls-for-marker-trait-106755.rs:17:1
|
LL | unsafe impl<T: MyTrait + 'static> Send for TestType<T> {}
| ------------------------------------------------------ first implementation here
Expand All @@ -17,26 +17,26 @@ LL | unsafe impl<T: 'static> Send for TestType<T> {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `TestType<_>`

error[E0367]: `!Send` impl requires `T: MyTrait` but the struct it is implemented for does not
--> $DIR/issue-106755.rs:13:9
--> $DIR/conflicting-send-impls-for-marker-trait-106755.rs:13:9
|
LL | impl<T: MyTrait> !Send for TestType<T> {}
| ^^^^^^^
|
note: the implementor must specify the same requirement
--> $DIR/issue-106755.rs:9:1
--> $DIR/conflicting-send-impls-for-marker-trait-106755.rs:9:1
|
LL | struct TestType<T>(::std::marker::PhantomData<T>);
| ^^^^^^^^^^^^^^^^^^

error[E0366]: `!Send` impls cannot be specialized
--> $DIR/issue-106755.rs:19:1
--> $DIR/conflicting-send-impls-for-marker-trait-106755.rs:19:1
|
LL | impl !Send for TestType<i32> {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `i32` is not a generic parameter
note: use the same sequence of generic lifetime, type and const parameters as the struct definition
--> $DIR/issue-106755.rs:9:1
--> $DIR/conflicting-send-impls-for-marker-trait-106755.rs:9:1
|
LL | struct TestType<T>(::std::marker::PhantomData<T>);
| ^^^^^^^^^^^^^^^^^^
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,5 @@ pub fn crash() -> bool {
}

fn main() {}

// https://github.com/rust-lang/rust/issues/46964
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,5 @@ fn main() {
let pin = Pin(&mut unit);
pin.poll();
}

// https://github.com/rust-lang/rust/issues/53843
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@ fn testing(test: Test) {
let _ = test.comps.inner.try_lock();
//~^ ERROR: field `inner` of struct `Mutex` is private
}

// https://github.com/rust-lang/rust/issues/54062
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0616]: field `inner` of struct `Mutex` is private
--> $DIR/issue-54062.rs:10:24
--> $DIR/private-field-access-in-mutex-54062.rs:10:24
|
LL | let _ = test.comps.inner.try_lock();
| ^^^^^ private field
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,5 @@ where
//~^ ERROR reached the recursion limit while instantiating
}
}

// https://github.com/rust-lang/rust/issues/67552
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
error: reached the recursion limit while instantiating `rec::<&mut &mut &mut &mut &mut ...>`
--> $DIR/issue-67552.rs:28:9
--> $DIR/recursive-impl-trait-iterator-by-ref-67552.rs:28:9
|
LL | rec(identity(&mut it))
| ^^^^^^^^^^^^^^^^^^^^^^
|
note: `rec` defined here
--> $DIR/issue-67552.rs:21:1
--> $DIR/recursive-impl-trait-iterator-by-ref-67552.rs:21:1
|
LL | / fn rec<T>(mut it: T)
LL | | where
LL | | T: Iterator,
| |________________^
= note: the full type name has been written to '$TEST_BUILD_DIR/issue-67552.long-type.txt'
= note: the full type name has been written to '$TEST_BUILD_DIR/recursive-impl-trait-iterator-by-ref-67552.long-type.txt'

error: aborting due to 1 previous error

Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ fn main() {
let x = ();
x
}

// https://github.com/rust-lang/rust/issues/24353
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ struct Foo<T: ?Hash> {}
//~| ERROR bound modifier `?` can only be applied to `Sized`

fn main() {}

// https://github.com/rust-lang/rust/issues/37534
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0404]: expected trait, found derive macro `Hash`
--> $DIR/issue-37534.rs:1:16
--> $DIR/relaxing-default-bound-error-37534.rs:1:16
|
LL | struct Foo<T: ?Hash> {}
| ^^^^ not a trait
Expand All @@ -10,7 +10,7 @@ LL + use std::hash::Hash;
|

error: bound modifier `?` can only be applied to `Sized`
--> $DIR/issue-37534.rs:1:15
--> $DIR/relaxing-default-bound-error-37534.rs:1:15
|
LL | struct Foo<T: ?Hash> {}
| ^^^^^
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,5 @@ pub fn main() {
print_str_vector(node.content.clone());

}

// https://github.com/rust-lang/rust/issues/3389
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ fn f<T: ?for<'a> Sized>() {}
//~^ ERROR `for<...>` binder should be placed before trait bound modifiers

fn main() {}

// https://github.com/rust-lang/rust/issues/39089
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error: `for<...>` binder should be placed before trait bound modifiers
--> $DIR/issue-39089.rs:1:13
--> $DIR/for-binder-placement-error-39089.rs:1:13
|
LL | fn f<T: ?for<'a> Sized>() {}
| - ^^^^
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@ struct Vec<T> {
}

fn main() {}

// https://github.com/rust-lang/rust/issues/23281
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
error[E0277]: the size for values of type `(dyn Fn() + 'static)` cannot be known at compilation time
--> $DIR/issue-23281.rs:4:27
--> $DIR/dyn-trait-size-error-23281.rs:4:27
|
LL | pub fn function(funs: Vec<dyn Fn() -> ()>) {}
| ^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
|
= help: the trait `Sized` is not implemented for `(dyn Fn() + 'static)`
note: required by an implicit `Sized` bound in `Vec`
--> $DIR/issue-23281.rs:8:12
--> $DIR/dyn-trait-size-error-23281.rs:8:12
|
LL | struct Vec<T> {
| ^ required by the implicit `Sized` requirement on this type parameter in `Vec`
help: you could relax the implicit `Sized` bound on `T` if it were used through indirection like `&T` or `Box<T>`
--> $DIR/issue-23281.rs:8:12
--> $DIR/dyn-trait-size-error-23281.rs:8:12
|
LL | struct Vec<T> {
| ^ this could be changed to `T: ?Sized`...
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,5 @@ impl<T> Broken for T {
fn main() {
let _m: &dyn Broken<Assoc=()> = &();
}

// https://github.com/rust-lang/rust/issues/36839
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,5 @@ impl FontTableTagConversions for FontTableTag {
pub fn main() {
5.tag_to_string();
}

// https://github.com/rust-lang/rust/issues/5280
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,5 @@ impl Fooable for usize {
pub fn main() {
2.yes();
}

// https://github.com/rust-lang/rust/issues/5321
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@ fn foo<'a, T: Trait<'a>>(value: T::A) {
}

fn main() { }

// https://github.com/rust-lang/rust/issues/21174
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
--> $DIR/issue-21174.rs:7:30
--> $DIR/transmute-between-associated-types-with-lifetimers-21174.rs:7:30
|
LL | let new: T::B = unsafe { std::mem::transmute(value) };
| ^^^^^^^^^^^^^^^^^^^
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,5 @@ fn main() {
let m : Matrix4<f32> = translate(x);
println!("m: {:?}", m);
}

// https://github.com/rust-lang/rust/issues/14382
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,5 @@ fn main() {
assert_eq!(foo(1, 1), (2, 2));
assert_eq!(foo(1, 1, 1), (4, 4, 4));
}

// https://github.com/rust-lang/rust/issues/18952
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ fn main() {
let k = |x: i32| { x + 1 };
Fn::call(&k, (0,));
}

// https://github.com/rust-lang/rust/issues/22789
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@ pub unsafe fn g() {
}

pub fn main() {}

// https://github.com/rust-lang/rust/issues/7246
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
error: unreachable statement
--> $DIR/issue-7246.rs:7:5
--> $DIR/unreachable-bool-read-7246.rs:7:5
|
LL | return;
| ------ any code following this expression is unreachable
LL | if *ptr::null() {};
| ^^^^^^^^^^^^^^^^^^^ unreachable statement
|
note: the lint level is defined here
--> $DIR/issue-7246.rs:1:9
--> $DIR/unreachable-bool-read-7246.rs:1:9
|
LL | #![deny(unreachable_code)]
| ^^^^^^^^^^^^^^^^

warning: dereferencing a null pointer
--> $DIR/issue-7246.rs:7:8
--> $DIR/unreachable-bool-read-7246.rs:7:8
|
LL | if *ptr::null() {};
| ^^^^^^^^^^^^ this code causes undefined behavior when executed
Expand Down
Loading
Loading