Skip to content

Commit 75d1f24

Browse files
authored
leave a note re. new specializations moratorium
1 parent 4f961b4 commit 75d1f24

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/libs/maintaining-std.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,12 @@ Blanket trait impls can't be added to `#[fundamental]` types because they have d
161161

162162
### Is specialization involved?
163163

164+
[#68358]: https://github.com/rust-lang/rust/pull/68358
165+
[#67194]: https://github.com/rust-lang/rust/issues/67194
166+
[lang_design_specialization]: https://paper.dropbox.com/doc/Specialization-Review-2020-02-03--AuBwAqGbsHDmBlBy~XUlmqUcAg-jFYgiknJi6j00SbN83dWX
167+
168+
**NOTE(2019-02-10):** Due to recent soundness holes introduced by specialization in the standard library (c.f. [#68358] and [#67194]) the language team decided on a design meeting to place a moratorium on new uses of specialization until we have some checks in place ensuring soundness for internal uses.
169+
164170
We try to avoid leaning on specialization too heavily, limiting its use to optimizing specific implementations. These specialized optimizations use a private trait to find the correct implementation, rather than specializing the public method itself. Any use of specialization that changes how methods are dispatched for external callers should be carefully considered.
165171

166172
### Are there public enums?

0 commit comments

Comments
 (0)