Skip to content

Rehome ~150 tests/ui/issues/ tests to other subdirectories under tests/ui/ #143902

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

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from
Draft
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
177 changes: 0 additions & 177 deletions src/tools/tidy/src/issues.txt

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/tools/tidy/src/ui_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ use ignore::Walk;
const ENTRY_LIMIT: u32 = 901;
// FIXME: The following limits should be reduced eventually.

const ISSUES_ENTRY_LIMIT: u32 = 1619;
const ISSUES_ENTRY_LIMIT: u32 = 1386;

const EXPECTED_TEST_FILE_EXTENSIONS: &[&str] = &[
"rs", // test source files
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,5 @@ extern "C" {
}

pub fn main() {}

// https://github.com/rust-lang/rust/issues/5754
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,5 @@ fn main() {
let m2: HashMap<isize, _> = arr.iter().map(copy).collect();
let m3: HashMap<_, usize> = arr.iter().map(copy).collect();
}

// https://github.com/rust-lang/rust/issues/12909
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,5 @@ pub fn main() {
assert_repr_eq(slice, "[()]".to_string());
assert_repr_eq(&x[..], "[(), ()]".to_string());
}

// https://github.com/rust-lang/rust/issues/8898
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,5 @@ pub fn main() {
None => ()
}
}

// https://github.com/rust-lang/rust/issues/8498
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,5 @@ fn main() {
assert_eq!(xs, ["foo", "foo"]);
assert_eq!(d, "baz");
}

// https://github.com/rust-lang/rust/issues/7784
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ fn f() {
S::A::<f> {}
//~^ ERROR ambiguous associated type
}

// https://github.com/rust-lang/rust/issues/78622
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0223]: ambiguous associated type
--> $DIR/issue-78622.rs:5:5
--> $DIR/ambiguous-associated-type-error-issue-78622.rs:5:5
|
LL | S::A::<f> {}
| ^^^^
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,5 @@ impl<T> HasNumber<T> for Two {
}

fn main() {}

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

fn main() {}

// https://github.com/rust-lang/rust/issues/43483
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@ impl Foo for FooStruct {
}

fn main() {}

// https://github.com/rust-lang/rust/issues/21946
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0275]: overflow evaluating the requirement `<FooStruct as Foo>::A == _`
--> $DIR/issue-21946.rs:8:14
--> $DIR/recursive-associated-type-overflow-issue-21946.rs:8:14
|
LL | type A = <FooStruct as Foo>::A;
| ^^^^^^^^^^^^^^^^^^^^^
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,5 @@ pub struct UnificationTable<K:UnifyKey> {
pub struct Delegate<K>(PhantomData<K>);

fn main() {}

// https://github.com/rust-lang/rust/issues/23442
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@ fn main() {
//~| WARN this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
5; //~ NOTE not a function
}

// https://github.com/rust-lang/rust/issues/54044
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error: attribute should be applied to a function definition
--> $DIR/issue-54044.rs:3:1
--> $DIR/cold-attribute-application-issue-54044.rs:3:1
|
LL | #[cold]
| ^^^^^^^
Expand All @@ -9,13 +9,13 @@ LL | struct Foo;
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
note: the lint level is defined here
--> $DIR/issue-54044.rs:1:9
--> $DIR/cold-attribute-application-issue-54044.rs:1:9
|
LL | #![deny(unused_attributes)]
| ^^^^^^^^^^^^^^^^^

error: attribute should be applied to a function definition
--> $DIR/issue-54044.rs:9:5
--> $DIR/cold-attribute-application-issue-54044.rs:9:5
|
LL | #[cold]
| ^^^^^^^
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,5 @@ fn main() {
// should be found
Cow::Borrowed(&VariantTy {}).as_str()
}

// https://github.com/rust-lang/rust/issues/91489
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ fn main() {
let value = [7u8];
while let Some(0) = value.get(0) {} //~ ERROR invalid left-hand side of assignment
}

// https://github.com/rust-lang/rust/issues/77218
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ fn main() {
let value = [7u8];
while Some(0) = value.get(0) {} //~ ERROR invalid left-hand side of assignment
}

// https://github.com/rust-lang/rust/issues/77218
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0070]: invalid left-hand side of assignment
--> $DIR/issue-77218.rs:4:19
--> $DIR/invalid-assignment-in-while-loop-issue-77218.rs:4:19
|
LL | while Some(0) = value.get(0) {}
| - ^
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ fn main() {
};
assert_eq!(x, 1);
}

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

// https://github.com/rust-lang/rust/issues/8860
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ fn main() {
//~^ ERROR: identifier `foo` is bound more than once in the same pattern
//~^^ ERROR: field `foo` bound multiple times
}

// https://github.com/rust-lang/rust/issues/9725
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
error[E0416]: identifier `foo` is bound more than once in the same pattern
--> $DIR/issue-9725.rs:4:18
--> $DIR/struct-destructuring-repeated-bindings-issue-9725.rs:4:18
|
LL | let A { foo, foo } = A { foo: 3 };
| ^^^ used in a pattern more than once

