grammar: fix
Reading this, one item stood out a bit. Small improvements here.
1. ‘Compile-time’ is not a noun, ‘compilation time’ was meant;
1. Mathematical formulas are best not rendered as code;
1. Use the same tense as in other items.
Reword explanation of 'size' types.
Do not reference machine 'pointers' in explanation of 'size' types.
I think the number of elements that can be directly addressed is a fundamental feature of a machine architecture in its own right. The fact that it coincides with the ‘size’ of a pointer should be viewed as an ‘implementation detail’ ;)
split iter.rs into a directory of (implementation private) modules.
+ mod Adaptor structs
- Private fields need to be available both for them and Iterator
+ iterator (Iterator trait)
+ traits (FromIterator, traits but Iterator itself)
+ range (range related)
+ sources (Repeat, Once, Empty)
rustbuild: Clean more as part of `make clean`
Clean out old documentation as well as the new test/tools directories. Should
prevent a problem that happened this morning where a PR bounced and then it left
docs with "broken links" so all future PRs bounced.
Instead of stripping impls which reference *stripped* items, we keep impls
which reference *retained* items. We do this because when we strip an
item we immediately return, and do not recurse into it - leaving the
contained items non-stripped from the point of view of the `ImplStripper`.
resolve: Improve performance
This fixes#33061 by speeding up searchs through all traits in scope, a bottleneck in `resolve`.
According to my measurements, this PR improves resolution performance by a factor of 3.4x on `librustc`, which almost completely reverses the 3.75x performance regression reported in #33061.
r? @eddyb
This changes the current rule that impls within `doc(hidden)` modules
aren't inlined, to only inlining impls where the implemented
trait and type are reachable in documentation.
Adjust example for error E0225
Adjust example for error E0225
It's using Copy as a trait object compatible trait, which is not
appropriate, change to use a more typical Read + Send + Sync example.
Also use whitespace around `+`.
This seems appropriate apropos issue #32963
List possible keys of the -L rustc option.
Since `rustc --help -v` does not describe it, only *rustc.1* man page, but there is no man for Windows.
r? @alexcrichton
cc @steveklabnik
std: Change String::truncate to panic less
The `Vec::truncate` method does not panic if the length argument is greater than
the vector's current length, but `String::truncate` will indeed panic. This
semantic difference can be a bit jarring (e.g. #32717), and after some
discussion the libs team concluded that although this can technically be a
breaking change it is almost undoubtedly not so in practice.
This commit changes the semantics of `String::truncate` to be a noop if
`new_len` is greater than the length of the current string.
Closes#32717
Get all (but one) of debuginfo tests to pass with MIR codegen.
I didn't get much feedback in #31005 so I went ahead and implemented something simple.
Closes#31005, as MIR debuginfo should work now for most usecases.
The `no-debug-attribute` test no longer assumes variables are in scope of `return`.
We might also want to revisit that in #32949, but the test is more reliable now either way.
In order to get one last function in the `associated-type` test pass, this PR also fixes#32790.
Implement `pub(restricted)` privacy (RFC 1422)
This implements `pub(restricted)` privacy from RFC 1422 (cc #32409) behind a feature gate.
`pub(restricted)` paths currently cannot use re-exported modules both for simplicity of implementation and for future compatibility with RFC 1560 (cf #31783).
r? @nikomatsakis
Clean out old documentation as well as the new test/tools directories. Should
prevent a problem that happened this morning where a PR bounced and then it left
docs with "broken links" so all future PRs bounced.
It's using Copy as a trait object compatible trait, which is not
appropriate, change to use a more typical Read + Send + Sync example.
Also use whitespace around `+`.