fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error[E0277]: `T` cannot be shared between threads safely 2 --> $DIR/phantom-auto-trait.rs:21:12 3 | 4LL | is_zen(x) 5 | ------ ^ `T` cannot be shared between threads safely 6 | | 7 | required by a bound introduced by this call 8 | 9note: required for `&T` to implement `Zen` 10 --> $DIR/phantom-auto-trait.rs:10:24 11 | 12LL | unsafe impl<'a, T: 'a> Zen for &'a T where T: Sync {} 13 | ^^^ ^^^^^ ---- unsatisfied trait bound introduced here 14note: required because it appears within the type `PhantomData<&T>` 15 --> $SRC_DIR/core/src/marker.rs:LL:COL 16note: required because it appears within the type `Guard<'_, T>` 17 --> $DIR/phantom-auto-trait.rs:12:8 18 | 19LL | struct Guard<'a, T: 'a> { 20 | ^^^^^ 21note: required by a bound in `is_zen` 22 --> $DIR/phantom-auto-trait.rs:18:14 23 | 24LL | fn is_zen<T: Zen>(_: T) {} 25 | ^^^ required by this bound in `is_zen` 26help: consider restricting type parameter `T` 27 | 28LL | fn not_sync<T: std::marker::Sync>(x: Guard<T>) { 29 | +++++++++++++++++++ 30 31error[E0277]: `T` cannot be shared between threads safely 32 --> $DIR/phantom-auto-trait.rs:26:12 33 | 34LL | is_zen(x) 35 | ------ ^ `T` cannot be shared between threads safely 36 | | 37 | required by a bound introduced by this call 38 | 39note: required for `&T` to implement `Zen` 40 --> $DIR/phantom-auto-trait.rs:10:24 41 | 42LL | unsafe impl<'a, T: 'a> Zen for &'a T where T: Sync {} 43 | ^^^ ^^^^^ ---- unsatisfied trait bound introduced here 44note: required because it appears within the type `PhantomData<&T>` 45 --> $SRC_DIR/core/src/marker.rs:LL:COL 46note: required because it appears within the type `Guard<'_, T>` 47 --> $DIR/phantom-auto-trait.rs:12:8 48 | 49LL | struct Guard<'a, T: 'a> { 50 | ^^^^^ 51note: required because it appears within the type `Nested<Guard<'_, T>>` 52 --> $DIR/phantom-auto-trait.rs:16:8 53 | 54LL | struct Nested<T>(T); 55 | ^^^^^^ 56note: required by a bound in `is_zen` 57 --> $DIR/phantom-auto-trait.rs:18:14 58 | 59LL | fn is_zen<T: Zen>(_: T) {} 60 | ^^^ required by this bound in `is_zen` 61help: consider restricting type parameter `T` 62 | 63LL | fn nested_not_sync<T: std::marker::Sync>(x: Nested<Guard<T>>) { 64 | +++++++++++++++++++ 65 66error: aborting due to 2 previous errors 67 68For more information about this error, try `rustc --explain E0277`.