Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
118 commits
Select commit Hold shift + click to select a range
a8f5471
fix: upmap ranges in convert_tuple_struct_to_named_struct assist
vishruth-thimmaiah Jan 16, 2025
1f45995
manual: Convert to mdbook
Wilfred Jan 23, 2025
b46775a
Combine `pat_hyigene` and `expr_hygiene`
Veykril Jan 25, 2025
8e7a338
BodyCollector
Veykril Jan 25, 2025
d9c58c8
Cleanup body ast ptr defs
Veykril Jan 25, 2025
c679d56
Split out `ExpressionStore` from `Body`
Veykril Jan 25, 2025
bdebd86
Add GenericDefId::StaticId
Veykril Jan 26, 2025
1360b4c
In completion's expand, consider recursion stop condition (when we're…
ChayimFriedman2 Jan 26, 2025
5de2cd4
Support RFC 2396
ChayimFriedman2 Jan 26, 2025
9051647
Merge pull request #19038 from ChayimFriedman2/unused-unsafe
Veykril Jan 27, 2025
6db1411
Merge pull request #19037 from ChayimFriedman2/fix-other-test
Veykril Jan 27, 2025
1711a19
Merge pull request #19036 from Veykril/push-nprltlwvryxw
Veykril Jan 27, 2025
d18afd3
feat: Implement `default-field-values`
ShoyuVanilla Jan 22, 2025
5ca9f52
Handle missing fields diagnostics
ShoyuVanilla Jan 23, 2025
2622160
Merge record lit's ellipsis into pre-existing spread's variant
ShoyuVanilla Jan 26, 2025
faeaf4a
Compute diagnostics of a field body iff it has one
ShoyuVanilla Jan 26, 2025
c7463fe
Implement `HasResolver` and `HasModule` for `FieldId`
ShoyuVanilla Jan 26, 2025
ec89b7d
Add a test for field default value body as defining usage of TAIT
ShoyuVanilla Jan 26, 2025
e4e7c95
Fix a mistake in condition
ShoyuVanilla Jan 26, 2025
c093db0
Remove `has_default` from `FieldId`
ShoyuVanilla Jan 27, 2025
ad0aea4
Merge pull request #19001 from ShoyuVanilla/default-field-values
Veykril Jan 27, 2025
9a0504b
Fix #[rustc_deprecated_safe_2024]
ChayimFriedman2 Jan 27, 2025
86d5e29
Fix a missing standard token in semantic highlighting
ChayimFriedman2 Jan 27, 2025
238d7bd
Merge pull request #19045 from ChayimFriedman2/missing-token
Veykril Jan 27, 2025
0fe9d77
Merge pull request #19044 from ChayimFriedman2/deprecated-safe
Veykril Jan 27, 2025
5f2072c
Fix syntactic highlighting for renames
lnicola Jan 27, 2025
d60afec
Merge pull request #19047 from lnicola/rename-highlight
lnicola Jan 27, 2025
78feee8
Remove duplicate method from `hir::Type`
ChayimFriedman2 Jan 27, 2025
b4508dc
Don't suggest `into_iter().method()` on iterators
ChayimFriedman2 Jan 27, 2025
1ba8943
Report calling unsafe fn pointer as unsafe
ChayimFriedman2 Jan 27, 2025
26c5708
Prioritize formatting thread tasks in main_loop
Veykril Jan 27, 2025
30b6063
Merge pull request #19052 from Veykril/push-yqwutllwwyyp
Veykril Jan 27, 2025
8ed9227
Merge pull request #19049 from ChayimFriedman2/add-reference-ty
Veykril Jan 27, 2025
da33e7c
Merge pull request #19050 from ChayimFriedman2/iter-self
Veykril Jan 27, 2025
cadc468
Merge pull request #19051 from ChayimFriedman2/fn-ptr-unsafe
Veykril Jan 27, 2025
3dd95e3
Add FreeBSD as a target OS for TestDir to avoid warnings
vkrivopalov Jan 27, 2025
7268b3d
fix: Properly handle CRLF line endings in the syntax tree view
Giga-Bowser Jan 27, 2025
165f276
Merge pull request #19055 from vkrivopalov/fix-testdir-unused-variabl…
ChayimFriedman2 Jan 27, 2025
a9cd21f
Show status bar in RA output
darichey Jan 27, 2025
a4e6556
Back out "Remove `has_default` from `FieldId`"
davidbarsky Jan 27, 2025
ff2656d
Back out "Fix a mistake in condition"
davidbarsky Jan 27, 2025
f22e331
Back out "Add a test for field default value body as defining usage o…
davidbarsky Jan 27, 2025
9c1a7ab
Back out "Implement `HasResolver` and `HasModule` for `FieldId`"
davidbarsky Jan 27, 2025
6f723ee
Back out "Compute diagnostics of a field body iff it has one"
davidbarsky Jan 27, 2025
10089c2
Back out "Merge record lit's ellipsis into pre-existing spread's vari…
davidbarsky Jan 27, 2025
d039b10
Back out "Handle missing fields diagnostics"
davidbarsky Jan 27, 2025
0f9cdeb
Back out "feat: Implement `default-field-values`"
davidbarsky Jan 27, 2025
1eb9f5e
Fix scip inherent impl overflow
darichey Jan 28, 2025
8e68c3f
Disable `Receiver` based autoderef temporarily
Veykril Jan 28, 2025
82efe0f
Merge pull request #19061 from Veykril/push-rwyqqtqmnput
Veykril Jan 28, 2025
0a2221d
Fix scip `crate` symbol name
darichey Jan 28, 2025
f70ac25
Merge pull request #19057 from darichey/status-bar-in-output
Veykril Jan 28, 2025
8ecb754
Merge pull request #19056 from Giga-Bowser/fix-syntax-tree-crlf
Veykril Jan 28, 2025
d417284
Fix scip symbols for implicit modules
darichey Jan 28, 2025
a355626
Merge pull request #19015 from Wilfred/mdbook
Veykril Jan 28, 2025
f10b622
feat: Implement `default-field-values` only in parser
ShoyuVanilla Jan 28, 2025
19afce0
Update lsif_contains_generated_constant
darichey Jan 28, 2025
2386e95
Merge pull request #19063 from davidbarsky/davidbarsky/backout-struct…
davidbarsky Jan 28, 2025
db07adf
try to infer array type from slice pattern
alibektas Jan 28, 2025
fc6c6b4
add test, bless tests
alibektas Jan 28, 2025
14ab466
Equip infer_pat_* with declaration origin
alibektas Jan 28, 2025
437921f
call infer_pats from infer::expr with context
alibektas Jan 28, 2025
22b8339
Update TentHash to version 1.0
cessen Jan 29, 2025
ce8bace
Merge pull request #19067 from cessen/update_tenthash
lnicola Jan 29, 2025
0d9355e
Remove mutable syntax tree shenanigans from adjustment hints
Veykril Jan 29, 2025
9c30fec
Merge pull request #19070 from Veykril/push-wpqzmznymtrn
Veykril Jan 29, 2025
0cf275b
Fix #19071: ensure `completion_item_hash` serializes items uniquely
cessen Jan 29, 2025
6151865
Fix typo
cessen Jan 29, 2025
7ffccb0
Use `to_ne_bytes` instead of `to_le_bytes`
cessen Jan 29, 2025
da96fff
Merge pull request #19072 from cessen/concat_uniquely
lnicola Jan 30, 2025
e70b589
Stop running some release workflows on forks and update old URLs
lnicola Feb 1, 2025
bec452f
Merge pull request #19078 from lnicola/no-ci-forks
lnicola Feb 1, 2025
acb9544
More rustfmt hang investigations
Veykril Feb 2, 2025
3288929
Merge pull request #19080 from Veykril/push-wlqsvqsksupr
Veykril Feb 2, 2025
4d9be70
Split cache priming into distinct phases
Veykril Feb 3, 2025
3c83458
Merge pull request #19062 from darichey/scip-fix-module-names
Veykril Feb 3, 2025
806ec88
Revert tests::patterns::infer_pattern
alibektas Jan 28, 2025
5acbff8
Do not use make use of `InferenceResult::has_errors` flag for mir bui…
Veykril Feb 3, 2025
9c981b7
Merge pull request #19085 from Veykril/push-sknwykqmlott
Veykril Feb 3, 2025
a118b18
Fix some mir eval/lowerings
Veykril Feb 3, 2025
08d4b03
Merge pull request #19086 from Veykril/push-ponvylutpnww
Veykril Feb 3, 2025
93b72ce
Merge pull request #19066 from alibektas/slice_pattern_type_inference
Veykril Feb 3, 2025
a373fb2
Expose symbol of `CrateName`
Veykril Feb 3, 2025
1ba7a38
Merge pull request #19084 from Veykril/push-muworpzpzqup
Veykril Feb 4, 2025
1ce2d7e
Prevent panics from tearing down worker threads
Veykril Feb 4, 2025
21ddcbb
Merge pull request #19093 from Veykril/push-lrvoookylnxp
Veykril Feb 4, 2025
9bf4fe4
line-index: don't try to use neon on big-endian aarch64.
he32 Feb 4, 2025
96f96a4
Merge pull request #19083 from he32/fix-arm64-be
lnicola Feb 4, 2025
5467091
Fix IDE resolution of `use` inside a body
ChayimFriedman2 Feb 4, 2025
9d81503
Fix a failing test
ChayimFriedman2 Feb 4, 2025
578ae16
Add a FIXME for feature(adt_const_params)
ChayimFriedman2 Feb 4, 2025
d958719
Merge pull request #19095 from ChayimFriedman2/fixme-adt_const_params
ChayimFriedman2 Feb 4, 2025
4b1d83d
Merge pull request #19094 from ChayimFriedman2/use-body
lnicola Feb 5, 2025
f57caa1
Bump proc-macro2 in xtask
Veykril Feb 5, 2025
9c0af74
Merge pull request #19097 from Veykril/push-xmkmkwplqnlr
Veykril Feb 5, 2025
a7e9739
Merge pull request #18912 from vishruth-thimmaiah/fix_named_struct_as…
Veykril Feb 5, 2025
9bcb2b0
Use interior mutability for loaded `ProcMacrorv::expanders`
Veykril Feb 5, 2025
d18dd4d
Merge pull request #19099 from Veykril/push-qxylslwltsqy
Veykril Feb 5, 2025
98b16ea
closure parameter inlay hints
jnyfah Feb 6, 2025
57b2415
collapsing if statement
jnyfah Feb 6, 2025
e8955a8
fix: Don't emit empty scip occurrence for builtins
darichey Feb 6, 2025
bacc9df
fix: Resolve projection types before checking casts
ShoyuVanilla Feb 7, 2025
b27a0f4
Merge pull request #19105 from darichey/fix-scip-builtin-occurrences
Veykril Feb 7, 2025
cde8d92
Merge pull request #19106 from ShoyuVanilla/issue-18682
Veykril Feb 7, 2025
d3b80e1
minor changes
jnyfah Feb 7, 2025
8151886
Merge pull request #19104 from jnyfah/some-branch
Veykril Feb 7, 2025
2c22ae3
Update PRIVACY.md
BenjaminBrienen Feb 7, 2025
e7d5d30
Update README.md links for mdbook manual
Wilfred Feb 7, 2025
b6fd709
Organise chapters in mdbook sidebar
Wilfred Feb 7, 2025
236000b
Merge pull request #19114 from Wilfred/update_readme_for_mdbook
lnicola Feb 8, 2025
cac45e1
Merge pull request #19115 from Wilfred/sidebar_structure
lnicola Feb 8, 2025
4ac07f2
Merge pull request #19113 from BenjaminBrienen/patch-1
lnicola Feb 8, 2025
82162a7
doc: error url
ahaoboy Feb 9, 2025
d4f7c76
Merge pull request #19120 from ahaoboy/patch-1
ChayimFriedman2 Feb 9, 2025
879dc38
Preparing for merge from rust-lang/rust
lnicola Feb 10, 2025
15cd1f0
Merge from rust-lang/rust
lnicola Feb 10, 2025
24d7a14
Bump rustc crates
lnicola Feb 10, 2025
8fd713b
Merge pull request #19126 from lnicola/sync-from-rust
lnicola Feb 10, 2025
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
Prev Previous commit
Next Next commit
manual: Convert to mdbook
Split manual.adoc into markdown files, one for each chapter.

