mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 22:31:43 +00:00
Show fn traits in signature info for trait implementors
This commit is contained in:
parent
0de904d539
commit
7bd343e085
8 changed files with 195 additions and 67 deletions
|
@ -221,6 +221,14 @@ impl fmt::Display for FnTrait {
|
|||
}
|
||||
|
||||
impl FnTrait {
|
||||
pub const fn function_name(&self) -> &'static str {
|
||||
match self {
|
||||
FnTrait::FnOnce => "call_once",
|
||||
FnTrait::FnMut => "call_mut",
|
||||
FnTrait::Fn => "call",
|
||||
}
|
||||
}
|
||||
|
||||
const fn lang_item(self) -> LangItem {
|
||||
match self {
|
||||
FnTrait::FnOnce => LangItem::FnOnce,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue