Home
last modified time | relevance | path

Searched refs:impl_def (Results 1 – 25 of 87) sorted by relevance

1234

/dports/devel/rust-analyzer/rust-analyzer-2021-12-20/crates/ide_assists/src/handlers/
H A Dgenerate_delegate_methods.rs80 let impl_def = find_struct_impl(ctx, &adt, &name).flatten(); in generate_delegate_methods() localVariable
118 match impl_def { in generate_delegate_methods()
119 Some(impl_def) => { in generate_delegate_methods()
121 let impl_def = impl_def.clone_for_update(); in generate_delegate_methods() localVariable
122 let old_range = impl_def.syntax().text_range(); in generate_delegate_methods()
125 let assoc_items = impl_def.get_or_create_assoc_item_list(); in generate_delegate_methods()
131 let snippet = render_snippet(cap, impl_def.syntax(), cursor); in generate_delegate_methods()
135 builder.replace(old_range, impl_def.syntax().to_string()); in generate_delegate_methods()
146 let assoc_items = impl_def.get_or_create_assoc_item_list(); in generate_delegate_methods()
153 let snippet = render_snippet(cap, impl_def.syntax(), cursor); in generate_delegate_methods()
[all …]
H A Dadd_missing_impl_members.rs104 let impl_def = ctx.find_node_at_offset::<ast::Impl>()?; in add_missing_impl_members_inner() localVariable
105 let trait_ = resolve_target_trait(&ctx.sema, &impl_def)?; in add_missing_impl_members_inner()
109 &ide_db::traits::get_missing_assoc_items(&ctx.sema, &impl_def), in add_missing_impl_members_inner()
117 let target = impl_def.syntax().text_range(); in add_missing_impl_members_inner()
119 let target_scope = ctx.sema.scope(impl_def.syntax()); in add_missing_impl_members_inner()
135 impl_def.clone(), in add_missing_impl_members_inner()
144 if try_gen_trait_body(ctx, func, &trait_, &impl_def).is_none() { in add_missing_impl_members_inner()
168 impl_def: &ast::Impl, in try_gen_trait_body()
171 let hir_ty = ctx.sema.resolve_type(&impl_def.self_ty()?)?; in try_gen_trait_body()
H A Dgenerate_setter.rs41 let impl_def = find_struct_impl( in generate_setter() localVariable
60 if impl_def.is_some() { in generate_setter()
81 let start_offset = impl_def in generate_setter()
82 .and_then(|impl_def| find_impl_block_end(impl_def, &mut buf)) in generate_setter()
H A Dgenerate_new.rs39 let impl_def = find_struct_impl(ctx, &ast::Adt::Struct(strukt.clone()), "new")?; in generate_new() localVariable
45 if impl_def.is_some() { in generate_new()
59 let start_offset = impl_def in generate_new()
60 .and_then(|impl_def| find_impl_block_start(impl_def, &mut buf)) in generate_new()
H A Dintroduce_named_lifetime.rs45 } else if let Some(impl_def) = lifetime.syntax().ancestors().find_map(ast::Impl::cast) { in introduce_named_lifetime()
46 generate_impl_def_assist(acc, impl_def, lifetime_loc, lifetime) in introduce_named_lifetime()
105 impl_def: ast::Impl, in generate_impl_def_assist()
109 let new_lifetime_param = generate_unique_lifetime_param_name(impl_def.generic_param_list())?; in generate_impl_def_assist()
111 let impl_def = builder.make_mut(impl_def); in generate_impl_def_assist() localVariable
114 impl_def.get_or_create_generic_param_list().add_generic_param( in generate_impl_def_assist()
H A Dgenerate_getter.rs94 let impl_def = find_struct_impl(ctx, &ast::Adt::Struct(strukt.clone()), fn_name.as_str())?; in generate_getter_impl() localVariable
110 if impl_def.is_some() { in generate_getter_impl()
148 let start_offset = impl_def in generate_getter_impl()
149 .and_then(|impl_def| find_impl_block_end(impl_def, &mut buf)) in generate_getter_impl()
/dports/lang/rust/rustc-1.58.1-src/src/tools/rust-analyzer/crates/ide_assists/src/handlers/
H A Dgenerate_delegate_methods.rs81 let impl_def = find_struct_impl(ctx, &adt, &name).flatten(); in generate_delegate_methods() localVariable
119 match impl_def { in generate_delegate_methods()
120 Some(impl_def) => { in generate_delegate_methods()
122 let impl_def = impl_def.clone_for_update(); in generate_delegate_methods() localVariable
123 let old_range = impl_def.syntax().text_range(); in generate_delegate_methods()
126 let assoc_items = impl_def.get_or_create_assoc_item_list(); in generate_delegate_methods()
132 let snippet = render_snippet(cap, impl_def.syntax(), cursor); in generate_delegate_methods()
136 builder.replace(old_range, impl_def.syntax().to_string()); in generate_delegate_methods()
147 let assoc_items = impl_def.get_or_create_assoc_item_list(); in generate_delegate_methods()
154 let snippet = render_snippet(cap, impl_def.syntax(), cursor); in generate_delegate_methods()
[all …]
H A Dadd_missing_impl_members.rs104 let impl_def = ctx.find_node_at_offset::<ast::Impl>()?; in add_missing_impl_members_inner() localVariable
105 let trait_ = resolve_target_trait(&ctx.sema, &impl_def)?; in add_missing_impl_members_inner()
109 &ide_db::traits::get_missing_assoc_items(&ctx.sema, &impl_def), in add_missing_impl_members_inner()
117 let target = impl_def.syntax().text_range(); in add_missing_impl_members_inner()
119 let target_scope = ctx.sema.scope(impl_def.syntax()); in add_missing_impl_members_inner()
124 impl_def.clone(), in add_missing_impl_members_inner()
133 if try_gen_trait_body(ctx, func, &trait_, &impl_def).is_none() { in add_missing_impl_members_inner()
157 impl_def: &ast::Impl, in try_gen_trait_body()
160 let hir_ty = ctx.sema.resolve_type(&impl_def.self_ty()?)?; in try_gen_trait_body()
H A Dgenerate_setter.rs41 let impl_def = find_struct_impl( in generate_setter() localVariable
60 if impl_def.is_some() { in generate_setter()
81 let start_offset = impl_def in generate_setter()
82 .and_then(|impl_def| find_impl_block_end(impl_def, &mut buf)) in generate_setter()
H A Dgenerate_new.rs39 let impl_def = find_struct_impl(ctx, &ast::Adt::Struct(strukt.clone()), "new")?; in generate_new() localVariable
45 if impl_def.is_some() { in generate_new()
59 let start_offset = impl_def in generate_new()
60 .and_then(|impl_def| find_impl_block_start(impl_def, &mut buf)) in generate_new()
H A Dintroduce_named_lifetime.rs45 } else if let Some(impl_def) = lifetime.syntax().ancestors().find_map(ast::Impl::cast) { in introduce_named_lifetime()
46 generate_impl_def_assist(acc, impl_def, lifetime_loc, lifetime) in introduce_named_lifetime()
105 impl_def: ast::Impl, in generate_impl_def_assist()
109 let new_lifetime_param = generate_unique_lifetime_param_name(impl_def.generic_param_list())?; in generate_impl_def_assist()
111 let impl_def = builder.make_mut(impl_def); in generate_impl_def_assist() localVariable
114 impl_def.get_or_create_generic_param_list().add_generic_param( in generate_impl_def_assist()
H A Dgenerate_getter.rs94 let impl_def = find_struct_impl(ctx, &ast::Adt::Struct(strukt.clone()), fn_name.as_str())?; in generate_getter_impl() localVariable
110 if impl_def.is_some() { in generate_getter_impl()
148 let start_offset = impl_def in generate_getter_impl()
149 .and_then(|impl_def| find_impl_block_end(impl_def, &mut buf)) in generate_getter_impl()
/dports/devel/rust-analyzer/rust-analyzer-2021-12-20/crates/ide_completion/src/completions/
H A Dtrait_impl.rs54 if let Some((kind, trigger, impl_def)) = completion_match(ctx.token.clone()) { in complete_trait_impl()
55 if let Some(hir_impl) = ctx.sema.to_def(&impl_def) { in complete_trait_impl()
56 get_missing_assoc_items(&ctx.sema, &impl_def).into_iter().for_each(|item| match item { in complete_trait_impl()
116 let impl_def = ast::Impl::cast(impl_item.parent()?.parent()?)?; in completion_match() localVariable
126 Some((kind, impl_item, impl_def)) in completion_match()
134 impl_def: hir::Impl, in add_function_impl()
182 impl_def: hir::Impl, in get_transformed_assoc_item()
185 let trait_ = impl_def.trait_(ctx.db)?; in get_transformed_assoc_item()
187 let target_scope = &ctx.sema.scope(ctx.sema.source(impl_def)?.syntax().value); in get_transformed_assoc_item()
192 impl_def.source(ctx.db)?.value, in get_transformed_assoc_item()
[all …]
/dports/lang/rust/rustc-1.58.1-src/src/tools/rust-analyzer/crates/ide_completion/src/completions/
H A Dtrait_impl.rs54 if let Some((kind, trigger, impl_def)) = completion_match(ctx.token.clone()) { in complete_trait_impl()
55 if let Some(hir_impl) = ctx.sema.to_def(&impl_def) { in complete_trait_impl()
56 get_missing_assoc_items(&ctx.sema, &impl_def).into_iter().for_each(|item| match item { in complete_trait_impl()
116 let impl_def = ast::Impl::cast(impl_item.parent()?.parent()?)?; in completion_match() localVariable
126 Some((kind, impl_item, impl_def)) in completion_match()
134 impl_def: hir::Impl, in add_function_impl()
182 impl_def: hir::Impl, in get_transformed_assoc_item()
185 let trait_ = impl_def.trait_(ctx.db)?; in get_transformed_assoc_item()
187 let target_scope = &ctx.sema.scope(ctx.sema.source(impl_def)?.syntax().value); in get_transformed_assoc_item()
192 impl_def.source(ctx.db)?.value, in get_transformed_assoc_item()
[all …]
/dports/devel/rust-analyzer/rust-analyzer-2021-12-20/crates/ide_db/src/
H A Dtraits.rs14 impl_def: &ast::Impl, in resolve_target_trait()
17 impl_def.trait_().map(|it| it.syntax().clone()).and_then(ast::PathType::cast)?.path()?; in resolve_target_trait()
29 impl_def: &ast::Impl, in get_missing_assoc_items()
36 if let Some(item_list) = impl_def.assoc_item_list() { in get_missing_assoc_items()
61 resolve_target_trait(sema, impl_def).map_or(vec![], |target_trait| { in get_missing_assoc_items()
/dports/lang/rust/rustc-1.58.1-src/src/tools/rust-analyzer/crates/ide_db/src/
H A Dtraits.rs14 impl_def: &ast::Impl, in resolve_target_trait()
17 impl_def.trait_().map(|it| it.syntax().clone()).and_then(ast::PathType::cast)?.path()?; in resolve_target_trait()
29 impl_def: &ast::Impl, in get_missing_assoc_items()
36 if let Some(item_list) = impl_def.assoc_item_list() { in get_missing_assoc_items()
61 resolve_target_trait(sema, impl_def).map_or(vec![], |target_trait| { in get_missing_assoc_items()
/dports/net-im/zkgroup/zkgroup-0.7.4/cargo-crates/packed_simd-0.3.3/src/codegen/math/float/
H A Dsin_pi.rs14 macro_rules! impl_def { macro
26 impl_def!($vid, crate::f32::consts::PI);
31 impl_def!($vid, crate::f64::consts::PI);
H A Dcos_pi.rs14 macro_rules! impl_def { macro
26 impl_def!($vid, crate::f32::consts::PI);
31 impl_def!($vid, crate::f64::consts::PI);
/dports/textproc/ripgrep/ripgrep-13.0.0/cargo-crates/packed_simd_2-0.3.6/src/codegen/math/float/
H A Dsin_pi.rs14 macro_rules! impl_def { macro
26 impl_def!($vid, crate::f32::consts::PI);
31 impl_def!($vid, crate::f64::consts::PI);
H A Dcos_pi.rs14 macro_rules! impl_def { macro
26 impl_def!($vid, crate::f32::consts::PI);
31 impl_def!($vid, crate::f64::consts::PI);
/dports/www/firefox/firefox-99.0/third_party/rust/packed_simd/src/codegen/math/float/
H A Dcos_pi.rs14 macro_rules! impl_def { macro
26 impl_def!($vid, crate::f32::consts::PI);
31 impl_def!($vid, crate::f64::consts::PI);
H A Dsin_pi.rs14 macro_rules! impl_def { macro
26 impl_def!($vid, crate::f32::consts::PI);
31 impl_def!($vid, crate::f64::consts::PI);
/dports/mail/thunderbird/thunderbird-91.8.0/third_party/rust/packed_simd/src/codegen/math/float/
H A Dcos_pi.rs14 macro_rules! impl_def { macro
26 impl_def!($vid, crate::f32::consts::PI);
31 impl_def!($vid, crate::f64::consts::PI);
H A Dsin_pi.rs14 macro_rules! impl_def { macro
26 impl_def!($vid, crate::f32::consts::PI);
31 impl_def!($vid, crate::f64::consts::PI);
/dports/www/geckodriver/mozilla-central-e9783a644016aa9b317887076618425586730d73/testing/geckodriver/cargo-crates/packed_simd-0.3.3/src/codegen/math/float/
H A Dsin_pi.rs14 macro_rules! impl_def { macro
26 impl_def!($vid, crate::f32::consts::PI);
31 impl_def!($vid, crate::f64::consts::PI);

1234