我正在尝试使用
syn::parse_file
板条箱中的 syn
功能。
但是,我无法使用它,并在板条箱中找到了一个带有
feature
属性的函数:
#[cfg(all(feature = "parsing", feature = "full"))]
#[cfg_attr(doc_cfg, doc(cfg(all(feature = "parsing", feature = "full"))))]
pub fn parse_file(mut content: &str) -> Result<File> {
// other code
}
找不到此功能的任何说明。
如何在我的项目中启用这些功能?
并使用这个功能。