mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-11 08:05:12 +00:00
Unify naming
This commit is contained in:
parent
5328792fea
commit
75b1f9ee23
@ -166,7 +166,7 @@ impl<'a> QualifyPaths<'a> {
|
||||
.map(|arg_list| apply(self, arg_list));
|
||||
if let Some(type_args) = type_args {
|
||||
let last_segment = path.segment().unwrap();
|
||||
path = path.with_segment(last_segment.with_type_args(type_args))
|
||||
path = path.with_segment(last_segment.with_generic_args(type_args))
|
||||
}
|
||||
|
||||
Some(path.syntax().clone())
|
||||
|
@ -260,16 +260,16 @@ impl ast::Path {
|
||||
|
||||
impl ast::PathSegment {
|
||||
#[must_use]
|
||||
pub fn with_type_args(&self, type_args: ast::GenericArgList) -> ast::PathSegment {
|
||||
self._with_type_args(type_args, false)
|
||||
pub fn with_generic_args(&self, type_args: ast::GenericArgList) -> ast::PathSegment {
|
||||
self._with_generic_args(type_args, false)
|
||||
}
|
||||
|
||||
#[must_use]
|
||||
pub fn with_turbo_fish(&self, type_args: ast::GenericArgList) -> ast::PathSegment {
|
||||
self._with_type_args(type_args, true)
|
||||
self._with_generic_args(type_args, true)
|
||||
}
|
||||
|
||||
fn _with_type_args(&self, type_args: ast::GenericArgList, turbo: bool) -> ast::PathSegment {
|
||||
fn _with_generic_args(&self, type_args: ast::GenericArgList, turbo: bool) -> ast::PathSegment {
|
||||
if let Some(old) = self.generic_arg_list() {
|
||||
return self.replace_children(
|
||||
single_node(old.syntax().clone()),
|
||||
|
Loading…
Reference in New Issue
Block a user