2024-01-24
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.
mem::take to reduce heap allocationsThis week's crate is apistos, an OpenAPI documentation tool.
Thanks to Romain Lebran 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.
SqlxDatabase instance per processIf 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.
453 pull requests were merged in the last week
HashMap/HashSet: forward fold implementations of iteratorsdead_code treats #[repr(transparent)] the same as #[repr(C)]fix(rust-analyzer): use new pkgid spec to comparelarge_assignments: Lint on specific large args passed to functionsmaybe_lint_impl_trait: separate is_downgradable from is_object_safenever_patterns: Count ! bindings as divergingnever_patterns: typecheck never patternspat_analysis: Don't rely on contiguous VariantIds outside of rustcpattern_analysis: Remove Ty: Copy boundproc_macro: Add Literal::c_string constructorsingle_use_lifetimes: Don't suggest deleting lifetimes with bounds#[track_caller] to the "From implies Into" implIpv6Addr::is_ipv4_mappedPatKind::Err to AST/HIRexclusive_range_pattern errorNonZero<T> type aliasNonZeroXxx::from_mut(_unchecked)?const expression blocks in thread_local!dynNulInCStr error earlierlet_underscore_lockcollapse_debuginfo attribute, added command-line flagunsafe_op_in_unsafe_fn migrated in edition 2024closure_env_ty and closure_env_param.swap() when encountering conflicting borrows from mem::swap on a sliceunstable_features and make use of it in the compilerstable_mir::with_tables soundEscapeAscii's Display and CStr's Debugbound_mapround_ties_evenslice_first_last_chunkoffset_of!split_at{,_mut}_checkediter::repeat_n(A)Rc::from_box_inbool instead of PartialOrd as return value of the comparison closure in {slice,Iterator}::is_sorted_byInput::new guard against incorrect AsRef implementationsvalues() when no features are declaredgenerated_marker_line_search_limitblocks_in_conditions: do not warn if condition comes from macrodefault_numeric_fallback: improve const context detectionno_effect_underscore_binding: _ prefixed variables can be usedunused_io_amount captures Ok(_)ssuspicious_open_options linttrait_duplication_in_bounds lintderive_partial_eq_without_eq lint if the type has the non_exhaustive attributesemicolon_if_nothing_returnedmultiple_crate_versions to correctly normalize package names to avoid missing the local oneno_effect_underscore_binding#[allow] attributes in single_call_fn lintarc_with_non_send_sync lintuse_tree_list parsingstruct from enum variantSelfParam better in "Inline call"for construct in convert to guarded return conditionsOUT_DIR when workspace root contains a symlinkvalue_ty query falliblemacro_rules as macro nameRusty Events between 2024-01-24 - 2024-02-21 🦀
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
The functional ML roots of the language, Graydon's first Rust compiler was written in OCaml, shine through, influencing it right from the start.
It's not "C++ but better".
It's Haskell standing on Lisp's shoulders, hiding in C's coat to sneak into PRDCTN. (The fancy nightclub where all the popular language's hang out)
– tris on his "No Boilerplate" Youtube channel
Thanks to PrototypeNM1 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