Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 17 pull requests #75538

Merged
merged 46 commits into from
Aug 15, 2020
Merged

Rollup of 17 pull requests #75538

merged 46 commits into from
Aug 15, 2020

Conversation

tmandry
Copy link
Member

@tmandry tmandry commented Aug 14, 2020

Successful merges:

Failed merges:

r? @ghost

LukasKalbertodt and others added 30 commits July 28, 2020 17:48
This has already been done for `SocketAddrV4`, `SocketAddrV6`,
`IpAddrV4` and `IpAddrV6`. I don't see a point to keep the rather bad
to read derived impl, especially when pretty printing:

    V4(
        127.0.0.1
    )

From the `Display`, one can easily and unambiguously see if it's V4 or
V6. Using `Display` as `Debug` is very convenient for configuration
structs (e.g. for webservers) that often just have a `derive(Debug)`
and are printed that way to the user.
These links were broken before.
Emit E0288 (lifetime bound for trait object cannot be deduced) only on
bare trait objects. When the trait object is in the form of
`&dyn Trait`, E0106 (missing lifetime specifier) will have been emitted,
making the former redundant.
Co-authored-by: Joshua Nelson <joshua@yottadb.com>
As a relative beginner, it took a while for me to figure out I could just steal the references to avoid partially moving the child and thus retain ability to call functions on it (and store it in structs etc).
Co-authored-by: Joshua Nelson <joshua@yottadb.com>
…eklabnik

Document the unsafe keyword

Partial fix of rust-lang#34601 (just one more and it will be done 😄).

I tried to be concise and redirect as much as possible on other, longer resources, exposing only the strict necessary.

I also used `SAFETY:` comments to promote good documentation.

I would like a thorough review to ensure I did not introduce mistakes that would confuse people or worse, lead them to write unsound code.

@rustbot modify labels: T-doc,C-enhancement

Edit: this is now the last PR for the original issue: fixes rust-lang#34601.
…, r=Mark-Simulacrum

deny(unsafe_op_in_unsafe_fn) in libstd/ffi/c_str.rs

Partial fix of rust-lang#73904.

This encloses `unsafe` operations in `unsafe fn` in `libstd/ffi/c_str.rs`.
Improve documentation on process::Child.std* fields

As a relative beginner, it took a while for me to figure out I could just steal the references to avoid partially moving the child and thus retain ability to call functions on it (and store it in structs etc).
…of-socketaddr-ipaddr, r=Amanieu

Change Debug impl of SocketAddr and IpAddr to match their Display output

This has already been done for `SocketAddrV4`, `SocketAddrV6`, `IpAddrV4` and `IpAddrV6`. I don't see a point to keep the rather bad to read derived impl, especially so when pretty printing:

    V4(
        127.0.0.1
    )

From the `Display`, one can easily and unambiguously see if it's V4 or V6. Two examples:

```
127.0.0.1:443
[2001:db8:85a3::8a2e:370:7334]:443
```

Luckily the docs explicitly state that `Debug` output is not stable and that it may be changed at any time.

Using `Display` as `Debug` is very convenient for configuration structs (e.g. for webservers) that often just have a `derive(Debug)` and are printed that way to the one starting the server.
… r=Mark-Simulacrum

BTreeMap: purge innocent use of into_kv_mut

Replace the use of `into_kv_mut` into more precise calls. This makes more sense if you know that the single remaining use of `into_kv_mut` is in fact evil and can be trialled in court (rust-lang#75200) and sent to a correction facility (rust-lang#73971).

No real performance difference reported (but functions that might benefit a tiny constant bit like `BTreeMap::get_mut` aren't benchmarked):
```
benchcmp old new --threshold 5
 name                       old ns/iter  new ns/iter  diff ns/iter  diff %  speedup
 btree::map::clone_fat_100  63,073       59,256             -3,817  -6.05%   x 1.06
 btree::map::iter_100       3,514        3,235                -279  -7.94%   x 1.09
```
Use intra-doc links in `mem::manually_drop` & `mem::maybe_uninit`

This is partial fixes for rust-lang#75080.
…cess, r=jyn514

Switch to intra-doc links in `std::process`

Part of rust-lang#75080.
…=jyn514

Move to intra doc links in std::ffi

Helps with rust-lang#75080.

@rustbot modify labels: T-doc, A-intra-doc-links, T-rustdoc
…and, r=lcnr

Tweak suggestion for `this` -> `self`

* When referring to `this` in associated `fn`s always suggest `self`.
* Point at ident for `fn` lacking `self`
* Suggest adding `self` to assoc `fn`s when appropriate

_Improvements based on the narrative in https://fasterthanli.me/articles/i-am-a-java-csharp-c-or-cplusplus-dev-time-to-do-some-rust_
…r, r=lcnr

Do not emit E0228 when it is implied by E0106

Emit E0288 (lifetime bound for trait object cannot be deduced) only on bare trait objects. When the trait object is in the form of `&dyn Trait`, E0106 (missing lifetime specifier) will have been emitted, making the former redundant.
…lacrum

Bump std's libc version to 0.2.74

It's been a while and this should really be using a recent version, that's all. 💖
…li-obk

Promotion and const interning comments

I understood some things today which I felt should be put into comments.

Cc @rust-lang/wg-const-eval
…=Mark-Simulacrum

BTreeMap: refactor splitpoint and move testing over to unit test

r? @Mark-Simulacrum
Switch to intra-doc links in os/raw/*.md

Partial fix for rust-lang#75080

@rustbot modify labels: T-doc, A-intra-doc-links, T-rustdoc

r? @jyn514
…rk-Simulacrum

Migrate unit tests of btree collections to their native breeding ground

There's one BTreeSet test case that I couldn't easily convince to come along, maybe because it truly is an integration test. But leaving it in place would mean git wouldn't see the move so I also moved it to a new file.

r? @Mark-Simulacrum
@tmandry
Copy link
Member Author

tmandry commented Aug 14, 2020

@bors r+ p=5 rollup=never
@rustbot modify labels: +rollup

@bors
Copy link
Contributor

bors commented Aug 14, 2020

📌 Commit 939befd has been approved by tmandry

@rustbot rustbot added the rollup A PR which is a rollup label Aug 14, 2020
@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Aug 14, 2020
@Aaron1011
Copy link
Member

@bors retry

@bors
Copy link
Contributor

bors commented Aug 14, 2020

⌛ Testing commit 939befd with merge 95879ad...

@bors
Copy link
Contributor

bors commented Aug 15, 2020

☀️ Test successful - checks-actions, checks-azure
Approved by: tmandry
Pushing 95879ad to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Aug 15, 2020
@bors bors merged commit 95879ad into rust-lang:master Aug 15, 2020
@cuviper cuviper added this to the 1.47.0 milestone May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. rollup A PR which is a rollup S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.