aboutsummaryrefslogtreecommitdiff
path: root/crates/ide/src
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-01-10 18:16:29 +0000
committerGitHub <[email protected]>2021-01-10 18:16:29 +0000
commit607b9ea160149bacca41c0638f16d372c3b235cd (patch)
treec1ef9b29af2f080530fd3d79b9bb6622bcff0a2a /crates/ide/src
parent3e32e39da765632dd5c61d31b846bfa93738e786 (diff)
parentd4621197447d6906305ed30f8ab4fb48d657ec86 (diff)
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 <[email protected]>
Diffstat (limited to 'crates/ide/src')
-rw-r--r--crates/ide/src/doc_links.rs4
-rw-r--r--crates/ide/src/hover.rs20
-rw-r--r--crates/ide/src/references.rs2
-rw-r--r--crates/ide/src/references/rename.rs4
4 files changed, 15 insertions, 15 deletions
diff --git a/crates/ide/src/doc_links.rs b/crates/ide/src/doc_links.rs
index 91f4241f9..de10406bc 100644
--- a/crates/ide/src/doc_links.rs
+++ b/crates/ide/src/doc_links.rs
@@ -39,7 +39,7 @@ pub(crate) fn rewrite_links(db: &RootDatabase, markdown: &str, definition: &Defi
39 if target.contains("://") { 39 if target.contains("://") {
40 (target.to_string(), title.to_string()) 40 (target.to_string(), title.to_string())
41 } else { 41 } else {
42 // Two posibilities: 42 // Two possibilities:
43 // * path-based links: `../../module/struct.MyStruct.html` 43 // * path-based links: `../../module/struct.MyStruct.html`
44 // * module-based links (AKA intra-doc links): `super::super::module::MyStruct` 44 // * module-based links (AKA intra-doc links): `super::super::module::MyStruct`
45 if let Some(rewritten) = rewrite_intra_doc_link(db, *definition, target, title) { 45 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)
442 function.as_assoc_item(db).map(|assoc| assoc.container(db)), 442 function.as_assoc_item(db).map(|assoc| assoc.container(db)),
443 Some(AssocItemContainer::Trait(..)) 443 Some(AssocItemContainer::Trait(..))
444 ); 444 );
445 // This distinction may get more complicated when specialisation is available. 445 // This distinction may get more complicated when specialization is available.
446 // Rustdoc makes this decision based on whether a method 'has defaultness'. 446 // Rustdoc makes this decision based on whether a method 'has defaultness'.
447 // Currently this is only the case for provided trait methods. 447 // Currently this is only the case for provided trait methods.
448 if is_trait_method && !function.has_body(db) { 448 if is_trait_method && !function.has_body(db) {
diff --git a/crates/ide/src/hover.rs b/crates/ide/src/hover.rs
index e331f8886..e892d5588 100644
--- a/crates/ide/src/hover.rs
+++ b/crates/ide/src/hover.rs
@@ -1953,16 +1953,16 @@ struct S {
1953/// Test cases: 1953/// Test cases:
1954/// case 1. bare URL: https://www.example.com/ 1954/// case 1. bare URL: https://www.example.com/
1955/// case 2. inline URL with title: [example](https://www.example.com/) 1955/// case 2. inline URL with title: [example](https://www.example.com/)
1956/// case 3. code refrence: [`Result`] 1956/// case 3. code reference: [`Result`]
1957/// case 4. code refrence but miss footnote: [`String`] 1957/// case 4. code reference but miss footnote: [`String`]
1958/// case 5. autolink: <http://www.example.com/> 1958/// case 5. autolink: <http://www.example.com/>
1959/// case 6. email address: <[email protected]> 1959/// case 6. email address: <[email protected]>
1960/// case 7. refrence: [example][example] 1960/// case 7. reference: [example][example]
1961/// case 8. collapsed link: [example][] 1961/// case 8. collapsed link: [example][]
1962/// case 9. shortcut link: [example] 1962/// case 9. shortcut link: [example]
1963/// case 10. inline without URL: [example]() 1963/// case 10. inline without URL: [example]()
1964/// case 11. refrence: [foo][foo] 1964/// case 11. reference: [foo][foo]
1965/// case 12. refrence: [foo][bar] 1965/// case 12. reference: [foo][bar]
1966/// case 13. collapsed link: [foo][] 1966/// case 13. collapsed link: [foo][]
1967/// case 14. shortcut link: [foo] 1967/// case 14. shortcut link: [foo]
1968/// case 15. inline without URL: [foo]() 1968/// case 15. inline without URL: [foo]()
@@ -1989,16 +1989,16 @@ pub fn fo$0o() {}
1989 Test cases: 1989 Test cases:
1990 case 1. bare URL: https://www.example.com/ 1990 case 1. bare URL: https://www.example.com/
1991 case 2. inline URL with title: [example](https://www.example.com/) 1991 case 2. inline URL with title: [example](https://www.example.com/)
1992 case 3. code refrence: `Result` 1992 case 3. code reference: `Result`
1993 case 4. code refrence but miss footnote: `String` 1993 case 4. code reference but miss footnote: `String`
1994 case 5. autolink: http://www.example.com/ 1994 case 5. autolink: http://www.example.com/
1995 case 6. email address: [email protected] 1995 case 6. email address: [email protected]
1996 case 7. refrence: example 1996 case 7. reference: example
1997 case 8. collapsed link: example 1997 case 8. collapsed link: example
1998 case 9. shortcut link: example 1998 case 9. shortcut link: example
1999 case 10. inline without URL: example 1999 case 10. inline without URL: example
2000 case 11. refrence: foo 2000 case 11. reference: foo
2001 case 12. refrence: foo 2001 case 12. reference: foo
2002 case 13. collapsed link: foo 2002 case 13. collapsed link: foo
2003 case 14. shortcut link: foo 2003 case 14. shortcut link: foo
2004 case 15. inline without URL: foo 2004 case 15. inline without URL: foo
diff --git a/crates/ide/src/references.rs b/crates/ide/src/references.rs
index d44d96dd4..b774a2be1 100644
--- a/crates/ide/src/references.rs
+++ b/crates/ide/src/references.rs
@@ -3,7 +3,7 @@
3//! or `ast::NameRef`. If it's a `ast::NameRef`, at the classification step we 3//! or `ast::NameRef`. If it's a `ast::NameRef`, at the classification step we
4//! try to resolve the direct tree parent of this element, otherwise we 4//! try to resolve the direct tree parent of this element, otherwise we
5//! already have a definition and just need to get its HIR together with 5//! already have a definition and just need to get its HIR together with
6//! some information that is needed for futher steps of searching. 6//! some information that is needed for further steps of searching.
7//! After that, we collect files that might contain references and look 7//! After that, we collect files that might contain references and look
8//! for text occurrences of the identifier. If there's an `ast::NameRef` 8//! for text occurrences of the identifier. If there's an `ast::NameRef`
9//! at the index that the match starts at and its tree parent is 9//! at the index that the match starts at and its tree parent is
diff --git a/crates/ide/src/references/rename.rs b/crates/ide/src/references/rename.rs
index 53d79333c..099900673 100644
--- a/crates/ide/src/references/rename.rs
+++ b/crates/ide/src/references/rename.rs
@@ -945,7 +945,7 @@ use crate::foo$0::FooContent;
945//- /lib.rs 945//- /lib.rs
946mod fo$0o; 946mod fo$0o;
947//- /foo/mod.rs 947//- /foo/mod.rs
948// emtpy 948// empty
949"#, 949"#,
950 expect![[r#" 950 expect![[r#"
951 RangeInfo { 951 RangeInfo {
@@ -995,7 +995,7 @@ mod fo$0o;
995mod outer { mod fo$0o; } 995mod outer { mod fo$0o; }
996 996
997//- /outer/foo.rs 997//- /outer/foo.rs
998// emtpy 998// empty
999"#, 999"#,
1000 expect![[r#" 1000 expect![[r#"
1001 RangeInfo { 1001 RangeInfo {