Skip to content

Rehome 32 tests/ui/issues/ tests to other subdirectories under tests/ui/ #144553

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
@@ -1,3 +1,4 @@
// https://github.com/rust-lang/rust/issues/23442
//@ check-pass
#![allow(dead_code)]
use std::marker::PhantomData;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// https://github.com/rust-lang/rust/issues/91489
//@ check-pass

// regression test for #91489
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// https://github.com/rust-lang/rust/issues/9725
struct A { foo: isize }

fn main() {
Expand Down
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-9725.rs:5: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-9725.rs:5: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
@@ -1,3 +1,4 @@
// https://github.com/rust-lang/rust/issues/9942
//@ run-pass

pub fn main() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// https://github.com/rust-lang/rust/issues/9129
//@ run-pass
#![allow(dead_code)]
#![allow(non_camel_case_types)]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// https://github.com/rust-lang/rust/issues/9951
//@ run-pass

#![allow(unused_variables)]
Expand Down
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-9951.rs:7:6
|
LL | trait Bar {
| --- method in this trait
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// https://github.com/rust-lang/rust/issues/98299
use std::convert::TryFrom;

pub fn test_usage(p: ()) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
error[E0284]: type annotations needed for `SmallCString<_>`
--> $DIR/issue-98299.rs:4:36
--> $DIR/try-from-with-const-genericsrs-98299.rs:5:36
|
LL | SmallCString::try_from(p).map(|cstr| cstr);
| ------------ ^^^^
| |
| type must be known at this point
|
note: required by a const generic parameter in `SmallCString`
--> $DIR/issue-98299.rs:10:25
--> $DIR/try-from-with-const-genericsrs-98299.rs:11:25
|
LL | pub struct SmallCString<const N: usize> {}
| ^^^^^^^^^^^^^^ required by this const generic parameter in `SmallCString`
Expand All @@ -17,15 +17,15 @@ LL | SmallCString::try_from(p).map(|cstr: SmallCString<N>| cstr);
| +++++++++++++++++

error[E0284]: type annotations needed for `SmallCString<_>`
--> $DIR/issue-98299.rs:4:36
--> $DIR/try-from-with-const-genericsrs-98299.rs:5:36
|
LL | SmallCString::try_from(p).map(|cstr| cstr);
| ------------ ^^^^
| |
| type must be known at this point
|
note: required for `SmallCString<_>` to implement `TryFrom<()>`
--> $DIR/issue-98299.rs:12:22
--> $DIR/try-from-with-const-genericsrs-98299.rs:13:22
|
LL | impl<const N: usize> TryFrom<()> for SmallCString<N> {
| -------------- ^^^^^^^^^^^ ^^^^^^^^^^^^^^^
Expand All @@ -37,15 +37,15 @@ LL | SmallCString::try_from(p).map(|cstr: SmallCString<N>| cstr);
| +++++++++++++++++

error[E0284]: type annotations needed for `SmallCString<_>`
--> $DIR/issue-98299.rs:4:36
--> $DIR/try-from-with-const-genericsrs-98299.rs:5:36
|
LL | SmallCString::try_from(p).map(|cstr| cstr);
| ------------------------- ^^^^
| |
| type must be known at this point
|
note: required for `SmallCString<_>` to implement `TryFrom<()>`
--> $DIR/issue-98299.rs:12:22
--> $DIR/try-from-with-const-genericsrs-98299.rs:13:22
|
LL | impl<const N: usize> TryFrom<()> for SmallCString<N> {
| -------------- ^^^^^^^^^^^ ^^^^^^^^^^^^^^^
Expand Down
11 changes: 11 additions & 0 deletions tests/ui/cross-crate/generic-newtypes-cross-crate-usage-9155.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// https://github.com/rust-lang/rust/issues/9155
//@ run-pass
//@ aux-build:aux-9155.rs

extern crate aux_9155;

struct Baz;

pub fn main() {
aux_9155::Foo::new(Baz);
}
10 changes: 10 additions & 0 deletions tests/ui/cross-crate/reexported-structs-impls-link-error-9906.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// https://github.com/rust-lang/rust/issues/9906
//@ run-pass
//@ aux-build:aux-9906.rs

extern crate aux_9906 as testmod;

pub fn main() {
testmod::foo();
testmod::FooBar::new(1);
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// https://github.com/rust-lang/rust/issues/22992
//@ run-pass

struct X { val: i32 }
Expand All @@ -6,7 +7,6 @@ impl std::ops::Deref for X {
fn deref(&self) -> &i32 { &self.val }
}


trait M { fn m(self); }
impl M for i32 { fn m(self) { println!("i32::m()"); } }
impl M for X { fn m(self) { println!("X::m()"); } }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// https://github.com/rust-lang/rust/issues/25549
//@ run-pass
#![allow(unused_variables)]
struct Foo<'r>(&'r mut i32);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// https://github.com/rust-lang/rust/issues/9243
//@ build-pass
#![allow(dead_code)]
// Regression test for issue 9243
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// https://github.com/rust-lang/rust/issues/53333
//@ run-pass
#![allow(unused_imports)]
//@ edition:2018
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// https://github.com/rust-lang/rust/issues/9837
//@ run-pass
const C1: i32 = 0x12345678;
const C2: isize = C1 as i16 as isize;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// https://github.com/rust-lang/rust/issues/9814
// Verify that single-variant enums can't be de-referenced
// Regression test for issue #9814

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0614]: type `Foo` cannot be dereferenced
--> $DIR/issue-9814.rs:7:13
--> $DIR/single-variant-enum-deref-error-9814.rs:8:13
|
LL | let _ = *Foo::Bar(2);
| ^^^^^^^^^^^^ can't be dereferenced
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// https://github.com/rust-lang/rust/issues/3037
//@ run-pass
#![allow(dead_code)]
#![allow(non_camel_case_types)]
Expand Down
12 changes: 12 additions & 0 deletions tests/ui/imports/pub-use-link-errors-9968.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// https://github.com/rust-lang/rust/issues/9968
//@ run-pass
//@ aux-build:aux-9968.rs

extern crate aux_9968 as lib;

use lib::{Trait, Struct};

pub fn main()
{
Struct::init().test();
}
11 changes: 0 additions & 11 deletions tests/ui/issues/issue-9155.rs

This file was deleted.

10 changes: 0 additions & 10 deletions tests/ui/issues/issue-9906.rs

This file was deleted.

12 changes: 0 additions & 12 deletions tests/ui/issues/issue-9968.rs

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// https://github.com/rust-lang/rust/issues/21655
//@ run-pass

fn test(it: &mut dyn Iterator<Item=i32>) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// https://github.com/rust-lang/rust/issues/9259
//@ run-pass
#![allow(dead_code)]

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// https://github.com/rust-lang/rust/issues/29710
//@ check-pass
#![deny(unused_results)]
#![allow(dead_code)]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// https://github.com/rust-lang/rust/issues/9047
//@ run-pass
#![allow(unused_mut)]
#![allow(unused_variables)]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// https://github.com/rust-lang/rust/issues/9110
//@ check-pass
#![allow(dead_code)]
#![allow(non_snake_case)]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// https://github.com/rust-lang/rust/issues/9737
//@ run-pass
#![allow(unused_variables)]
macro_rules! f {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// https://github.com/rust-lang/rust/issues/25386
mod stuff {
pub struct Item {
c_object: Box<CObj>,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0616]: field `c_object` of struct `Item` is private
--> $DIR/issue-25386.rs:19:16
--> $DIR/private-struct-member-macro-access-25386.rs:20:16
|
LL | (*$var.c_object).$member.is_some()
| ^^^^^^^^ private field
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// https://github.com/rust-lang/rust/issues/92741
//@ run-rustfix
fn main() {}
fn _foo() -> bool {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// https://github.com/rust-lang/rust/issues/92741
//@ run-rustfix
fn main() {}
fn _foo() -> bool {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0308]: mismatched types
--> $DIR/issue-92741.rs:4:5
--> $DIR/newlines-in-diagnostic-fix-suggestions-92741.rs:5:5
|
LL | fn _foo() -> bool {
| ---- expected `bool` because of return type
Expand All @@ -15,7 +15,7 @@ LL - mut
|

error[E0308]: mismatched types
--> $DIR/issue-92741.rs:10:5
--> $DIR/newlines-in-diagnostic-fix-suggestions-92741.rs:11:5
|
LL | fn _bar() -> bool {
| ---- expected `bool` because of return type
Expand All @@ -31,7 +31,7 @@ LL + if true { true } else { false }
|

error[E0308]: mismatched types
--> $DIR/issue-92741.rs:15:5
--> $DIR/newlines-in-diagnostic-fix-suggestions-92741.rs:16:5
|
LL | fn _baz() -> bool {
| ---- expected `bool` because of return type
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// https://github.com/rust-lang/rust/issues/99838
//@ run-pass

use std::hint;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// https://github.com/rust-lang/rust/issues/29383
enum E {
A,
B,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0532]: expected tuple struct or tuple variant, found unit variant `E::A`
--> $DIR/issue-pr29383.rs:9:14
--> $DIR/unit-variant-pattern-matching-29383.rs:10:14
|
LL | A,
| - `E::A` defined here
Expand All @@ -8,7 +8,7 @@ LL | Some(E::A(..)) => {}
| ^^^^^^^^ help: use this syntax instead: `E::A`

error[E0532]: expected tuple struct or tuple variant, found unit variant `E::B`
--> $DIR/issue-pr29383.rs:11:14
--> $DIR/unit-variant-pattern-matching-29383.rs:12:14
|
LL | B,
| - `E::B` defined here
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// https://github.com/rust-lang/rust/issues/9249
//@ check-pass
#![allow(dead_code)]

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// https://github.com/rust-lang/rust/issues/24365
pub enum Attribute {
Code {attr_name_idx: u16},
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
error[E0609]: no field `b` on type `Foo`
--> $DIR/issue-24365.rs:10:22
--> $DIR/struct-field-access-errors-24365.rs:11:22
|
LL | println!("{}", a.b);
| ^ unknown field

error[E0609]: no field `attr_name_idx` on type `&Attribute`
--> $DIR/issue-24365.rs:17:18
--> $DIR/struct-field-access-errors-24365.rs:18:18
|
LL | let z = (&x).attr_name_idx;
| ^^^^^^^^^^^^^ unknown field

error[E0609]: no field `attr_name_idx` on type `Attribute`
--> $DIR/issue-24365.rs:18:15
--> $DIR/struct-field-access-errors-24365.rs:19:15
|
LL | let y = x.attr_name_idx;
| ^^^^^^^^^^^^^ unknown field
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// https://github.com/rust-lang/rust/issues/30756
//@ run-pass
#![forbid(unsafe_code)]

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// https://github.com/rust-lang/rust/issues/30236
type Foo<
Unused //~ ERROR type parameter `Unused` is never used
> = u8;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0091]: type parameter `Unused` is never used
--> $DIR/issue-30236.rs:2:5
--> $DIR/unused-type-parameter-span-30236.rs:3:5
|
LL | Unused
| ^^^^^^ unused type parameter
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// https://github.com/rust-lang/rust/issues/88150
//@ run-pass
//@ compile-flags:-C debuginfo=2
//@ edition:2018
Expand Down
Loading