about summary refs log tree commit diff
diff options
context:
space:
mode:
authorcuishuang <imcusg@gmail.com>2022-05-07 23:56:21 +0800
committerCaleb Cartwright <calebcartwright@users.noreply.github.com>2022-05-07 11:10:59 -0500
commitc03e1842f637e34b23297fa3a0aeeb0fcdca1c47 (patch)
treeb17ab36ae66b043c2eae7db676fcd6b078077a59
parentb26c86b51afa013815fc54404ef033f14541c707 (diff)
downloadrust-c03e1842f637e34b23297fa3a0aeeb0fcdca1c47.tar.gz
rust-c03e1842f637e34b23297fa3a0aeeb0fcdca1c47.zip
fix some typos
Signed-off-by: cuishuang <imcusg@gmail.com>
-rw-r--r--src/parse/session.rs2
-rw-r--r--tests/rustfmt/main.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/parse/session.rs b/src/parse/session.rs
index 7571e6d078a..55050571db7 100644
--- a/src/parse/session.rs
+++ b/src/parse/session.rs
@@ -152,7 +152,7 @@ impl ParseSess {
     /// * `relative` - If Some(symbol), the symbol name is a directory relative to the dir_path.
     ///   If relative is Some, resolve the submodle at {dir_path}/{symbol}/{id}.rs
     ///   or {dir_path}/{symbol}/{id}/mod.rs. if None, resolve the module at {dir_path}/{id}.rs.
-    /// *  `dir_path` - Module resolution will occur relative to this direcotry.
+    /// *  `dir_path` - Module resolution will occur relative to this directory.
     pub(crate) fn default_submod_path(
         &self,
         id: symbol::Ident,
diff --git a/tests/rustfmt/main.rs b/tests/rustfmt/main.rs
index 450051d2fec..4c6d52726f3 100644
--- a/tests/rustfmt/main.rs
+++ b/tests/rustfmt/main.rs
@@ -143,7 +143,7 @@ fn mod_resolution_error_relative_module_not_found() {
     let args = ["tests/mod-resolver/module-not-found/relative_module/lib.rs"];
     let (_stdout, stderr) = rustfmt(&args);
     // The file `./a.rs` and directory `./a` both exist.
-    // Module resolution fails becuase we're unable to find `./a/b.rs`
+    // Module resolution fails because we're unable to find `./a/b.rs`
     #[cfg(not(windows))]
     assert!(stderr.contains("a/b.rs does not exist"));
     #[cfg(windows)]