Skip to content

Commit 9f96f8a

Browse files
authored
Merge pull request #305 from rust-lang/specialization-moratorium
Note the moratorium on new uses of specialization in the standard library
2 parents 4f961b4 + 75d1f24 commit 9f96f8a

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)