proc_macro_span_file.rs 306 B

12345678910111213141516
  1. // SPDX-License-Identifier: Apache-2.0 OR MIT
  2. // The subset of Span's API stabilized in Rust 1.88.
  3. extern crate proc_macro;
  4. use proc_macro::Span;
  5. use std::path::PathBuf;
  6. pub fn file(this: &Span) -> String {
  7. this.file()
  8. }
  9. pub fn local_file(this: &Span) -> Option<PathBuf> {
  10. this.local_file()
  11. }