diff options
Diffstat (limited to 'tests/ui/closures')
76 files changed, 103 insertions, 75 deletions
diff --git a/tests/ui/closures/2229_closure_analysis/diagnostics/borrowck/borrowck-1.stderr b/tests/ui/closures/2229_closure_analysis/diagnostics/borrowck/borrowck-1.stderr index 341d2bc65..f59a2625c 100644 --- a/tests/ui/closures/2229_closure_analysis/diagnostics/borrowck/borrowck-1.stderr +++ b/tests/ui/closures/2229_closure_analysis/diagnostics/borrowck/borrowck-1.stderr @@ -14,6 +14,6 @@ LL | println!("{:?}", p); LL | *y+=1; | ----- first borrow later used here -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0499`. diff --git a/tests/ui/closures/2229_closure_analysis/diagnostics/borrowck/borrowck-2.stderr b/tests/ui/closures/2229_closure_analysis/diagnostics/borrowck/borrowck-2.stderr index 584bb862b..64d5ff8e2 100644 --- a/tests/ui/closures/2229_closure_analysis/diagnostics/borrowck/borrowck-2.stderr +++ b/tests/ui/closures/2229_closure_analysis/diagnostics/borrowck/borrowck-2.stderr @@ -14,6 +14,6 @@ LL | let x = &mut p.x; LL | println!("{}", y); | - immutable borrow later used here -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0502`. diff --git a/tests/ui/closures/2229_closure_analysis/diagnostics/borrowck/borrowck-3.stderr b/tests/ui/closures/2229_closure_analysis/diagnostics/borrowck/borrowck-3.stderr index ee9238047..979527e9f 100644 --- a/tests/ui/closures/2229_closure_analysis/diagnostics/borrowck/borrowck-3.stderr +++ b/tests/ui/closures/2229_closure_analysis/diagnostics/borrowck/borrowck-3.stderr @@ -17,6 +17,6 @@ help: to force the closure to take ownership of `p` (and any other referenced va LL | move || { | ++++ -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0373`. diff --git a/tests/ui/closures/2229_closure_analysis/diagnostics/borrowck/borrowck-4.stderr b/tests/ui/closures/2229_closure_analysis/diagnostics/borrowck/borrowck-4.stderr index 46379a381..d47f0539b 100644 --- a/tests/ui/closures/2229_closure_analysis/diagnostics/borrowck/borrowck-4.stderr +++ b/tests/ui/closures/2229_closure_analysis/diagnostics/borrowck/borrowck-4.stderr @@ -17,6 +17,6 @@ help: to force the closure to take ownership of `p` (and any other referenced va LL | let mut c = move || { | ++++ -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0373`. diff --git a/tests/ui/closures/2229_closure_analysis/diagnostics/borrowck/borrowck-closures-mut-and-imm.stderr b/tests/ui/closures/2229_closure_analysis/diagnostics/borrowck/borrowck-closures-mut-and-imm.stderr index 5f1dae297..57234fffe 100644 --- a/tests/ui/closures/2229_closure_analysis/diagnostics/borrowck/borrowck-closures-mut-and-imm.stderr +++ b/tests/ui/closures/2229_closure_analysis/diagnostics/borrowck/borrowck-closures-mut-and-imm.stderr @@ -16,6 +16,6 @@ LL | }; LL | drop(c2); | -- immutable borrow later used here -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0502`. diff --git a/tests/ui/closures/2229_closure_analysis/diagnostics/cant-mutate-imm-borrow.stderr b/tests/ui/closures/2229_closure_analysis/diagnostics/cant-mutate-imm-borrow.stderr index 38c530b80..d224f21bc 100644 --- a/tests/ui/closures/2229_closure_analysis/diagnostics/cant-mutate-imm-borrow.stderr +++ b/tests/ui/closures/2229_closure_analysis/diagnostics/cant-mutate-imm-borrow.stderr @@ -7,6 +7,6 @@ LL | LL | z.0.0.0 = format!("X1"); | ------- mutable borrow occurs due to use of `*z.0.0` in closure -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0596`. diff --git a/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-array-diagnostics.stderr b/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-array-diagnostics.stderr index 309c63e52..1172f54c1 100644 --- a/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-array-diagnostics.stderr +++ b/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-array-diagnostics.stderr @@ -17,6 +17,6 @@ note: required by a bound in `expect_fn` LL | fn expect_fn<F: Fn()>(_f: F) {} | ^^^^ required by this bound in `expect_fn` -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0525`. diff --git a/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-multi-variant-diagnostics.stderr b/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-multi-variant-diagnostics.stderr index 83d282aad..347fa3fa8 100644 --- a/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-multi-variant-diagnostics.stderr +++ b/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-multi-variant-diagnostics.stderr @@ -16,6 +16,6 @@ help: consider mutably borrowing `c` LL | let a = &mut c; | ++++ -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0382`. diff --git a/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-single-variant-diagnostics.stderr b/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-single-variant-diagnostics.stderr index 46323b752..c9b27e768 100644 --- a/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-single-variant-diagnostics.stderr +++ b/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-single-variant-diagnostics.stderr @@ -16,6 +16,6 @@ help: consider mutably borrowing `c` LL | let b = &mut c; | ++++ -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0382`. diff --git a/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-struct-diagnostics.stderr b/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-struct-diagnostics.stderr index 25029cc7b..079a9abed 100644 --- a/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-struct-diagnostics.stderr +++ b/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-struct-diagnostics.stderr @@ -16,6 +16,6 @@ help: consider mutably borrowing `hello` LL | let b = &mut hello; | ++++ -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0382`. diff --git a/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-tuple-diagnostics-1.stderr b/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-tuple-diagnostics-1.stderr index 06ef7baf9..0bf717404 100644 --- a/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-tuple-diagnostics-1.stderr +++ b/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-tuple-diagnostics-1.stderr @@ -16,6 +16,6 @@ help: consider mutably borrowing `hello` LL | let b = &mut hello; | ++++ -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0382`. diff --git a/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-tuple-diagnostics.stderr b/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-tuple-diagnostics.stderr index 3e77635f9..4abe5eda2 100644 --- a/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-tuple-diagnostics.stderr +++ b/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-tuple-diagnostics.stderr @@ -17,6 +17,6 @@ note: required by a bound in `expect_fn` LL | fn expect_fn<F: Fn()>(_f: F) {} | ^^^^ required by this bound in `expect_fn` -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0525`. diff --git a/tests/ui/closures/2229_closure_analysis/diagnostics/multilevel-path.stderr b/tests/ui/closures/2229_closure_analysis/diagnostics/multilevel-path.stderr index ac4c9c937..5a054ef5f 100644 --- a/tests/ui/closures/2229_closure_analysis/diagnostics/multilevel-path.stderr +++ b/tests/ui/closures/2229_closure_analysis/diagnostics/multilevel-path.stderr @@ -12,6 +12,6 @@ LL | LL | c(); | - first borrow later used here -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0499`. diff --git a/tests/ui/closures/2229_closure_analysis/diagnostics/repr_packed.stderr b/tests/ui/closures/2229_closure_analysis/diagnostics/repr_packed.stderr index 8c44229bc..c9972c8e7 100644 --- a/tests/ui/closures/2229_closure_analysis/diagnostics/repr_packed.stderr +++ b/tests/ui/closures/2229_closure_analysis/diagnostics/repr_packed.stderr @@ -9,6 +9,6 @@ LL | println!("{}", foo.x); = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers) = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0793`. diff --git a/tests/ui/closures/2229_closure_analysis/diagnostics/simple-struct-min-capture.stderr b/tests/ui/closures/2229_closure_analysis/diagnostics/simple-struct-min-capture.stderr index 06157b2af..68fdb3ce1 100644 --- a/tests/ui/closures/2229_closure_analysis/diagnostics/simple-struct-min-capture.stderr +++ b/tests/ui/closures/2229_closure_analysis/diagnostics/simple-struct-min-capture.stderr @@ -16,6 +16,6 @@ LL | c(); | = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0502`. diff --git a/tests/ui/closures/2229_closure_analysis/diagnostics/union.stderr b/tests/ui/closures/2229_closure_analysis/diagnostics/union.stderr index 17834e612..63fb3e5d9 100644 --- a/tests/ui/closures/2229_closure_analysis/diagnostics/union.stderr +++ b/tests/ui/closures/2229_closure_analysis/diagnostics/union.stderr @@ -13,6 +13,6 @@ LL | a.y = 1; LL | c(); | - borrow later used here -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0506`. diff --git a/tests/ui/closures/2229_closure_analysis/issue-118144.rs b/tests/ui/closures/2229_closure_analysis/issue-118144.rs new file mode 100644 index 000000000..3e5d9f973 --- /dev/null +++ b/tests/ui/closures/2229_closure_analysis/issue-118144.rs @@ -0,0 +1,16 @@ +// Regression test for ICE #118144 + +struct V(i32); + +fn func(func_arg: &mut V) { + || { + // Declaring `x` separately instead of using + // a destructuring binding like `let V(x) = ...` + // becaue only `V(x) = ...` triggers the ICE + let x; + V(x) = func_arg; //~ ERROR: mismatched types + func_arg.0 = 0; + }; +} + +fn main() {} diff --git a/tests/ui/closures/2229_closure_analysis/issue-118144.stderr b/tests/ui/closures/2229_closure_analysis/issue-118144.stderr new file mode 100644 index 000000000..85cb5adc0 --- /dev/null +++ b/tests/ui/closures/2229_closure_analysis/issue-118144.stderr @@ -0,0 +1,11 @@ +error[E0308]: mismatched types + --> $DIR/issue-118144.rs:11:9 + | +LL | V(x) = func_arg; + | ^^^^ -------- this expression has type `&mut V` + | | + | expected `&mut V`, found `V` + +error: aborting due to 1 previous error + +For more information about this error, try `rustc --explain E0308`. diff --git a/tests/ui/closures/2229_closure_analysis/issue-90465.stderr b/tests/ui/closures/2229_closure_analysis/issue-90465.stderr index c1679c6b6..ccca24764 100644 --- a/tests/ui/closures/2229_closure_analysis/issue-90465.stderr +++ b/tests/ui/closures/2229_closure_analysis/issue-90465.stderr @@ -22,5 +22,5 @@ LL ~ let c0 = move || { LL + let _ = &f0; | -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/closures/2229_closure_analysis/match/match-edge-cases_2.stderr b/tests/ui/closures/2229_closure_analysis/match/match-edge-cases_2.stderr index 1e42d73c6..d82db0481 100644 --- a/tests/ui/closures/2229_closure_analysis/match/match-edge-cases_2.stderr +++ b/tests/ui/closures/2229_closure_analysis/match/match-edge-cases_2.stderr @@ -12,6 +12,6 @@ LL | LL | _b(); | -- borrow later used here -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0505`. diff --git a/tests/ui/closures/2229_closure_analysis/migrations/macro.stderr b/tests/ui/closures/2229_closure_analysis/migrations/macro.stderr index c17edce72..7ea5136d1 100644 --- a/tests/ui/closures/2229_closure_analysis/migrations/macro.stderr +++ b/tests/ui/closures/2229_closure_analysis/migrations/macro.stderr @@ -18,5 +18,5 @@ help: add a dummy let to cause `a` to be fully captured LL | let _ = || { let _ = &a; dbg!(a.0) }; | +++++++++++++ + -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/closures/2229_closure_analysis/migrations/mir_calls_to_shims.stderr b/tests/ui/closures/2229_closure_analysis/migrations/mir_calls_to_shims.stderr index e10898f98..2b76deca3 100644 --- a/tests/ui/closures/2229_closure_analysis/migrations/mir_calls_to_shims.stderr +++ b/tests/ui/closures/2229_closure_analysis/migrations/mir_calls_to_shims.stderr @@ -22,5 +22,5 @@ LL ~ let result = panic::catch_unwind(move || { LL + let _ = &f; | -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/closures/2229_closure_analysis/unique-borrows-are-invariant-1.stderr b/tests/ui/closures/2229_closure_analysis/unique-borrows-are-invariant-1.stderr index 730823281..e4b5d39c0 100644 --- a/tests/ui/closures/2229_closure_analysis/unique-borrows-are-invariant-1.stderr +++ b/tests/ui/closures/2229_closure_analysis/unique-borrows-are-invariant-1.stderr @@ -10,5 +10,5 @@ LL | let mut closure = |input| x.0 = input; | = help: consider adding the following bound: `'b: 'a` -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/closures/2229_closure_analysis/unique-borrows-are-invariant-2.stderr b/tests/ui/closures/2229_closure_analysis/unique-borrows-are-invariant-2.stderr index 66ba0fe35..c18649b9e 100644 --- a/tests/ui/closures/2229_closure_analysis/unique-borrows-are-invariant-2.stderr +++ b/tests/ui/closures/2229_closure_analysis/unique-borrows-are-invariant-2.stderr @@ -11,5 +11,5 @@ LL | self.borrowed = borrow; | = help: consider adding the following bound: `'a: 'b` -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/closures/add_semicolon_non_block_closure.stderr b/tests/ui/closures/add_semicolon_non_block_closure.stderr index 6f9c309ed..d095e59c7 100644 --- a/tests/ui/closures/add_semicolon_non_block_closure.stderr +++ b/tests/ui/closures/add_semicolon_non_block_closure.stderr @@ -11,6 +11,6 @@ help: consider using a semicolon here LL | foo(|| { bar(); }) | + +++ -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0308`. diff --git a/tests/ui/closures/binder/const-bound.stderr b/tests/ui/closures/binder/const-bound.stderr index c016465c1..9c4fd95ed 100644 --- a/tests/ui/closures/binder/const-bound.stderr +++ b/tests/ui/closures/binder/const-bound.stderr @@ -13,5 +13,5 @@ error: late-bound const parameter not allowed on closures LL | for<const N: i32> || -> () {}; | ^^^^^^^^^^^^ -error: aborting due to previous error; 1 warning emitted +error: aborting due to 1 previous error; 1 warning emitted diff --git a/tests/ui/closures/binder/disallow-const.stderr b/tests/ui/closures/binder/disallow-const.stderr index 59f299315..d38b233d9 100644 --- a/tests/ui/closures/binder/disallow-const.stderr +++ b/tests/ui/closures/binder/disallow-const.stderr @@ -7,6 +7,6 @@ LL | for<const N: i32> || -> () {}; = note: see issue #108185 <https://github.com/rust-lang/rust/issues/108185> for more information = help: add `#![feature(non_lifetime_binders)]` to the crate attributes to enable -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0658`. diff --git a/tests/ui/closures/binder/disallow-ty.stderr b/tests/ui/closures/binder/disallow-ty.stderr index 3370e21bd..bc6696ad3 100644 --- a/tests/ui/closures/binder/disallow-ty.stderr +++ b/tests/ui/closures/binder/disallow-ty.stderr @@ -7,6 +7,6 @@ LL | for<T> || -> () {}; = note: see issue #108185 <https://github.com/rust-lang/rust/issues/108185> for more information = help: add `#![feature(non_lifetime_binders)]` to the crate attributes to enable -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0658`. diff --git a/tests/ui/closures/binder/implicit-return.stderr b/tests/ui/closures/binder/implicit-return.stderr index 35db34ce2..ff39e8841 100644 --- a/tests/ui/closures/binder/implicit-return.stderr +++ b/tests/ui/closures/binder/implicit-return.stderr @@ -6,5 +6,5 @@ LL | let _f = for<'a> |_: &'a ()| {}; | | | `for<...>` is here -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/closures/binder/type-bound-2.stderr b/tests/ui/closures/binder/type-bound-2.stderr index 14b2dbf03..6609b326f 100644 --- a/tests/ui/closures/binder/type-bound-2.stderr +++ b/tests/ui/closures/binder/type-bound-2.stderr @@ -13,5 +13,5 @@ error: late-bound type parameter not allowed on closures LL | for<T> || -> () {}; | ^ -error: aborting due to previous error; 1 warning emitted +error: aborting due to 1 previous error; 1 warning emitted diff --git a/tests/ui/closures/binder/type-bound.stderr b/tests/ui/closures/binder/type-bound.stderr index ef00a2dff..22431130a 100644 --- a/tests/ui/closures/binder/type-bound.stderr +++ b/tests/ui/closures/binder/type-bound.stderr @@ -13,5 +13,5 @@ error: late-bound type parameter not allowed on closures LL | for<T> || -> T {}; | ^ -error: aborting due to previous error; 1 warning emitted +error: aborting due to 1 previous error; 1 warning emitted diff --git a/tests/ui/closures/cannot-call-unsized-via-ptr.stderr b/tests/ui/closures/cannot-call-unsized-via-ptr.stderr index 9ecc66d5c..7c73372e3 100644 --- a/tests/ui/closures/cannot-call-unsized-via-ptr.stderr +++ b/tests/ui/closures/cannot-call-unsized-via-ptr.stderr @@ -7,6 +7,6 @@ LL | let f: fn([u8]) = |_result| {}; = help: the trait `Sized` is not implemented for `[u8]` = note: all function arguments must have a statically known size -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0277`. diff --git a/tests/ui/closures/capture-unsized-by-move.stderr b/tests/ui/closures/capture-unsized-by-move.stderr index d7fafc8ca..686bbab88 100644 --- a/tests/ui/closures/capture-unsized-by-move.stderr +++ b/tests/ui/closures/capture-unsized-by-move.stderr @@ -9,6 +9,6 @@ LL | k.to_string(); = help: the trait `Sized` is not implemented for `(dyn std::fmt::Display + 'static)` = note: all values captured by value by a closure must have a statically known size -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0277`. diff --git a/tests/ui/closures/closure-bounds-cant-promote-superkind-in-struct.stderr b/tests/ui/closures/closure-bounds-cant-promote-superkind-in-struct.stderr index bf6ec5c36..e98f05b47 100644 --- a/tests/ui/closures/closure-bounds-cant-promote-superkind-in-struct.stderr +++ b/tests/ui/closures/closure-bounds-cant-promote-superkind-in-struct.stderr @@ -14,6 +14,6 @@ help: consider further restricting this bound LL | fn foo<F>(blk: F) -> X<F> where F: FnOnce() + 'static + std::marker::Send { | +++++++++++++++++++ -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0277`. diff --git a/tests/ui/closures/closure-bounds-subtype.stderr b/tests/ui/closures/closure-bounds-subtype.stderr index 8ad8273fc..42588668e 100644 --- a/tests/ui/closures/closure-bounds-subtype.stderr +++ b/tests/ui/closures/closure-bounds-subtype.stderr @@ -20,6 +20,6 @@ help: consider further restricting this bound LL | fn give_owned<F>(f: F) where F: FnOnce() + Send + std::marker::Sync { | +++++++++++++++++++ -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0277`. diff --git a/tests/ui/closures/closure-expected.stderr b/tests/ui/closures/closure-expected.stderr index 565038f51..6b309d70b 100644 --- a/tests/ui/closures/closure-expected.stderr +++ b/tests/ui/closures/closure-expected.stderr @@ -11,6 +11,6 @@ LL | let y = x.or_else(4); note: required by a bound in `Option::<T>::or_else` --> $SRC_DIR/core/src/option.rs:LL:COL -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0277`. diff --git a/tests/ui/closures/closure-immutable-outer-variable.stderr b/tests/ui/closures/closure-immutable-outer-variable.stderr index 799097889..23bd0020d 100644 --- a/tests/ui/closures/closure-immutable-outer-variable.stderr +++ b/tests/ui/closures/closure-immutable-outer-variable.stderr @@ -6,6 +6,6 @@ LL | let y = true; LL | foo(Box::new(move || y = !y) as Box<_>); | ^^^^^^ cannot assign -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0594`. diff --git a/tests/ui/closures/closure-move-sync.stderr b/tests/ui/closures/closure-move-sync.stderr index aee903ac9..2bb26b0c0 100644 --- a/tests/ui/closures/closure-move-sync.stderr +++ b/tests/ui/closures/closure-move-sync.stderr @@ -20,6 +20,6 @@ LL | let t = thread::spawn(|| { note: required by a bound in `spawn` --> $SRC_DIR/std/src/thread/mod.rs:LL:COL -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0277`. diff --git a/tests/ui/closures/closure-no-fn-1.stderr b/tests/ui/closures/closure-no-fn-1.stderr index 87e670bb0..8fab92e9b 100644 --- a/tests/ui/closures/closure-no-fn-1.stderr +++ b/tests/ui/closures/closure-no-fn-1.stderr @@ -14,6 +14,6 @@ note: closures can only be coerced to `fn` types if they do not capture any vari LL | let foo: fn(u8) -> u8 = |v: u8| { a += v; a }; | ^ `a` captured here -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0308`. diff --git a/tests/ui/closures/closure-no-fn-2.stderr b/tests/ui/closures/closure-no-fn-2.stderr index 7c7e9d0ce..06682fcc2 100644 --- a/tests/ui/closures/closure-no-fn-2.stderr +++ b/tests/ui/closures/closure-no-fn-2.stderr @@ -14,6 +14,6 @@ note: closures can only be coerced to `fn` types if they do not capture any vari LL | let bar: fn() -> u8 = || { b }; | ^ `b` captured here -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0308`. diff --git a/tests/ui/closures/closure-no-fn-3.stderr b/tests/ui/closures/closure-no-fn-3.stderr index 276e766e8..bbf3677fb 100644 --- a/tests/ui/closures/closure-no-fn-3.stderr +++ b/tests/ui/closures/closure-no-fn-3.stderr @@ -4,6 +4,6 @@ error[E0605]: non-primitive cast: `{closure@$DIR/closure-no-fn-3.rs:6:28: 6:30}` LL | let baz: fn() -> u8 = (|| { b }) as fn() -> u8; | ^^^^^^^^^^^^^^^^^^^^^^^^ invalid cast -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0605`. diff --git a/tests/ui/closures/closure-no-fn-4.stderr b/tests/ui/closures/closure-no-fn-4.stderr index 0bec11ab6..c86731b12 100644 --- a/tests/ui/closures/closure-no-fn-4.stderr +++ b/tests/ui/closures/closure-no-fn-4.stderr @@ -19,6 +19,6 @@ note: closures can only be coerced to `fn` types if they do not capture any vari LL | false => |a| a - b, | ^ `b` captured here -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0308`. diff --git a/tests/ui/closures/closure-no-fn-5.stderr b/tests/ui/closures/closure-no-fn-5.stderr index 13d19495d..ffe01fac4 100644 --- a/tests/ui/closures/closure-no-fn-5.stderr +++ b/tests/ui/closures/closure-no-fn-5.stderr @@ -18,6 +18,6 @@ LL | let bar: fn() -> u8 = || { a; b; c; d; e }; | | `b` captured here | `a` captured here -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0308`. diff --git a/tests/ui/closures/closure-referencing-itself-issue-25954.stderr b/tests/ui/closures/closure-referencing-itself-issue-25954.stderr index 8ca43cd1c..6fe6840b3 100644 --- a/tests/ui/closures/closure-referencing-itself-issue-25954.stderr +++ b/tests/ui/closures/closure-referencing-itself-issue-25954.stderr @@ -4,6 +4,6 @@ error[E0308]: mismatched types LL | let q = || p.b.set(5i32); | ^^^^^^^^^^^^^^^^ cyclic type of infinite size -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0308`. diff --git a/tests/ui/closures/closure-reform-bad.stderr b/tests/ui/closures/closure-reform-bad.stderr index 6bb598131..426930666 100644 --- a/tests/ui/closures/closure-reform-bad.stderr +++ b/tests/ui/closures/closure-reform-bad.stderr @@ -21,6 +21,6 @@ note: function defined here LL | fn call_bare(f: fn(&str)) { | ^^^^^^^^^ ----------- -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0308`. diff --git a/tests/ui/closures/closure-wrong-kind.stderr b/tests/ui/closures/closure-wrong-kind.stderr index 9ea55d764..705cc9486 100644 --- a/tests/ui/closures/closure-wrong-kind.stderr +++ b/tests/ui/closures/closure-wrong-kind.stderr @@ -16,6 +16,6 @@ note: required by a bound in `bar` LL | fn bar<T: Fn(u32)>(_: T) {} | ^^^^^^^ required by this bound in `bar` -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0525`. diff --git a/tests/ui/closures/coerce-unsafe-closure-to-unsafe-fn-ptr.mir.stderr b/tests/ui/closures/coerce-unsafe-closure-to-unsafe-fn-ptr.mir.stderr index a60100dda..579227703 100644 --- a/tests/ui/closures/coerce-unsafe-closure-to-unsafe-fn-ptr.mir.stderr +++ b/tests/ui/closures/coerce-unsafe-closure-to-unsafe-fn-ptr.mir.stderr @@ -6,6 +6,6 @@ LL | let _: unsafe fn() = || { ::std::pin::Pin::new_unchecked(&0_u8); }; | = note: consult the function's documentation for information on how to avoid undefined behavior -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0133`. diff --git a/tests/ui/closures/coerce-unsafe-closure-to-unsafe-fn-ptr.thir.stderr b/tests/ui/closures/coerce-unsafe-closure-to-unsafe-fn-ptr.thir.stderr index 8c516e890..fb237231d 100644 --- a/tests/ui/closures/coerce-unsafe-closure-to-unsafe-fn-ptr.thir.stderr +++ b/tests/ui/closures/coerce-unsafe-closure-to-unsafe-fn-ptr.thir.stderr @@ -6,6 +6,6 @@ LL | let _: unsafe fn() = || { ::std::pin::Pin::new_unchecked(&0_u8); }; | = note: consult the function's documentation for information on how to avoid undefined behavior -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0133`. diff --git a/tests/ui/closures/coerce-unsafe-to-closure.stderr b/tests/ui/closures/coerce-unsafe-to-closure.stderr index bd4ab13a2..4841ff32e 100644 --- a/tests/ui/closures/coerce-unsafe-to-closure.stderr +++ b/tests/ui/closures/coerce-unsafe-to-closure.stderr @@ -11,6 +11,6 @@ LL | let x: Option<&[u8]> = Some("foo").map(std::mem::transmute); note: required by a bound in `Option::<T>::map` --> $SRC_DIR/core/src/option.rs:LL:COL -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0277`. diff --git a/tests/ui/closures/infer-signature-from-impl.next.stderr b/tests/ui/closures/infer-signature-from-impl.next.stderr index 973517066..0866265cf 100644 --- a/tests/ui/closures/infer-signature-from-impl.next.stderr +++ b/tests/ui/closures/infer-signature-from-impl.next.stderr @@ -11,6 +11,6 @@ help: consider giving this closure parameter an explicit type LL | needs_foo(|x: /* Type */| { | ++++++++++++ -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0282`. diff --git a/tests/ui/closures/infer-signature-from-impl.rs b/tests/ui/closures/infer-signature-from-impl.rs index 6e8c94177..8b18e4ef9 100644 --- a/tests/ui/closures/infer-signature-from-impl.rs +++ b/tests/ui/closures/infer-signature-from-impl.rs @@ -1,5 +1,5 @@ // revisions: current next -//[next] compile-flags: -Ztrait-solver=next +//[next] compile-flags: -Znext-solver //[next] known-bug: trait-system-refactor-initiative#71 //[current] check-pass diff --git a/tests/ui/closures/issue-10398.stderr b/tests/ui/closures/issue-10398.stderr index 423b79daf..bcbcd6d4c 100644 --- a/tests/ui/closures/issue-10398.stderr +++ b/tests/ui/closures/issue-10398.stderr @@ -8,6 +8,6 @@ LL | drop(x); | = note: move occurs because `x` has type `Box<i32>`, which does not implement the `Copy` trait -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0382`. diff --git a/tests/ui/closures/issue-112547.stderr b/tests/ui/closures/issue-112547.stderr index d86b05dc6..f47ea6072 100644 --- a/tests/ui/closures/issue-112547.stderr +++ b/tests/ui/closures/issue-112547.stderr @@ -18,6 +18,6 @@ LL | #![feature(non_lifetime_binders)] = note: see issue #108185 <https://github.com/rust-lang/rust/issues/108185> for more information = note: `#[warn(incomplete_features)]` on by default -error: aborting due to previous error; 1 warning emitted +error: aborting due to 1 previous error; 1 warning emitted For more information about this error, try `rustc --explain E0412`. diff --git a/tests/ui/closures/issue-113087.stderr b/tests/ui/closures/issue-113087.stderr index 8ccef4a54..c51d13f4a 100644 --- a/tests/ui/closures/issue-113087.stderr +++ b/tests/ui/closures/issue-113087.stderr @@ -11,6 +11,6 @@ LL | }); LL | } | - `a` dropped here while still borrowed -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0597`. diff --git a/tests/ui/closures/issue-11873.stderr b/tests/ui/closures/issue-11873.stderr index c814eedd2..04921b922 100644 --- a/tests/ui/closures/issue-11873.stderr +++ b/tests/ui/closures/issue-11873.stderr @@ -11,6 +11,6 @@ LL | LL | f(); | - borrow later used here -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0505`. diff --git a/tests/ui/closures/issue-25439.stderr b/tests/ui/closures/issue-25439.stderr index 5e889e6c1..19a26396a 100644 --- a/tests/ui/closures/issue-25439.stderr +++ b/tests/ui/closures/issue-25439.stderr @@ -14,6 +14,6 @@ note: required by a bound in `fix` LL | fn fix<F>(f: F) -> i32 where F: Fn(Helper<F>, i32) -> i32 { | ^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `fix` -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0644`. diff --git a/tests/ui/closures/issue-67123.stderr b/tests/ui/closures/issue-67123.stderr index 7877c7334..bdafeaef1 100644 --- a/tests/ui/closures/issue-67123.stderr +++ b/tests/ui/closures/issue-67123.stderr @@ -12,6 +12,6 @@ help: consider restricting type parameter `T` LL | fn foo<T: Copy>(t: T) { | ++++++ -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0382`. diff --git a/tests/ui/closures/issue-6801.stderr b/tests/ui/closures/issue-6801.stderr index 6a40db0d5..aed673fe1 100644 --- a/tests/ui/closures/issue-6801.stderr +++ b/tests/ui/closures/issue-6801.stderr @@ -11,6 +11,6 @@ LL | twice(x); LL | invoke(sq); | -- borrow later used here -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0505`. diff --git a/tests/ui/closures/issue-80313-mutable-borrow-in-closure.stderr b/tests/ui/closures/issue-80313-mutable-borrow-in-closure.stderr index 239f071ca..1266c603e 100644 --- a/tests/ui/closures/issue-80313-mutable-borrow-in-closure.stderr +++ b/tests/ui/closures/issue-80313-mutable-borrow-in-closure.stderr @@ -12,6 +12,6 @@ help: consider changing this to be mutable LL | let mut callback = || { | +++ -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0596`. diff --git a/tests/ui/closures/issue-80313-mutable-borrow-in-move-closure.stderr b/tests/ui/closures/issue-80313-mutable-borrow-in-move-closure.stderr index 1ec279f03..57320b58d 100644 --- a/tests/ui/closures/issue-80313-mutable-borrow-in-move-closure.stderr +++ b/tests/ui/closures/issue-80313-mutable-borrow-in-move-closure.stderr @@ -12,6 +12,6 @@ help: consider changing this to be mutable LL | let mut callback = move || { | +++ -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0596`. diff --git a/tests/ui/closures/issue-80313-mutation-in-closure.stderr b/tests/ui/closures/issue-80313-mutation-in-closure.stderr index 22a62ce73..b605cd2f9 100644 --- a/tests/ui/closures/issue-80313-mutation-in-closure.stderr +++ b/tests/ui/closures/issue-80313-mutation-in-closure.stderr @@ -12,6 +12,6 @@ help: consider changing this to be mutable LL | let mut callback = || { | +++ -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0596`. diff --git a/tests/ui/closures/issue-80313-mutation-in-move-closure.stderr b/tests/ui/closures/issue-80313-mutation-in-move-closure.stderr index a2222f8cc..b0210ac7c 100644 --- a/tests/ui/closures/issue-80313-mutation-in-move-closure.stderr +++ b/tests/ui/closures/issue-80313-mutation-in-move-closure.stderr @@ -12,6 +12,6 @@ help: consider changing this to be mutable LL | let mut callback = move || { | +++ -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0596`. diff --git a/tests/ui/closures/issue-81700-mut-borrow.stderr b/tests/ui/closures/issue-81700-mut-borrow.stderr index 03b18c3f7..d050fb60c 100644 --- a/tests/ui/closures/issue-81700-mut-borrow.stderr +++ b/tests/ui/closures/issue-81700-mut-borrow.stderr @@ -11,6 +11,6 @@ help: consider changing this to be mutable LL | let mut bar = || { foo(x); }; | +++ -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0596`. diff --git a/tests/ui/closures/issue-82438-mut-without-upvar.stderr b/tests/ui/closures/issue-82438-mut-without-upvar.stderr index f0951b7d1..c6ed7097c 100644 --- a/tests/ui/closures/issue-82438-mut-without-upvar.stderr +++ b/tests/ui/closures/issue-82438-mut-without-upvar.stderr @@ -9,6 +9,6 @@ help: consider changing this to be mutable LL | let mut c = |a, b, c, d| {}; | +++ -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0596`. diff --git a/tests/ui/closures/issue-84044-drop-non-mut.stderr b/tests/ui/closures/issue-84044-drop-non-mut.stderr index 5335a056c..ada0e3373 100644 --- a/tests/ui/closures/issue-84044-drop-non-mut.stderr +++ b/tests/ui/closures/issue-84044-drop-non-mut.stderr @@ -9,6 +9,6 @@ help: consider changing this to be mutable LL | let mut f = || {}; | +++ -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0596`. diff --git a/tests/ui/closures/issue-84128.stderr b/tests/ui/closures/issue-84128.stderr index 1cd8949b8..9d4c7f715 100644 --- a/tests/ui/closures/issue-84128.stderr +++ b/tests/ui/closures/issue-84128.stderr @@ -19,6 +19,6 @@ note: tuple struct defined here LL | struct Foo<T>(T); | ^^^ -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0308`. diff --git a/tests/ui/closures/issue-868.rs b/tests/ui/closures/issue-868.rs index ce0a3c7ca..df03b191a 100644 --- a/tests/ui/closures/issue-868.rs +++ b/tests/ui/closures/issue-868.rs @@ -1,5 +1,6 @@ // run-pass #![allow(unused_parens)] +#![allow(unit_bindings)] // pretty-expanded FIXME #23616 fn f<T, F>(g: F) -> T where F: FnOnce() -> T { g() } diff --git a/tests/ui/closures/issue-99565.stderr b/tests/ui/closures/issue-99565.stderr index 0d940aa9a..e48f51061 100644 --- a/tests/ui/closures/issue-99565.stderr +++ b/tests/ui/closures/issue-99565.stderr @@ -9,6 +9,6 @@ help: consider specifying the generic arguments LL | foo::<T, _>(|| {}); | ++++++++ -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0282`. diff --git a/tests/ui/closures/multiple-fn-bounds.stderr b/tests/ui/closures/multiple-fn-bounds.stderr index d94c902f7..325652ef1 100644 --- a/tests/ui/closures/multiple-fn-bounds.stderr +++ b/tests/ui/closures/multiple-fn-bounds.stderr @@ -6,8 +6,8 @@ LL | foo(move |x| v); | | | expected due to this | - = note: expected closure signature `fn(char) -> _` - found closure signature `for<'a> fn(&'a char) -> _` + = note: expected closure signature `fn(_) -> _` + found closure signature `for<'a> fn(&'a _) -> _` note: closure inferred to have a different signature due to this bound --> $DIR/multiple-fn-bounds.rs:1:11 | @@ -23,6 +23,6 @@ help: consider adjusting the signature so it does not borrow its argument LL | foo(move |char| v); | ~~~~ -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0631`. diff --git a/tests/ui/closures/old-closure-expression-remove-semicolon.stderr b/tests/ui/closures/old-closure-expression-remove-semicolon.stderr index bc54ab4d5..c6ce1c62d 100644 --- a/tests/ui/closures/old-closure-expression-remove-semicolon.stderr +++ b/tests/ui/closures/old-closure-expression-remove-semicolon.stderr @@ -9,6 +9,6 @@ LL | | foo(); LL | | }; | |_____^ expected `i32`, found `()` -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0308`. diff --git a/tests/ui/closures/print/closure-print-generic-1.stderr b/tests/ui/closures/print/closure-print-generic-1.stderr index 2697f93b1..41cad279f 100644 --- a/tests/ui/closures/print/closure-print-generic-1.stderr +++ b/tests/ui/closures/print/closure-print-generic-1.stderr @@ -15,6 +15,6 @@ note: this value implements `FnOnce`, which causes it to be moved when called LL | c(); | ^ -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0382`. diff --git a/tests/ui/closures/print/closure-print-generic-2.stderr b/tests/ui/closures/print/closure-print-generic-2.stderr index ced0be945..0a604a7d6 100644 --- a/tests/ui/closures/print/closure-print-generic-2.stderr +++ b/tests/ui/closures/print/closure-print-generic-2.stderr @@ -15,6 +15,6 @@ help: use parentheses to call this closure LL | let c1: () = c(); | ++ -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0308`. diff --git a/tests/ui/closures/print/closure-print-generic-trim-off-verbose-2.stderr b/tests/ui/closures/print/closure-print-generic-trim-off-verbose-2.stderr index 6e3659b95..1a1325542 100644 --- a/tests/ui/closures/print/closure-print-generic-trim-off-verbose-2.stderr +++ b/tests/ui/closures/print/closure-print-generic-trim-off-verbose-2.stderr @@ -15,6 +15,6 @@ help: use parentheses to call this closure LL | let c1 : () = c(); | ++ -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0308`. diff --git a/tests/ui/closures/print/closure-print-generic-verbose-1.stderr b/tests/ui/closures/print/closure-print-generic-verbose-1.stderr index 5e8a6b1a7..75aa3c934 100644 --- a/tests/ui/closures/print/closure-print-generic-verbose-1.stderr +++ b/tests/ui/closures/print/closure-print-generic-verbose-1.stderr @@ -15,6 +15,6 @@ note: this value implements `FnOnce`, which causes it to be moved when called LL | c(); | ^ -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0382`. diff --git a/tests/ui/closures/print/closure-print-generic-verbose-2.stderr b/tests/ui/closures/print/closure-print-generic-verbose-2.stderr index f1fc35e75..855381724 100644 --- a/tests/ui/closures/print/closure-print-generic-verbose-2.stderr +++ b/tests/ui/closures/print/closure-print-generic-verbose-2.stderr @@ -15,6 +15,6 @@ help: use parentheses to call this closure LL | let c1 : () = c(); | ++ -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0308`. diff --git a/tests/ui/closures/print/closure-print-verbose.stderr b/tests/ui/closures/print/closure-print-verbose.stderr index 3f9160fe5..3d0af5eb1 100644 --- a/tests/ui/closures/print/closure-print-verbose.stderr +++ b/tests/ui/closures/print/closure-print-verbose.stderr @@ -14,6 +14,6 @@ note: closures can only be coerced to `fn` types if they do not capture any vari LL | let foo: fn(u8) -> u8 = |v: u8| { a += v; a }; | ^ `a` captured here -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0308`. |