Skip to content

Commit

Permalink
mention ?Trait being accepted for non-Sized
Browse files Browse the repository at this point in the history
  • Loading branch information
davidtwco committed Nov 16, 2024
1 parent 2fb3aaa commit 23cb8a2
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions text/3729-sized-hierarchy.md
Original file line number Diff line number Diff line change
Expand Up @@ -497,8 +497,11 @@ every type in Rust today which would satisfy a `?Sized` bound would satisfy
a `const ValueSized` bound.

**Edition change:** In the current edition,`?Sized` will be syntatic sugar for
a `const ValueSized` bound. In the next edition, use of `?Sized` syntax will be prohibited
over an edition and all uses of it will be rewritten to a `const ValueSized` bound.
a `const ValueSized` bound. As the `?Trait` syntax is currently accepted for any trait
but ignored for every trait except `Sized`, `?ValueSized` and `?Pointee` bounds would
be ignored. In the next edition, any uses of `?Sized` syntax will be rewritten to
a `const ValueSized` bound. Any other uses of the `?Trait` syntax will be removed as
part of the migration and the `?Trait` syntax will be prohibited.

A default implicit bound of `const Sized` is added by the compiler to every type
parameter `T` that does not have an explicit `~const Sized`, `Sized`, `?Sized`,
Expand Down

0 comments on commit 23cb8a2

Please sign in to comment.