mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 12:29:21 +00:00
Move FunctionSignature to display, remove write_joined
write_joined is replaced with `join_to_string::join` which provides the necessary functionality.
This commit is contained in:
parent
84fde47d00
commit
7ba22f1c19
2 changed files with 36 additions and 49 deletions
|
@ -73,6 +73,7 @@ pub use crate::{
|
|||
syntax_highlighting::HighlightedRange,
|
||||
structure::{StructureNode, file_structure},
|
||||
diagnostics::Severity,
|
||||
display::FunctionSignature,
|
||||
};
|
||||
|
||||
pub use ra_db::{
|
||||
|
@ -248,32 +249,6 @@ pub struct CallInfo {
|
|||
pub active_parameter: Option<usize>,
|
||||
}
|
||||
|
||||
/// Contains information about a function signature
|
||||
#[derive(Debug)]
|
||||
pub struct FunctionSignature {
|
||||
/// Optional visibility
|
||||
pub visibility: Option<String>,
|
||||
/// Name of the function
|
||||
pub name: Option<String>,
|
||||
/// Documentation for the function
|
||||
pub doc: Option<Documentation>,
|
||||
/// Generic parameters
|
||||
pub generic_parameters: Vec<String>,
|
||||
/// Parameters of the function
|
||||
pub parameters: Vec<String>,
|
||||
/// Optional return type
|
||||
pub ret_type: Option<String>,
|
||||
/// Where predicates
|
||||
pub where_predicates: Vec<String>,
|
||||
}
|
||||
|
||||
impl FunctionSignature {
|
||||
pub(crate) fn with_doc_opt(mut self, doc: Option<Documentation>) -> Self {
|
||||
self.doc = doc;
|
||||
self
|
||||
}
|
||||
}
|
||||
|
||||
/// `AnalysisHost` stores the current state of the world.
|
||||
#[derive(Debug, Default)]
|
||||
pub struct AnalysisHost {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue