summaryrefslogtreecommitdiffstats
path: root/tests/ui/unboxed-closures
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/unboxed-closures')
-rw-r--r--tests/ui/unboxed-closures/unboxed-closure-sugar-region.rs2
-rw-r--r--tests/ui/unboxed-closures/unboxed-closure-sugar-region.stderr2
-rw-r--r--tests/ui/unboxed-closures/unboxed-closure-sugar-used-on-struct-1.rs2
-rw-r--r--tests/ui/unboxed-closures/unboxed-closure-sugar-used-on-struct-1.stderr2
-rw-r--r--tests/ui/unboxed-closures/unboxed-closure-sugar-used-on-struct.rs2
-rw-r--r--tests/ui/unboxed-closures/unboxed-closure-sugar-used-on-struct.stderr2
-rw-r--r--tests/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters-3.rs2
-rw-r--r--tests/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters-3.stderr2
-rw-r--r--tests/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters.rs10
-rw-r--r--tests/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters.stderr10
-rw-r--r--tests/ui/unboxed-closures/unboxed-closure-sugar-wrong-trait.rs2
-rw-r--r--tests/ui/unboxed-closures/unboxed-closure-sugar-wrong-trait.stderr2
-rw-r--r--tests/ui/unboxed-closures/unboxed-closures-borrow-conflict.stderr2
-rw-r--r--tests/ui/unboxed-closures/unboxed-closures-failed-recursive-fn-1.stderr8
-rw-r--r--tests/ui/unboxed-closures/unboxed-closures-infer-fn-once-move-from-projection.stderr2
-rw-r--r--tests/ui/unboxed-closures/unboxed-closures-static-call-wrong-trait.stderr2
16 files changed, 27 insertions, 27 deletions
diff --git a/tests/ui/unboxed-closures/unboxed-closure-sugar-region.rs b/tests/ui/unboxed-closures/unboxed-closure-sugar-region.rs
index 65f40075b..c575f5077 100644
--- a/tests/ui/unboxed-closures/unboxed-closure-sugar-region.rs
+++ b/tests/ui/unboxed-closures/unboxed-closure-sugar-region.rs
@@ -28,7 +28,7 @@ fn test<'a,'b>() {
}
fn test2(x: &dyn Foo<(isize,),Output=()>, y: &dyn Foo(isize)) {
- //~^ ERROR this trait takes 1 lifetime argument but 0 lifetime arguments were supplied
+ //~^ ERROR trait takes 1 lifetime argument but 0 lifetime arguments were supplied
// Here, the omitted lifetimes are expanded to distinct things.
same_type(x, y)
}
diff --git a/tests/ui/unboxed-closures/unboxed-closure-sugar-region.stderr b/tests/ui/unboxed-closures/unboxed-closure-sugar-region.stderr
index 016fc4dfb..881461781 100644
--- a/tests/ui/unboxed-closures/unboxed-closure-sugar-region.stderr
+++ b/tests/ui/unboxed-closures/unboxed-closure-sugar-region.stderr
@@ -1,4 +1,4 @@
-error[E0107]: this trait takes 1 lifetime argument but 0 lifetime arguments were supplied
+error[E0107]: trait takes 1 lifetime argument but 0 lifetime arguments were supplied
--> $DIR/unboxed-closure-sugar-region.rs:30:51
|
LL | fn test2(x: &dyn Foo<(isize,),Output=()>, y: &dyn Foo(isize)) {
diff --git a/tests/ui/unboxed-closures/unboxed-closure-sugar-used-on-struct-1.rs b/tests/ui/unboxed-closures/unboxed-closure-sugar-used-on-struct-1.rs
index 462f6fb7b..14d5646b5 100644
--- a/tests/ui/unboxed-closures/unboxed-closure-sugar-used-on-struct-1.rs
+++ b/tests/ui/unboxed-closures/unboxed-closure-sugar-used-on-struct-1.rs
@@ -7,7 +7,7 @@ struct Bar<A> {
fn bar() {
let x: Box<Bar()> = panic!();
//~^ ERROR parenthesized type parameters may only be used with a `Fn` trait
- //~| ERROR this struct takes 1 generic argument but 0 generic arguments
+ //~| ERROR struct takes 1 generic argument but 0 generic arguments
}
fn main() { }
diff --git a/tests/ui/unboxed-closures/unboxed-closure-sugar-used-on-struct-1.stderr b/tests/ui/unboxed-closures/unboxed-closure-sugar-used-on-struct-1.stderr
index 29ea5735c..27b22c212 100644
--- a/tests/ui/unboxed-closures/unboxed-closure-sugar-used-on-struct-1.stderr
+++ b/tests/ui/unboxed-closures/unboxed-closure-sugar-used-on-struct-1.stderr
@@ -4,7 +4,7 @@ error[E0214]: parenthesized type parameters may only be used with a `Fn` trait
LL | let x: Box<Bar()> = panic!();
| ^^^^^ only `Fn` traits may use parentheses
-error[E0107]: this struct takes 1 generic argument but 0 generic arguments were supplied
+error[E0107]: struct takes 1 generic argument but 0 generic arguments were supplied
--> $DIR/unboxed-closure-sugar-used-on-struct-1.rs:8:16
|
LL | let x: Box<Bar()> = panic!();
diff --git a/tests/ui/unboxed-closures/unboxed-closure-sugar-used-on-struct.rs b/tests/ui/unboxed-closures/unboxed-closure-sugar-used-on-struct.rs
index bd61cbd80..657b29204 100644
--- a/tests/ui/unboxed-closures/unboxed-closure-sugar-used-on-struct.rs
+++ b/tests/ui/unboxed-closures/unboxed-closure-sugar-used-on-struct.rs
@@ -6,7 +6,7 @@ struct Bar<A> {
fn foo(b: Box<Bar()>) {
//~^ ERROR parenthesized type parameters may only be used with a `Fn` trait
- //~| ERROR this struct takes 1 generic argument but 0 generic arguments
+ //~| ERROR struct takes 1 generic argument but 0 generic arguments
}
fn main() { }
diff --git a/tests/ui/unboxed-closures/unboxed-closure-sugar-used-on-struct.stderr b/tests/ui/unboxed-closures/unboxed-closure-sugar-used-on-struct.stderr
index 427ba3414..94e42a66c 100644
--- a/tests/ui/unboxed-closures/unboxed-closure-sugar-used-on-struct.stderr
+++ b/tests/ui/unboxed-closures/unboxed-closure-sugar-used-on-struct.stderr
@@ -4,7 +4,7 @@ error[E0214]: parenthesized type parameters may only be used with a `Fn` trait
LL | fn foo(b: Box<Bar()>) {
| ^^^^^ only `Fn` traits may use parentheses
-error[E0107]: this struct takes 1 generic argument but 0 generic arguments were supplied
+error[E0107]: struct takes 1 generic argument but 0 generic arguments were supplied
--> $DIR/unboxed-closure-sugar-used-on-struct.rs:7:15
|
LL | fn foo(b: Box<Bar()>) {
diff --git a/tests/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters-3.rs b/tests/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters-3.rs
index f26ad8e93..dd47ae73a 100644
--- a/tests/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters-3.rs
+++ b/tests/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters-3.rs
@@ -3,7 +3,7 @@
trait Three<A,B,C> { fn dummy(&self) -> (A,B,C); }
fn foo(_: &dyn Three())
-//~^ ERROR this trait takes 3 generic arguments but 1 generic argument
+//~^ ERROR trait takes 3 generic arguments but 1 generic argument
//~| ERROR associated type `Output` not found
{}
diff --git a/tests/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters-3.stderr b/tests/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters-3.stderr
index ebaacf0a6..5d7fe3fa5 100644
--- a/tests/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters-3.stderr
+++ b/tests/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters-3.stderr
@@ -1,4 +1,4 @@
-error[E0107]: this trait takes 3 generic arguments but 1 generic argument was supplied
+error[E0107]: trait takes 3 generic arguments but 1 generic argument was supplied
--> $DIR/unboxed-closure-sugar-wrong-number-number-type-parameters-3.rs:5:16
|
LL | fn foo(_: &dyn Three())
diff --git a/tests/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters.rs b/tests/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters.rs
index 4465b43a7..2c7e12f32 100644
--- a/tests/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters.rs
+++ b/tests/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters.rs
@@ -3,25 +3,25 @@
trait Zero { fn dummy(&self); }
fn foo1(_: dyn Zero()) {
- //~^ ERROR this trait takes 0 generic arguments but 1 generic argument
+ //~^ ERROR trait takes 0 generic arguments but 1 generic argument
//~| ERROR associated type `Output` not found for `Zero`
}
fn foo2(_: dyn Zero<usize>) {
- //~^ ERROR this trait takes 0 generic arguments but 1 generic argument
+ //~^ ERROR trait takes 0 generic arguments but 1 generic argument
}
fn foo3(_: dyn Zero < usize >) {
- //~^ ERROR this trait takes 0 generic arguments but 1 generic argument
+ //~^ ERROR trait takes 0 generic arguments but 1 generic argument
}
fn foo4(_: dyn Zero(usize)) {
- //~^ ERROR this trait takes 0 generic arguments but 1 generic argument
+ //~^ ERROR trait takes 0 generic arguments but 1 generic argument
//~| ERROR associated type `Output` not found for `Zero`
}
fn foo5(_: dyn Zero ( usize )) {
- //~^ ERROR this trait takes 0 generic arguments but 1 generic argument
+ //~^ ERROR trait takes 0 generic arguments but 1 generic argument
//~| ERROR associated type `Output` not found for `Zero`
}
diff --git a/tests/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters.stderr b/tests/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters.stderr
index 9601e64c1..50b90553a 100644
--- a/tests/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters.stderr
+++ b/tests/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters.stderr
@@ -1,4 +1,4 @@
-error[E0107]: this trait takes 0 generic arguments but 1 generic argument was supplied
+error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplied
--> $DIR/unboxed-closure-sugar-wrong-number-number-type-parameters.rs:5:16
|
LL | fn foo1(_: dyn Zero()) {
@@ -18,7 +18,7 @@ error[E0220]: associated type `Output` not found for `Zero`
LL | fn foo1(_: dyn Zero()) {
| ^^^^^^ associated type `Output` not found
-error[E0107]: this trait takes 0 generic arguments but 1 generic argument was supplied
+error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplied
--> $DIR/unboxed-closure-sugar-wrong-number-number-type-parameters.rs:10:16
|
LL | fn foo2(_: dyn Zero<usize>) {
@@ -32,7 +32,7 @@ note: trait defined here, with 0 generic parameters
LL | trait Zero { fn dummy(&self); }
| ^^^^
-error[E0107]: this trait takes 0 generic arguments but 1 generic argument was supplied
+error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplied
--> $DIR/unboxed-closure-sugar-wrong-number-number-type-parameters.rs:14:16
|
LL | fn foo3(_: dyn Zero < usize >) {
@@ -46,7 +46,7 @@ note: trait defined here, with 0 generic parameters
LL | trait Zero { fn dummy(&self); }
| ^^^^
-error[E0107]: this trait takes 0 generic arguments but 1 generic argument was supplied
+error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplied
--> $DIR/unboxed-closure-sugar-wrong-number-number-type-parameters.rs:18:16
|
LL | fn foo4(_: dyn Zero(usize)) {
@@ -66,7 +66,7 @@ error[E0220]: associated type `Output` not found for `Zero`
LL | fn foo4(_: dyn Zero(usize)) {
| ^^^^^^^^^^^ associated type `Output` not found
-error[E0107]: this trait takes 0 generic arguments but 1 generic argument was supplied
+error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplied
--> $DIR/unboxed-closure-sugar-wrong-number-number-type-parameters.rs:23:16
|
LL | fn foo5(_: dyn Zero ( usize )) {
diff --git a/tests/ui/unboxed-closures/unboxed-closure-sugar-wrong-trait.rs b/tests/ui/unboxed-closures/unboxed-closure-sugar-wrong-trait.rs
index 4bcf90552..ad60b0a0c 100644
--- a/tests/ui/unboxed-closures/unboxed-closure-sugar-wrong-trait.rs
+++ b/tests/ui/unboxed-closures/unboxed-closure-sugar-wrong-trait.rs
@@ -3,7 +3,7 @@
trait Trait {}
fn f<F:Trait(isize) -> isize>(x: F) {}
-//~^ ERROR this trait takes 0 generic arguments but 1 generic argument
+//~^ ERROR trait takes 0 generic arguments but 1 generic argument
//~| ERROR associated type `Output` not found for `Trait`
fn main() {}
diff --git a/tests/ui/unboxed-closures/unboxed-closure-sugar-wrong-trait.stderr b/tests/ui/unboxed-closures/unboxed-closure-sugar-wrong-trait.stderr
index 3ff05fb23..130b193d6 100644
--- a/tests/ui/unboxed-closures/unboxed-closure-sugar-wrong-trait.stderr
+++ b/tests/ui/unboxed-closures/unboxed-closure-sugar-wrong-trait.stderr
@@ -1,4 +1,4 @@
-error[E0107]: this trait takes 0 generic arguments but 1 generic argument was supplied
+error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplied
--> $DIR/unboxed-closure-sugar-wrong-trait.rs:5:8
|
LL | fn f<F:Trait(isize) -> isize>(x: F) {}
diff --git a/tests/ui/unboxed-closures/unboxed-closures-borrow-conflict.stderr b/tests/ui/unboxed-closures/unboxed-closures-borrow-conflict.stderr
index 21d6b4fde..98fe97c5c 100644
--- a/tests/ui/unboxed-closures/unboxed-closures-borrow-conflict.stderr
+++ b/tests/ui/unboxed-closures/unboxed-closures-borrow-conflict.stderr
@@ -4,7 +4,7 @@ error[E0503]: cannot use `x` because it was mutably borrowed
LL | let f = || x += 1;
| -- - borrow occurs due to use of `x` in closure
| |
- | borrow of `x` occurs here
+ | `x` is borrowed here
LL | let _y = x;
| ^ use of borrowed `x`
LL | f;
diff --git a/tests/ui/unboxed-closures/unboxed-closures-failed-recursive-fn-1.stderr b/tests/ui/unboxed-closures/unboxed-closures-failed-recursive-fn-1.stderr
index cbdb4dd0f..23aa18d71 100644
--- a/tests/ui/unboxed-closures/unboxed-closures-failed-recursive-fn-1.stderr
+++ b/tests/ui/unboxed-closures/unboxed-closures-failed-recursive-fn-1.stderr
@@ -16,14 +16,14 @@ error[E0506]: cannot assign to `factorial` because it is borrowed
--> $DIR/unboxed-closures-failed-recursive-fn-1.rs:20:5
|
LL | let f = |x: u32| -> u32 {
- | --------------- borrow of `factorial` occurs here
+ | --------------- `factorial` is borrowed here
LL | let g = factorial.as_ref().unwrap();
| --------- borrow occurs due to use in closure
...
LL | factorial = Some(Box::new(f));
| ^^^^^^^^^
| |
- | assignment to borrowed `factorial` occurs here
+ | `factorial` is assigned to here but it was already borrowed
| borrow later used here
error[E0597]: `factorial` does not live long enough
@@ -47,12 +47,12 @@ LL | let mut factorial: Option<Box<dyn Fn(u32) -> u32 + 'static>> = None;
| ----------------------------------------- type annotation requires that `factorial` is borrowed for `'static`
LL |
LL | let f = |x: u32| -> u32 {
- | --------------- borrow of `factorial` occurs here
+ | --------------- `factorial` is borrowed here
LL | let g = factorial.as_ref().unwrap();
| --------- borrow occurs due to use in closure
...
LL | factorial = Some(Box::new(f));
- | ^^^^^^^^^ assignment to borrowed `factorial` occurs here
+ | ^^^^^^^^^ `factorial` is assigned to here but it was already borrowed
error: aborting due to 4 previous errors
diff --git a/tests/ui/unboxed-closures/unboxed-closures-infer-fn-once-move-from-projection.stderr b/tests/ui/unboxed-closures/unboxed-closures-infer-fn-once-move-from-projection.stderr
index 635ebbb71..846a44ce4 100644
--- a/tests/ui/unboxed-closures/unboxed-closures-infer-fn-once-move-from-projection.stderr
+++ b/tests/ui/unboxed-closures/unboxed-closures-infer-fn-once-move-from-projection.stderr
@@ -14,7 +14,7 @@ note: required by a bound in `foo`
--> $DIR/unboxed-closures-infer-fn-once-move-from-projection.rs:4:14
|
LL | fn foo<F>(f: F)
- | --- required by a bound in this
+ | --- required by a bound in this function
LL | where F: Fn()
| ^^^^ required by this bound in `foo`
diff --git a/tests/ui/unboxed-closures/unboxed-closures-static-call-wrong-trait.stderr b/tests/ui/unboxed-closures/unboxed-closures-static-call-wrong-trait.stderr
index 99ec51783..482fd3cb4 100644
--- a/tests/ui/unboxed-closures/unboxed-closures-static-call-wrong-trait.stderr
+++ b/tests/ui/unboxed-closures/unboxed-closures-static-call-wrong-trait.stderr
@@ -1,4 +1,4 @@
-error[E0599]: no method named `call` found for closure `[closure@unboxed-closures-static-call-wrong-trait.rs:6:26]` in the current scope
+error[E0599]: no method named `call` found for closure `[closure@$DIR/unboxed-closures-static-call-wrong-trait.rs:6:26: 6:29]` in the current scope
--> $DIR/unboxed-closures-static-call-wrong-trait.rs:7:10
|
LL | mut_.call((0, ));