error[E0025]: field `foo` bound multiple times in the pattern
--> $DIR/issue-9725.rs:4:18
--> $DIR/struct-destructuring-repeated-bindings-issue-9725.rs:4:18
|
LL | let A { foo, foo } = A { foo: 3 };
| --- ^^^ multiple uses of `foo` in pattern
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ fn main() {
//~^^ ERROR `z` does not live long enough [E0597]
println!("{}", y);
}

// https://github.com/rust-lang/rust/issues/464711
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0597]: `z` does not live long enough
--> $DIR/issue-46471-1.rs:4:9
--> $DIR/borrow-checker-lifetime-error-issue-464711.rs:4:9
|
LL | let mut z = 0;
| ----- binding `z` declared here
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@ fn main() {

assert_eq!(1, z);
}

// https://github.com/rust-lang/rust/issues/78192
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@ impl<'a> BarStruct {
}

fn main() {}

// https://github.com/rust-lang/rust/issues/7061
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0308]: mismatched types
--> $DIR/issue-7061.rs:6:46
--> $DIR/mismatched-pointer-type-in-self-issue-7061.rs:6:46
|
LL | fn foo(&'a mut self) -> Box<BarStruct> { self }
| -------------- ^^^^ expected `Box<BarStruct>`, found `&mut BarStruct`
Expand Down
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-issue-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 @@ -12,3 +12,5 @@ fn foo<'r>() {
fn main() {
foo();
}

// https://github.com/rust-lang/rust/issues/13665
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@ pub fn main() {
let A(ref _a, ref _b) = m[&1];
let (a, b) = match m[&1] { A(ref _a, ref _b) => (_a, _b) };
}

// https://github.com/rust-lang/rust/issues/7660
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,5 @@ fn borrow<'a>(binding: &'a A) -> &'a str {
}

fn main() {}

// https://github.com/rust-lang/rust/issues/11869
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
pub fn main() {
const S: usize = 23 as usize; [0; S]; ()
}

// https://github.com/rust-lang/rust/issues/9942
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
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
pub fn main() {
assert_eq!((0 + 0u8) as char, '\0');
}

// https://github.com/rust-lang/rust/issues/9918
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,5 @@ fn main() {
//~| ERROR cannot borrow `x` as mutable, as it is a captured variable in a `Fn` closure
});
}

// https://github.com/rust-lang/rust/issues/21600
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0596]: cannot borrow `x` as mutable, as it is a captured variable in a `Fn` closure
--> $DIR/issue-21600.rs:14:20
--> $DIR/aliasability-violation-with-closure-issue-21600.rs:14:20
|
LL | fn call_it<F>(f: F) where F: Fn() { f(); }
| - change this to accept `FnMut` instead of `Fn`
Expand All @@ -11,7 +11,7 @@ LL | call_it(|| x.gen_mut());
| expects `Fn` instead of `FnMut`

error[E0596]: cannot borrow `x` as mutable, as it is a captured variable in a `Fn` closure
--> $DIR/issue-21600.rs:14:17
--> $DIR/aliasability-violation-with-closure-issue-21600.rs:14:17
|
LL | fn call_it<F>(f: F) where F: Fn() { f(); }
| - change this to accept `FnMut` instead of `Fn`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,5 @@ pub fn main() {
let b = Box::new(S) as Box<dyn bomb>;
light_fuse(b);
}

// https://github.com/rust-lang/rust/issues/9129
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,5 @@ fn main() {
panic!();
}
}

// https://github.com/rust-lang/rust/issues/76042
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 @@ pub fn main() {
let mut b = B;
foo(&mut b as &mut dyn A);
}

// https://github.com/rust-lang/rust/issues/8248
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
warning: method `dummy` is never used
--> $DIR/issue-8248.rs:4:8
--> $DIR/mut-trait-coercion-issue-8248.rs:4:8
|
LL | trait A {
| - method in this trait
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@ fn foo(a: &mut dyn Writer) {
}

pub fn main(){}

// https://github.com/rust-lang/rust/issues/8398
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,5 @@ fn main() {

let (c, d): (&dyn Bar, &dyn Bar) = (&5, &9);
}

// https://github.com/rust-lang/rust/issues/9951
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
warning: method `noop` is never used
--> $DIR/issue-9951.rs:6:6
--> $DIR/trait-object-coercion-distribution-issue-9951.rs:6:6
|
LL | trait Bar {
| --- method in this trait
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ impl Undefined {}
//~^ ERROR cannot find type `Undefined` in this scope

fn main() {}

// https://github.com/rust-lang/rust/issues/18058
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0412]: cannot find type `Undefined` in this scope
--> $DIR/issue-18058.rs:1:6
--> $DIR/impl-coherence-error-for-undefined-type-issue-18058.rs:1:6
|
LL | impl Undefined {}
| ^^^^^^^^^ not found in this scope
Expand Down
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-issue-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-issue-39211.rs:9:13
|
LL | let a = [3; M::Row::DIM];
| ^^^^^^^^^^^^^^^^
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,5 @@ pub struct Baz3<#[repr(C)] T>(PhantomData<T>);
//~^ ERROR attribute should be applied to a struct, enum, or union

fn main() {}

// https://github.com/rust-lang/rust/issues/78957
Loading
Loading