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 8 pull requests #89801

Closed
wants to merge 17 commits into from

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

jkugelman and others added 17 commits October 11, 2021 10:03
…, r=joshtriplett

Add #[must_use] to MaybeUninit::new

As discussed in rust-lang#89729 (comment).

Parent issue: rust-lang#89692

r? ``@joshtriplett``
…=joshtriplett

Add #[must_use] to From::from and Into::into

Risk of churn: **High**
Magic 8-Ball says: **Outlook not so good**

I figured I'd put this out there. If we don't do it now maybe we save it for a rainy day.

Parent issue: rust-lang#89692

r? `@joshtriplett`
…ons, r=joshtriplett

Add #[must_use] to as_type conversions

Clippy missed these:

```rust
alloc::string::String   fn as_mut_str(&mut self) -> &mut str;
core::mem::NonNull<T>   unsafe fn as_uninit_mut<'a>(&mut self) -> &'a MaybeUninit<T>;
str                     unsafe fn as_bytes_mut(&mut self) -> &mut [u8];
str                     fn as_mut_ptr(&mut self) -> *mut u8;
```

Parent issue: rust-lang#89692

r? ``@joshtriplett``
…, r=joshtriplett

Add #[must_use] to len and is_empty

Parent issue: rust-lang#89692

r? `@joshtriplett`
…b-methods, r=joshtriplett

Add #[must_use] to non-mutating verb methods

These are methods that could be misconstrued to mutate their input, similar to rust-lang#89694. I gave each one a different custom message.

I wrote that `upgrade` and `downgrade` don't modify the input pointers. Logically they don't, but technically they do...

Parent issue: rust-lang#89692

r? `@joshtriplett`
…ts, r=joshtriplett

Add #[must_use] to is_condition tests

I threw in `std::path::Path::has_root` for funsies.

A continuation of rust-lang#89718.

Parent issue: rust-lang#89692

r? `@joshtriplett`
…htriplett

fix minor spelling error in Poll::ready docs

