diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-30 03:57:31 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-30 03:57:31 +0000 |
commit | dc0db358abe19481e475e10c32149b53370f1a1c (patch) | |
tree | ab8ce99c4b255ce46f99ef402c27916055b899ee /tests/ui/issues | |
parent | Releasing progress-linux version 1.71.1+dfsg1-2~progress7.99u1. (diff) | |
download | rustc-dc0db358abe19481e475e10c32149b53370f1a1c.tar.xz rustc-dc0db358abe19481e475e10c32149b53370f1a1c.zip |
Merging upstream version 1.72.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
56 files changed, 112 insertions, 123 deletions
diff --git a/tests/ui/issues/issue-78115.rs b/tests/ui/async-await/issue-78115.rs index ac18470c6..ac18470c6 100644 --- a/tests/ui/issues/issue-78115.rs +++ b/tests/ui/async-await/issue-78115.rs diff --git a/tests/ui/issues/issue-3794.rs b/tests/ui/coercion/issue-3794.rs index b1f028fbc..b1f028fbc 100644 --- a/tests/ui/issues/issue-3794.rs +++ b/tests/ui/coercion/issue-3794.rs diff --git a/tests/ui/issues/issue-16538.mir.stderr b/tests/ui/consts/issue-16538.mir.stderr index e320df4b7..e320df4b7 100644 --- a/tests/ui/issues/issue-16538.mir.stderr +++ b/tests/ui/consts/issue-16538.mir.stderr diff --git a/tests/ui/issues/issue-16538.rs b/tests/ui/consts/issue-16538.rs index 270fa3014..270fa3014 100644 --- a/tests/ui/issues/issue-16538.rs +++ b/tests/ui/consts/issue-16538.rs diff --git a/tests/ui/issues/issue-16538.thir.stderr b/tests/ui/consts/issue-16538.thir.stderr index 4a8628692..4a8628692 100644 --- a/tests/ui/issues/issue-16538.thir.stderr +++ b/tests/ui/consts/issue-16538.thir.stderr diff --git a/tests/ui/issues/issue-28822.rs b/tests/ui/consts/issue-28822.rs index 10e5d1dd0..10e5d1dd0 100644 --- a/tests/ui/issues/issue-28822.rs +++ b/tests/ui/consts/issue-28822.rs diff --git a/tests/ui/issues/issue-29798.rs b/tests/ui/consts/issue-29798.rs index 5eff5d191..5eff5d191 100644 --- a/tests/ui/issues/issue-29798.rs +++ b/tests/ui/consts/issue-29798.rs diff --git a/tests/ui/issues/issue-50689.rs b/tests/ui/enum-discriminant/issue-50689.rs index b49f29500..b49f29500 100644 --- a/tests/ui/issues/issue-50689.rs +++ b/tests/ui/enum-discriminant/issue-50689.rs diff --git a/tests/ui/issues/issue-1251.rs b/tests/ui/extern/issue-1251.rs index c2c047c79..c2c047c79 100644 --- a/tests/ui/issues/issue-1251.rs +++ b/tests/ui/extern/issue-1251.rs diff --git a/tests/ui/issues/issue-1257.rs b/tests/ui/for-loop-while/issue-1257.rs index de5a6d359..de5a6d359 100644 --- a/tests/ui/issues/issue-1257.rs +++ b/tests/ui/for-loop-while/issue-1257.rs 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-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-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-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-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-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-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-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-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-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)]. diff --git a/tests/ui/issues/issue-3008-1.rs b/tests/ui/structs-enums/issue-3008-1.rs index 1124969e6..1124969e6 100644 --- a/tests/ui/issues/issue-3008-1.rs +++ b/tests/ui/structs-enums/issue-3008-1.rs diff --git a/tests/ui/issues/issue-3008-1.stderr b/tests/ui/structs-enums/issue-3008-1.stderr index be25b9091..be25b9091 100644 --- a/tests/ui/issues/issue-3008-1.stderr +++ b/tests/ui/structs-enums/issue-3008-1.stderr diff --git a/tests/ui/issues/issue-3008-2.rs b/tests/ui/structs-enums/issue-3008-2.rs index 5846c69da..5846c69da 100644 --- a/tests/ui/issues/issue-3008-2.rs +++ b/tests/ui/structs-enums/issue-3008-2.rs diff --git a/tests/ui/issues/issue-3008-2.stderr b/tests/ui/structs-enums/issue-3008-2.stderr index 858a8fd6a..858a8fd6a 100644 --- a/tests/ui/issues/issue-3008-2.stderr +++ b/tests/ui/structs-enums/issue-3008-2.stderr diff --git a/tests/ui/issues/issue-3008-3.rs b/tests/ui/structs-enums/issue-3008-3.rs index 212eb2eb8..212eb2eb8 100644 --- a/tests/ui/issues/issue-3008-3.rs +++ b/tests/ui/structs-enums/issue-3008-3.rs diff --git a/tests/ui/issues/issue-3008-3.stderr b/tests/ui/structs-enums/issue-3008-3.stderr index a1a81e293..a1a81e293 100644 --- a/tests/ui/issues/issue-3008-3.stderr +++ b/tests/ui/structs-enums/issue-3008-3.stderr diff --git a/tests/ui/issues/issue-1871.rs b/tests/ui/typeck/issue-1871.rs index f7a2bdd56..f7a2bdd56 100644 --- a/tests/ui/issues/issue-1871.rs +++ b/tests/ui/typeck/issue-1871.rs diff --git a/tests/ui/issues/issue-1871.stderr b/tests/ui/typeck/issue-1871.stderr index b774ca22d..b774ca22d 100644 --- a/tests/ui/issues/issue-1871.stderr +++ b/tests/ui/typeck/issue-1871.stderr diff --git a/tests/ui/issues/issue-2063-resource.rs b/tests/ui/typeck/issue-2063-resource.rs index 1d0527447..1d0527447 100644 --- a/tests/ui/issues/issue-2063-resource.rs +++ b/tests/ui/typeck/issue-2063-resource.rs diff --git a/tests/ui/issues/issue-2063.rs b/tests/ui/typeck/issue-2063.rs index f08f9d4cf..f08f9d4cf 100644 --- a/tests/ui/issues/issue-2063.rs +++ b/tests/ui/typeck/issue-2063.rs diff --git a/tests/ui/issues/issue-50825-1.rs b/tests/ui/where-clauses/issue-50825-1.rs index ee4316029..ee4316029 100644 --- a/tests/ui/issues/issue-50825-1.rs +++ b/tests/ui/where-clauses/issue-50825-1.rs diff --git a/tests/ui/issues/issue-50825.rs b/tests/ui/where-clauses/issue-50825.rs index 1ece2e9fc..1ece2e9fc 100644 --- a/tests/ui/issues/issue-50825.rs +++ b/tests/ui/where-clauses/issue-50825.rs |