• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1error[E0277]: `proc_macro::Span` cannot be sent between threads safely
2 --> test-not-send.rs:5:21
3  |
45 |     requires_send::<Span>();
5  |                     ^^^^ `proc_macro::Span` cannot be sent between threads safely
6  |
7  = help: within `Span`, the trait `Send` is not implemented for `proc_macro::Span`
8note: required because it appears within the type `proc_macro2::imp::Span`
9 --> $WORKSPACE/src/wrapper.rs
10  |
11  | pub(crate) enum Span {
12  |                 ^^^^
13note: required because it appears within the type `Span`
14 --> $WORKSPACE/src/lib.rs
15  |
16  | pub struct Span {
17  |            ^^^^
18note: required by a bound in `requires_send`
19 --> test-not-send.rs:4:25
20  |
214 |     fn requires_send<T: Send>() {}
22  |                         ^^^^ required by this bound in `requires_send`
23
24error[E0277]: `Rc<()>` cannot be sent between threads safely
25 --> test-not-send.rs:5:21
26  |
275 |     requires_send::<Span>();
28  |                     ^^^^ `Rc<()>` cannot be sent between threads safely
29  |
30  = help: within `Span`, the trait `Send` is not implemented for `Rc<()>`
31note: required because it appears within the type `PhantomData<Rc<()>>`
32 --> $RUST/core/src/marker.rs
33  |
34  | pub struct PhantomData<T: ?Sized>;
35  |            ^^^^^^^^^^^
36note: required because it appears within the type `proc_macro2::marker::ProcMacroAutoTraits`
37 --> $WORKSPACE/src/marker.rs
38  |
39  | pub(crate) struct ProcMacroAutoTraits(PhantomData<Rc<()>>);
40  |                   ^^^^^^^^^^^^^^^^^^^
41note: required because it appears within the type `Span`
42 --> $WORKSPACE/src/lib.rs
43  |
44  | pub struct Span {
45  |            ^^^^
46note: required by a bound in `requires_send`
47 --> test-not-send.rs:4:25
48  |
494 |     fn requires_send<T: Send>() {}
50  |                         ^^^^ required by this bound in `requires_send`
51