Skip to content

Commit fee1ded

Browse files
committed
impl trait -> trait impl
1 parent 6cb2a19 commit fee1ded

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

compiler/rustc_ast_lowering/src/delegation/generics.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,11 +251,11 @@ impl<'hir> LoweringContext<'_, 'hir> {
251251
let len = segments.len();
252252
let child_user_specified = segments[len - 1].args.is_some();
253253

254-
// If we are in impl trait always generate function whose generics matches
254+
// If we are in trait impl always generate function whose generics matches
255255
// those that are defined in trait.
256256
if matches!(delegation_parent_kind, DefKind::Impl { of_trait: true }) {
257257
// Considering parent generics, during signature inheritance
258-
// we will take those args that are in impl trait header trait ref.
258+
// we will take those args that are in trait impl header trait ref.
259259
let parent = GenericsGenerationResult::new(DelegationGenerics::Default(None));
260260

261261
let generics = self.get_fn_like_generics(root_fn_id, span);

compiler/rustc_hir_analysis/src/delegation.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ fn create_generic_args<'tcx>(
338338
| (FnKind::AssocTrait, FnKind::AssocTrait) => delegation_args,
339339

340340
(FnKind::AssocTraitImpl, FnKind::AssocTrait) => {
341-
// Special case, as user specifies Trait args in impl trait header, we want to treat
341+
// Special case, as user specifies Trait args in trait impl header, we want to treat
342342
// them as parent args. We always generate a function whose generics match
343343
// child generics in trait.
344344
let parent = tcx.local_parent(delegation_id);

0 commit comments

Comments
 (0)