Skip to content

no method named source_file found for struct proc_macro::Span in the current scope #43

Description

@mirsella

hello !

nightly: rustc 1.90.0-nightly (35f603652 2025-06-29)

error[E0599]: no method named `source_file` found for struct `proc_macro::Span` in the current scope
   --> /home/mirsella/.local/share/cargo/registry/src/index.crates.io-1949cf8c6b5b557f/crabtime-internal-1.1.3/src/lib.rs:379:64
    |
379 |         let mut call_site_path = proc_macro::Span::call_site().source_file().path();
    |                                                                ^^^^^^^^^^^
    |
help: there is a method `source` with a similar name
    |
379 -         let mut call_site_path = proc_macro::Span::call_site().source_file().path();
379 +         let mut call_site_path = proc_macro::Span::call_site().source().path();
    |

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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