mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-08-30 23:27:24 +00:00
Merge #7218
7218: Fix typos r=Veykril a=regexident Apart from the very last commit on this PR (which fixes a public type's name) all changes are non-breaking. Co-authored-by: Vincent Esche <regexident@gmail.com>
This commit is contained in:
commit
607b9ea160
32 changed files with 114 additions and 118 deletions
|
@ -39,7 +39,7 @@ pub(crate) fn rewrite_links(db: &RootDatabase, markdown: &str, definition: &Defi
|
|||
if target.contains("://") {
|
||||
(target.to_string(), title.to_string())
|
||||
} else {
|
||||
// Two posibilities:
|
||||
// Two possibilities:
|
||||
// * path-based links: `../../module/struct.MyStruct.html`
|
||||
// * module-based links (AKA intra-doc links): `super::super::module::MyStruct`
|
||||
if let Some(rewritten) = rewrite_intra_doc_link(db, *definition, target, title) {
|
||||
|
@ -442,7 +442,7 @@ fn get_symbol_fragment(db: &dyn HirDatabase, field_or_assoc: &FieldOrAssocItem)
|
|||
function.as_assoc_item(db).map(|assoc| assoc.container(db)),
|
||||
Some(AssocItemContainer::Trait(..))
|
||||
);
|
||||
// This distinction may get more complicated when specialisation is available.
|
||||
// This distinction may get more complicated when specialization is available.
|
||||
// Rustdoc makes this decision based on whether a method 'has defaultness'.
|
||||
// Currently this is only the case for provided trait methods.
|
||||
if is_trait_method && !function.has_body(db) {
|
||||
|
|
|
@ -1953,16 +1953,16 @@ struct S {
|
|||
/// Test cases:
|
||||
/// case 1. bare URL: https://www.example.com/
|
||||
/// case 2. inline URL with title: [example](https://www.example.com/)
|
||||
/// case 3. code refrence: [`Result`]
|
||||
/// case 4. code refrence but miss footnote: [`String`]
|
||||
/// case 3. code reference: [`Result`]
|
||||
/// case 4. code reference but miss footnote: [`String`]
|
||||
/// case 5. autolink: <http://www.example.com/>
|
||||
/// case 6. email address: <test@example.com>
|
||||
/// case 7. refrence: [example][example]
|
||||
/// case 7. reference: [example][example]
|
||||
/// case 8. collapsed link: [example][]
|
||||
/// case 9. shortcut link: [example]
|
||||
/// case 10. inline without URL: [example]()
|
||||
/// case 11. refrence: [foo][foo]
|
||||
/// case 12. refrence: [foo][bar]
|
||||
/// case 11. reference: [foo][foo]
|
||||
/// case 12. reference: [foo][bar]
|
||||
/// case 13. collapsed link: [foo][]
|
||||
/// case 14. shortcut link: [foo]
|
||||
/// case 15. inline without URL: [foo]()
|
||||
|
@ -1989,16 +1989,16 @@ pub fn fo$0o() {}
|
|||
Test cases:
|
||||
case 1. bare URL: https://www.example.com/
|
||||
case 2. inline URL with title: [example](https://www.example.com/)
|
||||
case 3. code refrence: `Result`
|
||||
case 4. code refrence but miss footnote: `String`
|
||||
case 3. code reference: `Result`
|
||||
case 4. code reference but miss footnote: `String`
|
||||
case 5. autolink: http://www.example.com/
|
||||
case 6. email address: test@example.com
|
||||
case 7. refrence: example
|
||||
case 7. reference: example
|
||||
case 8. collapsed link: example
|
||||
case 9. shortcut link: example
|
||||
case 10. inline without URL: example
|
||||
case 11. refrence: foo
|
||||
case 12. refrence: foo
|
||||
case 11. reference: foo
|
||||
case 12. reference: foo
|
||||
case 13. collapsed link: foo
|
||||
case 14. shortcut link: foo
|
||||
case 15. inline without URL: foo
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
//! or `ast::NameRef`. If it's a `ast::NameRef`, at the classification step we
|
||||
//! try to resolve the direct tree parent of this element, otherwise we
|
||||
//! already have a definition and just need to get its HIR together with
|
||||
//! some information that is needed for futher steps of searching.
|
||||
//! some information that is needed for further steps of searching.
|
||||
//! After that, we collect files that might contain references and look
|
||||
//! for text occurrences of the identifier. If there's an `ast::NameRef`
|
||||
//! at the index that the match starts at and its tree parent is
|
||||
|
|
|
@ -945,7 +945,7 @@ use crate::foo$0::FooContent;
|
|||
//- /lib.rs
|
||||
mod fo$0o;
|
||||
//- /foo/mod.rs
|
||||
// emtpy
|
||||
// empty
|
||||
"#,
|
||||
expect![[r#"
|
||||
RangeInfo {
|
||||
|
@ -995,7 +995,7 @@ mod fo$0o;
|
|||
mod outer { mod fo$0o; }
|
||||
|
||||
//- /outer/foo.rs
|
||||
// emtpy
|
||||
// empty
|
||||
"#,
|
||||
expect![[r#"
|
||||
RangeInfo {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue