mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
Recognize custom main function as binary entrypoint for runnables
This commit is contained in:
parent
7b8330f283
commit
fe398163b6
3 changed files with 72 additions and 23 deletions
|
@ -215,6 +215,10 @@ impl Attrs {
|
|||
self.doc_exprs().flat_map(|doc_expr| doc_expr.aliases().to_vec())
|
||||
}
|
||||
|
||||
pub fn export_name(&self) -> Option<&SmolStr> {
|
||||
self.by_key("export_name").string_value()
|
||||
}
|
||||
|
||||
pub fn is_proc_macro(&self) -> bool {
|
||||
self.by_key("proc_macro").exists()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue