summaryrefslogtreecommitdiffstats
path: root/tests/ui/issues
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/issues')
-rw-r--r--tests/ui/issues/issue-100605.stderr15
-rw-r--r--tests/ui/issues/issue-11047.rs4
-rw-r--r--tests/ui/issues/issue-11680.stderr8
-rw-r--r--tests/ui/issues/issue-11709.rs4
-rw-r--r--tests/ui/issues/issue-11740.rs2
-rw-r--r--tests/ui/issues/issue-11771.stderr32
-rw-r--r--tests/ui/issues/issue-12133-3.rs2
-rw-r--r--tests/ui/issues/issue-1251.rs16
-rw-r--r--tests/ui/issues/issue-1257.rs11
-rw-r--r--tests/ui/issues/issue-13167.rs2
-rw-r--r--tests/ui/issues/issue-1460.stderr4
-rw-r--r--tests/ui/issues/issue-15734.rs4
-rw-r--r--tests/ui/issues/issue-16538.mir.stderr29
-rw-r--r--tests/ui/issues/issue-16538.rs19
-rw-r--r--tests/ui/issues/issue-16538.thir.stderr29
-rw-r--r--tests/ui/issues/issue-17954.stderr2
-rw-r--r--tests/ui/issues/issue-18389.rs8
-rw-r--r--tests/ui/issues/issue-18389.stderr27
-rw-r--r--tests/ui/issues/issue-1871.rs12
-rw-r--r--tests/ui/issues/issue-1871.stderr9
-rw-r--r--tests/ui/issues/issue-20605.rs6
-rw-r--r--tests/ui/issues/issue-20605.stderr16
-rw-r--r--tests/ui/issues/issue-2063-resource.rs14
-rw-r--r--tests/ui/issues/issue-2063.rs22
-rw-r--r--tests/ui/issues/issue-20644.rs2
-rw-r--r--tests/ui/issues/issue-23808.rs8
-rw-r--r--tests/ui/issues/issue-24352.stderr4
-rw-r--r--tests/ui/issues/issue-28822.rs7
-rw-r--r--tests/ui/issues/issue-29798.rs11
-rw-r--r--tests/ui/issues/issue-3008-1.rs12
-rw-r--r--tests/ui/issues/issue-3008-1.stderr17
-rw-r--r--tests/ui/issues/issue-3008-2.rs6
-rw-r--r--tests/ui/issues/issue-3008-2.stderr14
-rw-r--r--tests/ui/issues/issue-3008-3.rs10
-rw-r--r--tests/ui/issues/issue-3008-3.stderr14
-rw-r--r--tests/ui/issues/issue-32709.stderr2
-rw-r--r--tests/ui/issues/issue-35570.rs1
-rw-r--r--tests/ui/issues/issue-35570.stderr12
-rw-r--r--tests/ui/issues/issue-37311-type-length-limit/issue-37311.rs1
-rw-r--r--tests/ui/issues/issue-37311-type-length-limit/issue-37311.stderr4
-rw-r--r--tests/ui/issues/issue-3794.rs32
-rw-r--r--tests/ui/issues/issue-50582.stderr16
-rw-r--r--tests/ui/issues/issue-50689.rs9
-rw-r--r--tests/ui/issues/issue-50811.rs1
-rw-r--r--tests/ui/issues/issue-50825-1.rs22
-rw-r--r--tests/ui/issues/issue-50825.rs15
-rw-r--r--tests/ui/issues/issue-51714.rs10
-rw-r--r--tests/ui/issues/issue-51714.stderr6
-rw-r--r--tests/ui/issues/issue-52049.stderr4
-rw-r--r--tests/ui/issues/issue-5439.stderr2
-rw-r--r--tests/ui/issues/issue-5883.rs2
-rw-r--r--tests/ui/issues/issue-5883.stderr18
-rw-r--r--tests/ui/issues/issue-67552.rs1
-rw-r--r--tests/ui/issues/issue-67552.stderr4
-rw-r--r--tests/ui/issues/issue-78115.rs19
-rw-r--r--tests/ui/issues/issue-85461.rs1
56 files changed, 112 insertions, 472 deletions
diff --git a/tests/ui/issues/issue-100605.stderr b/tests/ui/issues/issue-100605.stderr
index be30eef2a..6f11f4475 100644
--- a/tests/ui/issues/issue-100605.stderr
+++ b/tests/ui/issues/issue-100605.stderr
@@ -13,10 +13,6 @@ note: function defined here
|
LL | fn takes_option(_arg: Option<&String>) {}
| ^^^^^^^^^^^^ ---------------------
-help: you can convert from `&Option<T>` to `Option<&T>` using `.as_ref()`
- |
-LL | takes_option(None.as_ref());
- | ~~~~~~~~~~~~~
help: consider removing the borrow
|
LL - takes_option(&None);
@@ -27,10 +23,8 @@ error[E0308]: mismatched types
--> $DIR/issue-100605.rs:8:18
|
LL | takes_option(&res);
- | ------------ ^^^^
- | | |
- | | expected `Option<&String>`, found `&Option<String>`
- | | help: you can convert from `&Option<T>` to `Option<&T>` using `.as_ref()`: `res.as_ref()`
+ | ------------ ^^^^ expected `Option<&String>`, found `&Option<String>`
+ | |
| arguments to this function are incorrect
|
= note: expected enum `Option<&String>`
@@ -40,6 +34,11 @@ note: function defined here
|
LL | fn takes_option(_arg: Option<&String>) {}
| ^^^^^^^^^^^^ ---------------------
+help: try using `.as_ref()` to convert `&Option<String>` to `Option<&String>`
+ |
+LL - takes_option(&res);
+LL + takes_option(res.as_ref());
+ |
error: aborting due to 2 previous errors
diff --git a/tests/ui/issues/issue-11047.rs b/tests/ui/issues/issue-11047.rs
index 1fb2b5bb3..7a4acea45 100644
--- a/tests/ui/issues/issue-11047.rs
+++ b/tests/ui/issues/issue-11047.rs
@@ -18,8 +18,8 @@ pub mod foo {
fn main() {
type Ham = foo::bar::baz::Qux;
- let foo = foo::bar::baz::Qux::new(); // invoke directly
- let bar = Ham::new(); // invoke via type alias
+ let foo: () = foo::bar::baz::Qux::new(); // invoke directly
+ let bar: () = Ham::new(); // invoke via type alias
type StringVec = Vec<String>;
let sv = StringVec::new();
diff --git a/tests/ui/issues/issue-11680.stderr b/tests/ui/issues/issue-11680.stderr
index ea224af8e..5bcf93de8 100644
--- a/tests/ui/issues/issue-11680.stderr
+++ b/tests/ui/issues/issue-11680.stderr
@@ -2,7 +2,9 @@ error[E0603]: enum `Foo` is private
--> $DIR/issue-11680.rs:6:21
|
LL | let _b = other::Foo::Bar(1);
- | ^^^ private enum
+ | ^^^ --- tuple variant `Bar` is not publicly re-exported
+ | |
+ | private enum
|
note: the enum `Foo` is defined here
--> $DIR/auxiliary/issue-11680.rs:1:1
@@ -14,7 +16,9 @@ error[E0603]: enum `Foo` is private
--> $DIR/issue-11680.rs:9:27
|
LL | let _b = other::test::Foo::Bar(1);
- | ^^^ private enum
+ | ^^^ --- tuple variant `Bar` is not publicly re-exported
+ | |
+ | private enum
|
note: the enum `Foo` is defined here
--> $DIR/auxiliary/issue-11680.rs:6:5
diff --git a/tests/ui/issues/issue-11709.rs b/tests/ui/issues/issue-11709.rs
index 58424f9e4..2d6956649 100644
--- a/tests/ui/issues/issue-11709.rs
+++ b/tests/ui/issues/issue-11709.rs
@@ -10,7 +10,7 @@ struct S {x:()}
fn test(slot: &mut Option<Box<dyn FnMut() -> Box<dyn FnMut()>>>) -> () {
let a = slot.take();
- let _a = match a {
+ let _a: () = match a {
// `{let .. a(); }` would break
Some(mut a) => { let _a = a(); },
None => (),
@@ -28,7 +28,7 @@ fn not(b: bool) -> bool {
pub fn main() {
// {} would break
- let _r = {};
+ let _r: () = {};
let mut slot = None;
// `{ test(...); }` would break
let _s : S = S{ x: { test(&mut slot); } };
diff --git a/tests/ui/issues/issue-11740.rs b/tests/ui/issues/issue-11740.rs
index 9faeb7770..fa80f509b 100644
--- a/tests/ui/issues/issue-11740.rs
+++ b/tests/ui/issues/issue-11740.rs
@@ -24,5 +24,5 @@ impl Element {
fn main() {
let element = Element { attrs: Vec::new() };
- let _ = unsafe { element.get_attr("foo") };
+ unsafe { let () = element.get_attr("foo"); };
}
diff --git a/tests/ui/issues/issue-11771.stderr b/tests/ui/issues/issue-11771.stderr
index 161fce4b0..b37140f60 100644
--- a/tests/ui/issues/issue-11771.stderr
+++ b/tests/ui/issues/issue-11771.stderr
@@ -6,14 +6,14 @@ LL | 1 +
|
= help: the trait `Add<()>` is not implemented for `{integer}`
= help: the following other types implement trait `Add<Rhs>`:
- <&'a f32 as Add<f32>>
- <&'a f64 as Add<f64>>
- <&'a i128 as Add<i128>>
- <&'a i16 as Add<i16>>
- <&'a i32 as Add<i32>>
- <&'a i64 as Add<i64>>
- <&'a i8 as Add<i8>>
- <&'a isize as Add<isize>>
+ <isize as Add>
+ <isize as Add<&isize>>
+ <i8 as Add>
+ <i8 as Add<&i8>>
+ <i16 as Add>
+ <i16 as Add<&i16>>
+ <i32 as Add>
+ <i32 as Add<&i32>>
and 48 others
error[E0277]: cannot add `()` to `{integer}`
@@ -24,14 +24,14 @@ LL | 1 +
|
= help: the trait `Add<()>` is not implemented for `{integer}`
= help: the following other types implement trait `Add<Rhs>`:
- <&'a f32 as Add<f32>>
- <&'a f64 as Add<f64>>
- <&'a i128 as Add<i128>>
- <&'a i16 as Add<i16>>
- <&'a i32 as Add<i32>>
- <&'a i64 as Add<i64>>
- <&'a i8 as Add<i8>>
- <&'a isize as Add<isize>>
+ <isize as Add>
+ <isize as Add<&isize>>
+ <i8 as Add>
+ <i8 as Add<&i8>>
+ <i16 as Add>
+ <i16 as Add<&i16>>
+ <i32 as Add>
+ <i32 as Add<&i32>>
and 48 others
error: aborting due to 2 previous errors
diff --git a/tests/ui/issues/issue-12133-3.rs b/tests/ui/issues/issue-12133-3.rs
index e6b16e2da..988b61e3b 100644
--- a/tests/ui/issues/issue-12133-3.rs
+++ b/tests/ui/issues/issue-12133-3.rs
@@ -4,7 +4,7 @@
// aux-build:issue-12133-dylib2.rs
// ignore-emscripten no dylib support
// ignore-musl
-// ignore-sgx no dylib support
+// needs-dynamic-linking
// pretty-expanded FIXME #23616
diff --git a/tests/ui/issues/issue-1251.rs b/tests/ui/issues/issue-1251.rs
deleted file mode 100644
index c2c047c79..000000000
--- a/tests/ui/issues/issue-1251.rs
+++ /dev/null
@@ -1,16 +0,0 @@
-// build-pass
-#![allow(unused_attributes)]
-#![allow(dead_code)]
-// pretty-expanded FIXME #23616
-// ignore-wasm32-bare no libc to test ffi with
-#![feature(rustc_private)]
-
-mod rustrt {
- extern crate libc;
-
- extern "C" {
- pub fn rust_get_test_int() -> libc::intptr_t;
- }
-}
-
-pub fn main() {}
diff --git a/tests/ui/issues/issue-1257.rs b/tests/ui/issues/issue-1257.rs
deleted file mode 100644
index de5a6d359..000000000
--- a/tests/ui/issues/issue-1257.rs
+++ /dev/null
@@ -1,11 +0,0 @@
-// run-pass
-// pretty-expanded FIXME #23616
-
-pub fn main () {
- let mut line = "".to_string();
- let mut i = 0;
- while line != "exit".to_string() {
- line = if i == 9 { "exit".to_string() } else { "notexit".to_string() };
- i += 1;
- }
-}
diff --git a/tests/ui/issues/issue-13167.rs b/tests/ui/issues/issue-13167.rs
index 8584c98de..9a9f129ec 100644
--- a/tests/ui/issues/issue-13167.rs
+++ b/tests/ui/issues/issue-13167.rs
@@ -1,5 +1,7 @@
// check-pass
// pretty-expanded FIXME #23616
+// revisions: current next
+//[next] compile-flags: -Ztrait-solver=next
use std::slice;
diff --git a/tests/ui/issues/issue-1460.stderr b/tests/ui/issues/issue-1460.stderr
index eb7661fad..d4a8c8955 100644
--- a/tests/ui/issues/issue-1460.stderr
+++ b/tests/ui/issues/issue-1460.stderr
@@ -1,8 +1,8 @@
warning: unused closure that must be used
- --> $DIR/issue-1460.rs:6:5
+ --> $DIR/issue-1460.rs:6:6
|
LL | {|i: u32| if 1 == i { }};
- | ^^^^^^^^^^^^^^^^^^^^^^^^
+ | ^^^^^^^^^^^^^^^^^^^^^^
|
= note: closures are lazy and do nothing unless called
= note: `#[warn(unused_must_use)]` on by default
diff --git a/tests/ui/issues/issue-15734.rs b/tests/ui/issues/issue-15734.rs
index be5820606..27410d4c3 100644
--- a/tests/ui/issues/issue-15734.rs
+++ b/tests/ui/issues/issue-15734.rs
@@ -1,6 +1,6 @@
// run-pass
-// If `Index` used an associated type for its output, this test would
-// work more smoothly.
+// revisions: current next
+//[next] compile-flags: -Ztrait-solver=next
use std::ops::Index;
diff --git a/tests/ui/issues/issue-16538.mir.stderr b/tests/ui/issues/issue-16538.mir.stderr
deleted file mode 100644
index e320df4b7..000000000
--- a/tests/ui/issues/issue-16538.mir.stderr
+++ /dev/null
@@ -1,29 +0,0 @@
-error[E0015]: cannot call non-const fn `Y::foo` in statics
- --> $DIR/issue-16538.rs:14:23
- |
-LL | static foo: &Y::X = &*Y::foo(Y::x as *const Y::X);
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
- |
- = note: calls in statics are limited to constant functions, tuple structs and tuple variants
- = note: consider wrapping this expression in `Lazy::new(|| ...)` from the `once_cell` crate: https://crates.io/crates/once_cell
-
-error[E0133]: use of extern static is unsafe and requires unsafe function or block
- --> $DIR/issue-16538.rs:14:30
- |
-LL | static foo: &Y::X = &*Y::foo(Y::x as *const Y::X);
- | ^^^^ use of extern static
- |
- = note: extern statics are not controlled by the Rust type system: invalid data, aliasing violations or data races will cause undefined behavior
-
-error[E0133]: dereference of raw pointer is unsafe and requires unsafe function or block
- --> $DIR/issue-16538.rs:14:21
- |
-LL | static foo: &Y::X = &*Y::foo(Y::x as *const Y::X);
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ dereference of raw pointer
- |
- = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior
-
-error: aborting due to 3 previous errors
-
-Some errors have detailed explanations: E0015, E0133.
-For more information about an error, try `rustc --explain E0015`.
diff --git a/tests/ui/issues/issue-16538.rs b/tests/ui/issues/issue-16538.rs
deleted file mode 100644
index 270fa3014..000000000
--- a/tests/ui/issues/issue-16538.rs
+++ /dev/null
@@ -1,19 +0,0 @@
-// revisions: mir thir
-// [thir]compile-flags: -Z thir-unsafeck
-
-mod Y {
- pub type X = usize;
- extern "C" {
- pub static x: *const usize;
- }
- pub fn foo(value: *const X) -> *const X {
- value
- }
-}
-
-static foo: &Y::X = &*Y::foo(Y::x as *const Y::X);
-//~^ ERROR dereference of raw pointer
-//~| ERROR E0015
-//~| ERROR use of extern static is unsafe and requires
-
-fn main() {}
diff --git a/tests/ui/issues/issue-16538.thir.stderr b/tests/ui/issues/issue-16538.thir.stderr
deleted file mode 100644
index 4a8628692..000000000
--- a/tests/ui/issues/issue-16538.thir.stderr
+++ /dev/null
@@ -1,29 +0,0 @@
-error[E0133]: dereference of raw pointer is unsafe and requires unsafe function or block
- --> $DIR/issue-16538.rs:14:22
- |
-LL | static foo: &Y::X = &*Y::foo(Y::x as *const Y::X);
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ dereference of raw pointer
- |
- = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior
-
-error[E0133]: use of extern static is unsafe and requires unsafe function or block
- --> $DIR/issue-16538.rs:14:30
- |
-LL | static foo: &Y::X = &*Y::foo(Y::x as *const Y::X);
- | ^^^^ use of extern static
- |
- = note: extern statics are not controlled by the Rust type system: invalid data, aliasing violations or data races will cause undefined behavior
-
-error[E0015]: cannot call non-const fn `Y::foo` in statics
- --> $DIR/issue-16538.rs:14:23
- |
-LL | static foo: &Y::X = &*Y::foo(Y::x as *const Y::X);
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
- |
- = note: calls in statics are limited to constant functions, tuple structs and tuple variants
- = note: consider wrapping this expression in `Lazy::new(|| ...)` from the `once_cell` crate: https://crates.io/crates/once_cell
-
-error: aborting due to 3 previous errors
-
-Some errors have detailed explanations: E0015, E0133.
-For more information about an error, try `rustc --explain E0015`.
diff --git a/tests/ui/issues/issue-17954.stderr b/tests/ui/issues/issue-17954.stderr
index e08375fee..3e3706bcb 100644
--- a/tests/ui/issues/issue-17954.stderr
+++ b/tests/ui/issues/issue-17954.stderr
@@ -5,7 +5,7 @@ LL | let a = &FOO;
| ^^^^ thread-local variables cannot be borrowed beyond the end of the function
...
LL | }
- | - end of enclosing function is here
+ | - end of enclosing function is here
error: aborting due to previous error
diff --git a/tests/ui/issues/issue-18389.rs b/tests/ui/issues/issue-18389.rs
index 654dfb63b..05a5decf4 100644
--- a/tests/ui/issues/issue-18389.rs
+++ b/tests/ui/issues/issue-18389.rs
@@ -1,3 +1,10 @@
+#![feature(type_privacy_lints)]
+#![warn(private_bounds)]
+
+// In this test both old and new private-in-public diagnostic were emitted.
+// Old diagnostic will be deleted soon.
+// See https://rust-lang.github.io/rfcs/2145-type-privacy.html.
+
use std::any::Any;
use std::any::TypeId;
@@ -6,6 +13,7 @@ trait Private<P, R> {
}
pub trait Public: Private<
//~^ ERROR private trait `Private<<Self as Public>::P, <Self as Public>::R>` in public interface
+//~| WARNING trait `Private<<Self as Public>::P, <Self as Public>::R>` is more private than the item `Public`
<Self as Public>::P,
<Self as Public>::R
> {
diff --git a/tests/ui/issues/issue-18389.stderr b/tests/ui/issues/issue-18389.stderr
index 6ce78c45d..18ffc4177 100644
--- a/tests/ui/issues/issue-18389.stderr
+++ b/tests/ui/issues/issue-18389.stderr
@@ -1,16 +1,39 @@
error[E0445]: private trait `Private<<Self as Public>::P, <Self as Public>::R>` in public interface
- --> $DIR/issue-18389.rs:7:1
+ --> $DIR/issue-18389.rs:14:1
|
LL | trait Private<P, R> {
| ------------------- `Private<<Self as Public>::P, <Self as Public>::R>` declared as private
...
LL | / pub trait Public: Private<
LL | |
+LL | |
LL | | <Self as Public>::P,
LL | | <Self as Public>::R
LL | | > {
| |_^ can't leak private trait
-error: aborting due to previous error
+warning: trait `Private<<Self as Public>::P, <Self as Public>::R>` is more private than the item `Public`
+ --> $DIR/issue-18389.rs:14:1
+ |
+LL | / pub trait Public: Private<
+LL | |
+LL | |
+LL | | <Self as Public>::P,
+LL | | <Self as Public>::R
+LL | | > {
+ | |_^ trait `Public` is reachable at visibility `pub`
+ |
+note: but trait `Private<<Self as Public>::P, <Self as Public>::R>` is only usable at visibility `pub(crate)`
+ --> $DIR/issue-18389.rs:11:1
+ |
+LL | trait Private<P, R> {
+ | ^^^^^^^^^^^^^^^^^^^
+note: the lint level is defined here
+ --> $DIR/issue-18389.rs:2:9
+ |
+LL | #![warn(private_bounds)]
+ | ^^^^^^^^^^^^^^
+
+error: aborting due to previous error; 1 warning emitted
For more information about this error, try `rustc --explain E0445`.
diff --git a/tests/ui/issues/issue-1871.rs b/tests/ui/issues/issue-1871.rs
deleted file mode 100644
index f7a2bdd56..000000000
--- a/tests/ui/issues/issue-1871.rs
+++ /dev/null
@@ -1,12 +0,0 @@
-// Tests that we don't generate a spurious error about f.honk's type
-// being undeterminable
-fn main() {
- let f = 42;
-
- let _g = if f < 5 {
- f.honk() //~ ERROR no method named `honk` found
- }
- else {
- ()
- };
-}
diff --git a/tests/ui/issues/issue-1871.stderr b/tests/ui/issues/issue-1871.stderr
deleted file mode 100644
index b774ca22d..000000000
--- a/tests/ui/issues/issue-1871.stderr
+++ /dev/null
@@ -1,9 +0,0 @@
-error[E0599]: no method named `honk` found for type `{integer}` in the current scope
- --> $DIR/issue-1871.rs:7:9
- |
-LL | f.honk()
- | ^^^^ method not found in `{integer}`
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/issues/issue-20605.rs b/tests/ui/issues/issue-20605.rs
deleted file mode 100644
index 17b7d32eb..000000000
--- a/tests/ui/issues/issue-20605.rs
+++ /dev/null
@@ -1,6 +0,0 @@
-fn changer<'a>(mut things: Box<dyn Iterator<Item=&'a mut u8>>) {
- for item in *things { *item = 0 }
-//~^ ERROR the size for values of type
-}
-
-fn main() {}
diff --git a/tests/ui/issues/issue-20605.stderr b/tests/ui/issues/issue-20605.stderr
deleted file mode 100644
index e1858b639..000000000
--- a/tests/ui/issues/issue-20605.stderr
+++ /dev/null
@@ -1,16 +0,0 @@
-error[E0277]: the size for values of type `dyn Iterator<Item = &'a mut u8>` cannot be known at compilation time
- --> $DIR/issue-20605.rs:2:17
- |
-LL | for item in *things { *item = 0 }
- | ^^^^^^^ the trait `IntoIterator` is not implemented for `dyn Iterator<Item = &'a mut u8>`
- |
- = note: the trait bound `dyn Iterator<Item = &'a mut u8>: IntoIterator` is not satisfied
- = note: required for `dyn Iterator<Item = &'a mut u8>` to implement `IntoIterator`
-help: consider mutably borrowing here
- |
-LL | for item in &mut *things { *item = 0 }
- | ++++
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/issues/issue-2063-resource.rs b/tests/ui/issues/issue-2063-resource.rs
deleted file mode 100644
index 1d0527447..000000000
--- a/tests/ui/issues/issue-2063-resource.rs
+++ /dev/null
@@ -1,14 +0,0 @@
-// check-pass
-#![allow(dead_code)]
-// test that autoderef of a type like this does not
-// cause compiler to loop. Note that no instances
-// of such a type could ever be constructed.
-
-struct S {
- x: X,
- to_str: (),
-}
-
-struct X(Box<S>);
-
-fn main() {}
diff --git a/tests/ui/issues/issue-2063.rs b/tests/ui/issues/issue-2063.rs
deleted file mode 100644
index f08f9d4cf..000000000
--- a/tests/ui/issues/issue-2063.rs
+++ /dev/null
@@ -1,22 +0,0 @@
-// run-pass
-// test that autoderef of a type like this does not
-// cause compiler to loop. Note that no instances
-// of such a type could ever be constructed.
-
-struct T(#[allow(unused_tuple_struct_fields)] Box<T>);
-
-trait ToStr2 {
- fn my_to_string(&self) -> String;
-}
-
-impl ToStr2 for T {
- fn my_to_string(&self) -> String { "t".to_string() }
-}
-
-#[allow(dead_code)]
-fn new_t(x: T) {
- x.my_to_string();
-}
-
-fn main() {
-}
diff --git a/tests/ui/issues/issue-20644.rs b/tests/ui/issues/issue-20644.rs
index 1b90727fb..a3a9ea740 100644
--- a/tests/ui/issues/issue-20644.rs
+++ b/tests/ui/issues/issue-20644.rs
@@ -26,7 +26,7 @@ fn foo() {
let cwd = env::current_dir().unwrap();
let src = cwd.clone();
let summary = File::open(&src.join("SUMMARY.md")).unwrap();
- let _ = parse_summary(summary, &src);
+ parse_summary(summary, &src);
}
fn main() {}
diff --git a/tests/ui/issues/issue-23808.rs b/tests/ui/issues/issue-23808.rs
index 0988b09fc..b10682521 100644
--- a/tests/ui/issues/issue-23808.rs
+++ b/tests/ui/issues/issue-23808.rs
@@ -45,14 +45,14 @@ impl_Const!(ConstStruct, ConstEnum, AliasedConstStruct, AliasedConstEnum);
impl_StaticFn!(StaticFnStruct, StaticFnEnum, AliasedStaticFnStruct, AliasedStaticFnEnum);
fn main() {
- let _ = ConstStruct::C;
- let _ = ConstEnum::C;
+ let () = ConstStruct::C;
+ let () = ConstEnum::C;
StaticFnStruct::sfn();
StaticFnEnum::sfn();
- let _ = AliasConstStruct::C;
- let _ = AliasConstEnum::C;
+ let () = AliasConstStruct::C;
+ let () = AliasConstEnum::C;
AliasStaticFnStruct::sfn();
AliasStaticFnEnum::sfn();
diff --git a/tests/ui/issues/issue-24352.stderr b/tests/ui/issues/issue-24352.stderr
index 1f51b6e29..f1c3891b8 100644
--- a/tests/ui/issues/issue-24352.stderr
+++ b/tests/ui/issues/issue-24352.stderr
@@ -6,10 +6,10 @@ LL | 1.0f64 - 1
|
= help: the trait `Sub<{integer}>` is not implemented for `f64`
= help: the following other types implement trait `Sub<Rhs>`:
+ <f64 as Sub>
+ <f64 as Sub<&f64>>
<&'a f64 as Sub<f64>>
<&f64 as Sub<&f64>>
- <f64 as Sub<&f64>>
- <f64 as Sub>
help: consider using a floating-point literal by writing it with `.0`
|
LL | 1.0f64 - 1.0
diff --git a/tests/ui/issues/issue-28822.rs b/tests/ui/issues/issue-28822.rs
deleted file mode 100644
index 10e5d1dd0..000000000
--- a/tests/ui/issues/issue-28822.rs
+++ /dev/null
@@ -1,7 +0,0 @@
-// check-pass
-#![allow(dead_code)]
-
-fn main() {}
-
-const fn size_ofs(_: usize) {}
-const fn size_ofs2(_foo: usize) {}
diff --git a/tests/ui/issues/issue-29798.rs b/tests/ui/issues/issue-29798.rs
deleted file mode 100644
index 5eff5d191..000000000
--- a/tests/ui/issues/issue-29798.rs
+++ /dev/null
@@ -1,11 +0,0 @@
-// run-fail
-// error-pattern:index out of bounds: the len is 5 but the index is 5
-// ignore-emscripten no processes
-
-const fn test(x: usize) -> i32 {
- [42;5][x]
-}
-
-fn main () {
- let _ = test(5);
-}
diff --git a/tests/ui/issues/issue-3008-1.rs b/tests/ui/issues/issue-3008-1.rs
deleted file mode 100644
index 1124969e6..000000000
--- a/tests/ui/issues/issue-3008-1.rs
+++ /dev/null
@@ -1,12 +0,0 @@
-enum Foo {
- Foo_(Bar)
-}
-
-enum Bar {
- //~^ ERROR recursive type `Bar` has infinite size
- BarNone,
- BarSome(Bar)
-}
-
-fn main() {
-}
diff --git a/tests/ui/issues/issue-3008-1.stderr b/tests/ui/issues/issue-3008-1.stderr
deleted file mode 100644
index be25b9091..000000000
--- a/tests/ui/issues/issue-3008-1.stderr
+++ /dev/null
@@ -1,17 +0,0 @@
-error[E0072]: recursive type `Bar` has infinite size
- --> $DIR/issue-3008-1.rs:5:1
- |
-LL | enum Bar {
- | ^^^^^^^^
-...
-LL | BarSome(Bar)
- | --- recursive without indirection
- |
-help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle
- |
-LL | BarSome(Box<Bar>)
- | ++++ +
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0072`.
diff --git a/tests/ui/issues/issue-3008-2.rs b/tests/ui/issues/issue-3008-2.rs
deleted file mode 100644
index 5846c69da..000000000
--- a/tests/ui/issues/issue-3008-2.rs
+++ /dev/null
@@ -1,6 +0,0 @@
-enum Foo { Foo_(Bar) }
-struct Bar { x: Bar }
-//~^ ERROR E0072
-
-fn main() {
-}
diff --git a/tests/ui/issues/issue-3008-2.stderr b/tests/ui/issues/issue-3008-2.stderr
deleted file mode 100644
index 858a8fd6a..000000000
--- a/tests/ui/issues/issue-3008-2.stderr
+++ /dev/null
@@ -1,14 +0,0 @@
-error[E0072]: recursive type `Bar` has infinite size
- --> $DIR/issue-3008-2.rs:2:1
- |
-LL | struct Bar { x: Bar }
- | ^^^^^^^^^^ --- recursive without indirection
- |
-help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle
- |
-LL | struct Bar { x: Box<Bar> }
- | ++++ +
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0072`.
diff --git a/tests/ui/issues/issue-3008-3.rs b/tests/ui/issues/issue-3008-3.rs
deleted file mode 100644
index 212eb2eb8..000000000
--- a/tests/ui/issues/issue-3008-3.rs
+++ /dev/null
@@ -1,10 +0,0 @@
-use std::marker;
-
-enum E1 { V1(E2<E1>), }
-enum E2<T> { V2(E2<E1>, marker::PhantomData<T>), }
-//~^ ERROR recursive type `E2` has infinite size
-
-impl E1 { fn foo(&self) {} }
-
-fn main() {
-}
diff --git a/tests/ui/issues/issue-3008-3.stderr b/tests/ui/issues/issue-3008-3.stderr
deleted file mode 100644
index a1a81e293..000000000
--- a/tests/ui/issues/issue-3008-3.stderr
+++ /dev/null
@@ -1,14 +0,0 @@
-error[E0072]: recursive type `E2` has infinite size
- --> $DIR/issue-3008-3.rs:4:1
- |
-LL | enum E2<T> { V2(E2<E1>, marker::PhantomData<T>), }
- | ^^^^^^^^^^ ------ recursive without indirection
- |
-help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle
- |
-LL | enum E2<T> { V2(Box<E2<E1>>, marker::PhantomData<T>), }
- | ++++ +
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0072`.
diff --git a/tests/ui/issues/issue-32709.stderr b/tests/ui/issues/issue-32709.stderr
index a4ba5da4d..94e8f9295 100644
--- a/tests/ui/issues/issue-32709.stderr
+++ b/tests/ui/issues/issue-32709.stderr
@@ -8,6 +8,7 @@ LL | Err(5)?;
|
= note: the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait
= help: the following other types implement trait `From<T>`:
+ <(T,) as From<[T; 1]>>
<(T, T) as From<[T; 2]>>
<(T, T, T) as From<[T; 3]>>
<(T, T, T, T) as From<[T; 4]>>
@@ -15,7 +16,6 @@ LL | Err(5)?;
<(T, T, T, T, T, T) as From<[T; 6]>>
<(T, T, T, T, T, T, T) as From<[T; 7]>>
<(T, T, T, T, T, T, T, T) as From<[T; 8]>>
- <(T, T, T, T, T, T, T, T, T) as From<[T; 9]>>
and 4 others
= note: required for `Result<i32, ()>` to implement `FromResidual<Result<Infallible, {integer}>>`
diff --git a/tests/ui/issues/issue-35570.rs b/tests/ui/issues/issue-35570.rs
index a2b0222d4..42bdb423f 100644
--- a/tests/ui/issues/issue-35570.rs
+++ b/tests/ui/issues/issue-35570.rs
@@ -7,7 +7,6 @@ trait Trait2<'a> {
fn _ice(param: Box<dyn for <'a> Trait1<<() as Trait2<'a>>::Ty>>) {
//~^ ERROR the trait bound `for<'a> (): Trait2<'a>` is not satisfied
- //~| ERROR the trait bound `for<'a> (): Trait2<'a>` is not satisfied
let _e: (usize, usize) = unsafe{mem::transmute(param)};
}
diff --git a/tests/ui/issues/issue-35570.stderr b/tests/ui/issues/issue-35570.stderr
index 3dc33729d..2697d46bd 100644
--- a/tests/ui/issues/issue-35570.stderr
+++ b/tests/ui/issues/issue-35570.stderr
@@ -4,16 +4,6 @@ error[E0277]: the trait bound `for<'a> (): Trait2<'a>` is not satisfied
LL | fn _ice(param: Box<dyn for <'a> Trait1<<() as Trait2<'a>>::Ty>>) {
| ^^^^^^^^^^^^^^^^^^^^^^ the trait `for<'a> Trait2<'a>` is not implemented for `()`
-error[E0277]: the trait bound `for<'a> (): Trait2<'a>` is not satisfied
- --> $DIR/issue-35570.rs:8:1
- |
-LL | / fn _ice(param: Box<dyn for <'a> Trait1<<() as Trait2<'a>>::Ty>>) {
-LL | |
-LL | |
-LL | | let _e: (usize, usize) = unsafe{mem::transmute(param)};
-LL | | }
- | |_^ the trait `for<'a> Trait2<'a>` is not implemented for `()`
-
-error: aborting due to 2 previous errors
+error: aborting due to previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/issues/issue-37311-type-length-limit/issue-37311.rs b/tests/ui/issues/issue-37311-type-length-limit/issue-37311.rs
index 50d1f166c..c109be005 100644
--- a/tests/ui/issues/issue-37311-type-length-limit/issue-37311.rs
+++ b/tests/ui/issues/issue-37311-type-length-limit/issue-37311.rs
@@ -1,5 +1,6 @@
// build-fail
// normalize-stderr-test: ".nll/" -> "/"
+// ignore-compare-mode-next-solver (hangs)
trait Mirror {
type Image;
diff --git a/tests/ui/issues/issue-37311-type-length-limit/issue-37311.stderr b/tests/ui/issues/issue-37311-type-length-limit/issue-37311.stderr
index 5b8299fe8..87832dd29 100644
--- a/tests/ui/issues/issue-37311-type-length-limit/issue-37311.stderr
+++ b/tests/ui/issues/issue-37311-type-length-limit/issue-37311.stderr
@@ -1,11 +1,11 @@
error: reached the recursion limit while instantiating `<(&(&(..., ...), ...), ...) as Foo>::recurse`
- --> $DIR/issue-37311.rs:17:9
+ --> $DIR/issue-37311.rs:18:9
|
LL | (self, self).recurse();
| ^^^^^^^^^^^^^^^^^^^^^^
|
note: `<T as Foo>::recurse` defined here
- --> $DIR/issue-37311.rs:16:5
+ --> $DIR/issue-37311.rs:17:5
|
LL | fn recurse(&self) {
| ^^^^^^^^^^^^^^^^^
diff --git a/tests/ui/issues/issue-3794.rs b/tests/ui/issues/issue-3794.rs
deleted file mode 100644
index b1f028fbc..000000000
--- a/tests/ui/issues/issue-3794.rs
+++ /dev/null
@@ -1,32 +0,0 @@
-// run-pass
-#![allow(dead_code)]
-
-trait T {
- fn print(&self);
-}
-
-#[derive(Debug)]
-struct S {
- s: isize,
-}
-
-impl T for S {
- fn print(&self) {
- println!("{:?}", self);
- }
-}
-
-fn print_t(t: &dyn T) {
- t.print();
-}
-
-fn print_s(s: &S) {
- s.print();
-}
-
-pub fn main() {
- let s: Box<S> = Box::new(S { s: 5 });
- print_s(&*s);
- let t: Box<dyn T> = s as Box<dyn T>;
- print_t(&*t);
-}
diff --git a/tests/ui/issues/issue-50582.stderr b/tests/ui/issues/issue-50582.stderr
index 3d527eb6b..9eafd7ab4 100644
--- a/tests/ui/issues/issue-50582.stderr
+++ b/tests/ui/issues/issue-50582.stderr
@@ -15,14 +15,14 @@ LL | Vec::<[(); 1 + for x in 0..1 {}]>::new();
|
= help: the trait `Add<()>` is not implemented for `{integer}`
= help: the following other types implement trait `Add<Rhs>`:
- <&'a f32 as Add<f32>>
- <&'a f64 as Add<f64>>
- <&'a i128 as Add<i128>>
- <&'a i16 as Add<i16>>
- <&'a i32 as Add<i32>>
- <&'a i64 as Add<i64>>
- <&'a i8 as Add<i8>>
- <&'a isize as Add<isize>>
+ <isize as Add>
+ <isize as Add<&isize>>
+ <i8 as Add>
+ <i8 as Add<&i8>>
+ <i16 as Add>
+ <i16 as Add<&i16>>
+ <i32 as Add>
+ <i32 as Add<&i32>>
and 48 others
error: aborting due to 2 previous errors
diff --git a/tests/ui/issues/issue-50689.rs b/tests/ui/issues/issue-50689.rs
deleted file mode 100644
index b49f29500..000000000
--- a/tests/ui/issues/issue-50689.rs
+++ /dev/null
@@ -1,9 +0,0 @@
-// run-pass
-#![allow(unused_variables)]
-enum Foo {
- Bar = (|x: i32| { }, 42).1,
-}
-
-fn main() {
- assert_eq!(Foo::Bar as usize, 42);
-}
diff --git a/tests/ui/issues/issue-50811.rs b/tests/ui/issues/issue-50811.rs
index 683c85604..2a20e50fa 100644
--- a/tests/ui/issues/issue-50811.rs
+++ b/tests/ui/issues/issue-50811.rs
@@ -1,5 +1,6 @@
// run-pass
#![feature(test)]
+#![allow(invalid_nan_comparisons)]
extern crate test;
diff --git a/tests/ui/issues/issue-50825-1.rs b/tests/ui/issues/issue-50825-1.rs
deleted file mode 100644
index ee4316029..000000000
--- a/tests/ui/issues/issue-50825-1.rs
+++ /dev/null
@@ -1,22 +0,0 @@
-// run-pass
-// regression test for issue #50825
-// Make sure that the `impl` bound (): X<T = ()> is preferred over
-// the (): X bound in the where clause.
-
-trait X {
- type T;
-}
-
-trait Y<U>: X {
- fn foo(x: &Self::T);
-}
-
-impl X for () {
- type T = ();
-}
-
-impl<T> Y<Vec<T>> for () where (): Y<T> {
- fn foo(_x: &()) {}
-}
-
-fn main () {}
diff --git a/tests/ui/issues/issue-50825.rs b/tests/ui/issues/issue-50825.rs
deleted file mode 100644
index 1ece2e9fc..000000000
--- a/tests/ui/issues/issue-50825.rs
+++ /dev/null
@@ -1,15 +0,0 @@
-// run-pass
-// regression test for issue #50825
-// Make sure that the built-in bound {integer}: Sized is preferred over
-// the u64: Sized bound in the where clause.
-
-fn foo(y: &[()])
-where
- u64: Sized,
-{
- y[0]
-}
-
-fn main () {
- foo(&[()]);
-}
diff --git a/tests/ui/issues/issue-51714.rs b/tests/ui/issues/issue-51714.rs
index 8716524d6..03b50b796 100644
--- a/tests/ui/issues/issue-51714.rs
+++ b/tests/ui/issues/issue-51714.rs
@@ -1,9 +1,9 @@
fn main() {
-//~^ NOTE: not the enclosing function body
-//~| NOTE: not the enclosing function body
-//~| NOTE: not the enclosing function body
-//~| NOTE: not the enclosing function body
- |_: [_; return || {}] | {};
+ //~^ NOTE: not the enclosing function body
+ //~| NOTE: not the enclosing function body
+ //~| NOTE: not the enclosing function body
+ //~| NOTE: not the enclosing function body
+ |_: [_; return || {}]| {};
//~^ ERROR: return statement outside of function body [E0572]
//~| NOTE: the return is part of this body...
diff --git a/tests/ui/issues/issue-51714.stderr b/tests/ui/issues/issue-51714.stderr
index 514d69c1c..e53e10afc 100644
--- a/tests/ui/issues/issue-51714.stderr
+++ b/tests/ui/issues/issue-51714.stderr
@@ -1,13 +1,13 @@
error[E0572]: return statement outside of function body
- --> $DIR/issue-51714.rs:6:14
+ --> $DIR/issue-51714.rs:6:13
|
LL | / fn main() {
LL | |
LL | |
LL | |
LL | |
-LL | | |_: [_; return || {}] | {};
- | | ^^^^^^^^^^^^ the return is part of this body...
+LL | | |_: [_; return || {}]| {};
+ | | ^^^^^^^^^^^^ the return is part of this body...
... |
LL | |
LL | | }
diff --git a/tests/ui/issues/issue-52049.stderr b/tests/ui/issues/issue-52049.stderr
index b25dbd1cb..0812976cf 100644
--- a/tests/ui/issues/issue-52049.stderr
+++ b/tests/ui/issues/issue-52049.stderr
@@ -2,12 +2,10 @@ error[E0716]: temporary value dropped while borrowed
--> $DIR/issue-52049.rs:6:10
|
LL | foo(&unpromotable(5u32));
- | -----^^^^^^^^^^^^^^^^^^-
+ | -----^^^^^^^^^^^^^^^^^^-- temporary value is freed at the end of this statement
| | |
| | creates a temporary value which is freed while still in use
| argument requires that borrow lasts for `'static`
-LL | }
- | - temporary value is freed at the end of this statement
error: aborting due to previous error
diff --git a/tests/ui/issues/issue-5439.stderr b/tests/ui/issues/issue-5439.stderr
index dc8f8b878..a91e4b31f 100644
--- a/tests/ui/issues/issue-5439.stderr
+++ b/tests/ui/issues/issue-5439.stderr
@@ -4,7 +4,7 @@ error[E0560]: struct `Foo` has no field named `nonexistent`
LL | return Box::new(Foo { nonexistent: self, foo: i });
| ^^^^^^^^^^^ `Foo` does not have this field
|
- = note: available fields are: `foo`
+ = note: all struct fields are already assigned
error: aborting due to previous error
diff --git a/tests/ui/issues/issue-5883.rs b/tests/ui/issues/issue-5883.rs
index 82866b355..f9dd2c54d 100644
--- a/tests/ui/issues/issue-5883.rs
+++ b/tests/ui/issues/issue-5883.rs
@@ -6,7 +6,7 @@ struct Struct {
fn new_struct(
r: dyn A + 'static //~ ERROR the size for values of type
-) -> Struct { //~ ERROR the size for values of type
+) -> Struct {
Struct { r: r }
}
diff --git a/tests/ui/issues/issue-5883.stderr b/tests/ui/issues/issue-5883.stderr
index ffff403e0..a3e2531b5 100644
--- a/tests/ui/issues/issue-5883.stderr
+++ b/tests/ui/issues/issue-5883.stderr
@@ -15,22 +15,6 @@ help: function arguments must have a statically known size, borrowed types alway
LL | r: &dyn A + 'static
| +
-error[E0277]: the size for values of type `(dyn A + 'static)` cannot be known at compilation time
- --> $DIR/issue-5883.rs:9:6
- |
-LL | ) -> Struct {
- | ^^^^^^ doesn't have a size known at compile-time
-LL | Struct { r: r }
- | --------------- this returned value is of type `Struct`
- |
- = help: within `Struct`, the trait `Sized` is not implemented for `(dyn A + 'static)`
-note: required because it appears within the type `Struct`
- --> $DIR/issue-5883.rs:3:8
- |
-LL | struct Struct {
- | ^^^^^^
- = note: the return type of a function must have a statically known size
-
-error: aborting due to 2 previous errors
+error: aborting due to previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/issues/issue-67552.rs b/tests/ui/issues/issue-67552.rs
index ec1997ccd..7336b873d 100644
--- a/tests/ui/issues/issue-67552.rs
+++ b/tests/ui/issues/issue-67552.rs
@@ -1,6 +1,7 @@
// build-fail
// compile-flags: -Copt-level=0
// normalize-stderr-test: ".nll/" -> "/"
+// ignore-compare-mode-next-solver (hangs)
fn main() {
rec(Empty);
diff --git a/tests/ui/issues/issue-67552.stderr b/tests/ui/issues/issue-67552.stderr
index 4746f918b..f93ed67da 100644
--- a/tests/ui/issues/issue-67552.stderr
+++ b/tests/ui/issues/issue-67552.stderr
@@ -1,11 +1,11 @@
error: reached the recursion limit while instantiating `rec::<&mut &mut &mut &mut &mut ...>`
- --> $DIR/issue-67552.rs:29:9
+ --> $DIR/issue-67552.rs:30:9
|
LL | rec(identity(&mut it))
| ^^^^^^^^^^^^^^^^^^^^^^
|
note: `rec` defined here
- --> $DIR/issue-67552.rs:22:1
+ --> $DIR/issue-67552.rs:23:1
|
LL | / fn rec<T>(mut it: T)
LL | | where
diff --git a/tests/ui/issues/issue-78115.rs b/tests/ui/issues/issue-78115.rs
deleted file mode 100644
index ac18470c6..000000000
--- a/tests/ui/issues/issue-78115.rs
+++ /dev/null
@@ -1,19 +0,0 @@
-// Regression test for issue #78115: "ICE: variable should be placed in scope earlier"
-
-// check-pass
-// edition:2018
-
-#[allow(dead_code)]
-struct Foo {
- a: ()
-}
-
-async fn _bar() {
- let foo = Foo { a: () };
- match foo {
- Foo { a: _a } | Foo { a: _a } if true => {}
- _ => {}
- }
-}
-
-fn main() {}
diff --git a/tests/ui/issues/issue-85461.rs b/tests/ui/issues/issue-85461.rs
index 965510887..092105df2 100644
--- a/tests/ui/issues/issue-85461.rs
+++ b/tests/ui/issues/issue-85461.rs
@@ -1,6 +1,7 @@
// compile-flags: -Cinstrument-coverage -Ccodegen-units=4 --crate-type dylib -Copt-level=0
// build-pass
// needs-profiler-support
+// needs-dynamic-linking
// Regression test for #85461 where MSVC sometimes fails to link instrument-coverage binaries
// with dead code and #[inline(always)].