pub struct SourceFile(_);
🔬 This is a nightly-only experimental API. (
proc_macro_span
#54725)
Expand description
🔬 This is a nightly-only experimental API. (
proc_macro_span
#54725)
获取此源文件的路径。
如果与此 SourceFile
关联的代码范围是由外部宏 (此宏) 生成的,则这可能不是文件系统上的实际路径。
使用 is_real
进行检查。
还要注意,即使 is_real
返回 true
,如果在命令行上传递了 --remap-path-prefix
,则给定的路径实际上也可能无效。
🔬 This is a nightly-only experimental API. (
proc_macro_span
#54725)
如果此源文件是真实的源文件,并且不是由外部宏的扩展生成的,则返回 true
。
🔬 This is a nightly-only experimental API. (toowned_clone_into
#41263)
recently added