Skip to content

Commit

Permalink
Corrected spelling inconsistency
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcel Hellwig committed Jan 22, 2019
1 parent 51cc3cd commit 051835b
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 16 deletions.
4 changes: 2 additions & 2 deletions src/librustc/hir/lowering.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<T>`, where `Ref` has
Expand All @@ -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()))
Expand Down
8 changes: 4 additions & 4 deletions src/libsyntax/ast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -173,15 +173,15 @@ impl Into<Option<P<GenericArgs>>> for AngleBracketedArgs {
}
}

impl Into<Option<P<GenericArgs>>> for ParenthesisedArgs {
impl Into<Option<P<GenericArgs>>> for ParenthesizedArgs {
fn into(self) -> Option<P<GenericArgs>> {
Some(P(GenericArgs::Parenthesized(self)))
}
}

/// A path like `Foo(A,B) -> C`
#[derive(Clone, RustcEncodable, RustcDecodable, Debug)]
pub struct ParenthesisedArgs {
pub struct ParenthesizedArgs {
/// Overall span
pub span: Span,

Expand All @@ -192,7 +192,7 @@ pub struct ParenthesisedArgs {
pub output: Option<P<Ty>>,
}

impl ParenthesisedArgs {
impl ParenthesizedArgs {
pub fn as_angle_bracketed_args(&self) -> AngleBracketedArgs {
AngleBracketedArgs {
span: self.span,
Expand Down
12 changes: 6 additions & 6 deletions src/libsyntax/fold.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down Expand Up @@ -504,12 +504,12 @@ pub fn noop_fold_angle_bracketed_parameter_data<T: Folder>(data: AngleBracketedA
}
}

pub fn noop_fold_parenthesized_parameter_data<T: Folder>(data: ParenthesisedArgs,
pub fn noop_fold_parenthesized_parameter_data<T: Folder>(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)
Expand Down
4 changes: 2 additions & 2 deletions src/libsyntax/parse/parser.rs
Original file line number Diff line number Diff line change
@@ -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};
Expand Down Expand Up @@ -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 }
Expand Down
Original file line number Diff line number Diff line change
@@ -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`
| ^^^^
Expand All @@ -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]`
| ----------------^
Expand Down

0 comments on commit 051835b

Please sign in to comment.