Skip to content

Rehome 37 tests/ui/issues/ tests to other subdirectories under tests/ui/ #144983

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/8498
//@ 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/7784
//@ run-pass

use std::ops::Add;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// https://github.com/rust-lang/rust/issues/78622
#![crate_type = "lib"]

struct S;
Expand Down
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-78622.rs:6:5
|
LL | S::A::<f> {}
| ^^^^
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// https://github.com/rust-lang/rust/issues/77218
//@ run-rustfix
fn main() {
let value = [7u8];
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// https://github.com/rust-lang/rust/issues/77218
//@ run-rustfix
fn main() {
let value = [7u8];
Expand Down
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-77218.rs:5:19
|
LL | while Some(0) = value.get(0) {}
| - ^
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// https://github.com/rust-lang/rust/issues/8391
//@ run-pass

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/8860
//@ run-pass
// FIXME(static_mut_refs): this could use an atomic
#![allow(static_mut_refs)]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// https://github.com/rust-lang/rust/issues/772182
//@ run-rustfix
fn main() {
let value = [7u8];
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// https://github.com/rust-lang/rust/issues/772182
//@ run-rustfix
fn main() {
let value = [7u8];
Expand Down
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-2.rs:4:19
--> $DIR/invalid-assignment-lhs-in-while-772182.rs:5:19
|
LL | while Some(0) = value.get(0) {
| - ^
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// https://github.com/rust-lang/rust/issues/78192
//@ run-pass

#![allow(unused_assignments)]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// https://github.com/rust-lang/rust/issues/7660
//@ run-pass
#![allow(unused_variables)]
// Regression test for issue 7660
// rvalue lifetime too short when equivalent `match` works


use std::collections::HashMap;

struct A(isize, isize);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// https://github.com/rust-lang/rust/issues/76042
//@ run-pass
//@ compile-flags: -Coverflow-checks=off -Ccodegen-units=1 -Copt-level=0

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

trait A {
Expand Down
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-8248.rs:5:8
|
LL | trait A {
| - 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/8398
//@ 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/78957
#![deny(unused_attributes)]

use std::marker::PhantomData;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,64 +1,64 @@
error[E0518]: attribute should be applied to function or closure
--> $DIR/issue-78957.rs:5:16
--> $DIR/invalid-attributes-on-const-params-78957.rs:6:16
|
LL | pub struct Foo<#[inline] const N: usize>;
| ^^^^^^^^^ -------------- not a function or closure

error: attribute should be applied to a function definition
--> $DIR/issue-78957.rs:7:16
--> $DIR/invalid-attributes-on-const-params-78957.rs:8:16
|
LL | pub struct Bar<#[cold] const N: usize>;
| ^^^^^^^ -------------- not a function definition
|
= 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-78957.rs:1:9
--> $DIR/invalid-attributes-on-const-params-78957.rs:2:9
|
LL | #![deny(unused_attributes)]
| ^^^^^^^^^^^^^^^^^

error[E0517]: attribute should be applied to a struct, enum, or union
--> $DIR/issue-78957.rs:10:23
--> $DIR/invalid-attributes-on-const-params-78957.rs:11:23
|
LL | pub struct Baz<#[repr(C)] const N: usize>;
| ^ -------------- not a struct, enum, or union

error[E0518]: attribute should be applied to function or closure
--> $DIR/issue-78957.rs:13:17
--> $DIR/invalid-attributes-on-const-params-78957.rs:14:17
|
LL | pub struct Foo2<#[inline] 'a>(PhantomData<&'a ()>);
| ^^^^^^^^^ -- not a function or closure

error: attribute should be applied to a function definition
--> $DIR/issue-78957.rs:15:17
--> $DIR/invalid-attributes-on-const-params-78957.rs:16:17
|
LL | pub struct Bar2<#[cold] 'a>(PhantomData<&'a ()>);
| ^^^^^^^ -- not a function definition
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!

error[E0517]: attribute should be applied to a struct, enum, or union
--> $DIR/issue-78957.rs:18:24
--> $DIR/invalid-attributes-on-const-params-78957.rs:19:24
|
LL | pub struct Baz2<#[repr(C)] 'a>(PhantomData<&'a ()>);
| ^ -- not a struct, enum, or union

error[E0518]: attribute should be applied to function or closure
--> $DIR/issue-78957.rs:21:17
--> $DIR/invalid-attributes-on-const-params-78957.rs:22:17
|
LL | pub struct Foo3<#[inline] T>(PhantomData<T>);
| ^^^^^^^^^ - not a function or closure

error: attribute should be applied to a function definition
--> $DIR/issue-78957.rs:23:17
--> $DIR/invalid-attributes-on-const-params-78957.rs:24:17
|
LL | pub struct Bar3<#[cold] T>(PhantomData<T>);
| ^^^^^^^ - not a function definition
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!

error[E0517]: attribute should be applied to a struct, enum, or union
--> $DIR/issue-78957.rs:26:24
--> $DIR/invalid-attributes-on-const-params-78957.rs:27:24
|
LL | pub struct Baz3<#[repr(C)] T>(PhantomData<T>);
| ^ - not a struct, enum, or union
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// https://github.com/rust-lang/rust/issues/76191
// Regression test for diagnostic issue #76191
#![allow(non_snake_case)]

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
error[E0080]: evaluation panicked: explicit panic
--> $DIR/issue-76191.rs:8:37
--> $DIR/const-range-matching-76191.rs:9:37
|
LL | const RANGE2: RangeInclusive<i32> = panic!();
| ^^^^^^^^ evaluation of `RANGE2` failed here

error[E0308]: mismatched types
--> $DIR/issue-76191.rs:14:9
--> $DIR/const-range-matching-76191.rs:15:9
|
LL | const RANGE: RangeInclusive<i32> = 0..=255;
| -------------------------------- constant defined here
Expand All @@ -27,7 +27,7 @@ LL + 0..=255 => {}
|

error[E0308]: mismatched types
--> $DIR/issue-76191.rs:16:9
--> $DIR/const-range-matching-76191.rs:17:9
|
LL | const RANGE2: RangeInclusive<i32> = panic!();
| --------------------------------- constant defined here
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// https://github.com/rust-lang/rust/issues/8259
//@ run-pass
#![allow(dead_code)]
#![allow(non_upper_case_globals)]

//@ aux-build:issue-8259.rs
//@ aux-build:aux-8259.rs


extern crate issue_8259 as other;
extern crate aux_8259 as other;
static a: other::Foo<'static> = other::Foo::A;

pub fn main() {}
10 changes: 10 additions & 0 deletions tests/ui/cross-crate/tuple-like-structs-cross-crate-7899.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// https://github.com/rust-lang/rust/issues/7899
//@ run-pass
#![allow(unused_variables)]
//@ aux-build:aux-7899.rs

extern crate aux_7899 as testcrate;

fn main() {
let f = testcrate::V2(1.0f32, 2.0f32);
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// https://github.com/rust-lang/rust/issues/8761
enum Foo {
A = 1i64,
//~^ ERROR mismatched types
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0308]: mismatched types
--> $DIR/issue-8761.rs:2:9
--> $DIR/enum-discriminant-type-mismatch-8761.rs:3:9
|
LL | A = 1i64,
| ^^^^ expected `isize`, found `i64`
Expand All @@ -11,7 +11,7 @@ LL + A = 1isize,
|

error[E0308]: mismatched types
--> $DIR/issue-8761.rs:5:9
--> $DIR/enum-discriminant-type-mismatch-8761.rs:6:9
|
LL | B = 2u8
| ^^^ expected `isize`, found `u8`
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// https://github.com/rust-lang/rust/issues/80607
// This tests makes sure the diagnostics print the offending enum variant, not just the type.
pub enum Enum {
V1(i32),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0559]: variant `Enum::V1` has no field named `x`
--> $DIR/issue-80607.rs:7:16
--> $DIR/enum-variant-field-error-80607.rs:8:16
|
LL | V1(i32),
| -- `Enum::V1` 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/8506
//@ run-pass
#![allow(non_upper_case_globals)]

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// https://github.com/rust-lang/rust/issues/75283
extern "C" {
fn lol() { //~ ERROR incorrect function inside `extern` block
println!("");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error: incorrect function inside `extern` block
--> $DIR/issue-75283.rs:2:8
--> $DIR/function-definition-in-extern-block-75283.rs:3:8
|
LL | extern "C" {
| ---------- `extern` blocks define existing foreign functions and functions inside of them cannot have a body
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// https://github.com/rust-lang/rust/issues/86756
//@ edition: 2015
trait Foo<T, T = T> {}
//~^ ERROR the name `T` is already used for a generic parameter in this item's generic parameters
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
error[E0403]: the name `T` is already used for a generic parameter in this item's generic parameters
--> $DIR/issue-86756.rs:2:14
--> $DIR/duplicate-generic-parameter-error-86756.rs:3:14
|
LL | trait Foo<T, T = T> {}
| - ^ already used
| |
| first use of `T`

error[E0412]: cannot find type `dyn` in this scope
--> $DIR/issue-86756.rs:6:10
--> $DIR/duplicate-generic-parameter-error-86756.rs:7:10
|
LL | eq::<dyn, Foo>
| ^^^ not found in this scope

warning: trait objects without an explicit `dyn` are deprecated
--> $DIR/issue-86756.rs:6:15
--> $DIR/duplicate-generic-parameter-error-86756.rs:7:15
|
LL | eq::<dyn, Foo>
| ^^^
Expand All @@ -27,13 +27,13 @@ LL | eq::<dyn, dyn Foo>
| +++

error[E0107]: missing generics for trait `Foo`
--> $DIR/issue-86756.rs:6:15
--> $DIR/duplicate-generic-parameter-error-86756.rs:7:15
|
LL | eq::<dyn, Foo>
| ^^^ expected at least 1 generic argument
|
note: trait defined here, with at least 1 generic parameter: `T`
--> $DIR/issue-86756.rs:2:7
--> $DIR/duplicate-generic-parameter-error-86756.rs:3:7
|
LL | trait Foo<T, T = T> {}
| ^^^ -
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// https://github.com/rust-lang/rust/issues/85461
//@ compile-flags: -Cinstrument-coverage -Ccodegen-units=4 --crate-type dylib -Copt-level=0
//@ build-pass
//@ needs-profiler-runtime
Expand Down
10 changes: 0 additions & 10 deletions tests/ui/issues/issue-7899.rs

This file was deleted.

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

This file was deleted.

7 changes: 0 additions & 7 deletions tests/ui/issues/issue-9123.rs

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@
extern crate issue_8401;

pub fn main() {}

// https://github.com/rust-lang/rust/issues/8401
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// https://github.com/rust-lang/rust/issues/81584
//@ run-rustfix
fn main() {
let _ = vec![vec![0, 1], vec![2]]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// https://github.com/rust-lang/rust/issues/81584
//@ run-rustfix
fn main() {
let _ = vec![vec![0, 1], vec![2]]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0515]: cannot return value referencing function parameter `y`
--> $DIR/issue-81584.rs:5:22
--> $DIR/iterator-scope-collect-suggestion-81584.rs:6:22
|
LL | .map(|y| y.iter().map(|x| x + 1))
| -^^^^^^^^^^^^^^^^^^^^^^
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
// https://github.com/rust-lang/rust/issues/7970
macro_rules! one_arg_macro {
($fmt:expr) => (print!(concat!($fmt, "\n")));
($fmt:expr) => {
print!(concat!($fmt, "\n"))
};
}

fn main() {
Expand Down
Loading
Loading