Skip to content

DOCS_RS=1 cargo build fails #12

Open
@wtdcode

Description

@wtdcode

This crate fails to build with DOCS_RS=1:

error[E0277]: the trait bound `proc_macro2::Span: From<proc_macro::Span>` is not satisfied
   --> src/lib.rs:554:32
    |
554 |                 first: (*self).into(),
    |                                ^^^^ the trait `From<proc_macro::Span>` is not implemented for `proc_macro2::Span`
    |
    = note: required for `proc_macro::Span` to implement `Into<proc_macro2::Span>`

error[E0277]: the trait bound `proc_macro2::Span: From<proc_macro::Span>` is not satisfied
   --> src/lib.rs:555:31
    |
555 |                 last: (*self).into(),
    |                               ^^^^ the trait `From<proc_macro::Span>` is not implemented for `proc_macro2::Span`
    |
    = note: required for `proc_macro::Span` to implement `Into<proc_macro2::Span>`

For more information about this error, try `rustc --explain E0277`.
error: could not compile `proc-macro-error2` (lib) due to 2 previous errors

Funnily, if cargo build and then DOCS_RS=1 cargo build would pass. Therefore, to reproduce this, ensure doing:

cargo clean && DOCS_RS=1 cargo build

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions