Skip to content

No method named file found for struct memo::proc_macro::Span in nightly #3909

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
matchish opened this issue May 1, 2025 · 2 comments
Closed

Comments

@matchish
Copy link
Contributor

matchish commented May 1, 2025

Describe the bug
axum-start nightly do not start

Leptos Dependencies

Please copy and paste the Leptos dependencies and features from your Cargo.toml.

For example:

[dependencies]
leptos = { version = "0.7.0", features = ["nightly"] }
leptos_router = { version = "0.7.0", features = ["nightly"] }
axum = { version = "0.7", optional = true }
console_error_panic_hook = { version = "0.1", optional = true}
leptos_axum = { version = "0.7.0", optional = true }
leptos_meta = { version = "0.7.0" }
tokio = { version = "1", features = ["rt-multi-thread"], optional = true }
wasm-bindgen = { version = "=0.2.100", optional = true }

To Reproduce
Steps to reproduce the behavior:

  1. Try to run cargo leptos watch in start-axum nightly
  2. See error
error[E0599]: no method named `file` found for struct `memo::proc_macro::Span` in the current scope
   --> .cargo/registry/src/index.crates.io-1949cf8c6b5b557f/leptos_macro-0.7.9/src/lib.rs:360:22
    |
360 |                 site.file(),
    |                      ^^^^ method not found in `Span`

For more information about this error, try `rustc --explain E0599`.

Next Steps
[ ] I will make a PR
[x] I would like to make a PR, but need help getting started
[ ] I want someone else to take the time to fix this
[ ] This is a low priority for me and is just shared for your information

Additional context
Do not know if it is a right solution but changing to
site.source_file().path(), was the solution for me

site.file(),

@gbj
Copy link
Collaborator

gbj commented May 1, 2025

What is your rustc --version? When I try it with a relatively recent nightly it works. There was a chance in this API a few weeks ago and source_file() no longer exists in current nightly.

Mine is rustc 1.88.0-nightly (10fa3c449 2025-04-26)

Try rustup update nightly and see if it fixes the issue for you.

@matchish
Copy link
Contributor Author

matchish commented May 1, 2025

Yes you're right after update to rustc 1.88.0-nightly (b45dd71d1 2025-04-30) (from rustc 1.87.0-nightly (f8c27dfe1 2025-03-24))
the bug gone. thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants