aboutsummaryrefslogtreecommitdiff
path: root/tests/ui
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui')
-rw-r--r--tests/ui/cfg/cfg_attr-resolve.rs2
-rw-r--r--tests/ui/cfg/cfg_attr-resolve.stderr6
-rw-r--r--tests/ui/pin_project/packed-enum.stderr6
-rw-r--r--tests/ui/pin_project/private_in_public-enum.stderr4
-rw-r--r--tests/ui/pin_project/project_replace_unsized.stderr6
-rw-r--r--tests/ui/pin_project/project_replace_unsized_fn_params.rs (renamed from tests/ui/pin_project/project_replace_unsized_locals.rs)2
-rw-r--r--tests/ui/pin_project/project_replace_unsized_fn_params.stderr (renamed from tests/ui/pin_project/project_replace_unsized_locals.stderr)10
-rw-r--r--tests/ui/pinned_drop/call-drop-inner.stderr10
8 files changed, 25 insertions, 21 deletions
diff --git a/tests/ui/cfg/cfg_attr-resolve.rs b/tests/ui/cfg/cfg_attr-resolve.rs
index c7a246a..e36cc95 100644
--- a/tests/ui/cfg/cfg_attr-resolve.rs
+++ b/tests/ui/cfg/cfg_attr-resolve.rs
@@ -7,5 +7,5 @@ struct Foo<T> {
fn main() {
let mut x = Foo { f: 0_u8 };
- let _x = Pin::new(&mut x).project(); //~ ERROR E0599
+ let _ = Pin::new(&mut x).project(); //~ ERROR E0599
}
diff --git a/tests/ui/cfg/cfg_attr-resolve.stderr b/tests/ui/cfg/cfg_attr-resolve.stderr
index ee1fa03..12bcc67 100644
--- a/tests/ui/cfg/cfg_attr-resolve.stderr
+++ b/tests/ui/cfg/cfg_attr-resolve.stderr
@@ -1,5 +1,5 @@
error[E0599]: no method named `project` found for struct `Pin<&mut Foo<u8>>` in the current scope
- --> $DIR/cfg_attr-resolve.rs:10:31
+ --> $DIR/cfg_attr-resolve.rs:10:30
|
-10 | let _x = Pin::new(&mut x).project(); //~ ERROR E0599
- | ^^^^^^^ method not found in `Pin<&mut Foo<u8>>`
+10 | let _ = Pin::new(&mut x).project(); //~ ERROR E0599
+ | ^^^^^^^ method not found in `Pin<&mut Foo<u8>>`
diff --git a/tests/ui/pin_project/packed-enum.stderr b/tests/ui/pin_project/packed-enum.stderr
index 0a5d31b..afc8b30 100644
--- a/tests/ui/pin_project/packed-enum.stderr
+++ b/tests/ui/pin_project/packed-enum.stderr
@@ -1,4 +1,4 @@
-error[E0517]: attribute should be applied to struct or union
+error[E0517]: attribute should be applied to a struct or union
--> $DIR/packed-enum.rs:3:8
|
3 | #[repr(packed)] //~ ERROR E0517
@@ -8,7 +8,7 @@ error[E0517]: attribute should be applied to struct or union
6 | | }
| |_- not a struct or union
-error[E0517]: attribute should be applied to struct or union
+error[E0517]: attribute should be applied to a struct or union
--> $DIR/packed-enum.rs:9:8
|
9 | #[repr(packed)] //~ ERROR E0517
@@ -18,7 +18,7 @@ error[E0517]: attribute should be applied to struct or union
12 | | }
| |_- not a struct or union
-error[E0517]: attribute should be applied to struct or union
+error[E0517]: attribute should be applied to a struct or union
--> $DIR/packed-enum.rs:14:8
|
14 | #[repr(packed)] //~ ERROR E0517
diff --git a/tests/ui/pin_project/private_in_public-enum.stderr b/tests/ui/pin_project/private_in_public-enum.stderr
index a14756b..6e3316c 100644
--- a/tests/ui/pin_project/private_in_public-enum.stderr
+++ b/tests/ui/pin_project/private_in_public-enum.stderr
@@ -5,7 +5,7 @@ error[E0446]: private type `PrivateEnum` in public interface
| ^^^^^^^^^^^ can't leak private type
...
9 | enum PrivateEnum {
- | - `PrivateEnum` declared as private
+ | ---------------- `PrivateEnum` declared as private
error[E0446]: private type `foo::PrivateEnum` in public interface
--> $DIR/private_in_public-enum.rs:15:11
@@ -14,4 +14,4 @@ error[E0446]: private type `foo::PrivateEnum` in public interface
| ^^^^^^^^^^^ can't leak private type
...
18 | enum PrivateEnum {
- | - `foo::PrivateEnum` declared as private
+ | ---------------- `foo::PrivateEnum` declared as private
diff --git a/tests/ui/pin_project/project_replace_unsized.stderr b/tests/ui/pin_project/project_replace_unsized.stderr
index b6ecb1b..e40db5f 100644
--- a/tests/ui/pin_project/project_replace_unsized.stderr
+++ b/tests/ui/pin_project/project_replace_unsized.stderr
@@ -7,7 +7,7 @@ error[E0277]: the size for values of type `T` cannot be known at compilation tim
| - this type parameter needs to be `Sized`
|
= note: required because it appears within the type `Struct<T>`
- = help: unsized locals are gated as an unstable feature
+ = help: unsized fn params are gated as an unstable feature
help: function arguments must have a statically known size, borrowed types always have a known size
|
3 | #[pin_project(&project_replace)] //~ ERROR E0277
@@ -42,7 +42,7 @@ error[E0277]: the size for values of type `T` cannot be known at compilation tim
| - this type parameter needs to be `Sized`
|
= note: required because it appears within the type `TupleStruct<T>`
- = help: unsized locals are gated as an unstable feature
+ = help: unsized fn params are gated as an unstable feature
help: function arguments must have a statically known size, borrowed types always have a known size
|
8 | #[pin_project(&project_replace)] //~ ERROR E0277
@@ -67,4 +67,4 @@ error[E0277]: the size for values of type `T` cannot be known at compilation tim
| doesn't have a size known at compile-time
|
= note: all function arguments must have a statically known size
- = help: unsized locals are gated as an unstable feature
+ = help: unsized fn params are gated as an unstable feature
diff --git a/tests/ui/pin_project/project_replace_unsized_locals.rs b/tests/ui/pin_project/project_replace_unsized_fn_params.rs
index 7e28e2c..e0fa25b 100644
--- a/tests/ui/pin_project/project_replace_unsized_locals.rs
+++ b/tests/ui/pin_project/project_replace_unsized_fn_params.rs
@@ -1,4 +1,4 @@
-#![feature(unsized_locals)]
+#![feature(unsized_fn_params)]
use pin_project::pin_project;
diff --git a/tests/ui/pin_project/project_replace_unsized_locals.stderr b/tests/ui/pin_project/project_replace_unsized_fn_params.stderr
index ad965e5..622d12f 100644
--- a/tests/ui/pin_project/project_replace_unsized_locals.stderr
+++ b/tests/ui/pin_project/project_replace_unsized_fn_params.stderr
@@ -1,5 +1,5 @@
error[E0277]: the size for values of type `T` cannot be known at compilation time
- --> $DIR/project_replace_unsized_locals.rs:6:8
+ --> $DIR/project_replace_unsized_fn_params.rs:6:8
|
6 | struct Struct<T: ?Sized> {
| ^^^^^^^-^^^^^^^^^
@@ -11,7 +11,7 @@ error[E0277]: the size for values of type `T` cannot be known at compilation tim
= note: the return type of a function must have a statically known size
error[E0277]: the size for values of type `T` cannot be known at compilation time
- --> $DIR/project_replace_unsized_locals.rs:7:5
+ --> $DIR/project_replace_unsized_fn_params.rs:7:5
|
6 | struct Struct<T: ?Sized> {
| - this type parameter needs to be `Sized`
@@ -19,7 +19,7 @@ error[E0277]: the size for values of type `T` cannot be known at compilation tim
| ^ doesn't have a size known at compile-time
error[E0277]: the size for values of type `T` cannot be known at compilation time
- --> $DIR/project_replace_unsized_locals.rs:5:1
+ --> $DIR/project_replace_unsized_fn_params.rs:5:1
|
5 | #[pin_project(project_replace)] //~ ERROR E0277
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
@@ -31,7 +31,7 @@ error[E0277]: the size for values of type `T` cannot be known at compilation tim
= note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the size for values of type `T` cannot be known at compilation time
- --> $DIR/project_replace_unsized_locals.rs:11:8
+ --> $DIR/project_replace_unsized_fn_params.rs:11:8
|
11 | struct TupleStruct<T: ?Sized>(T);
| ^^^^^^^^^^^^-^^^^^^^^^
@@ -43,7 +43,7 @@ error[E0277]: the size for values of type `T` cannot be known at compilation tim
= note: the return type of a function must have a statically known size
error[E0277]: the size for values of type `T` cannot be known at compilation time
- --> $DIR/project_replace_unsized_locals.rs:10:1
+ --> $DIR/project_replace_unsized_fn_params.rs:10:1
|
10 | #[pin_project(project_replace)] //~ ERROR E0277
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
diff --git a/tests/ui/pinned_drop/call-drop-inner.stderr b/tests/ui/pinned_drop/call-drop-inner.stderr
index eb55ce7..53194b0 100644
--- a/tests/ui/pinned_drop/call-drop-inner.stderr
+++ b/tests/ui/pinned_drop/call-drop-inner.stderr
@@ -1,10 +1,14 @@
error[E0061]: this function takes 0 arguments but 1 argument was supplied
--> $DIR/call-drop-inner.rs:12:9
|
-9 | #[pinned_drop]
- | -------------- defined here
-...
12 | __drop_inner(__self);
| ^^^^^^^^^^^^ ------ supplied 1 argument
| |
| expected 0 arguments
+ |
+note: function defined here
+ --> $DIR/call-drop-inner.rs:9:1
+ |
+9 | #[pinned_drop]
+ | ^^^^^^^^^^^^^^
+ = note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info)