xref: /linux/rust/proc-macro2/probe/proc_macro_span_file.rs (revision 784faa8eca8270671e0ed6d9d21f04bbb80fc5f7)
1 // SPDX-License-Identifier: Apache-2.0 OR MIT
2 
3 // The subset of Span's API stabilized in Rust 1.88.
4 
5 extern crate proc_macro;
6 
7 use proc_macro::Span;
8 use std::path::PathBuf;
9 
file(this: &Span) -> String10 pub fn file(this: &Span) -> String {
11     this.file()
12 }
13 
local_file(this: &Span) -> Option<PathBuf>14 pub fn local_file(this: &Span) -> Option<PathBuf> {
15     this.local_file()
16 }
17