Skip to content

Commit 56f7902

Browse files
authored
Update maintaining-std.md
1 parent a96dd82 commit 56f7902

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

src/libs/maintaining-std.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@ As a member of the Libs team you’ll find yourself assigned to PRs that need re
3232

3333
### When is an RFC needed?
3434

35-
New unstable features don't need an RFC before they can be merged. If the feature is small, and the design space is straightforward, stabilizing it usually only requires the feature to go through FCP. Sometimes however, Libs may ask for an RFC before stabilizing.
35+
New unstable features don't need an RFC before they can be merged. If the feature is small, and the design space is straightforward, stabilizing it usually only requires the feature to go through FCP. Sometimes however, you may ask for an RFC before stabilizing.
3636

3737
### Is there any `unsafe`?
3838

3939
Unsafe code blocks in the standard library need a comment explaining why they're [ok](https://doc.rust-lang.org/nomicon). There's a `tidy` lint that checks this. The unsafe code also needs to actually be ok.
4040

41-
The rules around what's sound and what's not can be subtle. See the [Unsafe Code Guidelines WG] for current thinking, and consider pinging `@rust-lang/libs`, `@rust-lang/lang`, and/or somebody from the WG if you're in any doubt. We love debating the soundness of unsafe code, and the more eyes on it the better.
41+
The rules around what's sound and what's not can be subtle. See the [Unsafe Code Guidelines WG] for current thinking, and consider pinging `@rust-lang/libs`, `@rust-lang/lang`, and/or somebody from the WG if you're in _any_ doubt. We love debating the soundness of unsafe code, and the more eyes on it the better!
4242

4343
### Is that `#[inline]` right?
4444

@@ -65,6 +65,8 @@ For changes where the value is high and the impact is high too, there are strate
6565

6666
- Using compiler lints to try phase out broken behavior.
6767

68+
The following sections outline some kinds of breakage that may not be obvious just from the change made to the standard library.
69+
6870
#### Inference breaks when a second generic impl is introduced
6971

7072
Rust will use the fact that there's only a single impl for a generic trait during inference. This breaks once a second impl makes the type of that generic ambiguous. Say we have:
@@ -161,6 +163,10 @@ Rust doesn't guarantee destructors will run when a value is leaked (which can be
161163

162164
It's ok not to run a destructor when a value is leaked because its storage isn't deallocated or repurposed. It's generally _not_ ok not to run a destructor before deallocating or repurposing already initialized storage because [memory may be pinned][Drop guarantee]. Having said that, there can be exceptions for skipping destructors if you can guarantee there's never pinning involved.
163165

166+
### How is performance impacted?
167+
168+
Changes to hot code might impact performance in consumers, for better or for worse. Appropriate benchmarks should give an idea of how performance characteristics change. For changes that affect `rustc` itself, you can also do a [`rust-timer`] run.
169+
164170
### Is the commit log tidy?
165171

166172
PRs shouldn’t have merge commits in them. If they become out of date with `master` then they need to be rebased.
@@ -177,7 +183,7 @@ If a submodule is affected then probably don't `rollup`. If the feature affects
177183

178184
### When there’s new public items
179185

180-
If the feature is new, then a tracking issue should be opened for it. The `issue` field on `#[unstable]` attributes should be updated with the tracking issue number.
186+
If the feature is new, then a tracking issue should be opened for it. Have a look at some previous [tracking issues][Libs tracking issues] to get an idea of what needs to go in there. The `issue` field on `#[unstable]` attributes should be updated with the tracking issue number.
181187

182188
Unstable features can be merged as normal through [`bors`] once they look ready.
183189

@@ -197,6 +203,8 @@ Features can be stabilized in a PR that replaces `#[unstable]` attributes with `
197203
[`bors`]: https://github.com/rust-lang/homu
198204
[`highfive`]: https://github.com/rust-lang/highfive
199205
[`crater`]: https://github.com/rust-lang/crater
206+
[`rust-timer`]: https://github.com/rust-lang-nursery/rustc-perf
207+
[Libs tracking issues]: https://github.com/rust-lang/rust/issues?q=label%3AC-tracking-issue+label%3AT-libs
200208
[Drop guarantee]: https://doc.rust-lang.org/nightly/std/pin/index.html#drop-guarantee
201209
[RFC 1023]: https://rust-lang.github.io/rfcs/1023-rebalancing-coherence.html
202210
[RFC 1105]: https://rust-lang.github.io/rfcs/1105-api-evolution.html

0 commit comments

Comments
 (0)