From cf94bdc0742c13e2a0cac864c478b8626b266e1b Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:11:38 +0200 Subject: Merging upstream version 1.66.0+dfsg1. Signed-off-by: Daniel Baumann --- .../issues/auxiliary/issue-17718-const-privacy.rs | 8 - src/test/ui/issues/issue-102964.rs | 10 ++ src/test/ui/issues/issue-102964.stderr | 19 +++ src/test/ui/issues/issue-11958.stderr | 4 +- src/test/ui/issues/issue-1460.stderr | 2 +- src/test/ui/issues/issue-14875.rs | 1 - src/test/ui/issues/issue-16250.stderr | 12 +- src/test/ui/issues/issue-16256.stderr | 2 +- src/test/ui/issues/issue-17431-1.stderr | 10 +- src/test/ui/issues/issue-17431-2.rs | 3 +- src/test/ui/issues/issue-17431-2.stderr | 31 ++-- src/test/ui/issues/issue-17431-3.stderr | 10 +- src/test/ui/issues/issue-17431-4.stderr | 10 +- src/test/ui/issues/issue-17431-5.stderr | 4 +- src/test/ui/issues/issue-17431-6.stderr | 10 +- src/test/ui/issues/issue-17431-7.stderr | 10 +- .../ui/issues/issue-17718-const-destructors.rs | 10 -- src/test/ui/issues/issue-17718-const-privacy.rs | 16 -- .../ui/issues/issue-17718-const-privacy.stderr | 27 ---- .../ui/issues/issue-17718-constants-not-static.rs | 9 -- .../issues/issue-17718-constants-not-static.stderr | 12 -- src/test/ui/issues/issue-17718-parse-const.rs | 7 - src/test/ui/issues/issue-17718-patterns.rs | 12 -- src/test/ui/issues/issue-17718-patterns.stderr | 21 --- src/test/ui/issues/issue-17718-static-move.rs | 7 - src/test/ui/issues/issue-17718-static-move.stderr | 12 -- src/test/ui/issues/issue-17718-static-sync.rs | 12 -- src/test/ui/issues/issue-17718-static-sync.stderr | 12 -- .../issues/issue-17718-static-unsafe-interior.rs | 52 ------- src/test/ui/issues/issue-18919.stderr | 4 +- src/test/ui/issues/issue-19991.rs | 2 +- src/test/ui/issues/issue-19991.stderr | 2 +- src/test/ui/issues/issue-21174.stderr | 4 +- src/test/ui/issues/issue-22644.rs | 2 +- src/test/ui/issues/issue-22644.stderr | 2 +- src/test/ui/issues/issue-23122-2.rs | 1 + src/test/ui/issues/issue-23122-2.stderr | 9 +- .../issues/issue-23338-ensure-param-drop-order.rs | 162 --------------------- .../issue-23338-params-outlive-temps-of-body.rs | 30 ---- src/test/ui/issues/issue-24013.stderr | 5 - src/test/ui/issues/issue-24322.stderr | 4 +- src/test/ui/issues/issue-24805-dropck-itemless.rs | 77 ---------- src/test/ui/issues/issue-25901.rs | 2 +- src/test/ui/issues/issue-25901.stderr | 22 +-- src/test/ui/issues/issue-2718-a.rs | 12 -- src/test/ui/issues/issue-2718-a.stderr | 16 -- src/test/ui/issues/issue-28344.stderr | 2 +- src/test/ui/issues/issue-29746.rs | 2 +- src/test/ui/issues/issue-29948.rs | 1 - src/test/ui/issues/issue-3008-1.stderr | 4 +- src/test/ui/issues/issue-3008-2.stderr | 4 +- src/test/ui/issues/issue-3008-3.stderr | 4 +- src/test/ui/issues/issue-30371.rs | 1 + src/test/ui/issues/issue-30490.rs | 1 + src/test/ui/issues/issue-32326.stderr | 12 +- src/test/ui/issues/issue-35241.stderr | 2 +- src/test/ui/issues/issue-3563-2.rs | 14 -- src/test/ui/issues/issue-36053.rs | 22 --- src/test/ui/issues/issue-3779.stderr | 6 +- src/test/ui/issues/issue-40000.stderr | 4 +- src/test/ui/issues/issue-4265.stderr | 8 +- src/test/ui/issues/issue-43784-supertrait.rs | 10 -- src/test/ui/issues/issue-43784-supertrait.stderr | 19 --- src/test/ui/issues/issue-43853.rs | 1 - src/test/ui/issues/issue-46519.rs | 1 - src/test/ui/issues/issue-47094.stderr | 2 +- src/test/ui/issues/issue-47486.stderr | 5 - src/test/ui/issues/issue-47725.stderr | 2 +- src/test/ui/issues/issue-48962.rs | 34 ----- src/test/ui/issues/issue-50582.stderr | 4 +- src/test/ui/issues/issue-50781.stderr | 10 +- src/test/ui/issues/issue-54044.stderr | 2 +- src/test/ui/issues/issue-5500-1.rs | 15 -- src/test/ui/issues/issue-55380.stderr | 2 +- src/test/ui/issues/issue-57271.rs | 4 +- src/test/ui/issues/issue-57271.stderr | 28 ++-- src/test/ui/issues/issue-57362-2.stderr | 6 +- src/test/ui/issues/issue-58022.stderr | 12 +- src/test/ui/issues/issue-58734.stderr | 2 +- src/test/ui/issues/issue-59488.stderr | 4 +- src/test/ui/issues/issue-60622.stderr | 4 +- src/test/ui/issues/issue-6458-3.stderr | 6 +- src/test/ui/issues/issue-6458-4.stderr | 2 +- src/test/ui/issues/issue-64620.rs | 5 - src/test/ui/issues/issue-64620.stderr | 9 -- ...ssue-70724-add_type_neq_err_label-unwrap.stderr | 2 +- src/test/ui/issues/issue-72278.stderr | 2 +- src/test/ui/issues/issue-72554.rs | 1 - src/test/ui/issues/issue-72554.stderr | 24 +-- src/test/ui/issues/issue-73541-3.rs | 9 -- src/test/ui/issues/issue-73541-3.stderr | 12 -- src/test/ui/issues/issue-73541.rs | 9 -- src/test/ui/issues/issue-73541.stderr | 14 -- src/test/ui/issues/issue-75307.rs | 2 +- src/test/ui/issues/issue-75307.stderr | 8 +- src/test/ui/issues/issue-75907.rs | 2 +- src/test/ui/issues/issue-75907_b.rs | 2 +- src/test/ui/issues/issue-77993-1.rs | 12 -- src/test/ui/issues/issue-77993-1.stderr | 16 -- src/test/ui/issues/issue-78957.stderr | 2 +- src/test/ui/issues/issue-86756.stderr | 2 +- src/test/ui/issues/issue-8727.stderr | 2 +- src/test/ui/issues/issue-87707.rs | 1 + src/test/ui/issues/issue-87707.run.stderr | 4 +- src/test/ui/issues/issue-99838.rs | 2 +- 105 files changed, 184 insertions(+), 931 deletions(-) delete mode 100644 src/test/ui/issues/auxiliary/issue-17718-const-privacy.rs create mode 100644 src/test/ui/issues/issue-102964.rs create mode 100644 src/test/ui/issues/issue-102964.stderr delete mode 100644 src/test/ui/issues/issue-17718-const-destructors.rs delete mode 100644 src/test/ui/issues/issue-17718-const-privacy.rs delete mode 100644 src/test/ui/issues/issue-17718-const-privacy.stderr delete mode 100644 src/test/ui/issues/issue-17718-constants-not-static.rs delete mode 100644 src/test/ui/issues/issue-17718-constants-not-static.stderr delete mode 100644 src/test/ui/issues/issue-17718-parse-const.rs delete mode 100644 src/test/ui/issues/issue-17718-patterns.rs delete mode 100644 src/test/ui/issues/issue-17718-patterns.stderr delete mode 100644 src/test/ui/issues/issue-17718-static-move.rs delete mode 100644 src/test/ui/issues/issue-17718-static-move.stderr delete mode 100644 src/test/ui/issues/issue-17718-static-sync.rs delete mode 100644 src/test/ui/issues/issue-17718-static-sync.stderr delete mode 100644 src/test/ui/issues/issue-17718-static-unsafe-interior.rs delete mode 100644 src/test/ui/issues/issue-23338-ensure-param-drop-order.rs delete mode 100644 src/test/ui/issues/issue-23338-params-outlive-temps-of-body.rs delete mode 100644 src/test/ui/issues/issue-24805-dropck-itemless.rs delete mode 100644 src/test/ui/issues/issue-2718-a.rs delete mode 100644 src/test/ui/issues/issue-2718-a.stderr delete mode 100644 src/test/ui/issues/issue-3563-2.rs delete mode 100644 src/test/ui/issues/issue-36053.rs delete mode 100644 src/test/ui/issues/issue-43784-supertrait.rs delete mode 100644 src/test/ui/issues/issue-43784-supertrait.stderr delete mode 100644 src/test/ui/issues/issue-48962.rs delete mode 100644 src/test/ui/issues/issue-5500-1.rs delete mode 100644 src/test/ui/issues/issue-64620.rs delete mode 100644 src/test/ui/issues/issue-64620.stderr delete mode 100644 src/test/ui/issues/issue-73541-3.rs delete mode 100644 src/test/ui/issues/issue-73541-3.stderr delete mode 100644 src/test/ui/issues/issue-73541.rs delete mode 100644 src/test/ui/issues/issue-73541.stderr delete mode 100644 src/test/ui/issues/issue-77993-1.rs delete mode 100644 src/test/ui/issues/issue-77993-1.stderr (limited to 'src/test/ui/issues') diff --git a/src/test/ui/issues/auxiliary/issue-17718-const-privacy.rs b/src/test/ui/issues/auxiliary/issue-17718-const-privacy.rs deleted file mode 100644 index 93cf4bf3e..000000000 --- a/src/test/ui/issues/auxiliary/issue-17718-const-privacy.rs +++ /dev/null @@ -1,8 +0,0 @@ -pub use foo::FOO2; - -pub const FOO: usize = 3; -const BAR: usize = 3; - -mod foo { - pub const FOO2: usize = 3; -} diff --git a/src/test/ui/issues/issue-102964.rs b/src/test/ui/issues/issue-102964.rs new file mode 100644 index 000000000..43ff23600 --- /dev/null +++ b/src/test/ui/issues/issue-102964.rs @@ -0,0 +1,10 @@ +use std::rc::Rc; +type Foo<'a, T> = &'a dyn Fn(&T); +type RcFoo<'a, T> = Rc>; + +fn bar_function(function: Foo) -> RcFoo { + //~^ ERROR mismatched types + let rc = Rc::new(function); +} + +fn main() {} diff --git a/src/test/ui/issues/issue-102964.stderr b/src/test/ui/issues/issue-102964.stderr new file mode 100644 index 000000000..450403909 --- /dev/null +++ b/src/test/ui/issues/issue-102964.stderr @@ -0,0 +1,19 @@ +error[E0308]: mismatched types + --> $DIR/issue-102964.rs:5:41 + | +LL | fn bar_function(function: Foo) -> RcFoo { + | ------------ ^^^^^^^^ expected struct `Rc`, found `()` + | | + | implicitly returns `()` as its body has no tail or `return` expression + | + = note: expected struct `Rc<&dyn for<'a> Fn(&'a T)>` + found unit type `()` +help: consider returning the local binding `rc` + | +LL ~ let rc = Rc::new(function); +LL + rc + | + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0308`. diff --git a/src/test/ui/issues/issue-11958.stderr b/src/test/ui/issues/issue-11958.stderr index 25de6ff4c..5dca4c2f0 100644 --- a/src/test/ui/issues/issue-11958.stderr +++ b/src/test/ui/issues/issue-11958.stderr @@ -4,8 +4,8 @@ warning: value assigned to `x` is never read LL | let _thunk = Box::new(move|| { x = 2; }); | ^ | - = note: `#[warn(unused_assignments)]` on by default = help: maybe it is overwritten before being read? + = note: `#[warn(unused_assignments)]` on by default warning: unused variable: `x` --> $DIR/issue-11958.rs:8:36 @@ -13,8 +13,8 @@ warning: unused variable: `x` LL | let _thunk = Box::new(move|| { x = 2; }); | ^ | - = note: `#[warn(unused_variables)]` on by default = help: did you mean to capture by reference instead? + = note: `#[warn(unused_variables)]` on by default warning: 2 warnings emitted diff --git a/src/test/ui/issues/issue-1460.stderr b/src/test/ui/issues/issue-1460.stderr index 26f95f5af..f0ff2cafd 100644 --- a/src/test/ui/issues/issue-1460.stderr +++ b/src/test/ui/issues/issue-1460.stderr @@ -4,8 +4,8 @@ warning: unused closure that must be used LL | {|i: u32| if 1 == i { }}; | ^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: `#[warn(unused_must_use)]` on by default = note: closures are lazy and do nothing unless called + = note: `#[warn(unused_must_use)]` on by default warning: 1 warning emitted diff --git a/src/test/ui/issues/issue-14875.rs b/src/test/ui/issues/issue-14875.rs index aaef2aab9..fca330915 100644 --- a/src/test/ui/issues/issue-14875.rs +++ b/src/test/ui/issues/issue-14875.rs @@ -1,6 +1,5 @@ // run-pass // needs-unwind -// ignore-wasm32-bare compiled with panic=abort by default // Check that values are not leaked when a dtor panics (#14875) diff --git a/src/test/ui/issues/issue-16250.stderr b/src/test/ui/issues/issue-16250.stderr index ae3b7f334..5eb5e0864 100644 --- a/src/test/ui/issues/issue-16250.stderr +++ b/src/test/ui/issues/issue-16250.stderr @@ -4,12 +4,6 @@ error: `extern` block uses type `Foo`, which is not FFI-safe LL | pub fn foo(x: (Foo)); | ^^^ not FFI-safe | -note: the lint level is defined here - --> $DIR/issue-16250.rs:1:9 - | -LL | #![deny(warnings)] - | ^^^^^^^^ - = note: `#[deny(improper_ctypes)]` implied by `#[deny(warnings)]` = help: consider adding a `#[repr(C)]` or `#[repr(transparent)]` attribute to this struct = note: this struct has unspecified layout note: the type is defined here @@ -17,6 +11,12 @@ note: the type is defined here | LL | pub struct Foo; | ^^^^^^^^^^^^^^ +note: the lint level is defined here + --> $DIR/issue-16250.rs:1:9 + | +LL | #![deny(warnings)] + | ^^^^^^^^ + = note: `#[deny(improper_ctypes)]` implied by `#[deny(warnings)]` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-16256.stderr b/src/test/ui/issues/issue-16256.stderr index 9c7312461..ca8e9a1be 100644 --- a/src/test/ui/issues/issue-16256.stderr +++ b/src/test/ui/issues/issue-16256.stderr @@ -4,8 +4,8 @@ warning: unused closure that must be used LL | |c: u8| buf.push(c); | ^^^^^^^^^^^^^^^^^^^^ | - = note: `#[warn(unused_must_use)]` on by default = note: closures are lazy and do nothing unless called + = note: `#[warn(unused_must_use)]` on by default warning: 1 warning emitted diff --git a/src/test/ui/issues/issue-17431-1.stderr b/src/test/ui/issues/issue-17431-1.stderr index db32eb952..e3af8976c 100644 --- a/src/test/ui/issues/issue-17431-1.stderr +++ b/src/test/ui/issues/issue-17431-1.stderr @@ -2,14 +2,12 @@ error[E0072]: recursive type `Foo` has infinite size --> $DIR/issue-17431-1.rs:1:1 | LL | struct Foo { foo: Option> } - | ^^^^^^^^^^ ------------------- recursive without indirection - | | - | recursive type has infinite size + | ^^^^^^^^^^ --- recursive without indirection | -help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `Foo` representable +help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle | -LL | struct Foo { foo: Option>> } - | ++++ + +LL | struct Foo { foo: Option>> } + | ++++ + error: aborting due to previous error diff --git a/src/test/ui/issues/issue-17431-2.rs b/src/test/ui/issues/issue-17431-2.rs index 9ed97f631..f7b9c6a55 100644 --- a/src/test/ui/issues/issue-17431-2.rs +++ b/src/test/ui/issues/issue-17431-2.rs @@ -1,8 +1,7 @@ struct Baz { q: Option } -//~^ ERROR recursive type `Baz` has infinite size +//~^ ERROR recursive types `Baz` and `Foo` have infinite size struct Foo { q: Option } -//~^ ERROR recursive type `Foo` has infinite size impl Foo { fn bar(&self) {} } diff --git a/src/test/ui/issues/issue-17431-2.stderr b/src/test/ui/issues/issue-17431-2.stderr index d23fd1474..39a99ec1e 100644 --- a/src/test/ui/issues/issue-17431-2.stderr +++ b/src/test/ui/issues/issue-17431-2.stderr @@ -1,29 +1,20 @@ -error[E0072]: recursive type `Baz` has infinite size +error[E0072]: recursive types `Baz` and `Foo` have infinite size --> $DIR/issue-17431-2.rs:1:1 | LL | struct Baz { q: Option } - | ^^^^^^^^^^ ----------- recursive without indirection - | | - | recursive type has infinite size - | -help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `Baz` representable - | -LL | struct Baz { q: Option> } - | ++++ + - -error[E0072]: recursive type `Foo` has infinite size - --> $DIR/issue-17431-2.rs:4:1 - | + | ^^^^^^^^^^ --- recursive without indirection +... LL | struct Foo { q: Option } - | ^^^^^^^^^^ ----------- recursive without indirection - | | - | recursive type has infinite size + | ^^^^^^^^^^ --- recursive without indirection + | +help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle | -help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `Foo` representable +LL ~ struct Baz { q: Option> } +LL | +LL | +LL ~ struct Foo { q: Option> } | -LL | struct Foo { q: Option> } - | ++++ + -error: aborting due to 2 previous errors +error: aborting due to previous error For more information about this error, try `rustc --explain E0072`. diff --git a/src/test/ui/issues/issue-17431-3.stderr b/src/test/ui/issues/issue-17431-3.stderr index 0dde6f382..394134c78 100644 --- a/src/test/ui/issues/issue-17431-3.stderr +++ b/src/test/ui/issues/issue-17431-3.stderr @@ -2,14 +2,12 @@ error[E0072]: recursive type `Foo` has infinite size --> $DIR/issue-17431-3.rs:3:1 | LL | struct Foo { foo: Mutex> } - | ^^^^^^^^^^ ------------------ recursive without indirection - | | - | recursive type has infinite size + | ^^^^^^^^^^ --- recursive without indirection | -help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `Foo` representable +help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle | -LL | struct Foo { foo: Box>> } - | ++++ + +LL | struct Foo { foo: Mutex>> } + | ++++ + error: aborting due to previous error diff --git a/src/test/ui/issues/issue-17431-4.stderr b/src/test/ui/issues/issue-17431-4.stderr index ddf669b8f..3d141e44b 100644 --- a/src/test/ui/issues/issue-17431-4.stderr +++ b/src/test/ui/issues/issue-17431-4.stderr @@ -2,14 +2,12 @@ error[E0072]: recursive type `Foo` has infinite size --> $DIR/issue-17431-4.rs:3:1 | LL | struct Foo { foo: Option>>, marker: marker::PhantomData } - | ^^^^^^^^^^^^^ ---------------------- recursive without indirection - | | - | recursive type has infinite size + | ^^^^^^^^^^^^^ ------ recursive without indirection | -help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `Foo` representable +help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle | -LL | struct Foo { foo: Option>>>, marker: marker::PhantomData } - | ++++ + +LL | struct Foo { foo: Option>>>, marker: marker::PhantomData } + | ++++ + error: aborting due to previous error diff --git a/src/test/ui/issues/issue-17431-5.stderr b/src/test/ui/issues/issue-17431-5.stderr index a379598c2..44a90a6fe 100644 --- a/src/test/ui/issues/issue-17431-5.stderr +++ b/src/test/ui/issues/issue-17431-5.stderr @@ -3,10 +3,8 @@ error[E0072]: recursive type `Bar` has infinite size | LL | struct Bar { x: Bar , marker: marker::PhantomData } | ^^^^^^^^^^^^^ -------- recursive without indirection - | | - | recursive type has infinite size | -help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `Bar` representable +help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle | LL | struct Bar { x: Box> , marker: marker::PhantomData } | ++++ + diff --git a/src/test/ui/issues/issue-17431-6.stderr b/src/test/ui/issues/issue-17431-6.stderr index fcac420b2..e0a822550 100644 --- a/src/test/ui/issues/issue-17431-6.stderr +++ b/src/test/ui/issues/issue-17431-6.stderr @@ -2,14 +2,12 @@ error[E0072]: recursive type `Foo` has infinite size --> $DIR/issue-17431-6.rs:3:1 | LL | enum Foo { X(Mutex>) } - | ^^^^^^^^ ------------------ recursive without indirection - | | - | recursive type has infinite size + | ^^^^^^^^ --- recursive without indirection | -help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `Foo` representable +help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle | -LL | enum Foo { X(Box>>) } - | ++++ + +LL | enum Foo { X(Mutex>>) } + | ++++ + error: aborting due to previous error diff --git a/src/test/ui/issues/issue-17431-7.stderr b/src/test/ui/issues/issue-17431-7.stderr index 6f8a7e386..ecf072b8e 100644 --- a/src/test/ui/issues/issue-17431-7.stderr +++ b/src/test/ui/issues/issue-17431-7.stderr @@ -2,14 +2,12 @@ error[E0072]: recursive type `Foo` has infinite size --> $DIR/issue-17431-7.rs:1:1 | LL | enum Foo { Voo(Option>) } - | ^^^^^^^^ ------------------- recursive without indirection - | | - | recursive type has infinite size + | ^^^^^^^^ --- recursive without indirection | -help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `Foo` representable +help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle | -LL | enum Foo { Voo(Option>>) } - | ++++ + +LL | enum Foo { Voo(Option>>) } + | ++++ + error: aborting due to previous error diff --git a/src/test/ui/issues/issue-17718-const-destructors.rs b/src/test/ui/issues/issue-17718-const-destructors.rs deleted file mode 100644 index c9a729c7b..000000000 --- a/src/test/ui/issues/issue-17718-const-destructors.rs +++ /dev/null @@ -1,10 +0,0 @@ -// check-pass -#![allow(dead_code)] -struct A; -impl Drop for A { - fn drop(&mut self) {} -} - -const FOO: A = A; - -fn main() {} diff --git a/src/test/ui/issues/issue-17718-const-privacy.rs b/src/test/ui/issues/issue-17718-const-privacy.rs deleted file mode 100644 index 6ab3a60df..000000000 --- a/src/test/ui/issues/issue-17718-const-privacy.rs +++ /dev/null @@ -1,16 +0,0 @@ -// aux-build:issue-17718-const-privacy.rs - -extern crate issue_17718_const_privacy as other; - -use a::B; //~ ERROR: constant `B` is private -use other::{ - FOO, - BAR, //~ ERROR: constant `BAR` is private - FOO2, -}; - -mod a { - const B: usize = 3; -} - -fn main() {} diff --git a/src/test/ui/issues/issue-17718-const-privacy.stderr b/src/test/ui/issues/issue-17718-const-privacy.stderr deleted file mode 100644 index 133a6360b..000000000 --- a/src/test/ui/issues/issue-17718-const-privacy.stderr +++ /dev/null @@ -1,27 +0,0 @@ -error[E0603]: constant `B` is private - --> $DIR/issue-17718-const-privacy.rs:5:8 - | -LL | use a::B; - | ^ private constant - | -note: the constant `B` is defined here - --> $DIR/issue-17718-const-privacy.rs:13:5 - | -LL | const B: usize = 3; - | ^^^^^^^^^^^^^^^^^^^ - -error[E0603]: constant `BAR` is private - --> $DIR/issue-17718-const-privacy.rs:8:5 - | -LL | BAR, - | ^^^ private constant - | -note: the constant `BAR` is defined here - --> $DIR/auxiliary/issue-17718-const-privacy.rs:4:1 - | -LL | const BAR: usize = 3; - | ^^^^^^^^^^^^^^^^ - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0603`. diff --git a/src/test/ui/issues/issue-17718-constants-not-static.rs b/src/test/ui/issues/issue-17718-constants-not-static.rs deleted file mode 100644 index 2e6aff161..000000000 --- a/src/test/ui/issues/issue-17718-constants-not-static.rs +++ /dev/null @@ -1,9 +0,0 @@ -fn id(x: T) -> T { x } - -const FOO: usize = 3; - -fn foo() -> &'static usize { &id(FOO) } -//~^ ERROR: cannot return reference to temporary value - -fn main() { -} diff --git a/src/test/ui/issues/issue-17718-constants-not-static.stderr b/src/test/ui/issues/issue-17718-constants-not-static.stderr deleted file mode 100644 index 8f3acae71..000000000 --- a/src/test/ui/issues/issue-17718-constants-not-static.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error[E0515]: cannot return reference to temporary value - --> $DIR/issue-17718-constants-not-static.rs:5:30 - | -LL | fn foo() -> &'static usize { &id(FOO) } - | ^------- - | || - | |temporary value created here - | returns a reference to data owned by the current function - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0515`. diff --git a/src/test/ui/issues/issue-17718-parse-const.rs b/src/test/ui/issues/issue-17718-parse-const.rs deleted file mode 100644 index d5a5f445d..000000000 --- a/src/test/ui/issues/issue-17718-parse-const.rs +++ /dev/null @@ -1,7 +0,0 @@ -// run-pass - -const FOO: usize = 3; - -fn main() { - assert_eq!(FOO, 3); -} diff --git a/src/test/ui/issues/issue-17718-patterns.rs b/src/test/ui/issues/issue-17718-patterns.rs deleted file mode 100644 index 2ca0f67f8..000000000 --- a/src/test/ui/issues/issue-17718-patterns.rs +++ /dev/null @@ -1,12 +0,0 @@ -static A1: usize = 1; -static mut A2: usize = 1; -const A3: usize = 1; - -fn main() { - match 1 { - A1 => {} //~ ERROR: match bindings cannot shadow statics - A2 => {} //~ ERROR: match bindings cannot shadow statics - A3 => {} - _ => {} - } -} diff --git a/src/test/ui/issues/issue-17718-patterns.stderr b/src/test/ui/issues/issue-17718-patterns.stderr deleted file mode 100644 index 109091c2a..000000000 --- a/src/test/ui/issues/issue-17718-patterns.stderr +++ /dev/null @@ -1,21 +0,0 @@ -error[E0530]: match bindings cannot shadow statics - --> $DIR/issue-17718-patterns.rs:7:9 - | -LL | static A1: usize = 1; - | --------------------- the static `A1` is defined here -... -LL | A1 => {} - | ^^ cannot be named the same as a static - -error[E0530]: match bindings cannot shadow statics - --> $DIR/issue-17718-patterns.rs:8:9 - | -LL | static mut A2: usize = 1; - | ------------------------- the static `A2` is defined here -... -LL | A2 => {} - | ^^ cannot be named the same as a static - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0530`. diff --git a/src/test/ui/issues/issue-17718-static-move.rs b/src/test/ui/issues/issue-17718-static-move.rs deleted file mode 100644 index 015487a06..000000000 --- a/src/test/ui/issues/issue-17718-static-move.rs +++ /dev/null @@ -1,7 +0,0 @@ -struct Foo; -const INIT: Foo = Foo; -static FOO: Foo = INIT; - -fn main() { - let _a = FOO; //~ ERROR: cannot move out of static item -} diff --git a/src/test/ui/issues/issue-17718-static-move.stderr b/src/test/ui/issues/issue-17718-static-move.stderr deleted file mode 100644 index 984534bfb..000000000 --- a/src/test/ui/issues/issue-17718-static-move.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error[E0507]: cannot move out of static item `FOO` - --> $DIR/issue-17718-static-move.rs:6:14 - | -LL | let _a = FOO; - | ^^^ - | | - | move occurs because `FOO` has type `Foo`, which does not implement the `Copy` trait - | help: consider borrowing here: `&FOO` - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0507`. diff --git a/src/test/ui/issues/issue-17718-static-sync.rs b/src/test/ui/issues/issue-17718-static-sync.rs deleted file mode 100644 index 6f278d76b..000000000 --- a/src/test/ui/issues/issue-17718-static-sync.rs +++ /dev/null @@ -1,12 +0,0 @@ -#![feature(negative_impls)] - -use std::marker::Sync; - -struct Foo; -impl !Sync for Foo {} - -static FOO: usize = 3; -static BAR: Foo = Foo; -//~^ ERROR: `Foo` cannot be shared between threads safely [E0277] - -fn main() {} diff --git a/src/test/ui/issues/issue-17718-static-sync.stderr b/src/test/ui/issues/issue-17718-static-sync.stderr deleted file mode 100644 index bc6e45e59..000000000 --- a/src/test/ui/issues/issue-17718-static-sync.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error[E0277]: `Foo` cannot be shared between threads safely - --> $DIR/issue-17718-static-sync.rs:9:13 - | -LL | static BAR: Foo = Foo; - | ^^^ `Foo` cannot be shared between threads safely - | - = help: the trait `Sync` is not implemented for `Foo` - = note: shared static variables must have a type that implements `Sync` - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/issues/issue-17718-static-unsafe-interior.rs b/src/test/ui/issues/issue-17718-static-unsafe-interior.rs deleted file mode 100644 index 65a8713ba..000000000 --- a/src/test/ui/issues/issue-17718-static-unsafe-interior.rs +++ /dev/null @@ -1,52 +0,0 @@ -// run-pass -#![allow(dead_code)] -#![allow(unused_variables)] -#![allow(unused_imports)] -// pretty-expanded FIXME #23616 - -use std::marker; -use std::cell::UnsafeCell; - -struct MyUnsafePack(UnsafeCell); - -unsafe impl Sync for MyUnsafePack {} - -struct MyUnsafe { - value: MyUnsafePack -} - -impl MyUnsafe { - fn forbidden(&self) {} -} - -unsafe impl Sync for MyUnsafe {} - -enum UnsafeEnum { - VariantSafe, - VariantUnsafe(UnsafeCell) -} - -unsafe impl Sync for UnsafeEnum {} - -static STATIC1: UnsafeEnum = UnsafeEnum::VariantSafe; - -static STATIC2: MyUnsafePack = MyUnsafePack(UnsafeCell::new(1)); -const CONST: MyUnsafePack = MyUnsafePack(UnsafeCell::new(1)); -static STATIC3: MyUnsafe = MyUnsafe{value: CONST}; - -static STATIC4: &'static MyUnsafePack = &STATIC2; - -struct Wrap { - value: T -} - -unsafe impl Sync for Wrap {} - -static UNSAFE: MyUnsafePack = MyUnsafePack(UnsafeCell::new(2)); -static WRAPPED_UNSAFE: Wrap<&'static MyUnsafePack> = Wrap { value: &UNSAFE }; - -fn main() { - let a = &STATIC1; - - STATIC3.forbidden() -} diff --git a/src/test/ui/issues/issue-18919.stderr b/src/test/ui/issues/issue-18919.stderr index d7dbb8299..b0b03a0ee 100644 --- a/src/test/ui/issues/issue-18919.stderr +++ b/src/test/ui/issues/issue-18919.stderr @@ -1,10 +1,10 @@ -error[E0277]: the size for values of type `dyn for<'r> Fn(&'r isize) -> isize` cannot be known at compilation time +error[E0277]: the size for values of type `dyn for<'a> Fn(&'a isize) -> isize` cannot be known at compilation time --> $DIR/issue-18919.rs:3:15 | LL | fn ho_func(f: Option) { | ^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time | - = help: the trait `Sized` is not implemented for `dyn for<'r> Fn(&'r isize) -> isize` + = help: the trait `Sized` is not implemented for `dyn for<'a> Fn(&'a isize) -> isize` note: required by a bound in `Option` --> $DIR/issue-18919.rs:7:13 | diff --git a/src/test/ui/issues/issue-19991.rs b/src/test/ui/issues/issue-19991.rs index 1f3b73f96..dd0efa972 100644 --- a/src/test/ui/issues/issue-19991.rs +++ b/src/test/ui/issues/issue-19991.rs @@ -3,7 +3,7 @@ fn main() { if let Some(homura) = Some("madoka") { //~ ERROR missing an `else` clause - //~| expected `()`, found integer + //~| expected integer, found `()` 765 }; } diff --git a/src/test/ui/issues/issue-19991.stderr b/src/test/ui/issues/issue-19991.stderr index 6e92be87a..57b0882b6 100644 --- a/src/test/ui/issues/issue-19991.stderr +++ b/src/test/ui/issues/issue-19991.stderr @@ -6,7 +6,7 @@ LL | | LL | | 765 | | --- found here LL | | }; - | |_____^ expected `()`, found integer + | |_____^ expected integer, found `()` | = note: `if` expressions without `else` evaluate to `()` = help: consider adding an `else` block that evaluates to the expected type diff --git a/src/test/ui/issues/issue-21174.stderr b/src/test/ui/issues/issue-21174.stderr index 09402c3d8..5981d9dc7 100644 --- a/src/test/ui/issues/issue-21174.stderr +++ b/src/test/ui/issues/issue-21174.stderr @@ -4,8 +4,8 @@ error[E0512]: cannot transmute between types of different sizes, or dependently- LL | let new: T::B = unsafe { std::mem::transmute(value) }; | ^^^^^^^^^^^^^^^^^^^ | - = note: source type: `::A` (this type does not have a fixed size) - = note: target type: `::B` (this type does not have a fixed size) + = note: source type: `>::A` (this type does not have a fixed size) + = note: target type: `>::B` (this type does not have a fixed size) error: aborting due to previous error diff --git a/src/test/ui/issues/issue-22644.rs b/src/test/ui/issues/issue-22644.rs index 9244ff593..b1d69dcd8 100644 --- a/src/test/ui/issues/issue-22644.rs +++ b/src/test/ui/issues/issue-22644.rs @@ -29,7 +29,7 @@ fn main() { < //~ ERROR `<` is interpreted as a start of generic 5); - println!("{}", a as usize << long_name); //~ ERROR `<` is interpreted as a start of generic + println!("{}", a as usize << long_name); //~ ERROR `<<` is interpreted as a start of generic println!("{}", a: &mut 4); //~ ERROR expected type, found `4` } diff --git a/src/test/ui/issues/issue-22644.stderr b/src/test/ui/issues/issue-22644.stderr index 039ffbfd3..45027afa7 100644 --- a/src/test/ui/issues/issue-22644.stderr +++ b/src/test/ui/issues/issue-22644.stderr @@ -95,7 +95,7 @@ LL | LL ~ usize) | -error: `<` is interpreted as a start of generic arguments for `usize`, not a shift +error: `<<` is interpreted as a start of generic arguments for `usize`, not a shift --> $DIR/issue-22644.rs:32:31 | LL | println!("{}", a as usize << long_name); diff --git a/src/test/ui/issues/issue-23122-2.rs b/src/test/ui/issues/issue-23122-2.rs index 95e1f60d8..338789c2e 100644 --- a/src/test/ui/issues/issue-23122-2.rs +++ b/src/test/ui/issues/issue-23122-2.rs @@ -1,3 +1,4 @@ +// normalize-stderr-test: "long-type-\d+" -> "long-type-hash" trait Next { type Next: Next; } diff --git a/src/test/ui/issues/issue-23122-2.stderr b/src/test/ui/issues/issue-23122-2.stderr index f6cda3de5..0111cf569 100644 --- a/src/test/ui/issues/issue-23122-2.stderr +++ b/src/test/ui/issues/issue-23122-2.stderr @@ -1,10 +1,15 @@ -error[E0275]: overflow evaluating the requirement `::Next` - --> $DIR/issue-23122-2.rs:10:17 +error[E0275]: overflow evaluating the requirement `<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next: Sized` + --> $DIR/issue-23122-2.rs:11:17 | LL | type Next = as Next>::Next; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`issue_23122_2`) +note: required for `GetNext<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next>` to implement `Next` + --> $DIR/issue-23122-2.rs:10:15 + | +LL | impl Next for GetNext { + | ^^^^ ^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/issues/issue-23338-ensure-param-drop-order.rs b/src/test/ui/issues/issue-23338-ensure-param-drop-order.rs deleted file mode 100644 index a99f260dd..000000000 --- a/src/test/ui/issues/issue-23338-ensure-param-drop-order.rs +++ /dev/null @@ -1,162 +0,0 @@ -// run-pass -#![allow(non_upper_case_globals)] - -// This test is ensuring that parameters are indeed dropped after -// temporaries in a fn body. - -use std::cell::RefCell; - -use self::d::D; - -pub fn main() { - let log = RefCell::new(vec![]); - d::println("created empty log"); - test(&log); - - assert_eq!(&log.borrow()[..], - [ - // created empty log - // +-- Make D(da_0, 0) - // | +-- Make D(de_1, 1) - // | | calling foo - // | | entered foo - // | | +-- Make D(de_2, 2) - // | | | +-- Make D(da_1, 3) - // | | | | +-- Make D(de_3, 4) - // | | | | | +-- Make D(de_4, 5) - 3, // | | | +-- Drop D(da_1, 3) - // | | | | | - 4, // | | | +-- Drop D(de_3, 4) - // | | | | - // | | | | eval tail of foo - // | | | +-- Make D(de_5, 6) - // | | | | +-- Make D(de_6, 7) - 5, // | | | | | +-- Drop D(de_4, 5) - // | | | | | - 2, // | | +-- Drop D(de_2, 2) - // | | | | - 6, // | | +-- Drop D(de_5, 6) - // | | | - 1, // | +-- Drop D(de_1, 1) - // | | - 0, // +-- Drop D(da_0, 0) - // | - // | result D(de_6, 7) - 7 // +-- Drop D(de_6, 7) - - ]); -} - -fn test<'a>(log: d::Log<'a>) { - let da = D::new("da", 0, log); - let de = D::new("de", 1, log); - d::println("calling foo"); - let result = foo(da, de); - d::println(&format!("result {}", result)); -} - -fn foo<'a>(da0: D<'a>, de1: D<'a>) -> D<'a> { - d::println("entered foo"); - let de2 = de1.incr(); // creates D(de_2, 2) - let de4 = { - let _da1 = da0.incr(); // creates D(da_1, 3) - de2.incr().incr() // creates D(de_3, 4) and D(de_4, 5) - }; - d::println("eval tail of foo"); - de4.incr().incr() // creates D(de_5, 6) and D(de_6, 7) -} - -// This module provides simultaneous printouts of the dynamic extents -// of all of the D values, in addition to logging the order that each -// is dropped. - -const PREF_INDENT: u32 = 16; - -pub mod d { - #![allow(unused_parens)] - use std::fmt; - use std::mem; - use std::cell::RefCell; - - static mut counter: u32 = 0; - static mut trails: u64 = 0; - - pub type Log<'a> = &'a RefCell>; - - pub fn current_width() -> u32 { - unsafe { max_width() - trails.leading_zeros() } - } - - pub fn max_width() -> u32 { - unsafe { - (mem::size_of_val(&trails)*8) as u32 - } - } - - pub fn indent_println(my_trails: u32, s: &str) { - let mut indent: String = String::new(); - for i in 0..my_trails { - unsafe { - if trails & (1 << i) != 0 { - indent = indent + "| "; - } else { - indent = indent + " "; - } - } - } - println!("{}{}", indent, s); - } - - pub fn println(s: &str) { - indent_println(super::PREF_INDENT, s); - } - - fn first_avail() -> u32 { - unsafe { - for i in 0..64 { - if trails & (1 << i) == 0 { - return i; - } - } - } - panic!("exhausted trails"); - } - - pub struct D<'a> { - name: &'static str, i: u32, uid: u32, trail: u32, log: Log<'a> - } - - impl<'a> fmt::Display for D<'a> { - fn fmt(&self, w: &mut fmt::Formatter) -> fmt::Result { - write!(w, "D({}_{}, {})", self.name, self.i, self.uid) - } - } - - impl<'a> D<'a> { - pub fn new(name: &'static str, i: u32, log: Log<'a>) -> D<'a> { - unsafe { - let trail = first_avail(); - let ctr = counter; - counter += 1; - trails |= (1 << trail); - let ret = D { - name: name, i: i, log: log, uid: ctr, trail: trail - }; - indent_println(trail, &format!("+-- Make {}", ret)); - ret - } - } - pub fn incr(&self) -> D<'a> { - D::new(self.name, self.i + 1, self.log) - } - } - - impl<'a> Drop for D<'a> { - fn drop(&mut self) { - unsafe { trails &= !(1 << self.trail); }; - self.log.borrow_mut().push(self.uid); - indent_println(self.trail, &format!("+-- Drop {}", self)); - indent_println(::PREF_INDENT, ""); - } - } -} diff --git a/src/test/ui/issues/issue-23338-params-outlive-temps-of-body.rs b/src/test/ui/issues/issue-23338-params-outlive-temps-of-body.rs deleted file mode 100644 index d45aaa843..000000000 --- a/src/test/ui/issues/issue-23338-params-outlive-temps-of-body.rs +++ /dev/null @@ -1,30 +0,0 @@ -// run-pass -// This is largely checking that we now accept code where temp values -// are borrowing from the input parameters (the `foo` case below). -// -// Compare to run-pass/issue-23338-params-outlive-temps-of-body.rs -// -// (The `foo2` case is just for parity with the above test, which -// shows what happens when you move the `y`-binding to the inside of -// the inner block.) - -use std::cell::RefCell; - -fn foo(x: RefCell) -> String { - x.borrow().clone() -} - -fn foo2(x: RefCell) -> String { - let y = x; - let ret = { - y.borrow().clone() - }; - ret -} - -pub fn main() { - let r = RefCell::new(format!("data")); - assert_eq!(foo(r), "data"); - let r = RefCell::new(format!("data")); - assert_eq!(foo2(r), "data"); -} diff --git a/src/test/ui/issues/issue-24013.stderr b/src/test/ui/issues/issue-24013.stderr index 995dce552..72102f460 100644 --- a/src/test/ui/issues/issue-24013.stderr +++ b/src/test/ui/issues/issue-24013.stderr @@ -3,11 +3,6 @@ error[E0282]: type annotations needed | LL | unsafe {swap::<&mut _>(transmute(&a), transmute(&b))}; | ^^^^^^^^^^^^^^ cannot infer type of the type parameter `T` declared on the function `swap` - | -help: consider specifying the generic argument - | -LL | unsafe {swap::<&mut _>(transmute(&a), transmute(&b))}; - | ~~~~~~~~~~ error: aborting due to previous error diff --git a/src/test/ui/issues/issue-24322.stderr b/src/test/ui/issues/issue-24322.stderr index 1a4fab165..1e4c8ac7c 100644 --- a/src/test/ui/issues/issue-24322.stderr +++ b/src/test/ui/issues/issue-24322.stderr @@ -6,8 +6,8 @@ LL | let x: &fn(&B) -> u32 = &B::func; | | | expected due to this | - = note: expected reference `&for<'r> fn(&'r B) -> u32` - found reference `&for<'r> fn(&'r B) -> u32 {B::func}` + = note: expected reference `&for<'a> fn(&'a B) -> u32` + found reference `&for<'a> fn(&'a B) -> u32 {B::func}` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-24805-dropck-itemless.rs b/src/test/ui/issues/issue-24805-dropck-itemless.rs deleted file mode 100644 index 45761b61c..000000000 --- a/src/test/ui/issues/issue-24805-dropck-itemless.rs +++ /dev/null @@ -1,77 +0,0 @@ -// run-pass - -// Check that item-less traits do not cause dropck to inject extra -// region constraints. - -#![allow(non_camel_case_types)] - -#![feature(dropck_eyepatch)] - -trait UserDefined { } - -impl UserDefined for i32 { } -impl<'a, T> UserDefined for &'a T { } - -// e.g., `impl_drop!(Send, D_Send)` expands to: -// ```rust -// struct D_Send(T); -// impl Drop for D_Send { fn drop(&mut self) { } } -// ``` -macro_rules! impl_drop { - ($Bound:ident, $Id:ident) => { - struct $Id(#[allow(unused_tuple_struct_fields)] T); - unsafe impl <#[may_dangle] T: $Bound> Drop for $Id { - fn drop(&mut self) { } - } - } -} - -impl_drop!{Send, D_Send} -impl_drop!{Sized, D_Sized} - -// See note below regarding Issue 24895 -// impl_drop!{Copy, D_Copy} - -impl_drop!{Sync, D_Sync} -impl_drop!{UserDefined, D_UserDefined} - -macro_rules! body { - ($id:ident) => { { - // `_d` and `d1` are assigned the *same* lifetime by region inference ... - let (_d, d1); - - d1 = $id(1); - // ... we store a reference to `d1` within `_d` ... - _d = $id(&d1); - - // ... a *conservative* dropck will thus complain, because it - // thinks Drop of _d could access the already dropped `d1`. - } } -} - -fn f_send() { body!(D_Send) } -fn f_sized() { body!(D_Sized) } -fn f_sync() { body!(D_Sync) } - -// Issue 24895: Copy: Clone implies `impl Drop for ...` can -// access a user-defined clone() method, which causes this test case -// to fail. -// -// If 24895 is resolved by removing the `Copy: Clone` relationship, -// then this definition and the call below should be uncommented. If -// it is resolved by deciding to keep the `Copy: Clone` relationship, -// then this comment and the associated bits of code can all be -// removed. - -// fn f_copy() { body!(D_Copy) } - -fn f_userdefined() { body!(D_UserDefined) } - -fn main() { - f_send(); - f_sized(); - // See note above regarding Issue 24895. - // f_copy(); - f_sync(); - f_userdefined(); -} diff --git a/src/test/ui/issues/issue-25901.rs b/src/test/ui/issues/issue-25901.rs index ba12e1ad0..1f7b341a9 100644 --- a/src/test/ui/issues/issue-25901.rs +++ b/src/test/ui/issues/issue-25901.rs @@ -2,7 +2,7 @@ struct A; struct B; static S: &'static B = &A; -//~^ ERROR cannot perform deref coercion on `A` in statics +//~^ ERROR the trait bound use std::ops::Deref; diff --git a/src/test/ui/issues/issue-25901.stderr b/src/test/ui/issues/issue-25901.stderr index c6c80e41c..b9cac3222 100644 --- a/src/test/ui/issues/issue-25901.stderr +++ b/src/test/ui/issues/issue-25901.stderr @@ -1,23 +1,15 @@ -error[E0015]: cannot perform deref coercion on `A` in statics +error[E0277]: the trait bound `A: Deref` is not satisfied --> $DIR/issue-25901.rs:4:24 | LL | static S: &'static B = &A; - | ^^ - | - = note: attempting to deref into `B` -note: deref defined here - --> $DIR/issue-25901.rs:10:5 + | ^^ the trait `~const Deref` is not implemented for `A` | -LL | type Target = B; - | ^^^^^^^^^^^ -note: impl defined here, but it is not `const` - --> $DIR/issue-25901.rs:9:1 +note: the trait `Deref` is implemented for `A`, but that implementation is not `const` + --> $DIR/issue-25901.rs:4:24 | -LL | impl Deref for A { - | ^^^^^^^^^^^^^^^^ - = 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 +LL | static S: &'static B = &A; + | ^^ error: aborting due to previous error -For more information about this error, try `rustc --explain E0015`. +For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/issues/issue-2718-a.rs b/src/test/ui/issues/issue-2718-a.rs deleted file mode 100644 index 6c4915845..000000000 --- a/src/test/ui/issues/issue-2718-a.rs +++ /dev/null @@ -1,12 +0,0 @@ -pub struct SendPacket { - p: T -} - -mod pingpong { - use SendPacket; - pub type Ping = SendPacket; - pub struct Pong(SendPacket); - //~^ ERROR recursive type `Pong` has infinite size -} - -fn main() {} diff --git a/src/test/ui/issues/issue-2718-a.stderr b/src/test/ui/issues/issue-2718-a.stderr deleted file mode 100644 index c6e703f48..000000000 --- a/src/test/ui/issues/issue-2718-a.stderr +++ /dev/null @@ -1,16 +0,0 @@ -error[E0072]: recursive type `Pong` has infinite size - --> $DIR/issue-2718-a.rs:8:5 - | -LL | pub struct Pong(SendPacket); - | ^^^^^^^^^^^^^^^ ---------------- recursive without indirection - | | - | recursive type has infinite size - | -help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `Pong` representable - | -LL | pub struct Pong(Box>); - | ++++ + - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0072`. diff --git a/src/test/ui/issues/issue-28344.stderr b/src/test/ui/issues/issue-28344.stderr index 85a8698af..f398a5da3 100644 --- a/src/test/ui/issues/issue-28344.stderr +++ b/src/test/ui/issues/issue-28344.stderr @@ -4,9 +4,9 @@ warning: trait objects without an explicit `dyn` are deprecated LL | let x: u8 = BitXor::bitor(0 as u8, 0 as u8); | ^^^^^^ | - = note: `#[warn(bare_trait_objects)]` on by default = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see + = note: `#[warn(bare_trait_objects)]` on by default help: use `dyn` | LL | let x: u8 = ::bitor(0 as u8, 0 as u8); diff --git a/src/test/ui/issues/issue-29746.rs b/src/test/ui/issues/issue-29746.rs index 428cc637f..3470a7e09 100644 --- a/src/test/ui/issues/issue-29746.rs +++ b/src/test/ui/issues/issue-29746.rs @@ -7,7 +7,7 @@ macro_rules! zip { zip!([$($rest),*], $a.zip($b), (x,y), [x,y]) }; - // Intermediate steps to build the zipped expression, the match pattern, and + // Intermediate steps to build the zipped expression, the match pattern // and the output tuple of the closure, using macro hygiene to repeatedly // introduce new variables named 'x'. ([$a:expr, $($rest:expr),*], $zip:expr, $pat:pat, [$($flat:expr),*]) => { diff --git a/src/test/ui/issues/issue-29948.rs b/src/test/ui/issues/issue-29948.rs index 01c3ec648..3ed701480 100644 --- a/src/test/ui/issues/issue-29948.rs +++ b/src/test/ui/issues/issue-29948.rs @@ -1,6 +1,5 @@ // run-pass // needs-unwind -// ignore-wasm32-bare compiled with panic=abort by default use std::panic; diff --git a/src/test/ui/issues/issue-3008-1.stderr b/src/test/ui/issues/issue-3008-1.stderr index e49d8e6aa..be25b9091 100644 --- a/src/test/ui/issues/issue-3008-1.stderr +++ b/src/test/ui/issues/issue-3008-1.stderr @@ -2,12 +2,12 @@ error[E0072]: recursive type `Bar` has infinite size --> $DIR/issue-3008-1.rs:5:1 | LL | enum Bar { - | ^^^^^^^^ recursive type has infinite size + | ^^^^^^^^ ... LL | BarSome(Bar) | --- recursive without indirection | -help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `Bar` representable +help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle | LL | BarSome(Box) | ++++ + diff --git a/src/test/ui/issues/issue-3008-2.stderr b/src/test/ui/issues/issue-3008-2.stderr index b3ce6e420..858a8fd6a 100644 --- a/src/test/ui/issues/issue-3008-2.stderr +++ b/src/test/ui/issues/issue-3008-2.stderr @@ -3,10 +3,8 @@ error[E0072]: recursive type `Bar` has infinite size | LL | struct Bar { x: Bar } | ^^^^^^^^^^ --- recursive without indirection - | | - | recursive type has infinite size | -help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `Bar` representable +help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle | LL | struct Bar { x: Box } | ++++ + diff --git a/src/test/ui/issues/issue-3008-3.stderr b/src/test/ui/issues/issue-3008-3.stderr index c1c043e21..a1a81e293 100644 --- a/src/test/ui/issues/issue-3008-3.stderr +++ b/src/test/ui/issues/issue-3008-3.stderr @@ -3,10 +3,8 @@ error[E0072]: recursive type `E2` has infinite size | LL | enum E2 { V2(E2, marker::PhantomData), } | ^^^^^^^^^^ ------ recursive without indirection - | | - | recursive type has infinite size | -help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `E2` representable +help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle | LL | enum E2 { V2(Box>, marker::PhantomData), } | ++++ + diff --git a/src/test/ui/issues/issue-30371.rs b/src/test/ui/issues/issue-30371.rs index a1ae9a36b..eea548c48 100644 --- a/src/test/ui/issues/issue-30371.rs +++ b/src/test/ui/issues/issue-30371.rs @@ -1,5 +1,6 @@ // run-pass #![allow(unreachable_code)] +#![allow(for_loops_over_fallibles)] #![deny(unused_variables)] fn main() { diff --git a/src/test/ui/issues/issue-30490.rs b/src/test/ui/issues/issue-30490.rs index 47c17e362..68d9c4de4 100644 --- a/src/test/ui/issues/issue-30490.rs +++ b/src/test/ui/issues/issue-30490.rs @@ -1,6 +1,7 @@ // run-pass // ignore-emscripten no processes // ignore-sgx no processes +// ignore-fuchsia Child I/O swaps not privileged // Previously libstd would set stdio descriptors of a child process // by `dup`ing the requested descriptors to inherit directly into the diff --git a/src/test/ui/issues/issue-32326.stderr b/src/test/ui/issues/issue-32326.stderr index cea765850..dc51198d9 100644 --- a/src/test/ui/issues/issue-32326.stderr +++ b/src/test/ui/issues/issue-32326.stderr @@ -2,16 +2,14 @@ error[E0072]: recursive type `Expr` has infinite size --> $DIR/issue-32326.rs:5:1 | LL | enum Expr { - | ^^^^^^^^^ recursive type has infinite size + | ^^^^^^^^^ LL | Plus(Expr, Expr), - | ---- ---- recursive without indirection - | | - | recursive without indirection + | ---- recursive without indirection | -help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `Expr` representable +help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle | -LL | Plus(Box, Box), - | ++++ + ++++ + +LL | Plus(Box, Expr), + | ++++ + error: aborting due to previous error diff --git a/src/test/ui/issues/issue-35241.stderr b/src/test/ui/issues/issue-35241.stderr index 9ee7654a0..42a78ed97 100644 --- a/src/test/ui/issues/issue-35241.stderr +++ b/src/test/ui/issues/issue-35241.stderr @@ -11,7 +11,7 @@ LL | fn test() -> Foo { Foo } | = note: expected struct `Foo` found fn item `fn(u32) -> Foo {Foo}` -help: use parentheses to instantiate this tuple struct +help: use parentheses to construct this tuple struct | LL | fn test() -> Foo { Foo(/* u32 */) } | +++++++++++ diff --git a/src/test/ui/issues/issue-3563-2.rs b/src/test/ui/issues/issue-3563-2.rs deleted file mode 100644 index 88a449b85..000000000 --- a/src/test/ui/issues/issue-3563-2.rs +++ /dev/null @@ -1,14 +0,0 @@ -// check-pass -// pretty-expanded FIXME #23616 - -trait Canvas { - fn add_point(&self, point: &isize); - fn add_points(&self, shapes: &[isize]) { - for pt in shapes { - self.add_point(pt) - } - } - -} - -pub fn main() {} diff --git a/src/test/ui/issues/issue-36053.rs b/src/test/ui/issues/issue-36053.rs deleted file mode 100644 index 5c6d07804..000000000 --- a/src/test/ui/issues/issue-36053.rs +++ /dev/null @@ -1,22 +0,0 @@ -// run-pass -// Regression test for #36053. ICE was caused due to obligations being -// added to a special, dedicated fulfillment cx during a -// probe. Problem seems to be related to the particular definition of -// `FusedIterator` in std but I was not able to isolate that into an -// external crate. - -use std::iter::FusedIterator; - -struct Thing<'a>(#[allow(unused_tuple_struct_fields)] &'a str); -impl<'a> Iterator for Thing<'a> { - type Item = &'a str; - fn next(&mut self) -> Option<&'a str> { - None - } -} - -impl<'a> FusedIterator for Thing<'a> {} - -fn main() { - Thing("test").fuse().filter(|_| true).count(); -} diff --git a/src/test/ui/issues/issue-3779.stderr b/src/test/ui/issues/issue-3779.stderr index e853d0f8c..a0dbcc920 100644 --- a/src/test/ui/issues/issue-3779.stderr +++ b/src/test/ui/issues/issue-3779.stderr @@ -2,12 +2,12 @@ error[E0072]: recursive type `S` has infinite size --> $DIR/issue-3779.rs:1:1 | LL | struct S { - | ^^^^^^^^ recursive type has infinite size + | ^^^^^^^^ LL | LL | element: Option - | --------- recursive without indirection + | - recursive without indirection | -help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `S` representable +help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle | LL | element: Option> | ++++ + diff --git a/src/test/ui/issues/issue-40000.stderr b/src/test/ui/issues/issue-40000.stderr index e6f0b5fbf..c41fbb9d2 100644 --- a/src/test/ui/issues/issue-40000.stderr +++ b/src/test/ui/issues/issue-40000.stderr @@ -4,7 +4,7 @@ error[E0308]: mismatched types LL | foo(bar); | ^^^ one type is more general than the other | - = note: expected trait object `dyn for<'r> Fn(&'r i32)` + = note: expected trait object `dyn for<'a> Fn(&'a i32)` found trait object `dyn Fn(&i32)` error[E0308]: mismatched types @@ -13,7 +13,7 @@ error[E0308]: mismatched types LL | foo(bar); | ^^^ one type is more general than the other | - = note: expected trait object `dyn for<'r> Fn(&'r i32)` + = note: expected trait object `dyn for<'a> Fn(&'a i32)` found trait object `dyn Fn(&i32)` error: aborting due to 2 previous errors diff --git a/src/test/ui/issues/issue-4265.stderr b/src/test/ui/issues/issue-4265.stderr index 27e83d495..8c7303f3c 100644 --- a/src/test/ui/issues/issue-4265.stderr +++ b/src/test/ui/issues/issue-4265.stderr @@ -1,12 +1,12 @@ -error[E0201]: duplicate definitions with name `bar`: +error[E0592]: duplicate definitions with name `bar` --> $DIR/issue-4265.rs:10:5 | LL | fn bar() { - | -------- previous definition of `bar` here + | -------- other definition for `bar` ... LL | fn bar() { - | ^^^^^^^^ duplicate definition + | ^^^^^^^^ duplicate definitions for `bar` error: aborting due to previous error -For more information about this error, try `rustc --explain E0201`. +For more information about this error, try `rustc --explain E0592`. diff --git a/src/test/ui/issues/issue-43784-supertrait.rs b/src/test/ui/issues/issue-43784-supertrait.rs deleted file mode 100644 index 55c26ccd2..000000000 --- a/src/test/ui/issues/issue-43784-supertrait.rs +++ /dev/null @@ -1,10 +0,0 @@ -pub trait Partial: Copy { -} - -pub trait Complete: Partial { -} - -impl Partial for T where T: Complete {} -impl Complete for T {} //~ ERROR the trait bound `T: Copy` is not satisfied - -fn main() {} diff --git a/src/test/ui/issues/issue-43784-supertrait.stderr b/src/test/ui/issues/issue-43784-supertrait.stderr deleted file mode 100644 index bb890cb99..000000000 --- a/src/test/ui/issues/issue-43784-supertrait.stderr +++ /dev/null @@ -1,19 +0,0 @@ -error[E0277]: the trait bound `T: Copy` is not satisfied - --> $DIR/issue-43784-supertrait.rs:8:9 - | -LL | impl Complete for T {} - | ^^^^^^^^ the trait `Copy` is not implemented for `T` - | -note: required by a bound in `Complete` - --> $DIR/issue-43784-supertrait.rs:4:21 - | -LL | pub trait Complete: Partial { - | ^^^^^^^ required by this bound in `Complete` -help: consider restricting type parameter `T` - | -LL | impl Complete for T {} - | +++++++++++++++++++ - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/issues/issue-43853.rs b/src/test/ui/issues/issue-43853.rs index 3162c091c..dd42c1e3c 100644 --- a/src/test/ui/issues/issue-43853.rs +++ b/src/test/ui/issues/issue-43853.rs @@ -1,6 +1,5 @@ // run-pass // needs-unwind -// ignore-wasm32-bare compiled with panic=abort by default use std::panic; diff --git a/src/test/ui/issues/issue-46519.rs b/src/test/ui/issues/issue-46519.rs index 9bd3c0948..0567923b7 100644 --- a/src/test/ui/issues/issue-46519.rs +++ b/src/test/ui/issues/issue-46519.rs @@ -2,7 +2,6 @@ // compile-flags:--test -O // needs-unwind -// ignore-wasm32-bare compiled with panic=abort by default #[test] #[should_panic(expected = "creating inhabited type")] diff --git a/src/test/ui/issues/issue-47094.stderr b/src/test/ui/issues/issue-47094.stderr index e323ce660..970e31847 100644 --- a/src/test/ui/issues/issue-47094.stderr +++ b/src/test/ui/issues/issue-47094.stderr @@ -4,9 +4,9 @@ error[E0566]: conflicting representation hints LL | #[repr(C, u8)] | ^ ^^ | - = note: `#[deny(conflicting_repr_hints)]` on by default = 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 #68585 + = note: `#[deny(conflicting_repr_hints)]` on by default error[E0566]: conflicting representation hints --> $DIR/issue-47094.rs:8:8 diff --git a/src/test/ui/issues/issue-47486.stderr b/src/test/ui/issues/issue-47486.stderr index b45f57b7b..2bd24f08c 100644 --- a/src/test/ui/issues/issue-47486.stderr +++ b/src/test/ui/issues/issue-47486.stderr @@ -9,11 +9,6 @@ error[E0282]: type annotations needed | LL | [0u8; std::mem::size_of::<_>()]; | ^^^^^^^^^^^^^^^^^^^^^^ cannot infer type of the type parameter `T` declared on the function `size_of` - | -help: consider specifying the generic argument - | -LL | [0u8; std::mem::size_of::<_>()]; - | ~~~~~ error: aborting due to 2 previous errors diff --git a/src/test/ui/issues/issue-47725.stderr b/src/test/ui/issues/issue-47725.stderr index c7a9bfe31..7143fb4d6 100644 --- a/src/test/ui/issues/issue-47725.stderr +++ b/src/test/ui/issues/issue-47725.stderr @@ -13,12 +13,12 @@ LL | #[link_name = "foo"] LL | struct Foo; | ----------- not a foreign function or static | + = 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-47725.rs:1:9 | LL | #![warn(unused_attributes)] | ^^^^^^^^^^^^^^^^^ - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! warning: attribute should be applied to a foreign function or static --> $DIR/issue-47725.rs:8:1 diff --git a/src/test/ui/issues/issue-48962.rs b/src/test/ui/issues/issue-48962.rs deleted file mode 100644 index 80d815379..000000000 --- a/src/test/ui/issues/issue-48962.rs +++ /dev/null @@ -1,34 +0,0 @@ -// run-pass -#![allow(unused_must_use)] -// Test that we are able to reinitialize box with moved referent -static mut ORDER: [usize; 3] = [0, 0, 0]; -static mut INDEX: usize = 0; - -struct Dropee (usize); - -impl Drop for Dropee { - fn drop(&mut self) { - unsafe { - ORDER[INDEX] = self.0; - INDEX = INDEX + 1; - } - } -} - -fn add_sentintel() { - unsafe { - ORDER[INDEX] = 2; - INDEX = INDEX + 1; - } -} - -fn main() { - let mut x = Box::new(Dropee(1)); - *x; // move out from `*x` - add_sentintel(); - *x = Dropee(3); // re-initialize `*x` - {x}; // drop value - unsafe { - assert_eq!(ORDER, [1, 2, 3]); - } -} diff --git a/src/test/ui/issues/issue-50582.stderr b/src/test/ui/issues/issue-50582.stderr index 3d527eb6b..53ecc6112 100644 --- a/src/test/ui/issues/issue-50582.stderr +++ b/src/test/ui/issues/issue-50582.stderr @@ -7,13 +7,13 @@ LL | Vec::<[(); 1 + for x in 0..1 {}]>::new(); = note: see issue #87575 for more information = help: add `#![feature(const_for)]` to the crate attributes to enable -error[E0277]: cannot add `()` to `{integer}` +error[E0277]: cannot add `()` to `{integer}` in const contexts --> $DIR/issue-50582.rs:2:18 | LL | Vec::<[(); 1 + for x in 0..1 {}]>::new(); | ^ no implementation for `{integer} + ()` | - = help: the trait `Add<()>` is not implemented for `{integer}` + = help: the trait `~const Add<()>` is not implemented for `{integer}` = help: the following other types implement trait `Add`: <&'a f32 as Add> <&'a f64 as Add> diff --git a/src/test/ui/issues/issue-50781.stderr b/src/test/ui/issues/issue-50781.stderr index 93bd951d3..e185ecdda 100644 --- a/src/test/ui/issues/issue-50781.stderr +++ b/src/test/ui/issues/issue-50781.stderr @@ -4,11 +4,6 @@ error: the trait `X` cannot be made into an object LL | fn foo(&self) where Self: Trait; | ^^^ | -note: the lint level is defined here - --> $DIR/issue-50781.rs:1:9 - | -LL | #![deny(where_clauses_object_safety)] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ = 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 #51443 note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit @@ -19,6 +14,11 @@ LL | trait X { LL | fn foo(&self) where Self: Trait; | ^^^ ...because method `foo` references the `Self` type in its `where` clause = help: consider moving `foo` to another trait +note: the lint level is defined here + --> $DIR/issue-50781.rs:1:9 + | +LL | #![deny(where_clauses_object_safety)] + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/issues/issue-54044.stderr b/src/test/ui/issues/issue-54044.stderr index 100965de1..8bd94a041 100644 --- a/src/test/ui/issues/issue-54044.stderr +++ b/src/test/ui/issues/issue-54044.stderr @@ -7,12 +7,12 @@ 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)] | ^^^^^^^^^^^^^^^^^ - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! error: attribute should be applied to a function definition --> $DIR/issue-54044.rs:9:5 diff --git a/src/test/ui/issues/issue-5500-1.rs b/src/test/ui/issues/issue-5500-1.rs deleted file mode 100644 index 98d6e1a14..000000000 --- a/src/test/ui/issues/issue-5500-1.rs +++ /dev/null @@ -1,15 +0,0 @@ -// MIR doesn't generate an error because the assignment isn't reachable. This -// is OK because the test is here to check that the compiler doesn't ICE (cf. -// #5500). - -// check-pass - -struct TrieMapIterator<'a> { - node: &'a usize -} - -fn main() { - let a = 5; - let _iter = TrieMapIterator{node: &a}; - _iter.node = &panic!() -} diff --git a/src/test/ui/issues/issue-55380.stderr b/src/test/ui/issues/issue-55380.stderr index 65e94d796..403844c72 100644 --- a/src/test/ui/issues/issue-55380.stderr +++ b/src/test/ui/issues/issue-55380.stderr @@ -4,9 +4,9 @@ warning: the feature `specialization` is incomplete and may not be safe to use a LL | #![feature(specialization)] | ^^^^^^^^^^^^^^ | - = note: `#[warn(incomplete_features)]` on by default = note: see issue #31844 for more information = help: consider using `min_specialization` instead, which is more stable and complete + = note: `#[warn(incomplete_features)]` on by default warning: 1 warning emitted diff --git a/src/test/ui/issues/issue-57271.rs b/src/test/ui/issues/issue-57271.rs index 9940fecbe..f74222e3e 100644 --- a/src/test/ui/issues/issue-57271.rs +++ b/src/test/ui/issues/issue-57271.rs @@ -4,7 +4,7 @@ extern crate issue_57271_lib; use issue_57271_lib::BaseType; -pub enum ObjectType { //~ ERROR recursive type `ObjectType` has infinite size +pub enum ObjectType { //~ ERROR recursive types `ObjectType` and `TypeSignature` have infinite size Class(ClassTypeSignature), Array(TypeSignature), TypeVariable(()), @@ -16,7 +16,7 @@ pub struct ClassTypeSignature { pub inner: (), } -pub enum TypeSignature { //~ ERROR recursive type `TypeSignature` has infinite size +pub enum TypeSignature { Base(BaseType), Object(ObjectType), } diff --git a/src/test/ui/issues/issue-57271.stderr b/src/test/ui/issues/issue-57271.stderr index 825009665..391e69c91 100644 --- a/src/test/ui/issues/issue-57271.stderr +++ b/src/test/ui/issues/issue-57271.stderr @@ -1,31 +1,27 @@ -error[E0072]: recursive type `ObjectType` has infinite size +error[E0072]: recursive types `ObjectType` and `TypeSignature` have infinite size --> $DIR/issue-57271.rs:7:1 | LL | pub enum ObjectType { - | ^^^^^^^^^^^^^^^^^^^ recursive type has infinite size + | ^^^^^^^^^^^^^^^^^^^ LL | Class(ClassTypeSignature), LL | Array(TypeSignature), | ------------- recursive without indirection - | -help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `ObjectType` representable - | -LL | Array(Box), - | ++++ + - -error[E0072]: recursive type `TypeSignature` has infinite size - --> $DIR/issue-57271.rs:19:1 - | +... LL | pub enum TypeSignature { - | ^^^^^^^^^^^^^^^^^^^^^^ recursive type has infinite size + | ^^^^^^^^^^^^^^^^^^^^^^ LL | Base(BaseType), LL | Object(ObjectType), | ---------- recursive without indirection | -help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `TypeSignature` representable +help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle + | +LL ~ Array(Box), +LL | TypeVariable(()), + ... +LL | Base(BaseType), +LL ~ Object(Box), | -LL | Object(Box), - | ++++ + -error: aborting due to 2 previous errors +error: aborting due to previous error For more information about this error, try `rustc --explain E0072`. diff --git a/src/test/ui/issues/issue-57362-2.stderr b/src/test/ui/issues/issue-57362-2.stderr index 3b6cffeaf..7d08c4643 100644 --- a/src/test/ui/issues/issue-57362-2.stderr +++ b/src/test/ui/issues/issue-57362-2.stderr @@ -1,11 +1,11 @@ -error[E0599]: the function or associated item `make_g` exists for fn pointer `for<'r> fn(&'r ())`, but its trait bounds were not satisfied +error[E0599]: the function or associated item `make_g` exists for fn pointer `for<'a> fn(&'a ())`, but its trait bounds were not satisfied --> $DIR/issue-57362-2.rs:22:25 | LL | let x = ::make_g(); - | ^^^^^^ function or associated item cannot be called on `for<'r> fn(&'r ())` due to unsatisfied trait bounds + | ^^^^^^ function or associated item cannot be called on `for<'a> fn(&'a ())` due to unsatisfied trait bounds | = note: the following trait bounds were not satisfied: - `for<'r> fn(&'r ()): X` + `for<'a> fn(&'a ()): X` = help: items from traits can only be used if the trait is implemented and in scope note: `X` defines an item `make_g`, perhaps you need to implement it --> $DIR/issue-57362-2.rs:8:1 diff --git a/src/test/ui/issues/issue-58022.stderr b/src/test/ui/issues/issue-58022.stderr index 6d24209ad..56d85c066 100644 --- a/src/test/ui/issues/issue-58022.stderr +++ b/src/test/ui/issues/issue-58022.stderr @@ -1,9 +1,3 @@ -error[E0423]: expected function, tuple struct or tuple variant, found trait `Foo` - --> $DIR/issue-58022.rs:14:9 - | -LL | Foo(Box::new(*slice)) - | ^^^ not a function, tuple struct or tuple variant - error[E0790]: cannot refer to the associated constant on trait without specifying the corresponding `impl` type --> $DIR/issue-58022.rs:4:25 | @@ -13,6 +7,12 @@ LL | LL | fn new(slice: &[u8; Foo::SIZE]) -> Self; | ^^^^^^^^^ cannot refer to the associated constant of trait +error[E0423]: expected function, tuple struct or tuple variant, found trait `Foo` + --> $DIR/issue-58022.rs:14:9 + | +LL | Foo(Box::new(*slice)) + | ^^^ not a function, tuple struct or tuple variant + error: aborting due to 2 previous errors Some errors have detailed explanations: E0423, E0790. diff --git a/src/test/ui/issues/issue-58734.stderr b/src/test/ui/issues/issue-58734.stderr index a91a1b377..d2314626d 100644 --- a/src/test/ui/issues/issue-58734.stderr +++ b/src/test/ui/issues/issue-58734.stderr @@ -4,9 +4,9 @@ warning: trait objects without an explicit `dyn` are deprecated LL | Trait::nonexistent(()); | ^^^^^ | - = note: `#[warn(bare_trait_objects)]` on by default = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see + = note: `#[warn(bare_trait_objects)]` on by default help: use `dyn` | LL | ::nonexistent(()); diff --git a/src/test/ui/issues/issue-59488.stderr b/src/test/ui/issues/issue-59488.stderr index 08fe0b35e..f9846b62a 100644 --- a/src/test/ui/issues/issue-59488.stderr +++ b/src/test/ui/issues/issue-59488.stderr @@ -99,7 +99,7 @@ LL | assert_eq!(Foo::Bar, i); extern "C" fn(A, B, C, D) -> Ret extern "C" fn(A, B, C, D, ...) -> Ret extern "C" fn(A, B, C, D, E) -> Ret - and 68 others + and 118 others = note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: `fn(usize) -> Foo {Foo::Bar}` doesn't implement `Debug` @@ -118,7 +118,7 @@ LL | assert_eq!(Foo::Bar, i); extern "C" fn(A, B, C, D) -> Ret extern "C" fn(A, B, C, D, ...) -> Ret extern "C" fn(A, B, C, D, E) -> Ret - and 68 others + and 118 others = note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 10 previous errors diff --git a/src/test/ui/issues/issue-60622.stderr b/src/test/ui/issues/issue-60622.stderr index b305cc785..ecf1ae758 100644 --- a/src/test/ui/issues/issue-60622.stderr +++ b/src/test/ui/issues/issue-60622.stderr @@ -7,14 +7,14 @@ LL | fn a(&self) {} LL | b.a::<'_, 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 #42868 note: the lint level is defined here --> $DIR/issue-60622.rs:1:9 | LL | #![deny(warnings)] | ^^^^^^^^ = note: `#[deny(late_bound_lifetime_arguments)]` implied by `#[deny(warnings)]` - = 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 #42868 error[E0107]: this associated function takes 0 generic arguments but 1 generic argument was supplied --> $DIR/issue-60622.rs:10:7 diff --git a/src/test/ui/issues/issue-6458-3.stderr b/src/test/ui/issues/issue-6458-3.stderr index 2c3ec1a33..520efccae 100644 --- a/src/test/ui/issues/issue-6458-3.stderr +++ b/src/test/ui/issues/issue-6458-3.stderr @@ -2,12 +2,12 @@ error[E0282]: type annotations needed --> $DIR/issue-6458-3.rs:4:5 | LL | mem::transmute(0); - | ^^^^^^^^^^^^^^ cannot infer type of the type parameter `U` declared on the function `transmute` + | ^^^^^^^^^^^^^^ cannot infer type of the type parameter `Dst` declared on the function `transmute` | help: consider specifying the generic arguments | -LL | mem::transmute::(0); - | ++++++++++ +LL | mem::transmute::(0); + | ++++++++++++ error: aborting due to previous error diff --git a/src/test/ui/issues/issue-6458-4.stderr b/src/test/ui/issues/issue-6458-4.stderr index d6e74d10e..168ececac 100644 --- a/src/test/ui/issues/issue-6458-4.stderr +++ b/src/test/ui/issues/issue-6458-4.stderr @@ -6,7 +6,7 @@ LL | fn foo(b: bool) -> Result { | | | implicitly returns `()` as its body has no tail or `return` expression LL | Err("bar".to_string()); - | - help: remove this semicolon + | - help: remove this semicolon to return this value | = note: expected enum `Result` found unit type `()` diff --git a/src/test/ui/issues/issue-64620.rs b/src/test/ui/issues/issue-64620.rs deleted file mode 100644 index a62e5bf8d..000000000 --- a/src/test/ui/issues/issue-64620.rs +++ /dev/null @@ -1,5 +0,0 @@ -enum Bug { - V1 = return [0][0] //~ERROR return statement outside of function body -} - -fn main() {} diff --git a/src/test/ui/issues/issue-64620.stderr b/src/test/ui/issues/issue-64620.stderr deleted file mode 100644 index f40ac4de3..000000000 --- a/src/test/ui/issues/issue-64620.stderr +++ /dev/null @@ -1,9 +0,0 @@ -error[E0572]: return statement outside of function body - --> $DIR/issue-64620.rs:2:10 - | -LL | V1 = return [0][0] - | ^^^^^^^^^^^^^ - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0572`. diff --git a/src/test/ui/issues/issue-70724-add_type_neq_err_label-unwrap.stderr b/src/test/ui/issues/issue-70724-add_type_neq_err_label-unwrap.stderr index 7f29709ce..b30bcfb77 100644 --- a/src/test/ui/issues/issue-70724-add_type_neq_err_label-unwrap.stderr +++ b/src/test/ui/issues/issue-70724-add_type_neq_err_label-unwrap.stderr @@ -29,7 +29,7 @@ LL | assert_eq!(a, 0); | ^^^^^^^^^^^^^^^^ `fn() -> i32 {a}` cannot be formatted using `{:?}` because it doesn't implement `Debug` | = help: the trait `Debug` is not implemented for fn item `fn() -> i32 {a}` - = help: use parentheses to call the function: `a()` + = help: use parentheses to call this function: `a()` = note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 3 previous errors diff --git a/src/test/ui/issues/issue-72278.stderr b/src/test/ui/issues/issue-72278.stderr index 41dff686b..5468837a3 100644 --- a/src/test/ui/issues/issue-72278.stderr +++ b/src/test/ui/issues/issue-72278.stderr @@ -7,9 +7,9 @@ LL | fn func<'a, U>(&'a self) -> U { LL | S.func::<'a, U>() | ^^ | - = note: `#[warn(late_bound_lifetime_arguments)]` on by default = 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 #42868 + = note: `#[warn(late_bound_lifetime_arguments)]` on by default warning: 1 warning emitted diff --git a/src/test/ui/issues/issue-72554.rs b/src/test/ui/issues/issue-72554.rs index 7287639c6..54f7e9ac5 100644 --- a/src/test/ui/issues/issue-72554.rs +++ b/src/test/ui/issues/issue-72554.rs @@ -3,7 +3,6 @@ use std::collections::BTreeSet; #[derive(Hash)] pub enum ElemDerived { //~^ ERROR recursive type `ElemDerived` has infinite size - //~| ERROR cycle detected when computing drop-check constraints for `ElemDerived` A(ElemDerived) } diff --git a/src/test/ui/issues/issue-72554.stderr b/src/test/ui/issues/issue-72554.stderr index 3e5adcae1..d12be539f 100644 --- a/src/test/ui/issues/issue-72554.stderr +++ b/src/test/ui/issues/issue-72554.stderr @@ -2,30 +2,16 @@ error[E0072]: recursive type `ElemDerived` has infinite size --> $DIR/issue-72554.rs:4:1 | LL | pub enum ElemDerived { - | ^^^^^^^^^^^^^^^^^^^^ recursive type has infinite size -... + | ^^^^^^^^^^^^^^^^^^^^ +LL | LL | A(ElemDerived) | ----------- recursive without indirection | -help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `ElemDerived` representable +help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle | LL | A(Box) | ++++ + -error[E0391]: cycle detected when computing drop-check constraints for `ElemDerived` - --> $DIR/issue-72554.rs:4:1 - | -LL | pub enum ElemDerived { - | ^^^^^^^^^^^^^^^^^^^^ - | - = note: ...which immediately requires computing drop-check constraints for `ElemDerived` again -note: cycle used when computing drop-check constraints for `Elem` - --> $DIR/issue-72554.rs:11:1 - | -LL | pub enum Elem { - | ^^^^^^^^^^^^^ - -error: aborting due to 2 previous errors +error: aborting due to previous error -Some errors have detailed explanations: E0072, E0391. -For more information about an error, try `rustc --explain E0072`. +For more information about this error, try `rustc --explain E0072`. diff --git a/src/test/ui/issues/issue-73541-3.rs b/src/test/ui/issues/issue-73541-3.rs deleted file mode 100644 index 02ca02da8..000000000 --- a/src/test/ui/issues/issue-73541-3.rs +++ /dev/null @@ -1,9 +0,0 @@ -fn main() { - 'aaaaab: loop { - || { - loop { continue 'aaaaaa } - //~^ ERROR use of undeclared label `'aaaaaa` - }; - - } -} diff --git a/src/test/ui/issues/issue-73541-3.stderr b/src/test/ui/issues/issue-73541-3.stderr deleted file mode 100644 index 53487aaca..000000000 --- a/src/test/ui/issues/issue-73541-3.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error[E0426]: use of undeclared label `'aaaaaa` - --> $DIR/issue-73541-3.rs:4:29 - | -LL | 'aaaaab: loop { - | ------- a label with a similar name exists but is unreachable -LL | || { -LL | loop { continue 'aaaaaa } - | ^^^^^^^ undeclared label `'aaaaaa` - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0426`. diff --git a/src/test/ui/issues/issue-73541.rs b/src/test/ui/issues/issue-73541.rs deleted file mode 100644 index 399a07cd3..000000000 --- a/src/test/ui/issues/issue-73541.rs +++ /dev/null @@ -1,9 +0,0 @@ -fn main() { - 'a: loop { - || { - loop { continue 'a } - //~^ ERROR use of unreachable label `'a` - }; - - } -} diff --git a/src/test/ui/issues/issue-73541.stderr b/src/test/ui/issues/issue-73541.stderr deleted file mode 100644 index 4bb466ff1..000000000 --- a/src/test/ui/issues/issue-73541.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error[E0767]: use of unreachable label `'a` - --> $DIR/issue-73541.rs:4:29 - | -LL | 'a: loop { - | -- unreachable label defined here -LL | || { -LL | loop { continue 'a } - | ^^ unreachable label `'a` - | - = note: labels are unreachable through functions, closures, async blocks and modules - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0767`. diff --git a/src/test/ui/issues/issue-75307.rs b/src/test/ui/issues/issue-75307.rs index 2fe112a3b..cffa6bea8 100644 --- a/src/test/ui/issues/issue-75307.rs +++ b/src/test/ui/issues/issue-75307.rs @@ -1,3 +1,3 @@ fn main() { - format!(r"{}{}{}", named_arg=1); //~ ERROR invalid reference to positional arguments 1 and 2 + format!(r"{}{}{}", named_arg=1); //~ ERROR 3 positional arguments in format string, but there is 1 argument } diff --git a/src/test/ui/issues/issue-75307.stderr b/src/test/ui/issues/issue-75307.stderr index 10c952006..c5b0b11e7 100644 --- a/src/test/ui/issues/issue-75307.stderr +++ b/src/test/ui/issues/issue-75307.stderr @@ -1,10 +1,8 @@ -error: invalid reference to positional arguments 1 and 2 (there is 1 argument) - --> $DIR/issue-75307.rs:2:17 +error: 3 positional arguments in format string, but there is 1 argument + --> $DIR/issue-75307.rs:2:15 | LL | format!(r"{}{}{}", named_arg=1); - | ^^^^ - | - = note: positional arguments are zero-based + | ^^^^^^ - error: aborting due to previous error diff --git a/src/test/ui/issues/issue-75907.rs b/src/test/ui/issues/issue-75907.rs index 1534b6d07..6da99cf64 100644 --- a/src/test/ui/issues/issue-75907.rs +++ b/src/test/ui/issues/issue-75907.rs @@ -1,4 +1,4 @@ -// Test for for diagnostic improvement issue #75907 +// Test for diagnostic improvement issue #75907 mod foo { pub(crate) struct Foo(u8); diff --git a/src/test/ui/issues/issue-75907_b.rs b/src/test/ui/issues/issue-75907_b.rs index e30747782..fdfc5907c 100644 --- a/src/test/ui/issues/issue-75907_b.rs +++ b/src/test/ui/issues/issue-75907_b.rs @@ -1,4 +1,4 @@ -// Test for for diagnostic improvement issue #75907, extern crate +// Test for diagnostic improvement issue #75907, extern crate // aux-build:issue-75907.rs extern crate issue_75907 as a; diff --git a/src/test/ui/issues/issue-77993-1.rs b/src/test/ui/issues/issue-77993-1.rs deleted file mode 100644 index 515b3bc09..000000000 --- a/src/test/ui/issues/issue-77993-1.rs +++ /dev/null @@ -1,12 +0,0 @@ -#[derive(Clone)] -struct InGroup { - it: It, - //~^ ERROR cannot find type `It` in this scope - f: F, -} -fn dates_in_year() -> impl Clone { - InGroup { f: |d| d } - //~^ ERROR missing field `it` in initializer of `InGroup<_>` -} - -fn main() {} diff --git a/src/test/ui/issues/issue-77993-1.stderr b/src/test/ui/issues/issue-77993-1.stderr deleted file mode 100644 index 3dc78ba6f..000000000 --- a/src/test/ui/issues/issue-77993-1.stderr +++ /dev/null @@ -1,16 +0,0 @@ -error[E0412]: cannot find type `It` in this scope - --> $DIR/issue-77993-1.rs:3:9 - | -LL | it: It, - | ^^ not found in this scope - -error[E0063]: missing field `it` in initializer of `InGroup<_>` - --> $DIR/issue-77993-1.rs:8:5 - | -LL | InGroup { f: |d| d } - | ^^^^^^^ missing `it` - -error: aborting due to 2 previous errors - -Some errors have detailed explanations: E0063, E0412. -For more information about an error, try `rustc --explain E0063`. diff --git a/src/test/ui/issues/issue-78957.stderr b/src/test/ui/issues/issue-78957.stderr index 45fa69d6f..6de22d6bf 100644 --- a/src/test/ui/issues/issue-78957.stderr +++ b/src/test/ui/issues/issue-78957.stderr @@ -10,12 +10,12 @@ error: attribute should be applied to a function definition LL | pub struct Bar<#[cold] const N: usize>; | ^^^^^^^ -------------- not a function definition | + = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! note: the lint level is defined here --> $DIR/issue-78957.rs:1:9 | LL | #![deny(unused_attributes)] | ^^^^^^^^^^^^^^^^^ - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! error[E0517]: attribute should be applied to a struct, enum, or union --> $DIR/issue-78957.rs:10:23 diff --git a/src/test/ui/issues/issue-86756.stderr b/src/test/ui/issues/issue-86756.stderr index b26c1834d..693cfeced 100644 --- a/src/test/ui/issues/issue-86756.stderr +++ b/src/test/ui/issues/issue-86756.stderr @@ -20,9 +20,9 @@ warning: trait objects without an explicit `dyn` are deprecated LL | eq:: | ^^^ | - = note: `#[warn(bare_trait_objects)]` on by default = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see + = note: `#[warn(bare_trait_objects)]` on by default help: use `dyn` | LL | eq:: diff --git a/src/test/ui/issues/issue-8727.stderr b/src/test/ui/issues/issue-8727.stderr index 10daba5ef..5e1fdad60 100644 --- a/src/test/ui/issues/issue-8727.stderr +++ b/src/test/ui/issues/issue-8727.stderr @@ -6,8 +6,8 @@ LL | fn generic() { LL | generic::>(); | ---------------------- recursive call site | - = note: `#[warn(unconditional_recursion)]` on by default = help: a `loop` may express intention better if this is on purpose + = note: `#[warn(unconditional_recursion)]` on by default error: reached the recursion limit while instantiating `generic::>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>` --> $DIR/issue-8727.rs:8:5 diff --git a/src/test/ui/issues/issue-87707.rs b/src/test/ui/issues/issue-87707.rs index 26e9e2c8f..c14e52dfe 100644 --- a/src/test/ui/issues/issue-87707.rs +++ b/src/test/ui/issues/issue-87707.rs @@ -3,6 +3,7 @@ // run-fail // exec-env:RUST_BACKTRACE=0 // check-run-results +// needs-unwind uses catch_unwind use std::sync::Once; use std::panic; diff --git a/src/test/ui/issues/issue-87707.run.stderr b/src/test/ui/issues/issue-87707.run.stderr index e6c9ea0eb..527c78ba8 100644 --- a/src/test/ui/issues/issue-87707.run.stderr +++ b/src/test/ui/issues/issue-87707.run.stderr @@ -1,3 +1,3 @@ -thread 'main' panicked at 'Here Once instance is poisoned.', $DIR/issue-87707.rs:13:24 +thread 'main' panicked at 'Here Once instance is poisoned.', $DIR/issue-87707.rs:14:24 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace -thread 'main' panicked at 'Once instance has previously been poisoned', $DIR/issue-87707.rs:15:7 +thread 'main' panicked at 'Once instance has previously been poisoned', $DIR/issue-87707.rs:16:7 diff --git a/src/test/ui/issues/issue-99838.rs b/src/test/ui/issues/issue-99838.rs index eaeeac72b..2e81d5e82 100644 --- a/src/test/ui/issues/issue-99838.rs +++ b/src/test/ui/issues/issue-99838.rs @@ -1,5 +1,5 @@ // run-pass -#![feature(bench_black_box)] + use std::hint; struct U16(u16); -- cgit v1.2.3