2024-02-14
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.
This week's crate is microflow, a robust and efficient TinyML inference engine for embedded systems.
Thanks to matteocarnelos for the self-suggestion!
Please submit your suggestions and votes for next week!
Always wanted to contribute to open-source projects but did not know where to start? Every week we highlight some tasks from the Rust community for you to pick and get started!
Some of these tasks may also have mentors available, visit the task page for more information.
If you are a Rust project owner and are looking for contributors, please submit tasks here.
Are you a new or experienced speaker looking for a place to share something cool? This section highlights events that are being planned and are accepting submissions to join their event as a speaker.
If you are an event organizer hoping to expand the reach of your event, please submit a link to the submission website through a PR to TWiR.
466 pull requests were merged in the last week
check_consts: fix duplicate errors, make importance consistent
interpret/write_discriminant: when encoding niched variant, ensure the stored value matches
pattern_analysis: track usefulness without interior mutability
account for non-overlapping unmet trait bounds in suggestion
add unstable -Z direct-access-external-data cmdline flag for rustc
allow restricted trait impls under #[allow_internal_unstable(min_specialization)]
avoid ICE in drop recursion check in case of invalid drop impls
check that the ABI of the instance we are inlining is correct
coverage: split out counter increment sites from BCB node/edge counters
deduplicate tcx.instance_mir(instance) calls in try_instance_mir
don't expect early-bound region to be local when reporting errors in RPITIT well-formedness
emit more specific diagnostics when enums fail to cast with as
exhaustiveness: prefer "0..MAX not covered" to "_ not covered"
fix cycle error when a static and a promoted are mutually recursive
for E0223, suggest associated functions that are similar to the path
gracefully handle non-WF alias in assemble_alias_bound_candidates_recur
harmonize AsyncFn implementations, make async closures conditionally impl Fn* traits
improve 'generic param from outer item' error for Self and inside static/const items
improve pretty printing for associated items in trait objects
introduce enter_forall to supercede instantiate_binder_with_placeholders
make min_exhaustive_patterns match exhaustive_patterns better
make it so that async-fn-in-trait is compatible with a concrete future in implementation
properly handle async block and async fn in if exprs without else
resolve: unload speculatively resolved crates before freezing cstore
static mut: allow mutable reference to arbitrary types, not just slices and arrays
stop bailing out from compilation just because there were incoherent traits
suggest [tail @ ..] on [..tail] and [...tail] where tail is unresolved
suggest name value cfg when only value is used for check-cfg
take empty where bounds into account when suggesting predicates
toggle assert_unsafe_precondition in codegen instead of expansion
turn the "no saved object file in work product" ICE into a translatable fatal error
unstably allow constants to refer to statics and read from immutable statics
miri: fix ICE with symbolic alignment check on extern static
A trait's local impls are trivially coherent if there are no impls
use ensure when the result of the query is not needed beyond its Resultness
simd intrinsics: add simd_shuffle_generic and other missing intrinsics
cargo: fix confusing error messages for sparse index replaced source
rustdoc: Correctly generate path for non-local items in source code pages
bindgen: add target mappings for riscv64imac and riscv32imafc
clippy: mem_replace_with_default No longer triggers on unused expression
clippy: similar_names: don't raise if the first character is different
clippy: to_string_trait_impl: avoid linting if the impl is a specialization
clippy: unconditional_recursion: compare by Tys instead of DefIds
clippy: don't allow derive macros to silence disallowed_macros
clippy: fix false positive in redundant_type_annotations lint
clippy: stop linting blocks_in_conditions on match with weird attr macro case
rust-analyzer: better error message for when proc-macros have not yet been built
rust-analyzer: add break and return postfix keyword completions
rust-analyzer: add diagnostic with fix to replace trailing return <val>; with <val>
rust-analyzer: add incorrect case diagnostics for traits and their associated items
rust-analyzer: allow cargo check to run on only the current package
rust-analyzer: completion list suggests constructor like & builder methods first
rust-analyzer: create UnindexedProject notification to be sent to the client
rust-analyzer: substitute $saved_file in custom check commands
rust-analyzer: fix incorrect inlining of functions that come from MBE macros
rust-analyzer: waker_getters tracking issue from 87021 for 96992
rust-analyzer: fix macro transcriber emitting incorrect lifetime tokens
rust-analyzer: fix tuple structs not rendering visibility in their fields
rust-analyzer: recover from missing argument in call expressions
rust-analyzer: remove unnecessary .as_ref() in generate getter assist
rust-analyzer: validate literals in proc-macro-srv FreeFunctions::literal_from_str
rust-analyzer: implement literal_from_str for proc macro server
Rusty Events between 2024-02-14 - 2024-03-13 💕 🦀 💕
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
For some weird reason the Elixir Discord community has a distinct lack of programmer-socks-wearing queer furries, at least compared to Rust, or even most other tech-y Discord servers I’ve seen. It caused some weird cognitive dissonance. Why do I feel vaguely strange hanging out online with all these kind, knowledgeable, friendly and compassionate techbro’s? Then I see a name I recognized from elsewhere and my hindbrain goes “oh thank gods, I know for a fact she’s actually a snow leopard in her free time”. Okay, this nitpick is firmly tongue-in-cheek, but the Rust user-base continues to be a fascinating case study in how many weirdos you can get together in one place when you very explicitly say it’s ok to be a weirdo.
– SimonHeath on the alopex Wiki's ElixirNitpicks page
Thanks to Brian Kung 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