Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion generator/plugins/rust/rust_commons.py
Original file line number Diff line number Diff line change
Expand Up @@ -682,7 +682,7 @@ def generate_extras(
) -> List[str]:
extras = []
if type_def.deprecated:
extras += ["#[deprecated]"]
extras += [f'#[deprecated(note = r#"{type_def.deprecated}"#)]']
if type_def.proposed:
extras += ['#[cfg(feature = "proposed")]']
return extras
20 changes: 10 additions & 10 deletions packages/rust/lsprotocol/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2260,7 +2260,7 @@ pub enum TextDocumentContentChangeEvent {
///
/// Note that markdown strings will be sanitized - that means html will be escaped.
/// @deprecated use MarkupContent instead.
#[deprecated]
#[deprecated(note = r#"use MarkupContent instead."#)]
#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)]
#[serde(untagged)]
pub enum MarkedString {
Expand Down Expand Up @@ -3737,15 +3737,15 @@ pub struct InitializeParams {
/// if no folder is open.
///
/// @deprecated in favour of rootUri.
#[deprecated]
#[deprecated(note = r#"in favour of rootUri."#)]
pub root_path: Option<String>,

/// The rootUri of the workspace. Is null if no
/// folder is open. If both `rootPath` and `rootUri` are set
/// `rootUri` wins.
///
/// @deprecated in favour of workspaceFolders.
#[deprecated]
#[deprecated(note = r#"in favour of workspaceFolders."#)]
#[serde(skip_serializing_if = "Option::is_none")]
pub root_uri: Option<Url>,

Expand Down Expand Up @@ -4038,7 +4038,7 @@ pub struct CompletionItem {

/// Indicates if this item is deprecated.
/// @deprecated Use `tags` instead.
#[deprecated]
#[deprecated(note = r#"Use `tags` instead."#)]
pub deprecated: Option<bool>,

/// A human-readable string with additional information
Expand Down Expand Up @@ -4498,7 +4498,7 @@ pub struct SymbolInformation {
/// Indicates if this symbol is deprecated.
///
/// @deprecated Use tags instead
#[deprecated]
#[deprecated(note = r#"Use tags instead"#)]
pub deprecated: Option<bool>,

/// The kind of this symbol.
Expand Down Expand Up @@ -4537,7 +4537,7 @@ pub struct DocumentSymbol {
/// Indicates if this symbol is deprecated.
///
/// @deprecated Use tags instead
#[deprecated]
#[deprecated(note = r#"Use tags instead"#)]
pub deprecated: Option<bool>,

/// More detail for this symbol, e.g the signature of a function.
Expand Down Expand Up @@ -6163,15 +6163,15 @@ pub struct _InitializeParams {
/// if no folder is open.
///
/// @deprecated in favour of rootUri.
#[deprecated]
#[deprecated(note = r#"in favour of rootUri."#)]
pub root_path: Option<String>,

/// The rootUri of the workspace. Is null if no
/// folder is open. If both `rootPath` and `rootUri` are set
/// `rootUri` wins.
///
/// @deprecated in favour of workspaceFolders.
#[deprecated]
#[deprecated(note = r#"in favour of workspaceFolders."#)]
#[serde(skip_serializing_if = "Option::is_none")]
pub root_uri: Option<Url>,

Expand Down Expand Up @@ -7398,7 +7398,7 @@ pub struct TextDocumentContentChangePartial {
/// The optional length of the range that got replaced.
///
/// @deprecated use range instead.
#[deprecated]
#[deprecated(note = r#"use range instead."#)]
pub range_length: Option<u32>,

/// The new text for the provided range.
Expand Down Expand Up @@ -7461,7 +7461,7 @@ pub struct ServerCompletionItemOptions {

/// @since 3.18.0
/// @deprecated use MarkupContent instead.
#[deprecated]
#[deprecated(note = r#"use MarkupContent instead."#)]
#[derive(Serialize, Deserialize, PartialEq, Debug, Eq, Clone)]
#[serde(rename_all = "camelCase", deny_unknown_fields)]
pub struct MarkedStringWithLanguage {
Expand Down
Loading