2024-02-28
Hello and welcome to another issue of This Week in Rust! Rust is a programming language empowering everyone to build reliable and efficient software. This is a weekly summary of its progress and community. Want something mentioned? Tag us at @ThisWeekInRust on Twitter or @ThisWeekinRust on mastodon.social, or send us a pull request. Want to get involved? We love contributions.
This Week in Rust is openly developed on GitHub and archives can be viewed at this-week-in-rust.org. If you find any errors in this week's issue, please submit a PR.
Text labels rendering on a map with Rust - research and design
Rust developers fear language is getting too complex and prefer bug fixes to new features
Mastering ManuallyDrop<T> - A Guide to Explicit Resource Management in Rust
[HEB][video] Rust Course
This week's crate is web-audio-api-rs, a Rust implementation of the Web Audio API for use outside the browser.
Thanks to Otto Rottier for the self-suggestion!
Please submit your suggestions and votes for next week!
An important step for RFC implementation is for people to experiment with the implementation and give feedback, especially before stabilization. The following RFCs would benefit from user testing before moving forward:
If you are a feature implementer and would like your RFC to appear on the above list, add the new call-for-testing
label to your RFC along with a comment providing testing instructions and/or guidance on which aspect(s) of the feature
need testing.
430 pull requests were merged in the last week
account for RPITIT in E0310 explicit lifetime constraint suggestion
actually use the right closure kind when checking async Fn goals
by changing some attributes to only_local, reducing encoding attributes in the crate metadate
expand weak alias types before collecting constrained/referenced late bound regions + refactorings
make it possible for outside crates to inspect a mir::ConstValue with the interpreter
match lowering: Introduce a TestCase enum to replace most matching on PatKind
no need to validate_alias_bound_self_from_param_env in assemble_alias_bound_candidates
split Diagnostics for Uncommon Codepoints: Add Individual Identifier Types
unify dylib loading between proc macros and codegen backends
when encountering <&T as Clone>::clone(x) because T: Clone, suggest #[derive(Clone)]
miri: /miri many-seeds: support MIRI_SEED_END to control the end of the seed range
use br instead of a conditional when switching on a constant boolean
implement MappedMutexGuard, MappedRwLockReadGuard, and MappedRwLockWriteGuard
add "algebraic" fast-math intrinsics, based on fast-math ops that cannot return poison
mpsc: fix race between block initialization and receiver disconnection
cargo add: Improve error when adding registry packages while vendored
cargo: error messages when collecting workspace members now mention the workspace root location
clippy: read_line_without_trim: detect string literal comparison and .ends_with() calls
clippy: allow unused_imports, and unused_import_braces on use
clippy: unused_unit: be careful with expressions with attributes
clippy: extend unnecessary_to_owned to handle Borrow trait in map types
clippy: fix sign-handling bugs and false negatives in cast_sign_loss
clippy: fix no_effect_underscore_binding firing on ignored parameters of async fns
rust-analyzer: add assist for filling fields by replacing ellipsis in record syntax
rust-analyzer: add short flag -V for consistency with other rust tooling
rust-analyzer: replace_filter_map_next_with_find_map shouldn't work for dyn trait
rust-analyzer: don't panic on synthetic syntax in inference diagnostics
rust-analyzer: fix completions panicking with certain macro setups
rust-analyzer: fix deadlock in recreate_crate_graph <-> file_line_index
rust-analyzer: fix modules in blocks not resolving in ide layer
rust-analyzer: fix proc-macro server not accounting for string delimiters correctly
rust-analyzer: panic when inlining callsites inside macros' parameters
rust-analyzer: merge BorrowKind::Unique into BorrowKind::Mut
rust-analyzer: speed up Method Completions By Taking Advantage of Orphan Rules
A rare week where regressions out powered improvements to make the compiler roughly half a percent slower on average on nearly 100 benchmarks. Some regressions have fixes in the pipeline, but some remain elusive or were introduced to address correctness issues.
Triage done by @rylev. Revision range: 5af21304..71ffdf7f
Summary:
| (instructions:u) | mean | range | count |
|---|---|---|---|
| Regressions ❌ (primary) | 1.0% | [0.2%, 4.4%] | 69 |
| Regressions ❌ (secondary) | 1.4% | [0.2%, 4.9%] | 66 |
| Improvements ✅ (primary) | -1.1% | [-3.3%, -0.2%] | 28 |
| Improvements ✅ (secondary) | -0.6% | [-1.5%, -0.2%] | 33 |
| All ❌✅ (primary) | 0.4% | [-3.3%, 4.4%] | 97 |
4 Regressions, 6 Improvements, 5 Mixed; 2 of them in rollups 58 artifact comparisons made in total
Changes to Rust follow the Rust RFC (request for comments) process. These are the RFCs that were approved for implementation this week:
No RFCs were approved this week.
Every week, the team announces the 'final comment period' for RFCs and key PRs which are reaching a decision. Express your opinions now.
NonZeroINVALID_DOC_ATTRIBUTES lint deny by defaultconfstr(_CS_DARWIN_USER_TEMP_DIR, ...) as a TMPDIR fallback on DarwinRusty Events between 2024-02-28 - 2024-03-27 🦀
If you are running a Rust event please add it to the calendar to get it mentioned here. Please remember to add a link to the event too. Email the Rust Community Team for access.
Please see the latest Who's Hiring thread on r/rust
That would take 18 million terabytes of RAM. You don't have that much memory.
– Alice Ryhl answering "What is MAX array size" on rust-users
Thanks to Zeroexcuses for the suggestion!
Please submit quotes and vote for next week!
This Week in Rust is edited by: nellshamrell, llogiq, cdmistman, ericseppanen, extrawurst, andrewpollack, U007D, kolharsam, joelmarcey, mariannegoldin, bennyvasquez.
Email list hosting is sponsored by The Rust Foundation