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