diff --git a/src/types/impl-trait.md b/src/types/impl-trait.md index 5a913344a..43a62e44f 100644 --- a/src/types/impl-trait.md +++ b/src/types/impl-trait.md @@ -119,13 +119,10 @@ Behind each return-position `impl Trait` abstract type is some hidden concrete t r[type.impl-trait.generic-capture.auto] r[type.impl-trait.generic-capture.auto.intro] -Return-position `impl Trait` abstract types automatically capture certain of the in-scope generic parameters. Everywhere, these automatically capture all in-scope type and const generic parameters. +Return-position `impl Trait` abstract types automatically capture all in-scope generic parameters, including generic type, const, and lifetime parameters (including higher-ranked ones). -r[type.impl-trait.generic-capture.auto.trait] -On items of trait impls and trait definitions, these types additionally automatically capture all in-scope generic lifetime parameters, including higher-ranked ones\1 - -r[type.impl-trait.generic-capture.auto.fn] -On free functions and on associated functions and methods of inherent impls, only the generic lifetime parameters that appear in the bounds of abstract return type are captured. +r[type.impl-trait.generic-capture.edition2024] +> **Edition differences**: Before the 2024 edition, on free functions and on associated functions and methods of inherent impls, generic lifetime parameters that do not appear in the bounds of the abstract return type are not automatically captured. ## Precise capturing