From c03e1842f637e34b23297fa3a0aeeb0fcdca1c47 Mon Sep 17 00:00:00 2001 From: cuishuang Date: Sat, 7 May 2022 23:56:21 +0800 Subject: [PATCH] fix some typos Signed-off-by: cuishuang --- src/parse/session.rs | 2 +- tests/rustfmt/main.rs | 2 +- 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)]