]> git.proxmox.com Git - rustc.git/blobdiff - src/test/ui/phantom-oibit.stderr
New upstream version 1.44.1+dfsg1
[rustc.git] / src / test / ui / phantom-oibit.stderr
index 7b6b105eb032be61ad2604e403bc1e96faa0612a..fd0307f15c79aa95bf5dad28e79052760b918369 100644 (file)
@@ -2,40 +2,38 @@ error[E0277]: `T` cannot be shared between threads safely
   --> $DIR/phantom-oibit.rs:21:12
    |
 LL | fn is_zen<T: Zen>(_: T) {}
-   |    ------    --- required by this bound in `is_zen`
+   |              --- required by this bound in `is_zen`
 ...
 LL |     is_zen(x)
    |            ^ `T` cannot be shared between threads safely
    |
    = help: the trait `std::marker::Sync` is not implemented for `T`
-help: consider restricting this type parameter with `T: std::marker::Sync`
-  --> $DIR/phantom-oibit.rs:20:13
-   |
-LL | fn not_sync<T>(x: Guard<T>) {
-   |             ^
    = note: required because of the requirements on the impl of `Zen` for `&T`
    = note: required because it appears within the type `std::marker::PhantomData<&T>`
    = note: required because it appears within the type `Guard<'_, T>`
+help: consider restricting type parameter `T`
+   |
+LL | fn not_sync<T: std::marker::Sync>(x: Guard<T>) {
+   |              ^^^^^^^^^^^^^^^^^^^
 
 error[E0277]: `T` cannot be shared between threads safely
   --> $DIR/phantom-oibit.rs:26:12
    |
 LL | fn is_zen<T: Zen>(_: T) {}
-   |    ------    --- required by this bound in `is_zen`
+   |              --- required by this bound in `is_zen`
 ...
 LL |     is_zen(x)
    |            ^ `T` cannot be shared between threads safely
    |
    = help: the trait `std::marker::Sync` is not implemented for `T`
-help: consider restricting this type parameter with `T: std::marker::Sync`
-  --> $DIR/phantom-oibit.rs:25:20
-   |
-LL | fn nested_not_sync<T>(x: Nested<Guard<T>>) {
-   |                    ^
    = note: required because of the requirements on the impl of `Zen` for `&T`
    = note: required because it appears within the type `std::marker::PhantomData<&T>`
    = note: required because it appears within the type `Guard<'_, T>`
    = note: required because it appears within the type `Nested<Guard<'_, T>>`
+help: consider restricting type parameter `T`
+   |
+LL | fn nested_not_sync<T: std::marker::Sync>(x: Nested<Guard<T>>) {
+   |                     ^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to 2 previous errors