diff options
Diffstat (limited to 'tests/ui/issues')
89 files changed, 0 insertions, 1542 deletions
| diff --git a/tests/ui/issues/auxiliary/issue-25185-1.rs b/tests/ui/issues/auxiliary/issue-25185-1.rs deleted file mode 100644 index 032d7d5de34..00000000000 --- a/tests/ui/issues/auxiliary/issue-25185-1.rs +++ /dev/null @@ -1,8 +0,0 @@ -//@ no-prefer-dynamic - -#![crate_type = "rlib"] - -#[link(name = "rust_test_helpers", kind = "static")] -extern "C" { - pub fn rust_dbg_extern_identity_u32(u: u32) -> u32; -} diff --git a/tests/ui/issues/auxiliary/issue-25185-2.rs b/tests/ui/issues/auxiliary/issue-25185-2.rs deleted file mode 100644 index 7ce3df255a3..00000000000 --- a/tests/ui/issues/auxiliary/issue-25185-2.rs +++ /dev/null @@ -1,3 +0,0 @@ -extern crate issue_25185_1; - -pub use issue_25185_1::rust_dbg_extern_identity_u32; diff --git a/tests/ui/issues/auxiliary/issue-5521.rs b/tests/ui/issues/auxiliary/issue-5521.rs deleted file mode 100644 index c2f81779b35..00000000000 --- a/tests/ui/issues/auxiliary/issue-5521.rs +++ /dev/null @@ -1,3 +0,0 @@ -use std::collections::HashMap; - -pub type map = Box<HashMap<usize, usize>>; diff --git a/tests/ui/issues/auxiliary/issue-9188.rs b/tests/ui/issues/auxiliary/issue-9188.rs deleted file mode 100644 index 3bc5697a1a6..00000000000 --- a/tests/ui/issues/auxiliary/issue-9188.rs +++ /dev/null @@ -1,13 +0,0 @@ -pub fn foo<T>() -> &'static isize { - if false { - static a: isize = 4; - return &a; - } else { - static a: isize = 5; - return &a; - } -} - -pub fn bar() -> &'static isize { - foo::<isize>() -} diff --git a/tests/ui/issues/issue-13665.rs b/tests/ui/issues/issue-13665.rs deleted file mode 100644 index e1d8be16f45..00000000000 --- a/tests/ui/issues/issue-13665.rs +++ /dev/null @@ -1,14 +0,0 @@ -//@ run-pass - -fn foo<'r>() { - let maybe_value_ref: Option<&'r u8> = None; - - let _ = maybe_value_ref.map(|& ref v| v); - let _ = maybe_value_ref.map(|& ref v| -> &'r u8 {v}); - let _ = maybe_value_ref.map(|& ref v: &'r u8| -> &'r u8 {v}); - let _ = maybe_value_ref.map(|& ref v: &'r u8| {v}); -} - -fn main() { - foo(); -} diff --git a/tests/ui/issues/issue-15673.rs b/tests/ui/issues/issue-15673.rs deleted file mode 100644 index bb61c246276..00000000000 --- a/tests/ui/issues/issue-15673.rs +++ /dev/null @@ -1,9 +0,0 @@ -//@ run-pass -#![allow(stable_features)] - -#![feature(iter_arith)] - -fn main() { - let x: [u64; 3] = [1, 2, 3]; - assert_eq!(6, (0..3).map(|i| x[i]).sum::<u64>()); -} diff --git a/tests/ui/issues/issue-15735.rs b/tests/ui/issues/issue-15735.rs deleted file mode 100644 index f5b3803f155..00000000000 --- a/tests/ui/issues/issue-15735.rs +++ /dev/null @@ -1,17 +0,0 @@ -//@ check-pass -#![allow(dead_code)] -struct A<'a> { - a: &'a i32, - b: &'a i32, -} - -impl <'a> A<'a> { - fn foo<'b>(&'b self) { - A { - a: self.a, - b: self.b, - }; - } -} - -fn main() { } diff --git a/tests/ui/issues/issue-16151.rs b/tests/ui/issues/issue-16151.rs deleted file mode 100644 index b18108e0a8a..00000000000 --- a/tests/ui/issues/issue-16151.rs +++ /dev/null @@ -1,32 +0,0 @@ -//@ run-pass - -// FIXME(static_mut_refs): Do not allow `static_mut_refs` lint -#![allow(static_mut_refs)] - -use std::mem; - -static mut DROP_COUNT: usize = 0; - -struct Fragment; - -impl Drop for Fragment { - fn drop(&mut self) { - unsafe { - DROP_COUNT += 1; - } - } -} - -fn main() { - { - let mut fragments = vec![Fragment, Fragment, Fragment]; - let _new_fragments: Vec<Fragment> = mem::replace(&mut fragments, vec![]) - .into_iter() - .skip_while(|_fragment| { - true - }).collect(); - } - unsafe { - assert_eq!(DROP_COUNT, 3); - } -} diff --git a/tests/ui/issues/issue-17385.rs b/tests/ui/issues/issue-17385.rs deleted file mode 100644 index 7400aadb059..00000000000 --- a/tests/ui/issues/issue-17385.rs +++ /dev/null @@ -1,29 +0,0 @@ -struct X(isize); - -enum Enum { - Variant1, - Variant2 -} - -impl Drop for X { - fn drop(&mut self) {} -} -impl Drop for Enum { - fn drop(&mut self) {} -} - -fn main() { - let foo = X(1); - drop(foo); - match foo { //~ ERROR use of moved value - X(1) => (), - _ => unreachable!() - } - - let e = Enum::Variant2; - drop(e); - match e { //~ ERROR use of moved value - Enum::Variant1 => unreachable!(), - Enum::Variant2 => () - } -} diff --git a/tests/ui/issues/issue-17385.stderr b/tests/ui/issues/issue-17385.stderr deleted file mode 100644 index 3c451a859e9..00000000000 --- a/tests/ui/issues/issue-17385.stderr +++ /dev/null @@ -1,41 +0,0 @@ -error[E0382]: use of moved value: `foo` - --> $DIR/issue-17385.rs:18:5 - | -LL | let foo = X(1); - | --- move occurs because `foo` has type `X`, which does not implement the `Copy` trait -LL | drop(foo); - | --- value moved here -LL | match foo { - | ^^^^^^^^^ value used here after move - | -note: if `X` implemented `Clone`, you could clone the value - --> $DIR/issue-17385.rs:1:1 - | -LL | struct X(isize); - | ^^^^^^^^ consider implementing `Clone` for this type -... -LL | drop(foo); - | --- you could clone this value - -error[E0382]: use of moved value: `e` - --> $DIR/issue-17385.rs:25:11 - | -LL | let e = Enum::Variant2; - | - move occurs because `e` has type `Enum`, which does not implement the `Copy` trait -LL | drop(e); - | - value moved here -LL | match e { - | ^ value used here after move - | -note: if `Enum` implemented `Clone`, you could clone the value - --> $DIR/issue-17385.rs:3:1 - | -LL | enum Enum { - | ^^^^^^^^^ consider implementing `Clone` for this type -... -LL | drop(e); - | - you could clone this value - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0382`. diff --git a/tests/ui/issues/issue-18058.rs b/tests/ui/issues/issue-18058.rs deleted file mode 100644 index cced66717e1..00000000000 --- a/tests/ui/issues/issue-18058.rs +++ /dev/null @@ -1,4 +0,0 @@ -impl Undefined {} -//~^ ERROR cannot find type `Undefined` in this scope - -fn main() {} diff --git a/tests/ui/issues/issue-18058.stderr b/tests/ui/issues/issue-18058.stderr deleted file mode 100644 index c880bb00291..00000000000 --- a/tests/ui/issues/issue-18058.stderr +++ /dev/null @@ -1,9 +0,0 @@ -error[E0412]: cannot find type `Undefined` in this scope - --> $DIR/issue-18058.rs:1:6 - | -LL | impl Undefined {} - | ^^^^^^^^^ not found in this scope - -error: aborting due to 1 previous error - -For more information about this error, try `rustc --explain E0412`. diff --git a/tests/ui/issues/issue-18685.rs b/tests/ui/issues/issue-18685.rs deleted file mode 100644 index 3dab341f615..00000000000 --- a/tests/ui/issues/issue-18685.rs +++ /dev/null @@ -1,20 +0,0 @@ -//@ run-pass -// Test that the self param space is not used in a conflicting -// manner by unboxed closures within a default method on a trait - - -trait Tr { - fn foo(&self); - - fn bar(&self) { - (|| { self.foo() })() - } -} - -impl Tr for () { - fn foo(&self) {} -} - -fn main() { - ().bar(); -} diff --git a/tests/ui/issues/issue-19100.fixed b/tests/ui/issues/issue-19100.fixed deleted file mode 100644 index 1162490048c..00000000000 --- a/tests/ui/issues/issue-19100.fixed +++ /dev/null @@ -1,29 +0,0 @@ -//@ run-rustfix - -#![allow(non_snake_case)] -#![allow(dead_code)] -#![allow(unused_variables)] - -#[derive(Copy, Clone)] -enum Foo { - Bar, - Baz -} - -impl Foo { - fn foo(&self) { - match self { - & -Foo::Bar if true -//~^ ERROR pattern binding `Bar` is named the same as one of the variants of the type `Foo` -=> println!("bar"), - & -Foo::Baz if false -//~^ ERROR pattern binding `Baz` is named the same as one of the variants of the type `Foo` -=> println!("baz"), -_ => () - } - } -} - -fn main() {} diff --git a/tests/ui/issues/issue-19100.rs b/tests/ui/issues/issue-19100.rs deleted file mode 100644 index fefed0daa72..00000000000 --- a/tests/ui/issues/issue-19100.rs +++ /dev/null @@ -1,29 +0,0 @@ -//@ run-rustfix - -#![allow(non_snake_case)] -#![allow(dead_code)] -#![allow(unused_variables)] - -#[derive(Copy, Clone)] -enum Foo { - Bar, - Baz -} - -impl Foo { - fn foo(&self) { - match self { - & -Bar if true -//~^ ERROR pattern binding `Bar` is named the same as one of the variants of the type `Foo` -=> println!("bar"), - & -Baz if false -//~^ ERROR pattern binding `Baz` is named the same as one of the variants of the type `Foo` -=> println!("baz"), -_ => () - } - } -} - -fn main() {} diff --git a/tests/ui/issues/issue-19100.stderr b/tests/ui/issues/issue-19100.stderr deleted file mode 100644 index ebbf083b7de..00000000000 --- a/tests/ui/issues/issue-19100.stderr +++ /dev/null @@ -1,17 +0,0 @@ -error[E0170]: pattern binding `Bar` is named the same as one of the variants of the type `Foo` - --> $DIR/issue-19100.rs:17:1 - | -LL | Bar if true - | ^^^ help: to match on the variant, qualify the path: `Foo::Bar` - | - = note: `#[deny(bindings_with_variant_name)]` on by default - -error[E0170]: pattern binding `Baz` is named the same as one of the variants of the type `Foo` - --> $DIR/issue-19100.rs:21:1 - | -LL | Baz if false - | ^^^ help: to match on the variant, qualify the path: `Foo::Baz` - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0170`. diff --git a/tests/ui/issues/issue-20413.rs b/tests/ui/issues/issue-20413.rs deleted file mode 100644 index 138a235e675..00000000000 --- a/tests/ui/issues/issue-20413.rs +++ /dev/null @@ -1,41 +0,0 @@ -trait Foo { - fn answer(self); -} - -struct NoData<T>; -//~^ ERROR: parameter `T` is never used - -impl<T> Foo for T where NoData<T>: Foo { - //~^ ERROR: overflow evaluating the requirement - fn answer(self) { - let val: NoData<T> = NoData; - } -} - -trait Bar { - fn answer(self); -} - -trait Baz { - fn answer(self); -} - -struct AlmostNoData<T>(Option<T>); - -struct EvenLessData<T>(Option<T>); - -impl<T> Bar for T where EvenLessData<T>: Baz { -//~^ ERROR: overflow evaluating the requirement - fn answer(self) { - let val: EvenLessData<T> = EvenLessData(None); - } -} - -impl<T> Baz for T where AlmostNoData<T>: Bar { -//~^ ERROR: overflow evaluating the requirement - fn answer(self) { - let val: NoData<T> = AlmostNoData(None); - } -} - -fn main() {} diff --git a/tests/ui/issues/issue-20413.stderr b/tests/ui/issues/issue-20413.stderr deleted file mode 100644 index 42f3cd2d062..00000000000 --- a/tests/ui/issues/issue-20413.stderr +++ /dev/null @@ -1,68 +0,0 @@ -error[E0392]: type parameter `T` is never used - --> $DIR/issue-20413.rs:5:15 - | -LL | struct NoData<T>; - | ^ unused type parameter - | - = help: consider removing `T`, referring to it in a field, or using a marker such as `PhantomData` - = help: if you intended `T` to be a const parameter, use `const T: /* Type */` instead - -error[E0275]: overflow evaluating the requirement `NoData<NoData<NoData<NoData<NoData<NoData<NoData<...>>>>>>>: Foo` - --> $DIR/issue-20413.rs:8:36 - | -LL | impl<T> Foo for T where NoData<T>: Foo { - | ^^^ - | - = help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`issue_20413`) -note: required for `NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>` to implement `Foo` - --> $DIR/issue-20413.rs:8:9 - | -LL | impl<T> Foo for T where NoData<T>: Foo { - | ^^^ ^ --- unsatisfied trait bound introduced here - = note: 126 redundant requirements hidden - = note: required for `NoData<T>` to implement `Foo` - -error[E0275]: overflow evaluating the requirement `AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<...>>>>>>>: Bar` - --> $DIR/issue-20413.rs:27:42 - | -LL | impl<T> Bar for T where EvenLessData<T>: Baz { - | ^^^ - | - = help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`issue_20413`) -note: required for `EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>` to implement `Baz` - --> $DIR/issue-20413.rs:34:9 - | -LL | impl<T> Baz for T where AlmostNoData<T>: Bar { - | ^^^ ^ --- unsatisfied trait bound introduced here -note: required for `AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>` to implement `Bar` - --> $DIR/issue-20413.rs:27:9 - | -LL | impl<T> Bar for T where EvenLessData<T>: Baz { - | ^^^ ^ --- unsatisfied trait bound introduced here - = note: 125 redundant requirements hidden - = note: required for `EvenLessData<T>` to implement `Baz` - -error[E0275]: overflow evaluating the requirement `EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<...>>>>>>>: Baz` - --> $DIR/issue-20413.rs:34:42 - | -LL | impl<T> Baz for T where AlmostNoData<T>: Bar { - | ^^^ - | - = help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`issue_20413`) -note: required for `AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>` to implement `Bar` - --> $DIR/issue-20413.rs:27:9 - | -LL | impl<T> Bar for T where EvenLessData<T>: Baz { - | ^^^ ^ --- unsatisfied trait bound introduced here -note: required for `EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>` to implement `Baz` - --> $DIR/issue-20413.rs:34:9 - | -LL | impl<T> Baz for T where AlmostNoData<T>: Bar { - | ^^^ ^ --- unsatisfied trait bound introduced here - = note: 125 redundant requirements hidden - = note: required for `AlmostNoData<T>` to implement `Bar` - -error: aborting due to 4 previous errors - -Some errors have detailed explanations: E0275, E0392. -For more information about an error, try `rustc --explain E0275`. diff --git a/tests/ui/issues/issue-20939.rs b/tests/ui/issues/issue-20939.rs deleted file mode 100644 index c0c22297897..00000000000 --- a/tests/ui/issues/issue-20939.rs +++ /dev/null @@ -1,6 +0,0 @@ -trait Foo {} - -impl<'a> Foo for dyn Foo + 'a {} -//~^ ERROR the object type `(dyn Foo + 'a)` automatically implements the trait `Foo` - -fn main() {} diff --git a/tests/ui/issues/issue-20939.stderr b/tests/ui/issues/issue-20939.stderr deleted file mode 100644 index 00357155c8a..00000000000 --- a/tests/ui/issues/issue-20939.stderr +++ /dev/null @@ -1,9 +0,0 @@ -error[E0371]: the object type `(dyn Foo + 'a)` automatically implements the trait `Foo` - --> $DIR/issue-20939.rs:3:1 - | -LL | impl<'a> Foo for dyn Foo + 'a {} - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `(dyn Foo + 'a)` automatically implements trait `Foo` - -error: aborting due to 1 previous error - -For more information about this error, try `rustc --explain E0371`. diff --git a/tests/ui/issues/issue-21600.rs b/tests/ui/issues/issue-21600.rs deleted file mode 100644 index 2e22e5e6fa2..00000000000 --- a/tests/ui/issues/issue-21600.rs +++ /dev/null @@ -1,18 +0,0 @@ -fn call_it<F>(f: F) where F: Fn() { f(); } - -struct A; - -impl A { - fn gen(&self) {} - fn gen_mut(&mut self) {} -} - -fn main() { - let mut x = A; - call_it(|| { - call_it(|| x.gen()); - call_it(|| x.gen_mut()); - //~^ ERROR cannot borrow `x` as mutable, as it is a captured variable in a `Fn` closure - //~| ERROR cannot borrow `x` as mutable, as it is a captured variable in a `Fn` closure - }); -} diff --git a/tests/ui/issues/issue-21600.stderr b/tests/ui/issues/issue-21600.stderr deleted file mode 100644 index f7905934424..00000000000 --- a/tests/ui/issues/issue-21600.stderr +++ /dev/null @@ -1,31 +0,0 @@ -error[E0596]: cannot borrow `x` as mutable, as it is a captured variable in a `Fn` closure - --> $DIR/issue-21600.rs:14:20 - | -LL | fn call_it<F>(f: F) where F: Fn() { f(); } - | - change this to accept `FnMut` instead of `Fn` -... -LL | call_it(|| x.gen_mut()); - | ------- -- ^ cannot borrow as mutable - | | | - | | in this closure - | 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 - | -LL | fn call_it<F>(f: F) where F: Fn() { f(); } - | - change this to accept `FnMut` instead of `Fn` -... -LL | call_it(|| { - | ------- -- in this closure - | | - | expects `Fn` instead of `FnMut` -LL | call_it(|| x.gen()); -LL | call_it(|| x.gen_mut()); - | ^^ - mutable borrow occurs due to use of `x` in closure - | | - | cannot borrow as mutable - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0596`. diff --git a/tests/ui/issues/issue-21946.rs b/tests/ui/issues/issue-21946.rs deleted file mode 100644 index d0c052cb2fd..00000000000 --- a/tests/ui/issues/issue-21946.rs +++ /dev/null @@ -1,12 +0,0 @@ -trait Foo { - type A; -} - -struct FooStruct; - -impl Foo for FooStruct { - type A = <FooStruct as Foo>::A; - //~^ ERROR overflow evaluating the requirement `<FooStruct as Foo>::A == _` -} - -fn main() {} diff --git a/tests/ui/issues/issue-21946.stderr b/tests/ui/issues/issue-21946.stderr deleted file mode 100644 index d1b4a808d2e..00000000000 --- a/tests/ui/issues/issue-21946.stderr +++ /dev/null @@ -1,9 +0,0 @@ -error[E0275]: overflow evaluating the requirement `<FooStruct as Foo>::A == _` - --> $DIR/issue-21946.rs:8:14 - | -LL | type A = <FooStruct as Foo>::A; - | ^^^^^^^^^^^^^^^^^^^^^ - -error: aborting due to 1 previous error - -For more information about this error, try `rustc --explain E0275`. diff --git a/tests/ui/issues/issue-22434.rs b/tests/ui/issues/issue-22434.rs deleted file mode 100644 index d9f7b987c64..00000000000 --- a/tests/ui/issues/issue-22434.rs +++ /dev/null @@ -1,8 +0,0 @@ -pub trait Foo { - type A; -} - -type I<'a> = &'a (dyn Foo + 'a); -//~^ ERROR the value of the associated type `A` in `Foo` must be specified - -fn main() {} diff --git a/tests/ui/issues/issue-22434.stderr b/tests/ui/issues/issue-22434.stderr deleted file mode 100644 index 172ae386c3e..00000000000 --- a/tests/ui/issues/issue-22434.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error[E0191]: the value of the associated type `A` in `Foo` must be specified - --> $DIR/issue-22434.rs:5:23 - | -LL | type A; - | ------ `A` defined here -... -LL | type I<'a> = &'a (dyn Foo + 'a); - | ^^^ help: specify the associated type: `Foo<A = Type>` - -error: aborting due to 1 previous error - -For more information about this error, try `rustc --explain E0191`. diff --git a/tests/ui/issues/issue-22684.rs b/tests/ui/issues/issue-22684.rs deleted file mode 100644 index a5b042706ed..00000000000 --- a/tests/ui/issues/issue-22684.rs +++ /dev/null @@ -1,18 +0,0 @@ -mod foo { - pub struct Foo; - impl Foo { - fn bar(&self) {} - } - - pub trait Baz { - fn bar(&self) -> bool { true } - } - impl Baz for Foo {} -} - -fn main() { - use foo::Baz; - - // Check that `bar` resolves to the trait method, not the inherent impl method. - let _: () = foo::Foo.bar(); //~ ERROR mismatched types -} diff --git a/tests/ui/issues/issue-22684.stderr b/tests/ui/issues/issue-22684.stderr deleted file mode 100644 index e2ca54caeac..00000000000 --- a/tests/ui/issues/issue-22684.stderr +++ /dev/null @@ -1,11 +0,0 @@ -error[E0308]: mismatched types - --> $DIR/issue-22684.rs:17:17 - | -LL | let _: () = foo::Foo.bar(); - | -- ^^^^^^^^^^^^^^ expected `()`, found `bool` - | | - | expected due to this - -error: aborting due to 1 previous error - -For more information about this error, try `rustc --explain E0308`. diff --git a/tests/ui/issues/issue-2281-part1.rs b/tests/ui/issues/issue-2281-part1.rs deleted file mode 100644 index 8340ade2239..00000000000 --- a/tests/ui/issues/issue-2281-part1.rs +++ /dev/null @@ -1 +0,0 @@ -fn main() { println!("{}", foobar); } //~ ERROR cannot find value `foobar` in this scope diff --git a/tests/ui/issues/issue-2281-part1.stderr b/tests/ui/issues/issue-2281-part1.stderr deleted file mode 100644 index 47a1ef8cc02..00000000000 --- a/tests/ui/issues/issue-2281-part1.stderr +++ /dev/null @@ -1,9 +0,0 @@ -error[E0425]: cannot find value `foobar` in this scope - --> $DIR/issue-2281-part1.rs:1:28 - | -LL | fn main() { println!("{}", foobar); } - | ^^^^^^ not found in this scope - -error: aborting due to 1 previous error - -For more information about this error, try `rustc --explain E0425`. diff --git a/tests/ui/issues/issue-23966.rs b/tests/ui/issues/issue-23966.rs deleted file mode 100644 index 5fdec28ac2c..00000000000 --- a/tests/ui/issues/issue-23966.rs +++ /dev/null @@ -1,4 +0,0 @@ -fn main() { - "".chars().fold(|_, _| (), ()); - //~^ ERROR E0277 -} diff --git a/tests/ui/issues/issue-23966.stderr b/tests/ui/issues/issue-23966.stderr deleted file mode 100644 index 3f7a4fa312f..00000000000 --- a/tests/ui/issues/issue-23966.stderr +++ /dev/null @@ -1,15 +0,0 @@ -error[E0277]: expected a `FnMut(_, char)` closure, found `()` - --> $DIR/issue-23966.rs:2:32 - | -LL | "".chars().fold(|_, _| (), ()); - | ---- ^^ expected an `FnMut(_, char)` closure, found `()` - | | - | required by a bound introduced by this call - | - = help: the trait `FnMut(_, char)` is not implemented for `()` -note: required by a bound in `fold` - --> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL - -error: aborting due to 1 previous error - -For more information about this error, try `rustc --explain E0277`. diff --git a/tests/ui/issues/issue-24352.rs b/tests/ui/issues/issue-24352.rs deleted file mode 100644 index 5c8246d179f..00000000000 --- a/tests/ui/issues/issue-24352.rs +++ /dev/null @@ -1,4 +0,0 @@ -fn main() { - 1.0f64 - 1.0; - 1.0f64 - 1 //~ ERROR E0277 -} diff --git a/tests/ui/issues/issue-24352.stderr b/tests/ui/issues/issue-24352.stderr deleted file mode 100644 index 3e0f812b5c7..00000000000 --- a/tests/ui/issues/issue-24352.stderr +++ /dev/null @@ -1,20 +0,0 @@ -error[E0277]: cannot subtract `{integer}` from `f64` - --> $DIR/issue-24352.rs:3:12 - | -LL | 1.0f64 - 1 - | ^ no implementation for `f64 - {integer}` - | - = help: the trait `Sub<{integer}>` is not implemented for `f64` - = help: the following other types implement trait `Sub<Rhs>`: - `&f64` implements `Sub<f64>` - `&f64` implements `Sub` - `f64` implements `Sub<&f64>` - `f64` implements `Sub` -help: consider using a floating-point literal by writing it with `.0` - | -LL | 1.0f64 - 1.0 - | ++ - -error: aborting due to 1 previous error - -For more information about this error, try `rustc --explain E0277`. diff --git a/tests/ui/issues/issue-25185.rs b/tests/ui/issues/issue-25185.rs deleted file mode 100644 index 7dc06ad96df..00000000000 --- a/tests/ui/issues/issue-25185.rs +++ /dev/null @@ -1,12 +0,0 @@ -//@ run-pass -//@ aux-build:issue-25185-1.rs -//@ aux-build:issue-25185-2.rs - -extern crate issue_25185_2; - -fn main() { - let x = unsafe { - issue_25185_2::rust_dbg_extern_identity_u32(1) - }; - assert_eq!(x, 1); -} diff --git a/tests/ui/issues/issue-26093.rs b/tests/ui/issues/issue-26093.rs deleted file mode 100644 index c838515caf9..00000000000 --- a/tests/ui/issues/issue-26093.rs +++ /dev/null @@ -1,12 +0,0 @@ -macro_rules! not_a_place { - ($thing:expr) => { - $thing = 42; - //~^ ERROR invalid left-hand side of assignment - $thing += 42; - //~^ ERROR invalid left-hand side of assignment - } -} - -fn main() { - not_a_place!(99); -} diff --git a/tests/ui/issues/issue-26093.stderr b/tests/ui/issues/issue-26093.stderr deleted file mode 100644 index 1a08d0fef41..00000000000 --- a/tests/ui/issues/issue-26093.stderr +++ /dev/null @@ -1,32 +0,0 @@ -error[E0070]: invalid left-hand side of assignment - --> $DIR/issue-26093.rs:3:16 - | -LL | $thing = 42; - | ^ -... -LL | not_a_place!(99); - | ---------------- - | | | - | | cannot assign to this expression - | in this macro invocation - | - = note: this error originates in the macro `not_a_place` (in Nightly builds, run with -Z macro-backtrace for more info) - -error[E0067]: invalid left-hand side of assignment - --> $DIR/issue-26093.rs:5:16 - | -LL | $thing += 42; - | ^^ -... -LL | not_a_place!(99); - | ---------------- - | | | - | | cannot assign to this expression - | in this macro invocation - | - = note: this error originates in the macro `not_a_place` (in Nightly builds, run with -Z macro-backtrace for more info) - -error: aborting due to 2 previous errors - -Some errors have detailed explanations: E0067, E0070. -For more information about an error, try `rustc --explain E0067`. diff --git a/tests/ui/issues/issue-26095.rs b/tests/ui/issues/issue-26095.rs deleted file mode 100644 index 34c617dc495..00000000000 --- a/tests/ui/issues/issue-26095.rs +++ /dev/null @@ -1,23 +0,0 @@ -//@ check-pass -#![allow(dead_code)] -#![allow(non_upper_case_globals)] - - -trait HasNumber<T> { - const Number: usize; -} - -enum One {} -enum Two {} - -enum Foo {} - -impl<T> HasNumber<T> for One { - const Number: usize = 1; -} - -impl<T> HasNumber<T> for Two { - const Number: usize = 2; -} - -fn main() {} diff --git a/tests/ui/issues/issue-26812.rs b/tests/ui/issues/issue-26812.rs deleted file mode 100644 index 8eb030a8ec9..00000000000 --- a/tests/ui/issues/issue-26812.rs +++ /dev/null @@ -1,6 +0,0 @@ -fn avg<T=T::Item>(_: T) {} -//~^ ERROR generic parameter defaults cannot reference parameters before they are declared -//~| ERROR defaults for type parameters -//~| WARN previously accepted - -fn main() {} diff --git a/tests/ui/issues/issue-26812.stderr b/tests/ui/issues/issue-26812.stderr deleted file mode 100644 index bb60d67e287..00000000000 --- a/tests/ui/issues/issue-26812.stderr +++ /dev/null @@ -1,30 +0,0 @@ -error[E0128]: generic parameter defaults cannot reference parameters before they are declared - --> $DIR/issue-26812.rs:1:10 - | -LL | fn avg<T=T::Item>(_: T) {} - | ^^^^^^^ cannot reference `T` before it is declared - -error: defaults for type parameters are only allowed in `struct`, `enum`, `type`, or `trait` definitions - --> $DIR/issue-26812.rs:1:8 - | -LL | fn avg<T=T::Item>(_: T) {} - | ^^^^^^^^^ - | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #36887 <https://github.com/rust-lang/rust/issues/36887> - = note: `#[deny(invalid_type_param_default)]` on by default - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0128`. -Future incompatibility report: Future breakage diagnostic: -error: defaults for type parameters are only allowed in `struct`, `enum`, `type`, or `trait` definitions - --> $DIR/issue-26812.rs:1:8 - | -LL | fn avg<T=T::Item>(_: T) {} - | ^^^^^^^^^ - | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #36887 <https://github.com/rust-lang/rust/issues/36887> - = note: `#[deny(invalid_type_param_default)]` on by default - diff --git a/tests/ui/issues/issue-32086.rs b/tests/ui/issues/issue-32086.rs deleted file mode 100644 index d595d1dd7e6..00000000000 --- a/tests/ui/issues/issue-32086.rs +++ /dev/null @@ -1,7 +0,0 @@ -struct S(u8); -const C: S = S(10); - -fn main() { - let C(a) = S(11); //~ ERROR expected tuple struct or tuple variant, found constant `C` - let C(..) = S(11); //~ ERROR expected tuple struct or tuple variant, found constant `C` -} diff --git a/tests/ui/issues/issue-32086.stderr b/tests/ui/issues/issue-32086.stderr deleted file mode 100644 index e566dea8908..00000000000 --- a/tests/ui/issues/issue-32086.stderr +++ /dev/null @@ -1,21 +0,0 @@ -error[E0532]: expected tuple struct or tuple variant, found constant `C` - --> $DIR/issue-32086.rs:5:9 - | -LL | struct S(u8); - | ------------- similarly named tuple struct `S` defined here -... -LL | let C(a) = S(11); - | ^ help: a tuple struct with a similar name exists: `S` - -error[E0532]: expected tuple struct or tuple variant, found constant `C` - --> $DIR/issue-32086.rs:6:9 - | -LL | struct S(u8); - | ------------- similarly named tuple struct `S` defined here -... -LL | let C(..) = S(11); - | ^ help: a tuple struct with a similar name exists: `S` - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0532`. diff --git a/tests/ui/issues/issue-32655.rs b/tests/ui/issues/issue-32655.rs deleted file mode 100644 index f52e0923129..00000000000 --- a/tests/ui/issues/issue-32655.rs +++ /dev/null @@ -1,19 +0,0 @@ -macro_rules! foo ( - () => ( - #[derive_Clone] //~ ERROR cannot find attribute `derive_Clone` in this scope - struct T; - ); -); - -macro_rules! bar ( - ($e:item) => ($e) -); - -foo!(); - -bar!( - #[derive_Clone] //~ ERROR cannot find attribute `derive_Clone` in this scope - struct S; -); - -fn main() {} diff --git a/tests/ui/issues/issue-32655.stderr b/tests/ui/issues/issue-32655.stderr deleted file mode 100644 index b8362499b2d..00000000000 --- a/tests/ui/issues/issue-32655.stderr +++ /dev/null @@ -1,25 +0,0 @@ -error: cannot find attribute `derive_Clone` in this scope - --> $DIR/issue-32655.rs:3:11 - | -LL | #[derive_Clone] - | ^^^^^^^^^^^^ help: an attribute macro with a similar name exists: `derive_const` -... -LL | foo!(); - | ------ in this macro invocation - --> $SRC_DIR/core/src/macros/mod.rs:LL:COL - | - = note: similarly named attribute macro `derive_const` defined here - | - = note: this error originates in the macro `foo` (in Nightly builds, run with -Z macro-backtrace for more info) - -error: cannot find attribute `derive_Clone` in this scope - --> $DIR/issue-32655.rs:15:7 - | -LL | #[derive_Clone] - | ^^^^^^^^^^^^ help: an attribute macro with a similar name exists: `derive_const` - --> $SRC_DIR/core/src/macros/mod.rs:LL:COL - | - = note: similarly named attribute macro `derive_const` defined here - -error: aborting due to 2 previous errors - diff --git a/tests/ui/issues/issue-32797.rs b/tests/ui/issues/issue-32797.rs deleted file mode 100644 index 470d661cb28..00000000000 --- a/tests/ui/issues/issue-32797.rs +++ /dev/null @@ -1,13 +0,0 @@ -//@ check-pass - -pub use bar::*; -mod bar { - pub use super::*; -} - -pub use baz::*; -mod baz { - pub use crate::main as f; -} - -pub fn main() {} diff --git a/tests/ui/issues/issue-32805.rs b/tests/ui/issues/issue-32805.rs deleted file mode 100644 index 717c00a248a..00000000000 --- a/tests/ui/issues/issue-32805.rs +++ /dev/null @@ -1,10 +0,0 @@ -//@ run-pass -fn const_mir() -> f32 { 9007199791611905.0 } - -fn main() { - let original = "9007199791611905.0"; // (1<<53)+(1<<29)+1 - let expected = "9007200000000000"; - - assert_eq!(const_mir().to_string(), expected); - assert_eq!(original.parse::<f32>().unwrap().to_string(), expected); -} diff --git a/tests/ui/issues/issue-32995-2.rs b/tests/ui/issues/issue-32995-2.rs deleted file mode 100644 index e713a64d3f5..00000000000 --- a/tests/ui/issues/issue-32995-2.rs +++ /dev/null @@ -1,13 +0,0 @@ -fn main() { - { fn f<X: ::std::marker()::Send>() {} } - //~^ ERROR parenthesized type parameters may only be used with a `Fn` trait - - { fn f() -> impl ::std::marker()::Send { } } - //~^ ERROR parenthesized type parameters may only be used with a `Fn` trait -} - -#[derive(Clone)] -struct X; - -impl ::std::marker()::Copy for X {} -//~^ ERROR parenthesized type parameters may only be used with a `Fn` trait diff --git a/tests/ui/issues/issue-32995-2.stderr b/tests/ui/issues/issue-32995-2.stderr deleted file mode 100644 index 6c2d772a233..00000000000 --- a/tests/ui/issues/issue-32995-2.stderr +++ /dev/null @@ -1,21 +0,0 @@ -error[E0214]: parenthesized type parameters may only be used with a `Fn` trait - --> $DIR/issue-32995-2.rs:2:22 - | -LL | { fn f<X: ::std::marker()::Send>() {} } - | ^^^^^^^^ only `Fn` traits may use parentheses - -error[E0214]: parenthesized type parameters may only be used with a `Fn` trait - --> $DIR/issue-32995-2.rs:5:29 - | -LL | { fn f() -> impl ::std::marker()::Send { } } - | ^^^^^^^^ only `Fn` traits may use parentheses - -error[E0214]: parenthesized type parameters may only be used with a `Fn` trait - --> $DIR/issue-32995-2.rs:12:13 - | -LL | impl ::std::marker()::Copy for X {} - | ^^^^^^^^ only `Fn` traits may use parentheses - -error: aborting due to 3 previous errors - -For more information about this error, try `rustc --explain E0214`. diff --git a/tests/ui/issues/issue-33293.rs b/tests/ui/issues/issue-33293.rs deleted file mode 100644 index 115ae3aad20..00000000000 --- a/tests/ui/issues/issue-33293.rs +++ /dev/null @@ -1,6 +0,0 @@ -fn main() { - match 0 { - aaa::bbb(_) => () - //~^ ERROR failed to resolve: use of unresolved module or unlinked crate `aaa` - }; -} diff --git a/tests/ui/issues/issue-33293.stderr b/tests/ui/issues/issue-33293.stderr deleted file mode 100644 index a82813194d7..00000000000 --- a/tests/ui/issues/issue-33293.stderr +++ /dev/null @@ -1,11 +0,0 @@ -error[E0433]: failed to resolve: use of unresolved module or unlinked crate `aaa` - --> $DIR/issue-33293.rs:3:9 - | -LL | aaa::bbb(_) => () - | ^^^ use of unresolved module or unlinked crate `aaa` - | - = help: you might be missing a crate named `aaa` - -error: aborting due to 1 previous error - -For more information about this error, try `rustc --explain E0433`. diff --git a/tests/ui/issues/issue-36023.rs b/tests/ui/issues/issue-36023.rs deleted file mode 100644 index 32e8af65c7d..00000000000 --- a/tests/ui/issues/issue-36023.rs +++ /dev/null @@ -1,24 +0,0 @@ -//@ run-pass -#![allow(unused_variables)] -use std::ops::Deref; - -fn main() { - if env_var("FOOBAR").as_ref().map(Deref::deref).ok() == Some("yes") { - panic!() - } - - let env_home: Result<String, ()> = Ok("foo-bar-baz".to_string()); - let env_home = env_home.as_ref().map(Deref::deref).ok(); - - if env_home == Some("") { panic!() } -} - -#[inline(never)] -fn env_var(s: &str) -> Result<String, VarError> { - Err(VarError::NotPresent) -} - -pub enum VarError { - NotPresent, - NotUnicode(String), -} diff --git a/tests/ui/issues/issue-36075.rs b/tests/ui/issues/issue-36075.rs deleted file mode 100644 index a563332ad78..00000000000 --- a/tests/ui/issues/issue-36075.rs +++ /dev/null @@ -1,14 +0,0 @@ -//@ check-pass -#![allow(dead_code)] -trait DeclarationParser { - type Declaration; -} - -struct DeclarationListParser<'i, I, P> - where P: DeclarationParser<Declaration = I> -{ - input: &'i (), - parser: P -} - -fn main() {} diff --git a/tests/ui/issues/issue-36116.rs b/tests/ui/issues/issue-36116.rs deleted file mode 100644 index 2313e189aff..00000000000 --- a/tests/ui/issues/issue-36116.rs +++ /dev/null @@ -1,25 +0,0 @@ -// Unnecessary path disambiguator is ok - -//@ check-pass - -macro_rules! m { - ($p: path) => { - let _ = $p(0); - let _: $p; - } -} - -struct Foo<T> { - _a: T, -} - -struct S<T>(T); - -fn f() { - let f = Some(Foo { _a: 42 }).map(|a| a as Foo::<i32>); - let g: Foo::<i32> = Foo { _a: 42 }; - - m!(S::<u8>); -} - -fn main() {} diff --git a/tests/ui/issues/issue-36786-resolve-call.rs b/tests/ui/issues/issue-36786-resolve-call.rs deleted file mode 100644 index de7b0e18d52..00000000000 --- a/tests/ui/issues/issue-36786-resolve-call.rs +++ /dev/null @@ -1,8 +0,0 @@ -//@ run-pass -// Ensure that types that rely on obligations are autoderefed -// correctly - -fn main() { - let x : Vec<Box<dyn Fn()>> = vec![Box::new(|| ())]; - x[0]() -} diff --git a/tests/ui/issues/issue-3763.rs b/tests/ui/issues/issue-3763.rs deleted file mode 100644 index 893009a2cd9..00000000000 --- a/tests/ui/issues/issue-3763.rs +++ /dev/null @@ -1,28 +0,0 @@ -// Regression test for #3763 - -mod my_mod { - pub struct MyStruct { - priv_field: isize - } - pub fn MyStruct () -> MyStruct { - MyStruct {priv_field: 4} - } - impl MyStruct { - fn happyfun(&self) {} - } -} - -fn main() { - let my_struct = my_mod::MyStruct(); - let _woohoo = (&my_struct).priv_field; - //~^ ERROR field `priv_field` of struct `MyStruct` is private - - let _woohoo = (Box::new(my_struct)).priv_field; - //~^ ERROR field `priv_field` of struct `MyStruct` is private - - (&my_struct).happyfun(); //~ ERROR method `happyfun` is private - - (Box::new(my_struct)).happyfun(); //~ ERROR method `happyfun` is private - let nope = my_struct.priv_field; - //~^ ERROR field `priv_field` of struct `MyStruct` is private -} diff --git a/tests/ui/issues/issue-3763.stderr b/tests/ui/issues/issue-3763.stderr deleted file mode 100644 index d101e4c33ad..00000000000 --- a/tests/ui/issues/issue-3763.stderr +++ /dev/null @@ -1,40 +0,0 @@ -error[E0616]: field `priv_field` of struct `MyStruct` is private - --> $DIR/issue-3763.rs:17:32 - | -LL | let _woohoo = (&my_struct).priv_field; - | ^^^^^^^^^^ private field - -error[E0616]: field `priv_field` of struct `MyStruct` is private - --> $DIR/issue-3763.rs:20:41 - | -LL | let _woohoo = (Box::new(my_struct)).priv_field; - | ^^^^^^^^^^ private field - -error[E0624]: method `happyfun` is private - --> $DIR/issue-3763.rs:23:18 - | -LL | fn happyfun(&self) {} - | ------------------ private method defined here -... -LL | (&my_struct).happyfun(); - | ^^^^^^^^ private method - -error[E0624]: method `happyfun` is private - --> $DIR/issue-3763.rs:25:27 - | -LL | fn happyfun(&self) {} - | ------------------ private method defined here -... -LL | (Box::new(my_struct)).happyfun(); - | ^^^^^^^^ private method - -error[E0616]: field `priv_field` of struct `MyStruct` is private - --> $DIR/issue-3763.rs:26:26 - | -LL | let nope = my_struct.priv_field; - | ^^^^^^^^^^ private field - -error: aborting due to 5 previous errors - -Some errors have detailed explanations: E0616, E0624. -For more information about an error, try `rustc --explain E0616`. diff --git a/tests/ui/issues/issue-43483.rs b/tests/ui/issues/issue-43483.rs deleted file mode 100644 index 2c62671d0c7..00000000000 --- a/tests/ui/issues/issue-43483.rs +++ /dev/null @@ -1,16 +0,0 @@ -//@ check-pass -#![allow(dead_code)] -#![allow(unused_variables)] -trait VecN { - const DIM: usize; -} - -trait Mat { - type Row: VecN; -} - -fn m<M: Mat>() { - let x = M::Row::DIM; -} - -fn main() {} diff --git a/tests/ui/issues/issue-46332.rs b/tests/ui/issues/issue-46332.rs deleted file mode 100644 index bed74e3138a..00000000000 --- a/tests/ui/issues/issue-46332.rs +++ /dev/null @@ -1,11 +0,0 @@ -// Original Levenshtein distance for both of this is 1. We improved accuracy with -// additional case insensitive comparison. - -struct TyUint {} - -struct TyInt {} - -fn main() { - TyUInt {}; - //~^ ERROR cannot find struct, variant or union type `TyUInt` in this scope -} diff --git a/tests/ui/issues/issue-46332.stderr b/tests/ui/issues/issue-46332.stderr deleted file mode 100644 index 8c0c1dfa6ee..00000000000 --- a/tests/ui/issues/issue-46332.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error[E0422]: cannot find struct, variant or union type `TyUInt` in this scope - --> $DIR/issue-46332.rs:9:5 - | -LL | struct TyUint {} - | ------------- similarly named struct `TyUint` defined here -... -LL | TyUInt {}; - | ^^^^^^ help: a struct with a similar name exists (notice the capitalization): `TyUint` - -error: aborting due to 1 previous error - -For more information about this error, try `rustc --explain E0422`. diff --git a/tests/ui/issues/issue-46471-1.rs b/tests/ui/issues/issue-46471-1.rs deleted file mode 100644 index aa161d40f70..00000000000 --- a/tests/ui/issues/issue-46471-1.rs +++ /dev/null @@ -1,8 +0,0 @@ -fn main() { - let y = { - let mut z = 0; - &mut z - }; - //~^^ ERROR `z` does not live long enough [E0597] - println!("{}", y); -} diff --git a/tests/ui/issues/issue-46471-1.stderr b/tests/ui/issues/issue-46471-1.stderr deleted file mode 100644 index d4517223982..00000000000 --- a/tests/ui/issues/issue-46471-1.stderr +++ /dev/null @@ -1,13 +0,0 @@ -error[E0597]: `z` does not live long enough - --> $DIR/issue-46471-1.rs:4:9 - | -LL | let mut z = 0; - | ----- binding `z` declared here -LL | &mut z - | ^^^^^^ borrowed value does not live long enough -LL | }; - | - `z` dropped here while still borrowed - -error: aborting due to 1 previous error - -For more information about this error, try `rustc --explain E0597`. diff --git a/tests/ui/issues/issue-47073-zero-padded-tuple-struct-indices.rs b/tests/ui/issues/issue-47073-zero-padded-tuple-struct-indices.rs deleted file mode 100644 index 6cd1f144359..00000000000 --- a/tests/ui/issues/issue-47073-zero-padded-tuple-struct-indices.rs +++ /dev/null @@ -1,12 +0,0 @@ -type Guilty = bool; -type FineDollars = u32; - -struct Verdict(Guilty, Option<FineDollars>); - -fn main() { - let justice = Verdict(true, Some(2718)); - let _condemned = justice.00; - //~^ ERROR no field `00` on type `Verdict` - let _punishment = justice.001; - //~^ ERROR no field `001` on type `Verdict` -} diff --git a/tests/ui/issues/issue-47073-zero-padded-tuple-struct-indices.stderr b/tests/ui/issues/issue-47073-zero-padded-tuple-struct-indices.stderr deleted file mode 100644 index 0a6fe24d5e3..00000000000 --- a/tests/ui/issues/issue-47073-zero-padded-tuple-struct-indices.stderr +++ /dev/null @@ -1,23 +0,0 @@ -error[E0609]: no field `00` on type `Verdict` - --> $DIR/issue-47073-zero-padded-tuple-struct-indices.rs:8:30 - | -LL | let _condemned = justice.00; - | ^^ unknown field - | -help: a field with a similar name exists - | -LL - let _condemned = justice.00; -LL + let _condemned = justice.0; - | - -error[E0609]: no field `001` on type `Verdict` - --> $DIR/issue-47073-zero-padded-tuple-struct-indices.rs:10:31 - | -LL | let _punishment = justice.001; - | ^^^ unknown field - | - = note: available fields are: `0`, `1` - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0609`. diff --git a/tests/ui/issues/issue-4734.rs b/tests/ui/issues/issue-4734.rs deleted file mode 100644 index 58aa0179693..00000000000 --- a/tests/ui/issues/issue-4734.rs +++ /dev/null @@ -1,38 +0,0 @@ -//@ run-pass -#![allow(dead_code)] -// Ensures that destructors are run for expressions of the form "e;" where -// `e` is a type which requires a destructor. - -// FIXME(static_mut_refs): Do not allow `static_mut_refs` lint -#![allow(static_mut_refs)] -#![allow(path_statements)] - -struct A { n: isize } -struct B; - -static mut NUM_DROPS: usize = 0; - -impl Drop for A { - fn drop(&mut self) { - unsafe { NUM_DROPS += 1; } - } -} - -impl Drop for B { - fn drop(&mut self) { - unsafe { NUM_DROPS += 1; } - } -} - -fn main() { - assert_eq!(unsafe { NUM_DROPS }, 0); - { let _a = A { n: 1 }; } - assert_eq!(unsafe { NUM_DROPS }, 1); - { A { n: 3 }; } - assert_eq!(unsafe { NUM_DROPS }, 2); - - { let _b = B; } - assert_eq!(unsafe { NUM_DROPS }, 3); - { B; } - assert_eq!(unsafe { NUM_DROPS }, 4); -} diff --git a/tests/ui/issues/issue-47638.rs b/tests/ui/issues/issue-47638.rs deleted file mode 100644 index e5a51ce0c06..00000000000 --- a/tests/ui/issues/issue-47638.rs +++ /dev/null @@ -1,10 +0,0 @@ -//@ run-pass -#![allow(unused_variables)] -fn id<'c, 'b>(f: &'c &'b dyn Fn(&i32)) -> &'c &'b dyn Fn(&'static i32) { - f -} - -fn main() { - let f: &dyn Fn(&i32) = &|x| {}; - id(&f); -} diff --git a/tests/ui/issues/issue-48276.rs b/tests/ui/issues/issue-48276.rs deleted file mode 100644 index f55c056fa67..00000000000 --- a/tests/ui/issues/issue-48276.rs +++ /dev/null @@ -1,33 +0,0 @@ -// Regression test for issue #48276 - ICE when self type does not match what is -// required by a trait and regions are involved. - -trait MyFrom<A> { - fn from(a: A) -> Self; -} - -struct A; - -impl<'a, 'b> MyFrom<A> for &'a str { - fn from(self: &'a Self) -> &'b str { - //~^ ERROR: method `from` has a `&self` declaration in the impl, but not in the trait - "asdf" - } -} - -struct B; - -impl From<A> for B { - fn from(&self) -> B { - //~^ ERROR: method `from` has a `&self` declaration in the impl, but not in the trait - B - } -} - -impl From<A> for &'static str { - fn from(&self) -> &'static str { - //~^ ERROR: method `from` has a `&self` declaration in the impl, but not in the trait - "" - } -} - -fn main(){} diff --git a/tests/ui/issues/issue-48276.stderr b/tests/ui/issues/issue-48276.stderr deleted file mode 100644 index 370905ee0df..00000000000 --- a/tests/ui/issues/issue-48276.stderr +++ /dev/null @@ -1,28 +0,0 @@ -error[E0185]: method `from` has a `&self` declaration in the impl, but not in the trait - --> $DIR/issue-48276.rs:11:5 - | -LL | fn from(a: A) -> Self; - | ---------------------- trait method declared without `&self` -... -LL | fn from(self: &'a Self) -> &'b str { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `&self` used in impl - -error[E0185]: method `from` has a `&self` declaration in the impl, but not in the trait - --> $DIR/issue-48276.rs:20:5 - | -LL | fn from(&self) -> B { - | ^^^^^^^^^^^^^^^^^^^ `&self` used in impl - | - = note: `from` from trait: `fn(T) -> Self` - -error[E0185]: method `from` has a `&self` declaration in the impl, but not in the trait - --> $DIR/issue-48276.rs:27:5 - | -LL | fn from(&self) -> &'static str { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `&self` used in impl - | - = note: `from` from trait: `fn(T) -> Self` - -error: aborting due to 3 previous errors - -For more information about this error, try `rustc --explain E0185`. diff --git a/tests/ui/issues/issue-48364.rs b/tests/ui/issues/issue-48364.rs deleted file mode 100644 index 14ee75e7c9c..00000000000 --- a/tests/ui/issues/issue-48364.rs +++ /dev/null @@ -1,6 +0,0 @@ -fn foo() -> bool { - b"".starts_with(stringify!(foo)) - //~^ ERROR mismatched types -} - -fn main() {} diff --git a/tests/ui/issues/issue-48364.stderr b/tests/ui/issues/issue-48364.stderr deleted file mode 100644 index 74bfa1e0693..00000000000 --- a/tests/ui/issues/issue-48364.stderr +++ /dev/null @@ -1,16 +0,0 @@ -error[E0308]: mismatched types - --> $DIR/issue-48364.rs:2:21 - | -LL | b"".starts_with(stringify!(foo)) - | ----------- ^^^^^^^^^^^^^^^ expected `&[u8]`, found `&str` - | | - | arguments to this method are incorrect - | - = note: expected reference `&[u8]` - found reference `&'static str` -note: method defined here - --> $SRC_DIR/core/src/slice/mod.rs:LL:COL - -error: aborting due to 1 previous error - -For more information about this error, try `rustc --explain E0308`. diff --git a/tests/ui/issues/issue-50585.rs b/tests/ui/issues/issue-50585.rs deleted file mode 100644 index ca2ece8d53b..00000000000 --- a/tests/ui/issues/issue-50585.rs +++ /dev/null @@ -1,4 +0,0 @@ -fn main() { - |y: Vec<[(); for x in 0..2 {}]>| {}; - //~^ ERROR mismatched types -} diff --git a/tests/ui/issues/issue-50585.stderr b/tests/ui/issues/issue-50585.stderr deleted file mode 100644 index 7e83ea35fbb..00000000000 --- a/tests/ui/issues/issue-50585.stderr +++ /dev/null @@ -1,15 +0,0 @@ -error[E0308]: mismatched types - --> $DIR/issue-50585.rs:2:18 - | -LL | |y: Vec<[(); for x in 0..2 {}]>| {}; - | ^^^^^^^^^^^^^^^^ expected `usize`, found `()` - | - = note: `for` loops evaluate to unit type `()` -help: consider returning a value here - | -LL | |y: Vec<[(); for x in 0..2 {} /* `usize` value */]>| {}; - | +++++++++++++++++++ - -error: aborting due to 1 previous error - -For more information about this error, try `rustc --explain E0308`. diff --git a/tests/ui/issues/issue-51632-try-desugar-incompatible-types.rs b/tests/ui/issues/issue-51632-try-desugar-incompatible-types.rs deleted file mode 100644 index 35402dff675..00000000000 --- a/tests/ui/issues/issue-51632-try-desugar-incompatible-types.rs +++ /dev/null @@ -1,12 +0,0 @@ -#![allow(dead_code)] - -fn missing_discourses() -> Result<isize, ()> { - Ok(1) -} - -fn forbidden_narratives() -> Result<isize, ()> { - missing_discourses()? - //~^ ERROR: `?` operator has incompatible types -} - -fn main() {} diff --git a/tests/ui/issues/issue-51632-try-desugar-incompatible-types.stderr b/tests/ui/issues/issue-51632-try-desugar-incompatible-types.stderr deleted file mode 100644 index 99fce1eeea6..00000000000 --- a/tests/ui/issues/issue-51632-try-desugar-incompatible-types.stderr +++ /dev/null @@ -1,24 +0,0 @@ -error[E0308]: `?` operator has incompatible types - --> $DIR/issue-51632-try-desugar-incompatible-types.rs:8:5 - | -LL | fn forbidden_narratives() -> Result<isize, ()> { - | ----------------- expected `Result<isize, ()>` because of return type -LL | missing_discourses()? - | ^^^^^^^^^^^^^^^^^^^^^ expected `Result<isize, ()>`, found `isize` - | - = note: `?` operator cannot convert from `isize` to `Result<isize, ()>` - = note: expected enum `Result<isize, ()>` - found type `isize` -help: try removing this `?` - | -LL - missing_discourses()? -LL + missing_discourses() - | -help: try wrapping the expression in `Ok` - | -LL | Ok(missing_discourses()?) - | +++ + - -error: aborting due to 1 previous error - -For more information about this error, try `rustc --explain E0308`. diff --git a/tests/ui/issues/issue-54044.rs b/tests/ui/issues/issue-54044.rs deleted file mode 100644 index 809ea7a87db..00000000000 --- a/tests/ui/issues/issue-54044.rs +++ /dev/null @@ -1,13 +0,0 @@ -#![deny(unused_attributes)] //~ NOTE lint level is defined here - -#[cold] -//~^ ERROR attribute should be applied to a function -//~| WARN this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! -struct Foo; //~ NOTE not a function - -fn main() { - #[cold] - //~^ ERROR attribute should be applied to a function - //~| 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 -} diff --git a/tests/ui/issues/issue-54044.stderr b/tests/ui/issues/issue-54044.stderr deleted file mode 100644 index 8bd94a041d0..00000000000 --- a/tests/ui/issues/issue-54044.stderr +++ /dev/null @@ -1,29 +0,0 @@ -error: attribute should be applied to a function definition - --> $DIR/issue-54044.rs:3:1 - | -LL | #[cold] - | ^^^^^^^ -... -LL | struct Foo; - | ----------- 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-54044.rs:1:9 - | -LL | #![deny(unused_attributes)] - | ^^^^^^^^^^^^^^^^^ - -error: attribute should be applied to a function definition - --> $DIR/issue-54044.rs:9:5 - | -LL | #[cold] - | ^^^^^^^ -... -LL | 5; - | - 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: aborting due to 2 previous errors - diff --git a/tests/ui/issues/issue-5521.rs b/tests/ui/issues/issue-5521.rs deleted file mode 100644 index 45896ae8128..00000000000 --- a/tests/ui/issues/issue-5521.rs +++ /dev/null @@ -1,17 +0,0 @@ -//@ run-pass -#![allow(dead_code)] -//@ aux-build:issue-5521.rs - - - -extern crate issue_5521 as foo; - -fn bar(a: foo::map) { - if false { - panic!(); - } else { - let _b = &(*a)[&2]; - } -} - -fn main() {} diff --git a/tests/ui/issues/issue-5754.rs b/tests/ui/issues/issue-5754.rs deleted file mode 100644 index 0aa09882959..00000000000 --- a/tests/ui/issues/issue-5754.rs +++ /dev/null @@ -1,15 +0,0 @@ -//@ build-pass -#![allow(dead_code)] -#![allow(improper_ctypes)] - - -struct TwoDoubles { - r: f64, - i: f64 -} - -extern "C" { - fn rust_dbg_extern_identity_TwoDoubles(arg1: TwoDoubles) -> TwoDoubles; -} - -pub fn main() {} diff --git a/tests/ui/issues/issue-6892.rs b/tests/ui/issues/issue-6892.rs deleted file mode 100644 index 7d99aef4ac5..00000000000 --- a/tests/ui/issues/issue-6892.rs +++ /dev/null @@ -1,60 +0,0 @@ -//@ run-pass -#![allow(dead_code)] -// Ensures that destructors are run for expressions of the form "let _ = e;" -// where `e` is a type which requires a destructor. - -// FIXME(static_mut_refs): Do not allow `static_mut_refs` lint -#![allow(static_mut_refs)] - -struct Foo; -struct Bar { x: isize } -struct Baz(isize); -enum FooBar { _Foo(Foo), _Bar(usize) } - -static mut NUM_DROPS: usize = 0; - -impl Drop for Foo { - fn drop(&mut self) { - unsafe { NUM_DROPS += 1; } - } -} -impl Drop for Bar { - fn drop(&mut self) { - unsafe { NUM_DROPS += 1; } - } -} -impl Drop for Baz { - fn drop(&mut self) { - unsafe { NUM_DROPS += 1; } - } -} -impl Drop for FooBar { - fn drop(&mut self) { - unsafe { NUM_DROPS += 1; } - } -} - -fn main() { - assert_eq!(unsafe { NUM_DROPS }, 0); - { let _x = Foo; } - assert_eq!(unsafe { NUM_DROPS }, 1); - { let _x = Bar { x: 21 }; } - assert_eq!(unsafe { NUM_DROPS }, 2); - { let _x = Baz(21); } - assert_eq!(unsafe { NUM_DROPS }, 3); - { let _x = FooBar::_Foo(Foo); } - assert_eq!(unsafe { NUM_DROPS }, 5); - { let _x = FooBar::_Bar(42); } - assert_eq!(unsafe { NUM_DROPS }, 6); - - { let _ = Foo; } - assert_eq!(unsafe { NUM_DROPS }, 7); - { let _ = Bar { x: 21 }; } - assert_eq!(unsafe { NUM_DROPS }, 8); - { let _ = Baz(21); } - assert_eq!(unsafe { NUM_DROPS }, 9); - { let _ = FooBar::_Foo(Foo); } - assert_eq!(unsafe { NUM_DROPS }, 11); - { let _ = FooBar::_Bar(42); } - assert_eq!(unsafe { NUM_DROPS }, 12); -} diff --git a/tests/ui/issues/issue-7061.rs b/tests/ui/issues/issue-7061.rs deleted file mode 100644 index c5d5a9d9498..00000000000 --- a/tests/ui/issues/issue-7061.rs +++ /dev/null @@ -1,12 +0,0 @@ -//@ dont-require-annotations: NOTE - -struct BarStruct; - -impl<'a> BarStruct { - fn foo(&'a mut self) -> Box<BarStruct> { self } - //~^ ERROR mismatched types - //~| NOTE expected struct `Box<BarStruct>` - //~| NOTE found mutable reference `&'a mut BarStruct` -} - -fn main() {} diff --git a/tests/ui/issues/issue-7061.stderr b/tests/ui/issues/issue-7061.stderr deleted file mode 100644 index b4c0ebfbdd5..00000000000 --- a/tests/ui/issues/issue-7061.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error[E0308]: mismatched types - --> $DIR/issue-7061.rs:6:46 - | -LL | fn foo(&'a mut self) -> Box<BarStruct> { self } - | -------------- ^^^^ expected `Box<BarStruct>`, found `&mut BarStruct` - | | - | expected `Box<BarStruct>` because of return type - | - = note: expected struct `Box<BarStruct>` - found mutable reference `&'a mut BarStruct` - -error: aborting due to 1 previous error - -For more information about this error, try `rustc --explain E0308`. diff --git a/tests/ui/issues/issue-72839-error-overflow.rs b/tests/ui/issues/issue-72839-error-overflow.rs deleted file mode 100644 index 6562d228409..00000000000 --- a/tests/ui/issues/issue-72839-error-overflow.rs +++ /dev/null @@ -1,19 +0,0 @@ -// Regression test for issue #72839 -// Tests that we do not overflow during trait selection after -// a type error occurs -use std::ops::Rem; -trait Foo {} -struct MyStruct<T>(T); - -impl<T, U> Rem<MyStruct<T>> for MyStruct<U> where MyStruct<U>: Rem<MyStruct<T>> { - type Output = u8; - fn rem(self, _: MyStruct<T>) -> Self::Output { - panic!() - } -} - -fn main() {} - -fn foo() { - if missing_var % 8 == 0 {} //~ ERROR cannot find -} diff --git a/tests/ui/issues/issue-72839-error-overflow.stderr b/tests/ui/issues/issue-72839-error-overflow.stderr deleted file mode 100644 index 35be632f579..00000000000 --- a/tests/ui/issues/issue-72839-error-overflow.stderr +++ /dev/null @@ -1,9 +0,0 @@ -error[E0425]: cannot find value `missing_var` in this scope - --> $DIR/issue-72839-error-overflow.rs:18:8 - | -LL | if missing_var % 8 == 0 {} - | ^^^^^^^^^^^ not found in this scope - -error: aborting due to 1 previous error - -For more information about this error, try `rustc --explain E0425`. diff --git a/tests/ui/issues/issue-7519-match-unit-in-arg.rs b/tests/ui/issues/issue-7519-match-unit-in-arg.rs deleted file mode 100644 index a7cea577b22..00000000000 --- a/tests/ui/issues/issue-7519-match-unit-in-arg.rs +++ /dev/null @@ -1,11 +0,0 @@ -//@ run-pass - -/* -#7519 ICE pattern matching unit in function argument -*/ - -fn foo(():()) { } - -pub fn main() { - foo(()); -} diff --git a/tests/ui/issues/issue-75704.rs b/tests/ui/issues/issue-75704.rs deleted file mode 100644 index 1672bf0b4c3..00000000000 --- a/tests/ui/issues/issue-75704.rs +++ /dev/null @@ -1,7 +0,0 @@ -// Caused an infinite loop during SimlifyCfg MIR transform previously. -// -//@ build-pass - -fn main() { - loop { continue; } -} diff --git a/tests/ui/issues/issue-77919.rs b/tests/ui/issues/issue-77919.rs deleted file mode 100644 index bf603314977..00000000000 --- a/tests/ui/issues/issue-77919.rs +++ /dev/null @@ -1,13 +0,0 @@ -fn main() { - [1; <Multiply<Five, Five>>::VAL]; -} -trait TypeVal<T> { - const VAL: T; -} -struct Five; -struct Multiply<N, M> { - _n: PhantomData, //~ ERROR cannot find type `PhantomData` in this scope -} -impl<N, M> TypeVal<usize> for Multiply<N, M> where N: TypeVal<VAL> {} -//~^ ERROR cannot find type `VAL` in this scope -//~| ERROR not all trait items implemented diff --git a/tests/ui/issues/issue-77919.stderr b/tests/ui/issues/issue-77919.stderr deleted file mode 100644 index dbbe70ff069..00000000000 --- a/tests/ui/issues/issue-77919.stderr +++ /dev/null @@ -1,35 +0,0 @@ -error[E0412]: cannot find type `PhantomData` in this scope - --> $DIR/issue-77919.rs:9:9 - | -LL | _n: PhantomData, - | ^^^^^^^^^^^ not found in this scope - | -help: consider importing this struct - | -LL + use std::marker::PhantomData; - | - -error[E0412]: cannot find type `VAL` in this scope - --> $DIR/issue-77919.rs:11:63 - | -LL | impl<N, M> TypeVal<usize> for Multiply<N, M> where N: TypeVal<VAL> {} - | ^^^ not found in this scope - | -help: you might be missing a type parameter - | -LL | impl<N, M, VAL> TypeVal<usize> for Multiply<N, M> where N: TypeVal<VAL> {} - | +++++ - -error[E0046]: not all trait items implemented, missing: `VAL` - --> $DIR/issue-77919.rs:11:1 - | -LL | const VAL: T; - | ------------ `VAL` from trait -... -LL | impl<N, M> TypeVal<usize> for Multiply<N, M> where N: TypeVal<VAL> {} - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `VAL` in implementation - -error: aborting due to 3 previous errors - -Some errors have detailed explanations: E0046, E0412. -For more information about an error, try `rustc --explain E0046`. diff --git a/tests/ui/issues/issue-8898.rs b/tests/ui/issues/issue-8898.rs deleted file mode 100644 index 4447704f059..00000000000 --- a/tests/ui/issues/issue-8898.rs +++ /dev/null @@ -1,18 +0,0 @@ -//@ run-pass - -fn assert_repr_eq<T: std::fmt::Debug>(obj : T, expected : String) { - assert_eq!(expected, format!("{:?}", obj)); -} - -pub fn main() { - let abc = [1, 2, 3]; - let tf = [true, false]; - let x = [(), ()]; - let slice = &x[..1]; - - assert_repr_eq(&abc[..], "[1, 2, 3]".to_string()); - assert_repr_eq(&tf[..], "[true, false]".to_string()); - assert_repr_eq(&x[..], "[(), ()]".to_string()); - assert_repr_eq(slice, "[()]".to_string()); - assert_repr_eq(&x[..], "[(), ()]".to_string()); -} diff --git a/tests/ui/issues/issue-9188.rs b/tests/ui/issues/issue-9188.rs deleted file mode 100644 index df2f90a0f16..00000000000 --- a/tests/ui/issues/issue-9188.rs +++ /dev/null @@ -1,11 +0,0 @@ -//@ run-pass -//@ aux-build:issue-9188.rs - - -extern crate issue_9188; - -pub fn main() { - let a = issue_9188::bar(); - let b = issue_9188::foo::<isize>(); - assert_eq!(*a, *b); -} diff --git a/tests/ui/issues/issue-9918.rs b/tests/ui/issues/issue-9918.rs deleted file mode 100644 index 017e833aefb..00000000000 --- a/tests/ui/issues/issue-9918.rs +++ /dev/null @@ -1,5 +0,0 @@ -//@ run-pass - -pub fn main() { - assert_eq!((0 + 0u8) as char, '\0'); -} | 
