From 21f8239ac8be6093967bc91ec155782d37efcb6a Mon Sep 17 00:00:00 2001 From: Vincent Esche Date: Fri, 8 Jan 2021 15:46:48 +0100 Subject: Fixed typos in code comments --- crates/ide/src/doc_links.rs | 4 ++-- crates/ide/src/hover.rs | 20 ++++++++++---------- crates/ide/src/references.rs | 2 +- crates/ide/src/references/rename.rs | 4 ++-- 4 files changed, 15 insertions(+), 15 deletions(-) (limited to 'crates/ide') 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 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) { @@ -420,7 +420,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) { 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 { /// 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: /// case 6. email address: -/// 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]() @@ -1987,16 +1987,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 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 @@ //! 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 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; //- /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 { -- cgit v1.2.3