From 051835b903181ac0a2e549327de9e8d89cf3d457 Mon Sep 17 00:00:00 2001 From: Marcel Hellwig Date: Mon, 21 Jan 2019 08:09:56 +0100 Subject: [PATCH] Corrected spelling inconsistency resolves #57773 --- src/librustc/hir/lowering.rs | 4 ++-- src/libsyntax/ast.rs | 8 ++++---- src/libsyntax/fold.rs | 12 ++++++------ src/libsyntax/parse/parser.rs | 4 ++-- ...ggestion.rs => parenthesized-deref-suggestion.rs} | 0 ....stderr => parenthesized-deref-suggestion.stderr} | 4 ++-- 6 files changed, 16 insertions(+), 16 deletions(-) rename src/test/ui/{parenthesised-deref-suggestion.rs => parenthesized-deref-suggestion.rs} (100%) rename src/test/ui/{parenthesised-deref-suggestion.stderr => parenthesized-deref-suggestion.stderr} (88%) diff --git a/src/librustc/hir/lowering.rs b/src/librustc/hir/lowering.rs index f7af135bc7605..905a3ceed81c9 100644 --- a/src/librustc/hir/lowering.rs +++ b/src/librustc/hir/lowering.rs @@ -1931,7 +1931,7 @@ impl<'a> LoweringContext<'a> { fn lower_parenthesized_parameter_data( &mut self, - data: &ParenthesisedArgs, + data: &ParenthesizedArgs, ) -> (hir::GenericArgs, bool) { // Switch to `PassThrough` mode for anonymous lifetimes: this // means that we permit things like `&Ref`, where `Ref` has @@ -1941,7 +1941,7 @@ impl<'a> LoweringContext<'a> { self.with_anonymous_lifetime_mode( AnonymousLifetimeMode::PassThrough, |this| { - let &ParenthesisedArgs { ref inputs, ref output, span } = data; + let &ParenthesizedArgs { ref inputs, ref output, span } = data; let inputs = inputs .iter() .map(|ty| this.lower_ty_direct(ty, ImplTraitContext::disallowed())) diff --git a/src/libsyntax/ast.rs b/src/libsyntax/ast.rs index 405cf612543fb..798f14dcba955 100644 --- a/src/libsyntax/ast.rs +++ b/src/libsyntax/ast.rs @@ -136,7 +136,7 @@ pub enum GenericArgs { /// The `<'a, A,B,C>` in `foo::bar::baz::<'a, A,B,C>` AngleBracketed(AngleBracketedArgs), /// The `(A,B)` and `C` in `Foo(A,B) -> C` - Parenthesized(ParenthesisedArgs), + Parenthesized(ParenthesizedArgs), } impl GenericArgs { @@ -173,7 +173,7 @@ impl Into>> for AngleBracketedArgs { } } -impl Into>> for ParenthesisedArgs { +impl Into>> for ParenthesizedArgs { fn into(self) -> Option> { Some(P(GenericArgs::Parenthesized(self))) } @@ -181,7 +181,7 @@ impl Into>> for ParenthesisedArgs { /// A path like `Foo(A,B) -> C` #[derive(Clone, RustcEncodable, RustcDecodable, Debug)] -pub struct ParenthesisedArgs { +pub struct ParenthesizedArgs { /// Overall span pub span: Span, @@ -192,7 +192,7 @@ pub struct ParenthesisedArgs { pub output: Option>, } -impl ParenthesisedArgs { +impl ParenthesizedArgs { pub fn as_angle_bracketed_args(&self) -> AngleBracketedArgs { AngleBracketedArgs { span: self.span, diff --git a/src/libsyntax/fold.rs b/src/libsyntax/fold.rs index a4c3b38f691ed..fdcbbb939a6cf 100644 --- a/src/libsyntax/fold.rs +++ b/src/libsyntax/fold.rs @@ -207,8 +207,8 @@ pub trait Folder : Sized { noop_fold_angle_bracketed_parameter_data(p, self) } - fn fold_parenthesized_parameter_data(&mut self, p: ParenthesisedArgs) - -> ParenthesisedArgs + fn fold_parenthesized_parameter_data(&mut self, p: ParenthesizedArgs) + -> ParenthesizedArgs { noop_fold_parenthesized_parameter_data(p, self) } @@ -504,12 +504,12 @@ pub fn noop_fold_angle_bracketed_parameter_data(data: AngleBracketedA } } -pub fn noop_fold_parenthesized_parameter_data(data: ParenthesisedArgs, +pub fn noop_fold_parenthesized_parameter_data(data: ParenthesizedArgs, fld: &mut T) - -> ParenthesisedArgs + -> ParenthesizedArgs { - let ParenthesisedArgs { inputs, output, span } = data; - ParenthesisedArgs { + let ParenthesizedArgs { inputs, output, span } = data; + ParenthesizedArgs { inputs: inputs.move_map(|ty| fld.fold_ty(ty)), output: output.map(|ty| fld.fold_ty(ty)), span: fld.new_span(span) diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 439eec5b0c48d..09ea099525326 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -1,5 +1,5 @@ use rustc_target::spec::abi::{self, Abi}; -use ast::{AngleBracketedArgs, ParenthesisedArgs, AttrStyle, BareFnTy}; +use ast::{AngleBracketedArgs, ParenthesizedArgs, AttrStyle, BareFnTy}; use ast::{GenericBound, TraitBoundModifier}; use ast::Unsafety; use ast::{Mod, AnonConst, Arg, Arm, Guard, Attribute, BindingMode, TraitItemKind}; @@ -2203,7 +2203,7 @@ impl<'a> Parser<'a> { } else { None }; - ParenthesisedArgs { inputs, output, span }.into() + ParenthesizedArgs { inputs, output, span }.into() }; PathSegment { ident, args, id: ast::DUMMY_NODE_ID } diff --git a/src/test/ui/parenthesised-deref-suggestion.rs b/src/test/ui/parenthesized-deref-suggestion.rs similarity index 100% rename from src/test/ui/parenthesised-deref-suggestion.rs rename to src/test/ui/parenthesized-deref-suggestion.rs diff --git a/src/test/ui/parenthesised-deref-suggestion.stderr b/src/test/ui/parenthesized-deref-suggestion.stderr similarity index 88% rename from src/test/ui/parenthesised-deref-suggestion.stderr rename to src/test/ui/parenthesized-deref-suggestion.stderr index 71a2bf67f06ae..fd9b0e8216b41 100644 --- a/src/test/ui/parenthesised-deref-suggestion.stderr +++ b/src/test/ui/parenthesized-deref-suggestion.stderr @@ -1,5 +1,5 @@ error[E0609]: no field `opts` on type `*const Session` - --> $DIR/parenthesised-deref-suggestion.rs:7:30 + --> $DIR/parenthesized-deref-suggestion.rs:7:30 | LL | (sess as *const Session).opts; //~ ERROR no field `opts` on type `*const Session` | ^^^^ @@ -9,7 +9,7 @@ LL | (*(sess as *const Session)).opts; //~ ERROR no field `opts` on type `*c | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0609]: no field `0` on type `[u32; 1]` - --> $DIR/parenthesised-deref-suggestion.rs:10:21 + --> $DIR/parenthesized-deref-suggestion.rs:10:21 | LL | (x as [u32; 1]).0; //~ ERROR no field `0` on type `[u32; 1]` | ----------------^