For the parts of the manual that are generated from source code doc
comments, update the comments to use markdown syntax and update the
code generators to write to `generated.md` files.

For the weekly release, stop copying the .adoc files to the
`rust-analyzer/rust-analyzer.github.io` at release time. Instead,
we'll sync the manual hourly from this repository.

See rust-analyzer/rust-analyzer.github.io#226
for the sync. This PR should be merged first, and that PR needs to be
merged before the next weekly release.

This change is based on #15795, but rebased and updated. I've also
manually checked each page for markdown syntax issues and fixed any I
encountered.

Co-authored-by: Lukas Wirth <[email protected]>
Co-authored-by: Josh Rotenberg <[email protected]>
  • Loading branch information
3 people committed Jan 24, 2025
commit 1f45995dea280baa6381279221c9c60ff7af342d
7 changes: 4 additions & 3 deletions src/tools/rust-analyzer/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@ target/
*.log
*.iml
.vscode/settings.json
generated_assists.adoc
generated_features.adoc
generated_diagnostic.adoc
.DS_Store
/out/
/dump.lsif
.envrc
docs/book/book
docs/book/src/assists_generated.md
docs/book/src/diagnostics_generated.md
docs/book/src/features_generated.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use crate::{utils::invert_boolean_expression, AssistContext, AssistId, AssistKin

// Assist: apply_demorgan
//
// Apply https://en.wikipedia.org/wiki/De_Morgan%27s_laws[De Morgan's law].
// Apply [De Morgan's law](https://en.wikipedia.org/wiki/De_Morgan%27s_laws).
// This transforms expressions of the form `!l || !r` into `!(l && r)`.
// This also works with `&&`. This assist can only be applied with the cursor
// on either `||` or `&&`.
Expand Down Expand Up @@ -131,7 +131,7 @@ pub(crate) fn apply_demorgan(acc: &mut Assists, ctx: &AssistContext<'_>) -> Opti

// Assist: apply_demorgan_iterator
//
// Apply https://en.wikipedia.org/wiki/De_Morgan%27s_laws[De Morgan's law] to
// Apply [De Morgan's law](https://en.wikipedia.org/wiki/De_Morgan%27s_laws) to
// `Iterator::all` and `Iterator::any`.
//
// This transforms expressions of the form `!iter.any(|x| predicate(x))` into
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ use crate::{AssistContext, AssistId, AssistKind, Assists, GroupLabel};
// use super::AssistContext;
// ```
//
// .Import Granularity
// #### Import Granularity
//
// It is possible to configure how use-trees are merged with the `imports.granularity.group` setting.
// It has the following configurations:
Expand All @@ -54,7 +54,7 @@ use crate::{AssistContext, AssistId, AssistKind, Assists, GroupLabel};
//
// In `VS Code` the configuration for this is `rust-analyzer.imports.granularity.group`.
//
// .Import Prefix
// #### Import Prefix
//
// The style of imports in the same crate is configurable through the `imports.prefix` setting.
// It has the following configurations:
Expand All @@ -68,7 +68,7 @@ use crate::{AssistContext, AssistId, AssistKind, Assists, GroupLabel};
//
// In `VS Code` the configuration for this is `rust-analyzer.imports.prefix`.
//
// image::https://user-images.githubusercontent.com/48062697/113020673-b85be580-917a-11eb-9022-59585f35d4f8.gif[]
// ![Auto Import](https://user-images.githubusercontent.com/48062697/113020673-b85be580-917a-11eb-9022-59585f35d4f8.gif)

// Assist: auto_import
//
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! Generated by `cargo codegen assists-doc-tests`, do not edit by hand.
//! Generated by `cargo xtask codegen assists-doc-tests`, do not edit by hand.

use super::check_doc_test;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,27 +83,27 @@ use crate::{
// NOTE: currently, if an assoc item comes from a trait that's not currently imported, and it also has an unresolved and/or partially-qualified path,
// no imports will be proposed.
//
// .Fuzzy search details
// #### Fuzzy search details
//
// To avoid an excessive amount of the results returned, completion input is checked for inclusion in the names only
// (i.e. in `HashMap` in the `std::collections::HashMap` path).
// For the same reasons, avoids searching for any path imports for inputs with their length less than 2 symbols
// (but shows all associated items for any input length).
//
// .Import configuration
// #### Import configuration
//
// It is possible to configure how use-trees are merged with the `imports.granularity.group` setting.
// Mimics the corresponding behavior of the `Auto Import` feature.
//
// .LSP and performance implications
// #### LSP and performance implications
//
// The feature is enabled only if the LSP client supports LSP protocol version 3.16+ and reports the `additionalTextEdits`
// (case-sensitive) resolve client capability in its client capabilities.
// This way the server is able to defer the costly computations, doing them for a selected completion item only.
// For clients with no such support, all edits have to be calculated on the completion request, including the fuzzy search completion ones,
// which might be slow ergo the feature is automatically disabled.
//
// .Feature toggle
// #### Feature toggle
//
// The feature can be forcefully turned off in the settings with the `rust-analyzer.completion.autoimport.enable` flag.
// Note that having this flag set to `true` does not guarantee that the feature is enabled: your client needs to have the corresponding
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
// ** `logw` -> `log::warn!(...)`
// ** `loge` -> `log::error!(...)`
//
// image::https://user-images.githubusercontent.com/48062697/113020656-b560f500-917a-11eb-87de-02991f61beb8.gif[]
// ![Format String Completion](https://user-images.githubusercontent.com/48062697/113020656-b560f500-917a-11eb-87de-02991f61beb8.gif)

use ide_db::{
syntax_helpers::format_string_exprs::{parse_format_exprs, with_placeholders, Arg},
Expand Down
8 changes: 5 additions & 3 deletions src/tools/rust-analyzer/crates/ide-completion/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,13 @@ impl CompletionFieldsToResolve {
//
// There also snippet completions:
//
// .Expressions
// #### Expressions
//
// - `pd` -> `eprintln!(" = {:?}", );`
// - `ppd` -> `eprintln!(" = {:#?}", );`
//
// .Items
// #### Items
//
// - `tfn` -> `#[test] fn feature(){}`
// - `tmod` ->
// ```rust
Expand All @@ -131,7 +133,7 @@ impl CompletionFieldsToResolve {
// Those are the additional completion options with automatic `use` import and options from all project importable items,
// fuzzy matched against the completion input.
//
// image::https://user-images.githubusercontent.com/48062697/113020667-b72ab880-917a-11eb-8778-716cf26a0eb3.gif[]
// ![Magic Completions](https://user-images.githubusercontent.com/48062697/113020667-b72ab880-917a-11eb-8778-716cf26a0eb3.gif)

/// Main entry point for completion. We run completion as a two-phase process.
///
Expand Down
12 changes: 6 additions & 6 deletions src/tools/rust-analyzer/crates/ide-completion/src/snippet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
//
// A custom snippet can be defined by adding it to the `rust-analyzer.completion.snippets.custom` object respectively.
//
// [source,json]
// ----
// ```json
// {
// "rust-analyzer.completion.snippets.custom": {
// "thread spawn": {
Expand All @@ -25,7 +24,7 @@
// }
// }
// }
// ----
// ```
//
// In the example above:
//
Expand All @@ -39,6 +38,7 @@
// * `description` is an optional description of the snippet, if unset the snippet name will be used.
//
// * `requires` is an optional list of item paths that have to be resolvable in the current crate where the completion is rendered.

// On failure of resolution the snippet won't be applicable, otherwise the snippet will insert an import for the items on insertion if
// the items aren't yet in scope.
//
Expand All @@ -55,8 +55,8 @@
//
// For the VSCode editor, rust-analyzer also ships with a small set of defaults which can be removed
// by overwriting the settings object mentioned above, the defaults are:
// [source,json]
// ----
//
// ```json
// {
// "Arc::new": {
// "postfix": "arc",
Expand Down Expand Up @@ -98,7 +98,7 @@
// "scope": "expr"
// }
// }
// ----
// ````

use hir::{ModPath, Name, Symbol};
use ide_db::imports::import_assets::LocatedImport;
Expand Down
9 changes: 4 additions & 5 deletions src/tools/rust-analyzer/crates/ide-db/src/apply_change.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,11 @@ impl RootDatabase {
//
// Clears rust-analyzer's internal database and prints memory usage statistics.
//
// |===
// | Editor | Action Name
//
// | Editor | Action Name |
// |---------|-------------|
// | VS Code | **rust-analyzer: Memory Usage (Clears Database)**
// |===
// image::https://user-images.githubusercontent.com/48062697/113065592-08559f00-91b1-11eb-8c96-64b88068ec02.gif[]

// ![Memory Usage](https://user-images.githubusercontent.com/48062697/113065592-08559f00-91b1-11eb-8c96-64b88068ec02.gif)
pub fn per_query_memory_usage(&mut self) -> Vec<(String, Bytes, usize)> {
let mut acc: Vec<(String, Bytes, usize)> = vec![];

Expand Down
8 changes: 3 additions & 5 deletions src/tools/rust-analyzer/crates/ide-db/src/symbol_index.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,11 +193,9 @@ impl<DB> std::ops::Deref for Snap<DB> {
// `rust-analyzer.workspace.symbol.search.kind` settings. Symbols prefixed
// with `__` are hidden from the search results unless configured otherwise.
//
// |===
// | Editor | Shortcut
//
// | VS Code | kbd:[Ctrl+T]
// |===
// | Editor | Shortcut |
// |---------|-----------|
// | VS Code | <kbd>Ctrl+T</kbd>
pub fn world_symbols(db: &RootDatabase, query: Query) -> Vec<FileSymbol> {
let _p = tracing::info_span!("world_symbols", query = ?query.query).entered();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use crate::{

// Diagnostic: incorrect-ident-case
//
// This diagnostic is triggered if an item name doesn't follow https://doc.rust-lang.org/1.0.0/style/style/naming/README.html[Rust naming convention].
// This diagnostic is triggered if an item name doesn't follow [Rust naming convention](https://doc.rust-lang.org/1.0.0/style/style/naming/README.html).
pub(crate) fn incorrect_case(ctx: &DiagnosticsContext<'_>, d: &hir::IncorrectCase) -> Diagnostic {
let code = match d.expected_case {
CaseType::LowerSnakeCase => DiagnosticCode::RustcLint("non_snake_case"),
Expand Down
18 changes: 7 additions & 11 deletions src/tools/rust-analyzer/crates/ide-ssr/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,10 @@
//
// Supported constraints:
//
// |===
// | Constraint | Restricts placeholder
//
// | kind(literal) | Is a literal (e.g. `42` or `"forty two"`)
// | not(a) | Negates the constraint `a`
// |===
// | Constraint | Restricts placeholder |
// |---------------|------------------------|
// | kind(literal) | Is a literal (e.g. `42` or `"forty two"`) |
// | not(a) | Negates the constraint `a` |
//
// Available via the command `rust-analyzer.ssr`.
//
Expand All @@ -52,11 +50,9 @@
// String::from((y + 5).foo(z))
// ```
//
// |===
// | Editor | Action Name
//
// | VS Code | **rust-analyzer: Structural Search Replace**
// |===
// | Editor | Action Name |
// |---------|--------------|
// | VS Code | **rust-analyzer: Structural Search Replace** |
//
// Also available as an assist, by writing a comment containing the structural
// search and replace rule. You will only see the assist if the comment can
Expand Down
2 changes: 1 addition & 1 deletion src/tools/rust-analyzer/crates/ide/src/annotations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ mod fn_references;
// Provides user with annotations above items for looking up references or impl blocks
// and running/debugging binaries.
//
// image::https://user-images.githubusercontent.com/48062697/113020672-b7c34f00-917a-11eb-8f6e-858735660a0e.png[]
// ![Annotations](https://user-images.githubusercontent.com/48062697/113020672-b7c34f00-917a-11eb-8f6e-858735660a0e.png)
#[derive(Debug, Hash, PartialEq, Eq)]
pub struct Annotation {
pub range: TextRange,
Expand Down
8 changes: 3 additions & 5 deletions src/tools/rust-analyzer/crates/ide/src/doc_links.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,9 @@ pub(crate) fn remove_links(markdown: &str) -> String {
// The simplest way to use this feature is via the context menu. Right-click on
// the selected item. The context menu opens. Select **Open Docs**.
//
// |===
// | Editor | Action Name
//
// | VS Code | **rust-analyzer: Open Docs**
// |===
// | Editor | Action Name |
// |---------|-------------|
// | VS Code | **rust-analyzer: Open Docs** |
pub(crate) fn external_docs(
db: &RootDatabase,
FilePosition { file_id, offset }: FilePosition,
Expand Down
10 changes: 4 additions & 6 deletions src/tools/rust-analyzer/crates/ide/src/expand_macro.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,11 @@ pub struct ExpandedMacro {
//
// Shows the full macro expansion of the macro at the current caret position.
//
// |===
// | Editor | Action Name
// | Editor | Action Name |
// |---------|-------------|
// | VS Code | **rust-analyzer: Expand macro recursively at caret** |
//
// | VS Code | **rust-analyzer: Expand macro recursively at caret**
// |===
//
// image::https://user-images.githubusercontent.com/48062697/113020648-b3973180-917a-11eb-84a9-ecb921293dc5.gif[]
// ![Expand Macro Recursively](https://user-images.githubusercontent.com/48062697/113020648-b3973180-917a-11eb-84a9-ecb921293dc5.gif)
pub(crate) fn expand_macro(db: &RootDatabase, position: FilePosition) -> Option<ExpandedMacro> {
let sema = Semantics::new(db);
let file = sema.parse_guess_edition(position.file_id);
Expand Down
10 changes: 4 additions & 6 deletions src/tools/rust-analyzer/crates/ide/src/extend_selection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,11 @@ use crate::FileRange;
// Extends or shrinks the current selection to the encompassing syntactic construct
// (expression, statement, item, module, etc). It works with multiple cursors.
//
// |===
// | Editor | Shortcut
// | Editor | Shortcut |
// |---------|----------|
// | VS Code | <kbd>Alt+Shift+→</kbd>, <kbd>Alt+Shift+←</kbd> |
//
// | VS Code | kbd:[Alt+Shift+→], kbd:[Alt+Shift+←]
// |===
//
// image::https://user-images.githubusercontent.com/48062697/113020651-b42fc800-917a-11eb-8a4f-cf1a07859fac.gif[]
// ![Expand and Shrink Selection](https://user-images.githubusercontent.com/48062697/113020651-b42fc800-917a-11eb-8a4f-cf1a07859fac.gif)
pub(crate) fn extend_selection(db: &RootDatabase, frange: FileRange) -> TextRange {
let sema = Semantics::new(db);
let src = sema.parse_guess_edition(frange.file_id);
Expand Down
10 changes: 4 additions & 6 deletions src/tools/rust-analyzer/crates/ide/src/fetch_crates.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,11 @@ pub struct CrateInfo {
//
// Shows a view tree with all the dependencies of this project
//
// |===
// | Editor | Panel Name
// | Editor | Panel Name |
// |---------|------------|
// | VS Code | **Rust Dependencies** |
//
// | VS Code | **Rust Dependencies**
// |===
//
// image::https://user-images.githubusercontent.com/5748995/229394139-2625beab-f4c9-484b-84ed-ad5dee0b1e1a.png[]
// ![Show Dependency Tree](https://user-images.githubusercontent.com/5748995/229394139-2625beab-f4c9-484b-84ed-ad5dee0b1e1a.png)
pub(crate) fn fetch_crates(db: &RootDatabase) -> FxIndexSet<CrateInfo> {
let crate_graph = db.crate_graph();
crate_graph
Expand Down
11 changes: 4 additions & 7 deletions src/tools/rust-analyzer/crates/ide/src/file_structure.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,11 @@ pub enum StructureNodeKind {
// * draw breadcrumbs to describe the context around the cursor
// * draw outline of the file
//
// |===
// | Editor | Shortcut
// | Editor | Shortcut |
// |---------|----------|
// | VS Code | <kbd>Ctrl+Shift+O</kbd> |
//
// | VS Code | kbd:[Ctrl+Shift+O]
// |===
//
// image::https://user-images.githubusercontent.com/48062697/113020654-b42fc800-917a-11eb-8388-e7dc4d92b02e.gif[]

// ![File Structure](https://user-images.githubusercontent.com/48062697/113020654-b42fc800-917a-11eb-8388-e7dc4d92b02e.gif)
pub(crate) fn file_structure(file: &SourceFile) -> Vec<StructureNode> {
let mut res = Vec::new();
let mut stack = Vec::new();
Expand Down
10 changes: 4 additions & 6 deletions src/tools/rust-analyzer/crates/ide/src/goto_definition.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,11 @@ use syntax::{
//
// For outline modules, this will navigate to the source file of the module.
//
// |===
// | Editor | Shortcut
// | Editor | Shortcut |
// |---------|----------|
// | VS Code | <kbd>F12</kbd> |
//
// | VS Code | kbd:[F12]
// |===
//
// image::https://user-images.githubusercontent.com/48062697/113065563-025fbe00-91b1-11eb-83e4-a5a703610b23.gif[]
// ![Go to Definition](https://user-images.githubusercontent.com/48062697/113065563-025fbe00-91b1-11eb-83e4-a5a703610b23.gif)
pub(crate) fn goto_definition(
db: &RootDatabase,
FilePosition { file_id, offset }: FilePosition,
Expand Down
10 changes: 4 additions & 6 deletions src/tools/rust-analyzer/crates/ide/src/goto_implementation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,11 @@ use crate::{FilePosition, NavigationTarget, RangeInfo, TryToNav};
//
// Navigates to the impl items of types.
//
// |===
// | Editor | Shortcut
// | Editor | Shortcut |
// |---------|----------|
// | VS Code | <kbd>Ctrl+F12</kbd>
//
// | VS Code | kbd:[Ctrl+F12]
// |===
//
// image::https://user-images.githubusercontent.com/48062697/113065566-02f85480-91b1-11eb-9288-aaad8abd8841.gif[]
// ![Go to Implementation](https://user-images.githubusercontent.com/48062697/113065566-02f85480-91b1-11eb-9288-aaad8abd8841.gif)
pub(crate) fn goto_implementation(
db: &RootDatabase,
FilePosition { file_id, offset }: FilePosition,
Expand Down
Loading