X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=tests%2Fui%2Fnon_send_fields_in_send_ty.stderr;h=60df4e226e4fa47078c43dc3bb66e1ff30e3e6e3;hb=3c8f90bd5a03872a9b9088facc3bf9ec8ac42dd0;hp=8b8a1d16d9bb96172bd747f011814853230725b9;hpb=33c34fb2d76aeff15ccafedc8b3ebb17bebbc782;p=rust.git diff --git a/tests/ui/non_send_fields_in_send_ty.stderr b/tests/ui/non_send_fields_in_send_ty.stderr index 8b8a1d16d9b..60df4e226e4 100644 --- a/tests/ui/non_send_fields_in_send_ty.stderr +++ b/tests/ui/non_send_fields_in_send_ty.stderr @@ -1,167 +1,167 @@ -error: this implementation is unsound, as some fields in `RingBuffer` are `!Send` +error: some fields in `RingBuffer` are not safe to be sent to another thread --> $DIR/non_send_fields_in_send_ty.rs:16:1 | LL | unsafe impl Send for RingBuffer {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: `-D clippy::non-send-fields-in-send-ty` implied by `-D warnings` -note: the type of field `data` is `!Send` +note: it is not safe to send field `data` to another thread --> $DIR/non_send_fields_in_send_ty.rs:11:5 | LL | data: Vec>, | ^^^^^^^^^^^^^^^^^^^^^^^^ = help: add bounds on type parameter `T` that satisfy `Vec>: Send` -error: this implementation is unsound, as some fields in `MvccRwLock` are `!Send` +error: some fields in `MvccRwLock` are not safe to be sent to another thread --> $DIR/non_send_fields_in_send_ty.rs:24:1 | LL | unsafe impl Send for MvccRwLock {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | -note: the type of field `lock` is `!Send` +note: it is not safe to send field `lock` to another thread --> $DIR/non_send_fields_in_send_ty.rs:21:5 | LL | lock: Mutex>, | ^^^^^^^^^^^^^^^^^^^ = help: add bounds on type parameter `T` that satisfy `Mutex>: Send` -error: this implementation is unsound, as some fields in `ArcGuard` are `!Send` +error: some fields in `ArcGuard` are not safe to be sent to another thread --> $DIR/non_send_fields_in_send_ty.rs:32:1 | LL | unsafe impl Send for ArcGuard {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | -note: the type of field `head` is `!Send` +note: it is not safe to send field `head` to another thread --> $DIR/non_send_fields_in_send_ty.rs:29:5 | LL | head: Arc, | ^^^^^^^^^^^^^ = help: add bounds on type parameter `RC` that satisfy `Arc: Send` -error: this implementation is unsound, as some fields in `DeviceHandle` are `!Send` +error: some fields in `DeviceHandle` are not safe to be sent to another thread --> $DIR/non_send_fields_in_send_ty.rs:48:1 | LL | unsafe impl Send for DeviceHandle {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | -note: the type of field `context` is `!Send` +note: it is not safe to send field `context` to another thread --> $DIR/non_send_fields_in_send_ty.rs:44:5 | LL | context: T, | ^^^^^^^^^^ = help: add `T: Send` bound in `Send` impl -error: this implementation is unsound, as some fields in `NoGeneric` are `!Send` +error: some fields in `NoGeneric` are not safe to be sent to another thread --> $DIR/non_send_fields_in_send_ty.rs:55:1 | LL | unsafe impl Send for NoGeneric {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | -note: the type of field `rc_is_not_send` is `!Send` +note: it is not safe to send field `rc_is_not_send` to another thread --> $DIR/non_send_fields_in_send_ty.rs:52:5 | LL | rc_is_not_send: Rc, | ^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: use a thread-safe type that implements `Send` -error: this implementation is unsound, as some fields in `MultiField` are `!Send` +error: some fields in `MultiField` are not safe to be sent to another thread --> $DIR/non_send_fields_in_send_ty.rs:63:1 | LL | unsafe impl Send for MultiField {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | -note: the type of field `field1` is `!Send` +note: it is not safe to send field `field1` to another thread --> $DIR/non_send_fields_in_send_ty.rs:58:5 | LL | field1: T, | ^^^^^^^^^ = help: add `T: Send` bound in `Send` impl -note: the type of field `field2` is `!Send` +note: it is not safe to send field `field2` to another thread --> $DIR/non_send_fields_in_send_ty.rs:59:5 | LL | field2: T, | ^^^^^^^^^ = help: add `T: Send` bound in `Send` impl -note: the type of field `field3` is `!Send` +note: it is not safe to send field `field3` to another thread --> $DIR/non_send_fields_in_send_ty.rs:60:5 | LL | field3: T, | ^^^^^^^^^ = help: add `T: Send` bound in `Send` impl -error: this implementation is unsound, as some fields in `MyOption` are `!Send` +error: some fields in `MyOption` are not safe to be sent to another thread --> $DIR/non_send_fields_in_send_ty.rs:70:1 | LL | unsafe impl Send for MyOption {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | -note: the type of field `0` is `!Send` +note: it is not safe to send field `0` to another thread --> $DIR/non_send_fields_in_send_ty.rs:66:12 | LL | MySome(T), | ^ = help: add `T: Send` bound in `Send` impl -error: this implementation is unsound, as some fields in `MultiParam` are `!Send` - --> $DIR/non_send_fields_in_send_ty.rs:77:1 +error: some fields in `MultiParam` are not safe to be sent to another thread + --> $DIR/non_send_fields_in_send_ty.rs:82:1 | LL | unsafe impl Send for MultiParam {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | -note: the type of field `vec` is `!Send` - --> $DIR/non_send_fields_in_send_ty.rs:74:5 +note: it is not safe to send field `vec` to another thread + --> $DIR/non_send_fields_in_send_ty.rs:79:5 | LL | vec: Vec<(A, B)>, | ^^^^^^^^^^^^^^^^ = help: add bounds on type parameters `A, B` that satisfy `Vec<(A, B)>: Send` -error: this implementation is unsound, as some fields in `HeuristicTest` are `!Send` - --> $DIR/non_send_fields_in_send_ty.rs:95:1 +error: some fields in `HeuristicTest` are not safe to be sent to another thread + --> $DIR/non_send_fields_in_send_ty.rs:100:1 | LL | unsafe impl Send for HeuristicTest {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | -note: the type of field `field4` is `!Send` - --> $DIR/non_send_fields_in_send_ty.rs:90:5 +note: it is not safe to send field `field4` to another thread + --> $DIR/non_send_fields_in_send_ty.rs:95:5 | LL | field4: (*const NonSend, Rc), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: use a thread-safe type that implements `Send` -error: this implementation is unsound, as some fields in `AttrTest3` are `!Send` - --> $DIR/non_send_fields_in_send_ty.rs:114:1 +error: some fields in `AttrTest3` are not safe to be sent to another thread + --> $DIR/non_send_fields_in_send_ty.rs:119:1 | LL | unsafe impl Send for AttrTest3 {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | -note: the type of field `0` is `!Send` - --> $DIR/non_send_fields_in_send_ty.rs:109:11 +note: it is not safe to send field `0` to another thread + --> $DIR/non_send_fields_in_send_ty.rs:114:11 | LL | Enum2(T), | ^ = help: add `T: Send` bound in `Send` impl -error: this implementation is unsound, as some fields in `Complex` are `!Send` - --> $DIR/non_send_fields_in_send_ty.rs:122:1 +error: some fields in `Complex` are not safe to be sent to another thread + --> $DIR/non_send_fields_in_send_ty.rs:127:1 | LL | unsafe impl

Send for Complex {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | -note: the type of field `field1` is `!Send` - --> $DIR/non_send_fields_in_send_ty.rs:118:5 +note: it is not safe to send field `field1` to another thread + --> $DIR/non_send_fields_in_send_ty.rs:123:5 | LL | field1: A, | ^^^^^^^^^ = help: add `P: Send` bound in `Send` impl -error: this implementation is unsound, as some fields in `Complex>` are `!Send` - --> $DIR/non_send_fields_in_send_ty.rs:125:1 +error: some fields in `Complex>` are not safe to be sent to another thread + --> $DIR/non_send_fields_in_send_ty.rs:130:1 | LL | unsafe impl Send for Complex> {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | -note: the type of field `field2` is `!Send` - --> $DIR/non_send_fields_in_send_ty.rs:119:5 +note: it is not safe to send field `field2` to another thread + --> $DIR/non_send_fields_in_send_ty.rs:124:5 | LL | field2: B, | ^^^^^^^^^