From b7bfe04b2d003d08f6ac450f41d7f221cb87f129 Mon Sep 17 00:00:00 2001 From: Joseph Crail Date: Tue, 2 Sep 2014 01:35:58 -0400 Subject: Fix spelling errors and capitalization. --- src/libsyntax/ext/format.rs | 2 +- src/libsyntax/parse/lexer/mod.rs | 2 +- src/libsyntax/print/pprust.rs | 2 +- src/libsyntax/util/parser_testing.rs | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/libsyntax') diff --git a/src/libsyntax/ext/format.rs b/src/libsyntax/ext/format.rs index 0994abaadc7..3c6cf54a6cf 100644 --- a/src/libsyntax/ext/format.rs +++ b/src/libsyntax/ext/format.rs @@ -501,7 +501,7 @@ impl<'a, 'b> Context<'a, 'b> { // Right now there is a bug such that for the expression: // foo(bar(&1)) // the lifetime of `1` doesn't outlast the call to `bar`, so it's not - // vald for the call to `foo`. To work around this all arguments to the + // valid for the call to `foo`. To work around this all arguments to the // format! string are shoved into locals. Furthermore, we shove the address // of each variable because we don't want to move out of the arguments // passed to this function. diff --git a/src/libsyntax/parse/lexer/mod.rs b/src/libsyntax/parse/lexer/mod.rs index 17249628989..da43f08a4e5 100644 --- a/src/libsyntax/parse/lexer/mod.rs +++ b/src/libsyntax/parse/lexer/mod.rs @@ -1114,7 +1114,7 @@ impl<'a> StringReader<'a> { self.bump(); valid &= self.scan_char_or_byte(ch_start, ch, /* ascii_only = */ false, '"'); } - // adjust for the ACSII " at the start of the literal + // adjust for the ASCII " at the start of the literal let id = if valid { self.name_from(start_bpos + BytePos(1)) } else { token::intern("??") }; self.bump(); diff --git a/src/libsyntax/print/pprust.rs b/src/libsyntax/print/pprust.rs index afea9e01de9..d5bc1bfe956 100644 --- a/src/libsyntax/print/pprust.rs +++ b/src/libsyntax/print/pprust.rs @@ -180,7 +180,7 @@ pub fn to_string(f: |&mut State| -> IoResult<()>) -> String { // FIXME (Issue #16472): the thing_to_string_impls macro should go away // after we revise the syntax::ext::quote::ToToken impls to go directly -// to token-trees instea of thing -> string -> token-trees. +// to token-trees instead of thing -> string -> token-trees. macro_rules! thing_to_string_impls { ($to_string:ident) => { diff --git a/src/libsyntax/util/parser_testing.rs b/src/libsyntax/util/parser_testing.rs index f50739a7069..7b96cf3c60d 100644 --- a/src/libsyntax/util/parser_testing.rs +++ b/src/libsyntax/util/parser_testing.rs @@ -81,9 +81,9 @@ pub fn strs_to_idents(ids: Vec<&str> ) -> Vec { /// Does the given string match the pattern? whitespace in the first string /// may be deleted or replaced with other whitespace to match the pattern. -/// this function is unicode-ignorant; fortunately, the careful design of +/// this function is Unicode-ignorant; fortunately, the careful design of /// UTF-8 mitigates this ignorance. In particular, this function only collapses -/// sequences of \n, \r, ' ', and \t, but it should otherwise tolerate unicode +/// sequences of \n, \r, ' ', and \t, but it should otherwise tolerate Unicode /// chars. Unsurprisingly, it doesn't do NKF-normalization(?). pub fn matches_codepattern(a : &str, b : &str) -> bool { let mut idx_a = 0; -- cgit 1.4.1-3-g733a5