diff options
Diffstat (limited to 'tests/ui')
-rw-r--r-- | tests/ui/derive_noncopy.stderr | 4 | ||||
-rw-r--r-- | tests/ui/expected_named.stderr | 2 | ||||
-rw-r--r-- | tests/ui/missing_unsafe.stderr | 2 | ||||
-rw-r--r-- | tests/ui/opaque_autotraits.stderr | 43 | ||||
-rw-r--r-- | tests/ui/opaque_not_sized.stderr | 2 | ||||
-rw-r--r-- | tests/ui/ptr_no_const_mut.stderr | 4 | ||||
-rw-r--r-- | tests/ui/rust_pinned.stderr | 5 | ||||
-rw-r--r-- | tests/ui/unique_ptr_to_opaque.stderr | 3 | ||||
-rw-r--r-- | tests/ui/unpin_impl.stderr | 8 | ||||
-rw-r--r-- | tests/ui/unsupported_elided.stderr | 8 | ||||
-rw-r--r-- | tests/ui/vector_autotraits.stderr | 22 |
11 files changed, 69 insertions, 34 deletions
diff --git a/tests/ui/derive_noncopy.stderr b/tests/ui/derive_noncopy.stderr index b4f35d3e..359581aa 100644 --- a/tests/ui/derive_noncopy.stderr +++ b/tests/ui/derive_noncopy.stderr @@ -1,7 +1,7 @@ -error[E0204]: the trait `Copy` cannot be implemented for this type +error[E0204]: the trait `std::marker::Copy` cannot be implemented for this type --> tests/ui/derive_noncopy.rs:4:12 | 4 | struct TryCopy { | ^^^^^^^ 5 | other: Other, - | ------------ this field does not implement `Copy` + | ------------ this field does not implement `std::marker::Copy` diff --git a/tests/ui/expected_named.stderr b/tests/ui/expected_named.stderr index 0068bdf3..c0fa04de 100644 --- a/tests/ui/expected_named.stderr +++ b/tests/ui/expected_named.stderr @@ -5,7 +5,7 @@ error[E0106]: missing lifetime specifier | ^^^^^^^^ expected named lifetime parameter | = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from -help: consider using the `'static` lifetime +help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static`, or if you will only have owned values | 5 | fn borrowed() -> UniquePtr<Borrowed<'static>>; | +++++++++ diff --git a/tests/ui/missing_unsafe.stderr b/tests/ui/missing_unsafe.stderr index e7dcba74..31ef9e24 100644 --- a/tests/ui/missing_unsafe.stderr +++ b/tests/ui/missing_unsafe.stderr @@ -1,4 +1,4 @@ -error[E0133]: call to unsafe function is unsafe and requires unsafe function or block +error[E0133]: call to unsafe function `f` is unsafe and requires unsafe function or block --> tests/ui/missing_unsafe.rs:4:12 | 4 | fn f(x: i32); diff --git a/tests/ui/opaque_autotraits.stderr b/tests/ui/opaque_autotraits.stderr index c6447c55..0a797b46 100644 --- a/tests/ui/opaque_autotraits.stderr +++ b/tests/ui/opaque_autotraits.stderr @@ -4,10 +4,14 @@ error[E0277]: `*const cxx::void` cannot be sent between threads safely 13 | assert_send::<ffi::Opaque>(); | ^^^^^^^^^^^ `*const cxx::void` cannot be sent between threads safely | - = help: within `ffi::Opaque`, the trait `Send` is not implemented for `*const cxx::void` - = note: required because it appears within the type `[*const void; 0]` - = note: required because it appears within the type `Opaque` -note: required because it appears within the type `Opaque` + = help: within `ffi::Opaque`, the trait `Send` is not implemented for `*const cxx::void`, which is required by `ffi::Opaque: Send` + = note: required because it appears within the type `[*const cxx::void; 0]` +note: required because it appears within the type `cxx::private::Opaque` + --> src/opaque.rs + | + | pub struct Opaque { + | ^^^^^^ +note: required because it appears within the type `ffi::Opaque` --> tests/ui/opaque_autotraits.rs:4:14 | 4 | type Opaque; @@ -24,10 +28,14 @@ error[E0277]: `*const cxx::void` cannot be shared between threads safely 14 | assert_sync::<ffi::Opaque>(); | ^^^^^^^^^^^ `*const cxx::void` cannot be shared between threads safely | - = help: within `ffi::Opaque`, the trait `Sync` is not implemented for `*const cxx::void` - = note: required because it appears within the type `[*const void; 0]` - = note: required because it appears within the type `Opaque` -note: required because it appears within the type `Opaque` + = help: within `ffi::Opaque`, the trait `Sync` is not implemented for `*const cxx::void`, which is required by `ffi::Opaque: Sync` + = note: required because it appears within the type `[*const cxx::void; 0]` +note: required because it appears within the type `cxx::private::Opaque` + --> src/opaque.rs + | + | pub struct Opaque { + | ^^^^^^ +note: required because it appears within the type `ffi::Opaque` --> tests/ui/opaque_autotraits.rs:4:14 | 4 | type Opaque; @@ -42,12 +50,21 @@ error[E0277]: `PhantomPinned` cannot be unpinned --> tests/ui/opaque_autotraits.rs:15:20 | 15 | assert_unpin::<ffi::Opaque>(); - | ^^^^^^^^^^^ within `ffi::Opaque`, the trait `Unpin` is not implemented for `PhantomPinned` + | ^^^^^^^^^^^ within `ffi::Opaque`, the trait `Unpin` is not implemented for `PhantomPinned`, which is required by `ffi::Opaque: Unpin` + | + = note: consider using the `pin!` macro + consider using `Box::pin` if you need to access the pinned value outside of the current scope +note: required because it appears within the type `PhantomData<PhantomPinned>` + --> $RUST/core/src/marker.rs + | + | pub struct PhantomData<T: ?Sized>; + | ^^^^^^^^^^^ +note: required because it appears within the type `cxx::private::Opaque` + --> src/opaque.rs | - = note: consider using `Box::pin` - = note: required because it appears within the type `PhantomData<PhantomPinned>` - = note: required because it appears within the type `Opaque` -note: required because it appears within the type `Opaque` + | pub struct Opaque { + | ^^^^^^ +note: required because it appears within the type `ffi::Opaque` --> tests/ui/opaque_autotraits.rs:4:14 | 4 | type Opaque; diff --git a/tests/ui/opaque_not_sized.stderr b/tests/ui/opaque_not_sized.stderr index 85be4af3..732ffeb9 100644 --- a/tests/ui/opaque_not_sized.stderr +++ b/tests/ui/opaque_not_sized.stderr @@ -4,7 +4,7 @@ error[E0277]: the size for values of type `str` cannot be known at compilation t 4 | type TypeR; | ^^^^^ doesn't have a size known at compile-time | - = help: within `TypeR`, the trait `Sized` is not implemented for `str` + = help: within `TypeR`, the trait `Sized` is not implemented for `str`, which is required by `TypeR: Sized` note: required because it appears within the type `TypeR` --> tests/ui/opaque_not_sized.rs:8:8 | diff --git a/tests/ui/ptr_no_const_mut.stderr b/tests/ui/ptr_no_const_mut.stderr index 4b1bf06f..a6d44786 100644 --- a/tests/ui/ptr_no_const_mut.stderr +++ b/tests/ui/ptr_no_const_mut.stderr @@ -6,10 +6,10 @@ error: expected `mut` or `const` keyword in raw pointer type | help: add `mut` or `const` here | -6 | fn get_neither_const_nor_mut() -> *const C; - | +++++ 6 | fn get_neither_const_nor_mut() -> *mut C; | +++ +6 | fn get_neither_const_nor_mut() -> *const C; + | +++++ error: expected `const` or `mut` --> tests/ui/ptr_no_const_mut.rs:6:44 diff --git a/tests/ui/rust_pinned.stderr b/tests/ui/rust_pinned.stderr index a0fc0338..94079d9a 100644 --- a/tests/ui/rust_pinned.stderr +++ b/tests/ui/rust_pinned.stderr @@ -2,9 +2,10 @@ error[E0277]: `PhantomPinned` cannot be unpinned --> tests/ui/rust_pinned.rs:6:14 | 6 | type Pinned; - | ^^^^^^ within `Pinned`, the trait `Unpin` is not implemented for `PhantomPinned` + | ^^^^^^ within `Pinned`, the trait `Unpin` is not implemented for `PhantomPinned`, which is required by `Pinned: Unpin` | - = note: consider using `Box::pin` + = note: consider using the `pin!` macro + consider using `Box::pin` if you need to access the pinned value outside of the current scope note: required because it appears within the type `Pinned` --> tests/ui/rust_pinned.rs:10:12 | diff --git a/tests/ui/unique_ptr_to_opaque.stderr b/tests/ui/unique_ptr_to_opaque.stderr index 3c121e54..7aa5d8ae 100644 --- a/tests/ui/unique_ptr_to_opaque.stderr +++ b/tests/ui/unique_ptr_to_opaque.stderr @@ -14,5 +14,8 @@ note: expected this to be `Trivial` note: required by a bound in `UniquePtr::<T>::new` --> src/unique_ptr.rs | + | pub fn new(value: T) -> Self + | --- required by a bound in this associated function + | where | T: ExternType<Kind = Trivial>, | ^^^^^^^^^^^^^^ required by this bound in `UniquePtr::<T>::new` diff --git a/tests/ui/unpin_impl.stderr b/tests/ui/unpin_impl.stderr index afe5a806..888d64fb 100644 --- a/tests/ui/unpin_impl.stderr +++ b/tests/ui/unpin_impl.stderr @@ -1,14 +1,8 @@ -error[E0282]: type annotations needed +error[E0283]: type annotations needed --> tests/ui/unpin_impl.rs:4:14 | 4 | type Opaque; | ^^^^^^ cannot infer type - -error[E0283]: type annotations needed - --> tests/ui/unpin_impl.rs:1:1 - | -1 | #[cxx::bridge] - | ^^^^^^^^^^^^^^ cannot infer type | note: multiple `impl`s satisfying `ffi::Opaque: __AmbiguousIfImpl<_>` found --> tests/ui/unpin_impl.rs:1:1 diff --git a/tests/ui/unsupported_elided.stderr b/tests/ui/unsupported_elided.stderr index 4ccac6fb..205fcfd2 100644 --- a/tests/ui/unsupported_elided.stderr +++ b/tests/ui/unsupported_elided.stderr @@ -20,3 +20,11 @@ help: consider introducing a named lifetime parameter | 8 | fn f<'a>(t: &'a T<'a>) -> &'a str; | ++++ ++ ++++ ++ + +error: lifetime may not live long enough + --> tests/ui/unsupported_elided.rs:8:12 + | +8 | fn f(t: &T) -> &str; + | ^ - has type `&T<'1>` + | | + | returning this value requires that `'1` must outlive `'static` diff --git a/tests/ui/vector_autotraits.stderr b/tests/ui/vector_autotraits.stderr index 8851cedc..1f0c522e 100644 --- a/tests/ui/vector_autotraits.stderr +++ b/tests/ui/vector_autotraits.stderr @@ -4,17 +4,29 @@ error[E0277]: `*const cxx::void` cannot be sent between threads safely 20 | assert_send::<CxxVector<ffi::NotThreadSafe>>(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `*const cxx::void` cannot be sent between threads safely | - = help: within `CxxVector<NotThreadSafe>`, the trait `Send` is not implemented for `*const cxx::void` - = note: required because it appears within the type `[*const void; 0]` - = note: required because it appears within the type `Opaque` + = help: within `CxxVector<NotThreadSafe>`, the trait `Send` is not implemented for `*const cxx::void`, which is required by `CxxVector<NotThreadSafe>: Send` + = note: required because it appears within the type `[*const cxx::void; 0]` +note: required because it appears within the type `cxx::private::Opaque` + --> src/opaque.rs + | + | pub struct Opaque { + | ^^^^^^ note: required because it appears within the type `NotThreadSafe` --> tests/ui/vector_autotraits.rs:7:14 | 7 | type NotThreadSafe; | ^^^^^^^^^^^^^ = note: required because it appears within the type `[NotThreadSafe]` - = note: required because it appears within the type `PhantomData<[NotThreadSafe]>` - = note: required because it appears within the type `CxxVector<NotThreadSafe>` +note: required because it appears within the type `PhantomData<[NotThreadSafe]>` + --> $RUST/core/src/marker.rs + | + | pub struct PhantomData<T: ?Sized>; + | ^^^^^^^^^^^ +note: required because it appears within the type `CxxVector<NotThreadSafe>` + --> src/cxx_vector.rs + | + | pub struct CxxVector<T> { + | ^^^^^^^^^ note: required by a bound in `assert_send` --> tests/ui/vector_autotraits.rs:16:19 | |