Skip to content

Commit ca1f34d

Browse files
authored
Merge branch 'master' into patch-4
2 parents b8ae166 + ce82664 commit ca1f34d

File tree

5 files changed

+164
-41
lines changed

5 files changed

+164
-41
lines changed

draft/2024-10-09-this-week-in-rust.md

Lines changed: 160 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -36,37 +36,53 @@ and just ask the editors to select the category.
3636
### Newsletters
3737

3838
### Project/Tooling Updates
39+
* [A new version of modversions](https://lwn.net/Articles/986892/)
40+
* [Smart pointers for the kernel](https://lwn.net/SubscriberLink/992055/104fe7d0d355faba/)
41+
* [Efficient Rust tracepoints](https://lwn.net/SubscriberLink/992455/6c61de6764f17830/)
42+
* [Improving bindgen for the kernel](https://lwn.net/SubscriberLink/992693/d4d6587f6faaf524/)
43+
44+
* [termscp 0.15.0](https://blog.veeso.dev/blog/en/announcing-termscp-015/)
3945

4046
### Observations/Thoughts
4147

4248
* [5 Awesome (and less known) Rust projects](https://kerkour.com/awesome-rust-projects-2024)
49+
* [Nine Rules for Running Rust in the Browser: Practical lessons from porting range-set-blaze to WASM](https://towardsdatascience.com/nine-rules-for-running-rust-in-the-browser-8228353649d1)
50+
* [Rust is rolling off the Volvo assembly line](https://tweedegolf.nl/en/blog/137/rust-is-rolling-off-the-volvo-assembly-line)
4351

4452
### Rust Walkthroughs
53+
* [Building Async I/O in Rust: How Futures, Wakers, and Thread Pools Work Together](https://www.spaghetti-coder.com/building-async-io-in-rust-how-futures-wakers-and-thread-pools-work-together)
54+
55+
* [Series] [Serde for Trait Object 2: Serialization](https://voelklmichael.github.io/Blog/2024/10/08/serde-trait-part2.html)
56+
* [video] [Build with Naz : Create an async shell in Rust](https://www.youtube.com/watch?v=jXzFCDIJQag)
57+
* [Index Trait, Pinned Elements and Immutable Push Vector](https://orxfun.github.io/orxfun-notes/#/imp-vec-motivation-2024-10-03)
4558

4659
### Research
4760

4861
### Miscellaneous
4962

5063
## Crate of the Week
5164

52-
<!-- COTW goes here -->
65+
This week's crate is [float8](https://crates.io/crates/float8), an 8-bit float implementation.
66+
67+
llogiq is still pleased with his choice, but increasingly unhappy about the lack of suggestions.
5368

5469
[Please submit your suggestions and votes for next week][submit_crate]!
5570

5671
[submit_crate]: https://users.rust-lang.org/t/crate-of-the-week/2704
5772

58-
## [Call for Testing](https://github.com/rust-lang/rfcs/issues?q=label%3Acall-for-testing)
73+
## Calls for Testing
5974
An important step for RFC implementation is for people to experiment with the
6075
implementation and give feedback, especially before stabilization. The following
6176
RFCs would benefit from user testing before moving forward:
6277

63-
<!-- Calls for Testing go here, use this format:
64-
* [<RFC Topic>](<RFC URL>)
65-
* [Tracking Issue](<Tracking Issue URL>)
66-
* [Testing steps](<Testing Steps URL>)
67-
-->
68-
<!-- or if there are no new or updated RFCs this week, use: * *No New or Updated RFCs were created this week.* -->
69-
<!-- Remember to remove the `call-for-testing` label from the RFC so that the maintainer can signal for testers again, if desired. -->
78+
### [RFCs](https://github.com/rust-lang/rfcs/issues?q=label%3Acall-for-testing)
79+
* *No calls for testing were issued this week.*
80+
81+
### [Rust](https://github.com/rust-lang/rust/labels/call-for-testing)
82+
* *No calls for testing were issued this week.*
83+
84+
### [Rustup](https://github.com/rust-lang/rustup/labels/call-for-testing)
85+
* *No calls for testing were issued this week.*
7086

7187
If you are a feature implementer and would like your RFC to appear on the above list, add the new `call-for-testing`
7288
label to your RFC along with a comment providing testing instructions and/or guidance on which aspect(s) of the feature
@@ -100,55 +116,158 @@ If you are an event organizer hoping to expand the reach of your event, please s
100116

101117
## Updates from the Rust Project
102118

103-
<!-- Rust updates go here -->
119+
437 pull requests were [merged in the last week][merged]
120+
121+
[merged]: https://github.com/search?q=is%3Apr+org%3Arust-lang+is%3Amerged+merged%3A2024-10-01..2024-10-08
122+
123+
* [add `x86_64-unknown-trusty` as tier 3 target](https://github.com/rust-lang/rust/pull/130453)
124+
* [initial support for `riscv32{e|em|emc}_unknown_none_elf`](https://github.com/rust-lang/rust/pull/130555)
125+
* [increase Stack Size for AIX](https://github.com/rust-lang/rust/pull/131116)
126+
* [allow boolean literals as cfg predicates](https://github.com/rust-lang/rust/pull/131034) (RFC [#3695](https://rust-lang.github.io/rfcs/3695-cfg-boolean-literals.html))
127+
* [account for `impl Trait {` when `impl Trait for Type {` was intended](https://github.com/rust-lang/rust/pull/131273)
128+
* [add `naked_asm!` macro for use in `#[naked]` functions](https://github.com/rust-lang/rust/pull/128651)
129+
* [add a lint for pointer to integer transmutes in consts](https://github.com/rust-lang/rust/pull/130540)
130+
* [add caching to most type folders, rm region uniquification](https://github.com/rust-lang/rust/pull/130821)
131+
* [add missing module flags for `-Zfunction-return=thunk-extern`](https://github.com/rust-lang/rust/pull/130824)
132+
* [add support for reborrowing pinned method receivers](https://github.com/rust-lang/rust/pull/130633)
133+
* [add unstable support for outputting file checksums for use in cargo](https://github.com/rust-lang/rust/pull/126930)
134+
* [avoid ICE in coverage builds with bad `#[coverage(..)]` attributes](https://github.com/rust-lang/rust/pull/131187)
135+
* [check elaborated projections from dyn don't mention unconstrained late bound lifetimes](https://github.com/rust-lang/rust/pull/130367)
136+
* [compute array length from type for unconditional panic lint](https://github.com/rust-lang/rust/pull/129517)
137+
* [couple of changes to make it easier to compile rustc for wasm](https://github.com/rust-lang/rust/pull/130899)
138+
* [coverage: multiple small tweaks to counter creation](https://github.com/rust-lang/rust/pull/131325)
139+
* [disable jump threading `UnOp::Not` for non-bool](https://github.com/rust-lang/rust/pull/131201)
140+
* [do not consider match/let/ref of place that evaluates to `!` to diverge, disallow coercions from them too](https://github.com/rust-lang/rust/pull/129392)
141+
* [don't allow the `#[pointee]` attribute where it doesn't belong](https://github.com/rust-lang/rust/pull/128721)
142+
* [don't give method suggestions when method probe fails due to bad implementation of `Deref`](https://github.com/rust-lang/rust/pull/131024)
143+
* [improve const traits diagnostics for new desugaring](https://github.com/rust-lang/rust/pull/131152)
144+
* [instantiate binders in `supertrait_vtable_slot`](https://github.com/rust-lang/rust/pull/131042)
145+
* [make `deprecated_cfg_attr_crate_type_name` a hard error](https://github.com/rust-lang/rust/pull/129670)
146+
* [make `test_lots_of_insertions` test take less long in Miri](https://github.com/rust-lang/rust/pull/131085)
147+
* [make opaque types regular HIR nodes](https://github.com/rust-lang/rust/pull/129244)
148+
* [only query `params_in_repr` if def kind is adt](https://github.com/rust-lang/rust/pull/131150)
149+
* [panic when an interpreter error gets unintentionally discarded](https://github.com/rust-lang/rust/pull/130885)
150+
* [parser: better error messages for `@` in `struct` patterns](https://github.com/rust-lang/rust/pull/130725)
151+
* [replace -Z default-hidden-visibility with -Z default-visibility](https://github.com/rust-lang/rust/pull/130005)
152+
* [restrict `ignore-mode-*` directives](https://github.com/rust-lang/rust/pull/131346)
153+
* [support `clobber_abi` and vector/access registers (clobber-only) in s390x inline assembly](https://github.com/rust-lang/rust/pull/130630)
154+
* [interpret: always enable `write_immediate` sanity checks](https://github.com/rust-lang/rust/pull/131006)
155+
* [miri: add vector clock to epoll ready lists](https://github.com/rust-lang/miri/pull/3932)
156+
* [miri: added rust-analyzer instructions for Helix](https://github.com/rust-lang/miri/pull/3936)
157+
* [miri: avoid `pthread_attr_t` in tests](https://github.com/rust-lang/miri/pull/3945)
158+
* [miri: implement LLVM x86 gfni intrinsics](https://github.com/rust-lang/miri/pull/3895)
159+
* [miri: prefer refutable slice patterns over len check + index op](https://github.com/rust-lang/miri/pull/3940)
160+
* [miri: pthread mutex: better error in reentrant-locking-UB](https://github.com/rust-lang/miri/pull/3943)
161+
* [`rustc_infer` cleanups](https://github.com/rust-lang/rust/pull/131226)
162+
* [stabilize 5 `const_mut_refs`-dependent API](https://github.com/rust-lang/rust/pull/131177)
163+
* [stabilize `BufRead::skip_until`](https://github.com/rust-lang/rust/pull/131267)
164+
* [stabilize `const_float_classify`](https://github.com/rust-lang/rust/pull/130157)
165+
* [stabilize `const_slice_from_raw_parts_mut`](https://github.com/rust-lang/rust/pull/130403)
166+
* [stabilize `const_slice_split_at_mut` and `const_slice_first_last_chunk`](https://github.com/rust-lang/rust/pull/130428)
167+
* [stabilize `expr_2021` fragment specifier in all editions](https://github.com/rust-lang/rust/pull/129972)
168+
* [stabilize the `map`/`value` methods on `ControlFlow`](https://github.com/rust-lang/rust/pull/130518)
169+
* [liballoc: introduce String, Vec const-slicing](https://github.com/rust-lang/rust/pull/128399)
170+
* [make Cell unstably const](https://github.com/rust-lang/rust/pull/131281)
171+
* [enable f16 and f128 on windows-gnullvm targets](https://github.com/rust-lang/rust/pull/131308)
172+
* [transmuteFrom: gracefully handle unnormalized types and normalization errors](https://github.com/rust-lang/rust/pull/131112)
173+
* [small optimization for integers Display implementation](https://github.com/rust-lang/rust/pull/128204)
174+
* [add `[Option<T>; N]::transpose`](https://github.com/rust-lang/rust/pull/130829)
175+
* [add precondition checks to `ptr::offset, ptr::add, ptr::sub`](https://github.com/rust-lang/rust/pull/130251)
176+
* [avoid emptiness check in `PeekMut::pop`](https://github.com/rust-lang/rust/pull/131197)
177+
* [don't use `Immediate::offset` to transmute pointers to integers](https://github.com/rust-lang/rust/pull/131068)
178+
* [add multi-producer, multi-consumer channel (mpmc)](https://github.com/rust-lang/rust/pull/126839)
179+
* [impl `Default` for `HashMap`/`HashSet` iterators that don't already have it](https://github.com/rust-lang/rust/pull/128711)
180+
* [std: make `thread::current` available in all `thread_local!` destructors](https://github.com/rust-lang/rust/pull/127912)
181+
* [std: replace `LazyBox` with `OnceBox`](https://github.com/rust-lang/rust/pull/131094)
182+
* [futures: fix use after free of task in FuturesUnordered when dropped future panics](https://github.com/rust-lang/futures-rs/pull/2886)
183+
* [hashbrown: add `Tag(u8)` newtype in an attempt to stop using byte-pointers for everything](https://github.com/rust-lang/hashbrown/pull/565)
184+
* [hashbrown: change the default hasher to foldhash](https://github.com/rust-lang/hashbrown/pull/563)
185+
* [cargo: fix `cargo:version_number` - has only one `:`](https://github.com/rust-lang/cargo/pull/14637)
186+
* [cargo: fix: remove implicit feature removal](https://github.com/rust-lang/cargo/pull/14630)
187+
* [cargo: improve error reporting when feature not found in `activated_features`](https://github.com/rust-lang/cargo/pull/14647)
188+
* [rustdoc: cleaner errors on disambiguator/namespace mismatches](https://github.com/rust-lang/rust/pull/131260)
189+
* [rustdoc: improve `<wbr>`-insertion for `SCREAMING_CAMEL_CASE`](https://github.com/rust-lang/rust/pull/131370)
190+
* [rustdoc: lists items that contain multiple paragraphs are more clear](https://github.com/rust-lang/rust/pull/130933)
191+
* [rustdoc: prevent ctors from resolving](https://github.com/rust-lang/rust/pull/131224)
192+
* [clippy: `infinite_loop`: continuing an outer loop leaves the inner loop](https://github.com/rust-lang/rust-clippy/pull/13512)
193+
* [clippy: `rustc_tools_util`: rerun when git commit changes](https://github.com/rust-lang/rust-clippy/pull/13329)
194+
* [clippy: `zombie_processes`: consider `wait()` calls in nested bodies](https://github.com/rust-lang/rust-clippy/pull/13462)
195+
* [clippy: compare trait references in `trait_duplication_in_bounds` correctly](https://github.com/rust-lang/rust-clippy/pull/13493)
196+
* [clippy: fix `mut_mutex_lock` when reference not ultimately mutable](https://github.com/rust-lang/rust-clippy/pull/13122)
197+
* [clippy: implement lint for `regex::Regex` compilation inside a loop](https://github.com/rust-lang/rust-clippy/pull/13412)
198+
* [clippy: reduce default 'large array' threshold](https://github.com/rust-lang/rust-clippy/pull/13485)
199+
* [clippy: show interior mutability chain in `mutable_key_type`](https://github.com/rust-lang/rust-clippy/pull/13496)
200+
* [clippy: simplify negative `Option::{is_some_and,is_none_or}`](https://github.com/rust-lang/rust-clippy/pull/13443)
201+
* [clippy: style: do not defensively use `saturating_sub()`](https://github.com/rust-lang/rust-clippy/pull/13513)
202+
* [rust-analyzer: fix: fix bootstrap error message being incorrect](https://github.com/rust-lang/rust-analyzer/pull/18219)
203+
* [rust-analyzer: use external stack in borrowck DFS](https://github.com/rust-lang/rust-analyzer/pull/18255)
104204

105205
### Rust Compiler Performance Triage
106206

107-
<!-- Perf results go here -->
207+
One regression dominated this week (dealing with a correctness fix around type system caching that was deemed necessary), but it luckily did not produce large regressions in any benchmarks. Overall, performance still ended up relatively in the same place as the beginning of the week.
208+
209+
Triage done by **@rylev**.
210+
Revision range: [c87004a1..e6c46db4](https://perf.rust-lang.org/?start=c87004a1f5be671e3f03f69fb13d8915bdbb6a52&end=e6c46db4e9fd11e3183c397a59d946731034ede6&absolute=false&stat=instructions%3Au)
211+
212+
**Summary**:
213+
214+
| (instructions:u) | mean | range | count |
215+
|:----------------------------------:|:-----:|:--------------:|:-----:|
216+
| Regressions ❌ <br /> (primary) | 0.3% | [0.1%, 1.0%] | 63 |
217+
| Regressions ❌ <br /> (secondary) | 1.1% | [0.1%, 3.4%] | 81 |
218+
| Improvements ✅ <br /> (primary) | -0.5% | [-3.0%, -0.1%] | 19 |
219+
| Improvements ✅ <br /> (secondary) | -0.5% | [-1.5%, -0.1%] | 46 |
220+
| All ❌✅ (primary) | 0.1% | [-3.0%, 1.0%] | 82 |
221+
222+
223+
2 Regressions, 3 Improvements, 7 Mixed; 3 of them in rollups
224+
57 artifact comparisons made in total
225+
226+
[Full report here](https://github.com/rust-lang/rustc-perf/blob/e6fcc69d6b3483f737140ff5c9fdba1ccac44776/triage/2024-10-08.md)
108227

109228
### [Approved RFCs](https://github.com/rust-lang/rfcs/commits/master)
110229

111230
Changes to Rust follow the Rust [RFC (request for comments) process](https://github.com/rust-lang/rfcs#rust-rfcs). These
112231
are the RFCs that were approved for implementation this week:
113232

114-
<!-- Approved RFCs go here, use this format: * [Topic](URL) -->
115-
<!-- or if none were approved this week, use: * *No RFCs were approved this week.* -->
116-
<!-- * []() -->
117-
118-
<!--
119-
### [Approved Major Change Proposals (MCP)](https://forge.rust-lang.org/compiler/mcp.html)
120-
<!~~ MCPs occur infrequently, so this section is commented out by default. ~~>
121-
<!~~ MCPs which have been approved or rejected this week go here, use this format: * [major change accepted|rejected] [Topic](URL) ~~>
122-
-->
233+
* [RFC: Allow boolean literals as `cfg` predicates](https://github.com/rust-lang/rfcs/pull/3695)
234+
* [Move `rustdoc-types` crate to T-Rustdoc ownership.](https://github.com/rust-lang/rfcs/pull/3505)
123235

124236
### Final Comment Period
125237

126238
Every week, [the team](https://www.rust-lang.org/team.html) announces the 'final comment period' for RFCs and key PRs
127239
which are reaching a decision. Express your opinions now.
128240

129241
#### [RFCs](https://github.com/rust-lang/rfcs/labels/final-comment-period)
242+
* *No RFCs entered Final Comment Period this week.*
130243

131-
<!-- RFCs which have entered FCP go here, use this format: * [disposition: merge|close] [Topic](URL) -->
132-
<!-- or if none entered FCP this week, use: * *No RFCs entered Final Comment Period this week.* -->
133-
<!-- * [disposition: ] []() -->
134-
135-
#### [Tracking Issues & PRs](https://github.com/rust-lang/rust/issues?q=is%3Aopen+label%3Afinal-comment-period+sort%3Aupdated-desc)
244+
#### Tracking Issues & PRs
245+
##### [Rust](https://github.com/rust-lang/rust/issues?q=is%3Aopen+label%3Afinal-comment-period+sort%3Aupdated-desc)
246+
* [disposition: merge] [Stabilize const `ptr::write*` and `mem::replace`](https://github.com/rust-lang/rust/pull/130954)
247+
* [disposition: merge] [Check ABI target compatibility for function pointers](https://github.com/rust-lang/rust/pull/128784)
248+
* [disposition: merge] [Proposal: stabilize `if_let_rescope` for Edition 2024](https://github.com/rust-lang/rust/issues/131154)
249+
* [disposition: merge] [Fixup Windows verbatim paths when used with the `include!` macro](https://github.com/rust-lang/rust/pull/125205)
250+
* [disposition: merge] [Implemented `FromStr` for `CString` and `TryFrom<CString>` for `String`](https://github.com/rust-lang/rust/pull/130608)
251+
* [disposition: merge] [Tracking Issue for `debug_more_non_exhaustive`](https://github.com/rust-lang/rust/issues/127942)
252+
* [disposition: merge] [Tracking Issue for `const_make_ascii`](https://github.com/rust-lang/rust/issues/130698)
253+
* [disposition: merge] [Tracking Issue for `const_char_encode_utf8`](https://github.com/rust-lang/rust/issues/130512)
136254

137-
<!-- Tracking Issues which have entered FCP go here, use this format: * [disposition: merge|close] [Topic](URL) -->
138-
<!-- or if none entered FCP this week, use: * *No Tracking Issues or PRs entered Final Comment Period this week.* -->
139-
<!-- * [disposition: ] []() -->
255+
##### [Cargo](https://github.com/rust-lang/cargo/issues?q=is%3Aopen+label%3Afinal-comment-period+sort%3Aupdated-desc)
256+
* [disposition: merge] [feat: Stabilize MSRV-aware resolver config](https://github.com/rust-lang/cargo/pull/14639)
257+
* [disposition: merge] [Official API for build scripts](https://github.com/rust-lang/cargo/issues/12432)
140258

141-
### [Language Reference](https://github.com/rust-lang/reference/issues?q=is%3Aopen+label%3Afinal-comment-period+sort%3Aupdated-desc)
142-
<!-- Remove this section if empty>
259+
##### [Language Team](https://github.com/rust-lang/lang-team/issues?q=is%3Aopen+label%3Afinal-comment-period+sort%3Aupdated-desc+)
260+
* [disposition: merge] [Meeting proposal: rename "object safety" to "dyn compatibility"](https://github.com/rust-lang/lang-team/issues/286)
143261

144-
### [Unsafe Code Guidelines](https://github.com/rust-lang/unsafe-code-guidelines/issues?q=is%3Aopen+label%3Afinal-comment-period+sort%3Aupdated-desc)
145-
<!-- Remove this section if empty>
262+
##### [Language Reference](https://github.com/rust-lang/reference/issues?q=is%3Aopen+label%3Afinal-comment-period+sort%3Aupdated-desc)
263+
* *No Language Reference RFCs entered Final Comment Period this week.*
146264

147-
### [New and Updated RFCs](https://github.com/rust-lang/rfcs/pulls)
265+
##### [Unsafe Code Guidelines](https://github.com/rust-lang/unsafe-code-guidelines/issues?q=is%3Aopen+label%3Afinal-comment-period+sort%3Aupdated-desc)
266+
* *No Unsafe Code Guideline Tracking Issues or PRs entered Final Comment Period this week.*
148267

149-
<!-- New or updated RFCs go here, use this format: * [new|updated] [Topic](URL) -->
150-
<!-- or if there are no new or updated RFCs this week, use: * *No New or Updated RFCs were created this week.* -->
151-
<!-- * [new|updated] []() -->
268+
#### [New and Updated RFCs](https://github.com/rust-lang/rfcs/pulls)
269+
* [new] [RFC: Promote riscv64gc-unknown-linux-gnu to Tier-1 (without host tools)](https://github.com/rust-lang/rfcs/pull/3707)
270+
* [new] [[RFC] Add Option::todo and Result::todo](https://github.com/rust-lang/rfcs/pull/3706)
152271

153272
## Upcoming Events
154273

@@ -300,7 +419,11 @@ Please see the latest [Who's Hiring thread on r/rust](INSERT_LINK_HERE)
300419

301420
# Quote of the Week
302421

303-
<!-- QOTW goes here -->
422+
> I'm the wrong side of 45. I have zero interest in wasting any time that I might have left writing C from scratch. Writing Rust is pure joy. I can go from an idea to a working, tested, robust, published and packaged implementation in the time it would take me to even begin the first few lines of a C version. The tooling is beautiful, makes programming fun, and the end result usually outperforms the equivalent C. Once it builds I know it will run perfectly on all of the platforms I care about, and I don't have to go around manually testing on them to find all of the various platform and compiler quirks that will break it.
423+
424+
[Jonathan Perkins on the NetBSD mailing list](http://mail-index.netbsd.org/pkgsrc-users/2024/08/25/msg040053.html)
425+
426+
Thanks to [blonk](https://users.rust-lang.org/t/twir-quote-of-the-week/328/1617) for the suggestion!
304427

305428
[Please submit quotes and vote for next week!](https://users.rust-lang.org/t/twir-quote-of-the-week/328)
306429

0 commit comments

Comments
 (0)