Skip to content

Rehome tests/ui/issues/ tests to other subdirectories under tests/ui/ #145332

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/56806
pub trait Trait {
fn dyn_instead_of_self(self: Box<dyn Trait>);
//~^ ERROR invalid `self` parameter type
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0307]: invalid `self` parameter type: `Box<(dyn Trait + 'static)>`
--> $DIR/issue-56806.rs:2:34
--> $DIR/invalid-self-parameter-type-56806.rs:3:34
|
LL | fn dyn_instead_of_self(self: Box<dyn Trait>);
| ^^^^^^^^^^^^^^
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// https://github.com/rust-lang/rust/issues/68951
//@ check-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/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/68010-
//@ build-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/54462-
//@ run-pass
//
//@ compile-flags: -Ccodegen-units=1 -O
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// https://github.com/rust-lang/rust/issues/7012
//@ run-pass
#![allow(non_camel_case_types)]
#![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/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/56870
//@ build-pass
// Regression test for #56870: Internal compiler error (traits & associated consts)

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/54094
//@ check-pass
trait Zoo {
type X;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// https://github.com/rust-lang/rust/issues/59326
//@ check-pass
trait Service {
type S;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// https://github.com/rust-lang/rust/issues/57399-
//@ check-pass

trait T {
Expand All @@ -12,7 +13,6 @@ struct S<A> {
a: A,
}


impl From<u32> for S<<i32 as T>::T> {
fn from(a: u32) -> Self {
Self { a }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// https://github.com/rust-lang/rust/issues/87490
fn main() {}
trait StreamOnce {
type Position;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0308]: mismatched types
--> $DIR/issue-87490.rs:9:5
--> $DIR/mismatched-types-in-associated-type-87490.rs:10:5
|
LL | fn follow(_: &str) -> <&str as StreamOnce>::Position {
| ------------------------------ expected `usize` 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/65230
trait T0 {}
trait T1: T0 {}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
error[E0308]: mismatched types
--> $DIR/issue-65230.rs:8:13
--> $DIR/mismatched-types-in-trait-impl-65230.rs:9:13
|
LL | impl T1 for &dyn T2 {}
| ^^^^^^^ lifetime mismatch
|
= note: expected trait `<&dyn T2 as T0>`
found trait `<&(dyn T2 + 'static) as T0>`
note: the anonymous lifetime as defined here...
--> $DIR/issue-65230.rs:8:13
--> $DIR/mismatched-types-in-trait-impl-65230.rs:9:13
|
LL | impl T1 for &dyn T2 {}
| ^
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// https://github.com/rust-lang/rust/issues/72076
trait X {
type S;
fn f() -> Self::S {} //~ 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-72076.rs:3:23
--> $DIR/missing-default-associated-type-72076.rs:4:23
|
LL | fn f() -> Self::S {}
| ^^ expected associated type, found `()`
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// https://github.com/rust-lang/rust/issues/66702-
// Breaks with values inside closures used to ICE (#66863)

fn main() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0767]: use of unreachable label `'some_label`
--> $DIR/issue-66702-break-outside-loop-val.rs:5:18
--> $DIR/labeled-break-in-async-fn-ice-66702-.rs:6:18
|
LL | 'some_label: loop {
| ----------- unreachable label defined here
Expand All @@ -9,7 +9,7 @@ LL | || break 'some_label ();
= note: labels are unreachable through functions, closures, async blocks and modules

error[E0267]: `break` inside of a closure
--> $DIR/issue-66702-break-outside-loop-val.rs:5:12
--> $DIR/labeled-break-in-async-fn-ice-66702-.rs:6:12
|
LL | || break 'some_label ();
| -- ^^^^^^^^^^^^^^^^^^^^ cannot `break` inside of a closure
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-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/77218-2
//@ 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-2
//@ 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-in-while-condition-77218-2.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/7092
enum Whatever {
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0308]: mismatched types
--> $DIR/issue-7092.rs:6:9
--> $DIR/method-call-nonsensical-pattern-binding-7092.rs:7:9
|
LL | match x {
| - this expression has type `Whatever`
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/70724-
fn a() -> i32 {
3
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0369]: binary operation `==` cannot be applied to type `fn() -> i32 {a}`
--> $DIR/issue-70724-add_type_neq_err_label-unwrap.rs:6:5
--> $DIR/binary-operation-error-on-function-70724-.rs:7:5
|
LL | assert_eq!(a, 0);
| ^^^^^^^^^^^^^^^^
Expand All @@ -10,7 +10,7 @@ LL | assert_eq!(a, 0);
= note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0308]: mismatched types
--> $DIR/issue-70724-add_type_neq_err_label-unwrap.rs:6:5
--> $DIR/binary-operation-error-on-function-70724-.rs:7:5
|
LL | assert_eq!(a, 0);
| ^^^^^^^^^^^^^^^^ expected fn item, found integer
Expand All @@ -20,7 +20,7 @@ LL | assert_eq!(a, 0);
= note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: `fn() -> i32 {a}` doesn't implement `Debug`
--> $DIR/issue-70724-add_type_neq_err_label-unwrap.rs:6:5
--> $DIR/binary-operation-error-on-function-70724-.rs:7:5
|
LL | fn a() -> i32 {
| - consider calling this function
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// https://github.com/rust-lang/rust/issues/59488
fn foo() -> i32 {
42
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0369]: binary operation `>` cannot be applied to type `fn() -> i32 {foo}`
--> $DIR/issue-59488.rs:14:9
--> $DIR/function-comparison-errors-59488.rs:15:9
|
LL | foo > 12;
| --- ^ -- {integer}
Expand All @@ -12,7 +12,7 @@ LL | foo() > 12;
| ++

error[E0308]: mismatched types
--> $DIR/issue-59488.rs:14:11
--> $DIR/function-comparison-errors-59488.rs:15:11
|
LL | foo > 12;
| ^^ expected fn item, found `i32`
Expand All @@ -21,7 +21,7 @@ LL | foo > 12;
found type `i32`

error[E0369]: binary operation `>` cannot be applied to type `fn(i64) -> i64 {bar}`
--> $DIR/issue-59488.rs:18:9
--> $DIR/function-comparison-errors-59488.rs:19:9
|
LL | bar > 13;
| --- ^ -- {integer}
Expand All @@ -34,7 +34,7 @@ LL | bar(/* i64 */) > 13;
| +++++++++++

error[E0308]: mismatched types
--> $DIR/issue-59488.rs:18:11
--> $DIR/function-comparison-errors-59488.rs:19:11
|
LL | bar > 13;
| ^^ expected fn item, found `i64`
Expand All @@ -43,7 +43,7 @@ LL | bar > 13;
found type `i64`

error[E0369]: binary operation `>` cannot be applied to type `fn() -> i32 {foo}`
--> $DIR/issue-59488.rs:22:9
--> $DIR/function-comparison-errors-59488.rs:23:9
|
LL | foo > foo;
| --- ^ --- fn() -> i32 {foo}
Expand All @@ -56,15 +56,15 @@ LL | foo() > foo();
| ++ ++

error[E0369]: binary operation `>` cannot be applied to type `fn() -> i32 {foo}`
--> $DIR/issue-59488.rs:25:9
--> $DIR/function-comparison-errors-59488.rs:26:9
|
LL | foo > bar;
| --- ^ --- fn(i64) -> i64 {bar}
| |
| fn() -> i32 {foo}

error[E0308]: mismatched types
--> $DIR/issue-59488.rs:25:11
--> $DIR/function-comparison-errors-59488.rs:26:11
|
LL | foo > bar;
| ^^^ expected fn item, found a different fn item
Expand All @@ -73,7 +73,7 @@ LL | foo > bar;
found fn item `fn(i64) -> i64 {bar}`

error[E0369]: binary operation `==` cannot be applied to type `fn(usize) -> Foo {Foo::Bar}`
--> $DIR/issue-59488.rs:30:5
--> $DIR/function-comparison-errors-59488.rs:31:5
|
LL | assert_eq!(Foo::Bar, i);
| ^^^^^^^^^^^^^^^^^^^^^^^
Expand All @@ -84,15 +84,15 @@ LL | assert_eq!(Foo::Bar, i);
= note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: `fn(usize) -> Foo {Foo::Bar}` doesn't implement `Debug`
--> $DIR/issue-59488.rs:30:5
--> $DIR/function-comparison-errors-59488.rs:31:5
|
LL | assert_eq!(Foo::Bar, i);
| ^^^^^^^^^^^^^^^^^^^^^^^ the trait `Debug` is not implemented for fn item `fn(usize) -> Foo {Foo::Bar}`
|
= note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: `fn(usize) -> Foo {Foo::Bar}` doesn't implement `Debug`
--> $DIR/issue-59488.rs:30:5
--> $DIR/function-comparison-errors-59488.rs:31:5
|
LL | assert_eq!(Foo::Bar, i);
| ^^^^^^^^^^^^^^^^^^^^^^^ the trait `Debug` is not implemented for fn item `fn(usize) -> Foo {Foo::Bar}`
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// https://github.com/rust-lang/rust/issues/6738
struct Foo<T> {
x: T,
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0368]: binary assignment operation `+=` cannot be applied to type `T`
--> $DIR/issue-6738.rs:6:9
--> $DIR/struct-field-generic-type-binary-assignment-error-6738.rs:7:9
|
LL | self.x += v.x;
| ------^^^^^^^
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// https://github.com/rust-lang/rust/issues/61108
fn main() {
let mut bad_letters = vec!['e', 't', 'o', 'i'];
for l in bad_letters {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0382]: borrow of moved value: `bad_letters`
--> $DIR/issue-61108.rs:6:5
--> $DIR/borrow-of-moved-value-in-for-loop-61108.rs:7:5
|
LL | let mut bad_letters = vec!['e', 't', 'o', 'i'];
| --------------- move occurs because `bad_letters` has type `Vec<char>`, which does not implement the `Copy` trait
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// https://github.com/rust-lang/rust/issues/5884
//@ build-pass
#![allow(dead_code)]

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// https://github.com/rust-lang/rust/issues/6919
//@ run-pass
#![allow(unused_attributes)]
//@ aux-build:iss.rs


extern crate issue6919_3;

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/5550
//@ run-pass
#![allow(unused_assignments)]

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// https://github.com/rust-lang/rust/issues/65131
fn get_pair(_a: &mut u32, _b: &mut u32) {}

macro_rules! x10 {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0499]: cannot borrow `x` as mutable more than once at a time
--> $DIR/issue-65131.rs:14:22
--> $DIR/multiple-mutable-borrows-error-65131.rs:15:22
|
LL | get_pair(&mut x, &mut x);
| -------- ------ ^^^^^^ second mutable borrow occurs here
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// https://github.com/rust-lang/rust/issues/61623
fn f1<'a>(_: &'a mut ()) {}

fn f2<P>(_: P, _: ()) {}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0596]: cannot borrow `*x.1` as mutable, as it is behind a `&` reference
--> $DIR/issue-61623.rs:6:19
--> $DIR/mutable-borrow-behind-reference-61623.rs:7:19
|
LL | f2(|| x.0, f1(x.1))
| ^^^ `x` is a `&` reference, so the data it refers to cannot be borrowed as mutable
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
Loading
Loading