Skip to content

Commit 91781c7

Browse files
committed
Rename TypeArgList -> GenericArgList
1 parent 54fd09a commit 91781c7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+70
-70
lines changed

crates/ra_assists/src/ast_transform.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ impl<'a> SubstituteTypeParams<'a> {
8686
ast::Type::PathType(path) => path,
8787
_ => return None,
8888
};
89-
let type_arg_list = path_type.path()?.segment()?.type_arg_list()?;
89+
let type_arg_list = path_type.path()?.segment()?.generic_arg_list()?;
9090
let mut result = Vec::new();
9191
for type_arg in type_arg_list.type_args() {
9292
let type_arg: ast::TypeArg = type_arg;
@@ -157,7 +157,7 @@ impl<'a> QualifyPaths<'a> {
157157

158158
let type_args = p
159159
.segment()
160-
.and_then(|s| s.type_arg_list())
160+
.and_then(|s| s.generic_arg_list())
161161
.map(|arg_list| apply(self, arg_list));
162162
if let Some(type_args) = type_args {
163163
let last_segment = path.segment().unwrap();

crates/ra_hir_def/src/body/lower.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ impl ExprCollector<'_> {
337337
};
338338
let method_name = e.name_ref().map(|nr| nr.as_name()).unwrap_or_else(Name::missing);
339339
let generic_args =
340-
e.type_arg_list().and_then(|it| GenericArgs::from_ast(&self.ctx(), it));
340+
e.generic_arg_list().and_then(|it| GenericArgs::from_ast(&self.ctx(), it));
341341
self.alloc_expr(
342342
Expr::MethodCall { receiver, method_name, args, generic_args },
343343
syntax_ptr,

crates/ra_hir_def/src/path.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ impl<'a> PathSegments<'a> {
258258
}
259259

260260
impl GenericArgs {
261-
pub(crate) fn from_ast(lower_ctx: &LowerCtx, node: ast::TypeArgList) -> Option<GenericArgs> {
261+
pub(crate) fn from_ast(lower_ctx: &LowerCtx, node: ast::GenericArgList) -> Option<GenericArgs> {
262262
lower::lower_generic_args(lower_ctx, node)
263263
}
264264

crates/ra_hir_def/src/path/lower.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ pub(super) fn lower_path(mut path: ast::Path, hygiene: &Hygiene) -> Option<Path>
4141
match hygiene.name_ref_to_name(name_ref) {
4242
Either::Left(name) => {
4343
let args = segment
44-
.type_arg_list()
44+
.generic_arg_list()
4545
.and_then(|it| lower_generic_args(&ctx, it))
4646
.or_else(|| {
4747
lower_generic_args_from_fn_path(
@@ -148,7 +148,7 @@ pub(super) fn lower_path(mut path: ast::Path, hygiene: &Hygiene) -> Option<Path>
148148

149149
pub(super) fn lower_generic_args(
150150
lower_ctx: &LowerCtx,
151-
node: ast::TypeArgList,
151+
node: ast::GenericArgList,
152152
) -> Option<GenericArgs> {
153153
let mut args = Vec::new();
154154
for type_arg in node.type_args() {

crates/ra_ide/src/completion/completion_context.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ impl<'a> CompletionContext<'a> {
377377
path.syntax().parent().and_then(ast::TupleStructPat::cast).is_some();
378378

379379
self.is_path_type = path.syntax().parent().and_then(ast::PathType::cast).is_some();
380-
self.has_type_args = segment.type_arg_list().is_some();
380+
self.has_type_args = segment.generic_arg_list().is_some();
381381

382382
#[allow(deprecated)]
383383
if let Some(path) = hir::Path::from_ast(path.clone()) {

crates/ra_ide/src/extend_selection.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ fn try_extend_selection(
4545
VARIANT_LIST,
4646
USE_TREE_LIST,
4747
GENERIC_PARAM_LIST,
48-
TYPE_ARG_LIST,
48+
GENERIC_ARG_LIST,
4949
TYPE_BOUND_LIST,
5050
PARAM_LIST,
5151
ARG_LIST,

crates/ra_parser/src/grammar/type_args.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ pub(super) fn opt_type_arg_list(p: &mut Parser, colon_colon_required: bool) {
2222
}
2323
}
2424
p.expect(T![>]);
25-
m.complete(p, TYPE_ARG_LIST);
25+
m.complete(p, GENERIC_ARG_LIST);
2626
}
2727

2828
// test type_arg

crates/ra_parser/src/syntax_kind/generated.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ pub enum SyntaxKind {
235235
LIFETIME_PARAM,
236236
TYPE_PARAM,
237237
CONST_PARAM,
238-
TYPE_ARG_LIST,
238+
GENERIC_ARG_LIST,
239239
LIFETIME_ARG,
240240
TYPE_ARG,
241241
ASSOC_TYPE_ARG,

crates/ra_ssr/src/matching.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -348,8 +348,8 @@ impl<'db, 'sema> Matcher<'db, 'sema> {
348348
// separately via comparing what the path resolves to below.
349349
self.attempt_match_opt(
350350
phase,
351-
pattern_segment.type_arg_list(),
352-
code_segment.type_arg_list(),
351+
pattern_segment.generic_arg_list(),
352+
code_segment.generic_arg_list(),
353353
)?;
354354
self.attempt_match_opt(
355355
phase,

crates/ra_ssr/src/resolving.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ fn pick_node_for_resolution(node: SyntaxNode) -> SyntaxNode {
217217
fn path_contains_type_arguments(path: Option<ast::Path>) -> bool {
218218
if let Some(path) = path {
219219
if let Some(segment) = path.segment() {
220-
if segment.type_arg_list().is_some() {
220+
if segment.generic_arg_list().is_some() {
221221
mark::hit!(type_arguments_within_path);
222222
return true;
223223
}

0 commit comments

Comments
 (0)