You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/libs/maintaining-std.md
+11-3Lines changed: 11 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,13 +32,13 @@ As a member of the Libs team you’ll find yourself assigned to PRs that need re
32
32
33
33
### When is an RFC needed?
34
34
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.
36
36
37
37
### Is there any `unsafe`?
38
38
39
39
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.
40
40
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!
42
42
43
43
### Is that `#[inline]` right?
44
44
@@ -65,6 +65,8 @@ For changes where the value is high and the impact is high too, there are strate
65
65
66
66
- Using compiler lints to try phase out broken behavior.
67
67
68
+
The following sections outline some kinds of breakage that may not be obvious just from the change made to the standard library.
69
+
68
70
#### Inference breaks when a second generic impl is introduced
69
71
70
72
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
161
163
162
164
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.
163
165
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
+
164
170
### Is the commit log tidy?
165
171
166
172
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
177
183
178
184
### When there’s new public items
179
185
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.
181
187
182
188
Unstable features can be merged as normal through [`bors`] once they look ready.
183
189
@@ -197,6 +203,8 @@ Features can be stabilized in a PR that replaces `#[unstable]` attributes with `
0 commit comments