Rename ParenthesizedArgData to ParenthesisedArgs
This commit is contained in:
parent
95ce05c586
commit
21136b8ab4
@ -1747,7 +1747,7 @@ impl<'a> LoweringContext<'a> {
|
||||
|
||||
fn lower_parenthesized_parameter_data(
|
||||
&mut self,
|
||||
data: &ParenthesizedArgData,
|
||||
data: &ParenthesisedArgs,
|
||||
) -> (hir::GenericArgs, bool) {
|
||||
// Switch to `PassThrough` mode for anonymous lifetimes: this
|
||||
// means that we permit things like `&Ref<T>`, where `Ref` has
|
||||
@ -1758,7 +1758,7 @@ impl<'a> LoweringContext<'a> {
|
||||
AnonymousLifetimeMode::PassThrough,
|
||||
|this| {
|
||||
const DISALLOWED: ImplTraitContext = ImplTraitContext::Disallowed;
|
||||
let &ParenthesizedArgData { ref inputs, ref output, span } = data;
|
||||
let &ParenthesisedArgs { ref inputs, ref output, span } = data;
|
||||
let inputs = inputs.iter().map(|ty| this.lower_ty(ty, DISALLOWED)).collect();
|
||||
let mk_tup = |this: &mut Self, tys, span| {
|
||||
let LoweredNodeId { node_id, hir_id } = this.next_id();
|
||||
|
@ -146,7 +146,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(ParenthesizedArgData),
|
||||
Parenthesized(ParenthesisedArgs),
|
||||
}
|
||||
|
||||
impl GenericArgs {
|
||||
@ -183,7 +183,7 @@ impl Into<Option<P<GenericArgs>>> for AngleBracketedArgs {
|
||||
}
|
||||
}
|
||||
|
||||
impl Into<Option<P<GenericArgs>>> for ParenthesizedArgData {
|
||||
impl Into<Option<P<GenericArgs>>> for ParenthesisedArgs {
|
||||
fn into(self) -> Option<P<GenericArgs>> {
|
||||
Some(P(GenericArgs::Parenthesized(self)))
|
||||
}
|
||||
@ -191,7 +191,7 @@ impl Into<Option<P<GenericArgs>>> for ParenthesizedArgData {
|
||||
|
||||
/// A path like `Foo(A,B) -> C`
|
||||
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
|
||||
pub struct ParenthesizedArgData {
|
||||
pub struct ParenthesisedArgs {
|
||||
/// Overall span
|
||||
pub span: Span,
|
||||
|
||||
|
@ -193,8 +193,8 @@ pub trait Folder : Sized {
|
||||
noop_fold_angle_bracketed_parameter_data(p, self)
|
||||
}
|
||||
|
||||
fn fold_parenthesized_parameter_data(&mut self, p: ParenthesizedArgData)
|
||||
-> ParenthesizedArgData
|
||||
fn fold_parenthesized_parameter_data(&mut self, p: ParenthesisedArgs)
|
||||
-> ParenthesisedArgs
|
||||
{
|
||||
noop_fold_parenthesized_parameter_data(p, self)
|
||||
}
|
||||
@ -483,12 +483,12 @@ pub fn noop_fold_angle_bracketed_parameter_data<T: Folder>(data: AngleBracketedA
|
||||
}
|
||||
}
|
||||
|
||||
pub fn noop_fold_parenthesized_parameter_data<T: Folder>(data: ParenthesizedArgData,
|
||||
pub fn noop_fold_parenthesized_parameter_data<T: Folder>(data: ParenthesisedArgs,
|
||||
fld: &mut T)
|
||||
-> ParenthesizedArgData
|
||||
-> ParenthesisedArgs
|
||||
{
|
||||
let ParenthesizedArgData { inputs, output, span } = data;
|
||||
ParenthesizedArgData {
|
||||
let ParenthesisedArgs { inputs, output, span } = data;
|
||||
ParenthesisedArgs {
|
||||
inputs: inputs.move_map(|ty| fld.fold_ty(ty)),
|
||||
output: output.map(|ty| fld.fold_ty(ty)),
|
||||
span: fld.new_span(span)
|
||||
|
@ -9,7 +9,7 @@
|
||||
// except according to those terms.
|
||||
|
||||
use rustc_target::spec::abi::{self, Abi};
|
||||
use ast::{AngleBracketedArgs, ParenthesizedArgData, AttrStyle, BareFnTy};
|
||||
use ast::{AngleBracketedArgs, ParenthesisedArgs, AttrStyle, BareFnTy};
|
||||
use ast::{GenericBound, TraitBoundModifier};
|
||||
use ast::Unsafety;
|
||||
use ast::{Mod, AnonConst, Arg, Arm, Attribute, BindingMode, TraitItemKind};
|
||||
@ -1988,7 +1988,7 @@ impl<'a> Parser<'a> {
|
||||
None
|
||||
};
|
||||
let span = lo.to(self.prev_span);
|
||||
ParenthesizedArgData { inputs, output, span }.into()
|
||||
ParenthesisedArgs { inputs, output, span }.into()
|
||||
};
|
||||
|
||||
PathSegment { ident, args }
|
||||
|
Loading…
x
Reference in New Issue
Block a user