如何在 Rust 中转储完整的编译器属性列表?

How to dump a complete list of compiler attributes in Rust?

虽然有些编译器属性是documented here, is it possible to get a complete list of all attributes from Rust, including those defined by the build environment? Something similar to gcc -dM -E

rustc -W help 会给你一个 rustc lint 检查列表和它们的默认值,但它不包含条件编译属性;您引用的 link 似乎提供了他们的综合列表,但如果您不确定它是否是最新的,您可以查看 the source.