aboutsummaryrefslogtreecommitdiff
path: root/crates/ide
diff options
context:
space:
mode:
authorVincent Esche <[email protected]>2021-01-08 14:46:48 +0000
committerVincent Esche <[email protected]>2021-01-09 14:41:29 +0000
commit21f8239ac8be6093967bc91ec155782d37efcb6a (patch)
treee4af0f0077f2d736db4651673dbab3d274275f02 /crates/ide
parent939ca83b34f9a5648d196f85e5cc7d844ba22604 (diff)
Fixed typos in code comments
Diffstat (limited to 'crates/ide')
-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 1ff818de2..72ddf3690 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) {
@@ -420,7 +420,7 @@ fn get_symbol_fragment(db: &dyn HirDatabase, field_or_assoc: &FieldOrAssocItem)
420 function.as_assoc_item(db).map(|assoc| assoc.container(db)), 420 function.as_assoc_item(db).map(|assoc| assoc.container(db)),
421 Some(AssocItemContainer::Trait(..)) 421 Some(AssocItemContainer::Trait(..))
422 ); 422 );
423 // This distinction may get more complicated when specialisation is available. 423 // This distinction may get more complicated when specialization is available.
424 // Rustdoc makes this decision based on whether a method 'has defaultness'. 424 // Rustdoc makes this decision based on whether a method 'has defaultness'.
425 // Currently this is only the case for provided trait methods. 425 // Currently this is only the case for provided trait methods.
426 if is_trait_method && !function.has_body(db) { 426 if is_trait_method && !function.has_body(db) {
diff --git a/crates/ide/src/hover.rs b/crates/ide/src/hover.rs
index 8cb4a51d8..165b32ef9 100644
--- a/crates/ide/src/hover.rs
+++ b/crates/ide/src/hover.rs
@@ -1951,16 +1951,16 @@ struct S {
1951/// Test cases: 1951/// Test cases:
1952/// case 1. bare URL: https://www.example.com/ 1952/// case 1. bare URL: https://www.example.com/
1953/// case 2. inline URL with title: [example](https://www.example.com/) 1953/// case 2. inline URL with title: [example](https://www.example.com/)
1954/// case 3. code refrence: [`Result`] 1954/// case 3. code reference: [`Result`]
1955/// case 4. code refrence but miss footnote: [`String`] 1955/// case 4. code reference but miss footnote: [`String`]
1956/// case 5. autolink: <http://www.example.com/> 1956/// case 5. autolink: <http://www.example.com/>
1957/// case 6. email address: <[email protected]> 1957/// case 6. email address: <[email protected]>
1958/// case 7. refrence: [example][example] 1958/// case 7. reference: [example][example]
1959/// case 8. collapsed link: [example][] 1959/// case 8. collapsed link: [example][]
1960/// case 9. shortcut link: [example] 1960/// case 9. shortcut link: [example]
1961/// case 10. inline without URL: [example]() 1961/// case 10. inline without URL: [example]()
1962/// case 11. refrence: [foo][foo] 1962/// case 11. reference: [foo][foo]
1963/// case 12. refrence: [foo][bar] 1963/// case 12. reference: [foo][bar]
1964/// case 13. collapsed link: [foo][] 1964/// case 13. collapsed link: [foo][]
1965/// case 14. shortcut link: [foo] 1965/// case 14. shortcut link: [foo]
1966/// case 15. inline without URL: [foo]() 1966/// case 15. inline without URL: [foo]()
@@ -1987,16 +1987,16 @@ pub fn fo$0o() {}
1987 Test cases: 1987 Test cases:
1988 case 1. bare URL: https://www.example.com/ 1988 case 1. bare URL: https://www.example.com/
1989 case 2. inline URL with title: [example](https://www.example.com/) 1989 case 2. inline URL with title: [example](https://www.example.com/)
1990 case 3. code refrence: `Result` 1990 case 3. code reference: `Result`
1991 case 4. code refrence but miss footnote: `String` 1991 case 4. code reference but miss footnote: `String`
1992 case 5. autolink: http://www.example.com/ 1992 case 5. autolink: http://www.example.com/
1993 case 6. email address: [email protected] 1993 case 6. email address: [email protected]
1994 case 7. refrence: example 1994 case 7. reference: example
1995 case 8. collapsed link: example 1995 case 8. collapsed link: example
1996 case 9. shortcut link: example 1996 case 9. shortcut link: example
1997 case 10. inline without URL: example 1997 case 10. inline without URL: example
1998 case 11. refrence: foo 1998 case 11. reference: foo
1999 case 12. refrence: foo 1999 case 12. reference: foo
2000 case 13. collapsed link: foo 2000 case 13. collapsed link: foo
2001 case 14. shortcut link: foo 2001 case 14. shortcut link: foo
2002 case 15. inline without URL: foo 2002 case 15. inline without URL: foo
diff --git a/crates/ide/src/references.rs b/crates/ide/src/references.rs
index c95ed669c..37a95e1c5 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 {