Fixes minor spelling error in the proposed `Poll::ready` docs. Not that my opinion matters, but +1 on the original PR (rust-lang#89651), it reads much nicer to me than the `ready!` macro.
Update books

## nomicon

5 commits in 2747c4bb2cbc0639b733793ddb0bf4e9daa2634e..2d66852a27c5d0ec50ae021820d1de22caa2b1bd
2021-09-19 17:33:32 +0900 to 2021-10-07 19:00:37 +0900
- Fix typo/minor grammar error in subtyping.md (rust-lang/nomicon#317)
- doc: clarify `thread::scoped::JoinGuard` chapter (rust-lang/nomicon#313)
- Clarify niche optimization on enums with reprs (rust-lang/nomicon#315)
- Update rc decrement snipped (rust-lang/nomicon#316)
- Remove useless `unsafe`, `mut` and ptr casts in example in `send-and-sync.md` (rust-lang/nomicon#308)

## reference

2 commits in 13747275bd14c2d2b453100498532f9ae5504769..b5c68b02984f74e99d1f1b332029e05f607e2660
2021-09-24 17:44:04 +0900 to 2021-10-02 08:11:35 -0700
- Use subtrait/supertrait, not sub-trait, super-trait. (rust-lang/reference#1095)
- Fixed link typo in Generics.md (rust-lang/reference#1094)

## rust-by-example

3 commits in 28aca4a36962c709bce301c03114b5589381dfb8..9a60624fcad0140826c44389571dc622917cd632
2021-09-25 08:19:51 -0300 to 2021-10-04 08:13:53 -0300
- Change 1..n + 1 to 1..=n (rust-lang/rust-by-example#1467)
- Close rust-lang/rust-by-example#1464 (rust-lang/rust-by-example#1465)
- Fix incorrect formatted print hint; closes rust-lang/rust-by-example#1459. (rust-lang/rust-by-example#1466)

## rustc-dev-guide

11 commits in d1f03cbaa39d9164f5fe4b9b93762668142e0dad..fba15a46ca8efa97e8a955794724ac7ce27805b8
2021-09-24 12:00:29 +0900 to 2021-10-12 08:52:21 +0900
- Update some docs from 2021-10 date triage (rust-lang/rustc-dev-guide#1230)
- Recommend `rustfmt --edition=2021`
- Update sanitizer documentation
- Mention needs-sanitizer-hwaddress directive
- Address review comments
- Document tracing awesomeness
- Move log/tracing instructions to its own file
- Update src/closure.md
- Fix accidental HTML tag
- Update links to `rustc_mir` in Two Phase Borrows (rust-lang/rustc-dev-guide#1226)
- Update some docs from 2021-10 date triage (rust-lang/rustc-dev-guide#1224)

## edition-guide

1 commits in 2d9b1b9da706de24650fdc5c3b0182f55c82115d..7c0088ca744d293a5f4b1e2ac378e7c23d30fe55
2021-08-31 10:44:09 +0200 to 2021-10-05 13:28:05 +0200
- Clarify cargo resolver behavior in a workspace. (rust-lang/edition-guide#267)

## embedded-book

2 commits in 4c76da9ddb4650203c129fceffdea95a3466c205..270fccd339e5972d9c900e788f197e81a0bcd956
2021-09-12 12:43:03 +0000 to 2021-10-06 16:28:48 +0000
- Update section 1.4 to mention that some additional packages required  (rust-embedded/book#304)
- Change `-file-headers` to `--file-headers`  (rust-embedded/book#303)
@rustbot rustbot added the rollup A PR which is a rollup label Oct 12, 2021
@matthiaskrgr
Copy link
Member Author

@bors r+ p=10 rollup=never
Unfortunately I don't have time to babysit this one right now, but just wanted to get it going in case it passes :)

@bors
Copy link
Contributor

bors commented Oct 12, 2021

📌 Commit 0ef36b9 has been approved by matthiaskrgr

@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 Oct 12, 2021
@rust-log-analyzer
Copy link
Collaborator

The job x86_64-gnu-tools failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
---- compile_test stdout ----

error: failed to compile fixed code
status: exit status: 1
command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/clippy-driver" "tests/ui/iter_count.fixed" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/test" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/test/iter_count.stage-id" "--emit=metadata" "-Dwarnings" "-Zui-testing" "-L" "dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps" "-L" "dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/deps" "--extern" "syn=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libsyn-2c42e7af51424ce5.rlib" "--extern" "serde=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libserde-89222f6e0d369b36.rlib" "--extern" "serde_derive=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/deps/libserde_derive-8bd56d0234290b82.so" "--extern" "itertools=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libitertools-b0f19a5fad83a10b.rlib" "--extern" "regex=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libregex-392b40a2759b0504.rlib" "--extern" "if_chain=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libif_chain-b3e76e8f62643cc6.rlib" "--extern" "clippy_utils=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_utils-bc2b0c8a9dcb9fb3.rlib" "--extern" "derive_new=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/deps/libderive_new-ea1db0c41efed0d6.so" "--extern" "quote=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libquote-c6bd037ba33baa25.rlib" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/test/iter_count.stage-id.aux"
stdout:
------------------------------------------

------------------------------------------
------------------------------------------
stderr:
------------------------------------------
{"message":"unused return value of `std::collections::BTreeMap::<K, V>::len` that must be used","code":{"code":"unused_must_use","explanation":null},"level":"error","spans":[{"file_name":"tests/ui/iter_count.fixed","byte_start":1523,"byte_end":1540,"line_start":59,"line_end":59,"column_start":5,"column_end":22,"is_primary":true,"text":[{"text":"    b_tree_map.len();","highlight_start":5,"highlight_end":22}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"`-D unused-must-use` implied by `-D warnings`","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error: unused return value of `std::collections::BTreeMap::<K, V>::len` that must be used\n  --> tests/ui/iter_count.fixed:59:5\n   |\nLL |     b_tree_map.len();\n   |     ^^^^^^^^^^^^^^^^^\n   |\n   = note: `-D unused-must-use` implied by `-D warnings`\n\n"}
{"message":"unused return value of `std::collections::BTreeSet::<T>::len` that must be used","code":{"code":"unused_must_use","explanation":null},"level":"error","spans":[{"file_name":"tests/ui/iter_count.fixed","byte_start":1545,"byte_end":1562,"line_start":60,"line_end":60,"column_start":5,"column_end":22,"is_primary":true,"text":[{"text":"    b_tree_set.len();","highlight_start":5,"highlight_end":22}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: unused return value of `std::collections::BTreeSet::<T>::len` that must be used\n  --> tests/ui/iter_count.fixed:60:5\n   |\nLL |     b_tree_set.len();\n   |     ^^^^^^^^^^^^^^^^^\n\n"}
{"message":"unused return value of `std::collections::LinkedList::<T>::len` that must be used","code":{"code":"unused_must_use","explanation":null},"level":"error","spans":[{"file_name":"tests/ui/iter_count.fixed","byte_start":1567,"byte_end":1585,"line_start":61,"line_end":61,"column_start":5,"column_end":23,"is_primary":true,"text":[{"text":"    linked_list.len();","highlight_start":5,"highlight_end":23}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: unused return value of `std::collections::LinkedList::<T>::len` that must be used\n  --> tests/ui/iter_count.fixed:61:5\n   |\nLL |     linked_list.len();\n   |     ^^^^^^^^^^^^^^^^^^\n\n"}
{"message":"unused return value of `std::collections::BinaryHeap::<T>::len` that must be used","code":{"code":"unused_must_use","explanation":null},"level":"error","spans":[{"file_name":"tests/ui/iter_count.fixed","byte_start":1590,"byte_end":1608,"line_start":62,"line_end":62,"column_start":5,"column_end":23,"is_primary":true,"text":[{"text":"    binary_heap.len();","highlight_start":5,"highlight_end":23}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: unused return value of `std::collections::BinaryHeap::<T>::len` that must be used\n  --> tests/ui/iter_count.fixed:62:5\n   |\nLL |     binary_heap.len();\n   |     ^^^^^^^^^^^^^^^^^^\n\n"}
{"message":"unused return value of `std::collections::BTreeMap::<K, V>::len` that must be used","code":{"code":"unused_must_use","explanation":null},"level":"error","spans":[{"file_name":"tests/ui/iter_count.fixed","byte_start":1698,"byte_end":1715,"line_start":68,"line_end":68,"column_start":5,"column_end":22,"is_primary":true,"text":[{"text":"    b_tree_map.len();","highlight_start":5,"highlight_end":22}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: unused return value of `std::collections::BTreeMap::<K, V>::len` that must be used\n  --> tests/ui/iter_count.fixed:68:5\n   |\nLL |     b_tree_map.len();\n   |     ^^^^^^^^^^^^^^^^^\n\n"}
{"message":"unused return value of `std::collections::LinkedList::<T>::len` that must be used","code":{"code":"unused_must_use","explanation":null},"level":"error","spans":[{"file_name":"tests/ui/iter_count.fixed","byte_start":1720,"byte_end":1738,"line_start":69,"line_end":69,"column_start":5,"column_end":23,"is_primary":true,"text":[{"text":"    linked_list.len();","highlight_start":5,"highlight_end":23}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: unused return value of `std::collections::LinkedList::<T>::len` that must be used\n  --> tests/ui/iter_count.fixed:69:5\n   |\nLL |     linked_list.len();\n   |     ^^^^^^^^^^^^^^^^^^\n\n"}
{"message":"unused return value of `std::collections::BTreeMap::<K, V>::len` that must be used","code":{"code":"unused_must_use","explanation":null},"level":"error","spans":[{"file_name":"tests/ui/iter_count.fixed","byte_start":1848,"byte_end":1865,"line_start":76,"line_end":76,"column_start":5,"column_end":22,"is_primary":true,"text":[{"text":"    b_tree_map.len();","highlight_start":5,"highlight_end":22}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: unused return value of `std::collections::BTreeMap::<K, V>::len` that must be used\n  --> tests/ui/iter_count.fixed:76:5\n   |\nLL |     b_tree_map.len();\n   |     ^^^^^^^^^^^^^^^^^\n\n"}
{"message":"unused return value of `std::collections::BTreeSet::<T>::len` that must be used","code":{"code":"unused_must_use","explanation":null},"level":"error","spans":[{"file_name":"tests/ui/iter_count.fixed","byte_start":1870,"byte_end":1887,"line_start":77,"line_end":77,"column_start":5,"column_end":22,"is_primary":true,"text":[{"text":"    b_tree_set.len();","highlight_start":5,"highlight_end":22}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: unused return value of `std::collections::BTreeSet::<T>::len` that must be used\n  --> tests/ui/iter_count.fixed:77:5\n   |\nLL |     b_tree_set.len();\n   |     ^^^^^^^^^^^^^^^^^\n\n"}
{"message":"unused return value of `std::collections::LinkedList::<T>::len` that must be used","code":{"code":"unused_must_use","explanation":null},"level":"error","spans":[{"file_name":"tests/ui/iter_count.fixed","byte_start":1892,"byte_end":1910,"line_start":78,"line_end":78,"column_start":5,"column_end":23,"is_primary":true,"text":[{"text":"    linked_list.len();","highlight_start":5,"highlight_end":23}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: unused return value of `std::collections::LinkedList::<T>::len` that must be used\n  --> tests/ui/iter_count.fixed:78:5\n   |\nLL |     linked_list.len();\n   |     ^^^^^^^^^^^^^^^^^^\n\n"}
{"message":"unused return value of `std::collections::BinaryHeap::<T>::len` that must be used","code":{"code":"unused_must_use","explanation":null},"level":"error","spans":[{"file_name":"tests/ui/iter_count.fixed","byte_start":1915,"byte_end":1933,"line_start":79,"line_end":79,"column_start":5,"column_end":23,"is_primary":true,"text":[{"text":"    binary_heap.len();","highlight_start":5,"highlight_end":23}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: unused return value of `std::collections::BinaryHeap::<T>::len` that must be used\n  --> tests/ui/iter_count.fixed:79:5\n   |\nLL |     binary_heap.len();\n   |     ^^^^^^^^^^^^^^^^^^\n\n"}

------------------------------------------

thread 'compile_test' panicked at 'Some tests failed', /cargo/registry/src/github.com-1ecc6299db9ec823/compiletest_rs-0.7.0/src/lib.rs:105:22

@matthiaskrgr
Copy link
Member Author

@bors r-

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Oct 12, 2021
@matthiaskrgr matthiaskrgr deleted the rollup-y1lhmc1 branch November 20, 2021 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rollup A PR which is a rollup S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants