Skip to content

Commit d035998

Browse files
committed
Small wording tweaks
1 parent ef84eb4 commit d035998

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

text/3245-refined-impls.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -177,13 +177,13 @@ Each associated item defined in the implementation meet the following conditions
177177
* Each where clause must be implied by the where clauses on the trait itself and/or the associated function in the trait definition, where "implied" is limited to supertrait and outlives relations. _This would be expanded to all [implied bounds] when that feature is enabled._
178178
* Must not be marked `unsafe` unless the trait definition is also marked `unsafe`.
179179

180-
When an item in an impl meets these conditions, we say it is a valid refinement of the trait item.
180+
When an item in an impl meets these conditions, we say it is a _valid refinement_ of the trait item.
181181

182182
[implied bounds]: https://rust-lang.github.io/rfcs/2089-implied-bounds.html
183183

184184
### Using refined implementations
185185

186-
Refined APIs are available anywhere knowledge of the impl being used is available. If the compiler can deduce a particular impl is being used, its API is available for use by the caller. This includes UFCS calls like `<MyType as Trait>::foo()`.
186+
Refined APIs are available anywhere knowledge of the impl being used is available. If the compiler can deduce a particular impl is being used, its API as written is available for use by the caller. This includes UFCS calls like `<MyType as Trait>::foo()`.
187187

188188
## Transitioning away from the current behavior
189189

@@ -277,8 +277,6 @@ Should the `nth` method also be considered `const fn`?
277277
# Drawbacks
278278
[drawbacks]: #drawbacks
279279

280-
> Why should we *not* do this?
281-
282280
## Accidental stabilization
283281

284282
For library authors, it is possible for this feature to create situations where a more refined API is *accidentally* stabilized. Before stabilizing, we will need to gain some experience with the feature to determine if it is a good idea to allow refined impls without annotations.
@@ -316,7 +314,7 @@ While we could postpone the question of whether to allow this indefinitely, we a
316314

317315
We could allow `#[refine]` on individual aspects of a function signature like the return type, where clauses, or argument types. This would allow users to scope refinement more narrowly and make sure that they aren't refining other aspects of that function signature. However, it seems unlikely that API refinement would be such a footgun that such narrowly scoping is needed.
318316

319-
Going in the other direction, we could allow `#[refine]` on the impl itself. This would remove repetition in cases where an impl refines many items at once. It seems unlikely that this would be desired frequently enough to justify it.
317+
Going in the other direction, we could allow `#[refine]` on the impl itself. This would remove repetition in cases where an impl refines many items at once. It is unclear if this would be desired frequently enough to justify it.
320318

321319
# Prior art
322320
[prior-art]: #prior-art

0 commit comments

Comments
 (0)