From c33c5dba7f972ed85a9309ed1c6fbc9ab9205330 Mon Sep 17 00:00:00 2001 From: Andre Bogus Date: Wed, 14 Feb 2024 10:57:11 +0100 Subject: [PATCH] C/QotW and notable changes --- draft/2024-02-14-this-week-in-rust.md | 155 +++++++++++++++++++++++++- 1 file changed, 152 insertions(+), 3 deletions(-) diff --git a/draft/2024-02-14-this-week-in-rust.md b/draft/2024-02-14-this-week-in-rust.md index 83b515154..62972f0aa 100644 --- a/draft/2024-02-14-this-week-in-rust.md +++ b/draft/2024-02-14-this-week-in-rust.md @@ -45,7 +45,9 @@ and just ask the editors to select the category. ## Crate of the Week - +This week's crate is [microflow](https://github.com/matteocarnelos/microflow-rs), a robust and efficient TinyML inference engine for embedded systems. + +Thanks to [matteocarnelos](https://users.rust-lang.org/t/crate-of-the-week/2704/1289) for the self-suggestion! [Please submit your suggestions and votes for next week][submit_crate]! @@ -78,7 +80,150 @@ If you are an event organizer hoping to expand the reach of your event, please s ## Updates from the Rust Project - +466 pull requests were [merged in the last week][merged] + +[merged]: https://github.com/search?q=is%3Apr+org%3Arust-lang+is%3Amerged+merged%3A2024-02-06..2024-02-13 + +* [add armv8r-none-eabihf target for the Cortex-R52](https://github.com/rust-lang/rust/pull/110482) +* [add lahfsahf and prfchw target feature](https://github.com/rust-lang/rust/pull/120965) +* [`check_consts`: fix duplicate errors, make importance consistent](https://github.com/rust-lang/rust/pull/120933) +* [`interpret/write_discriminant`: when encoding niched variant, ensure the stored value matches](https://github.com/rust-lang/rust/pull/120882) +* [`large_assignments`: Allow moves into functions](https://github.com/rust-lang/rust/pull/120773) +* [`pattern_analysis`: gather up place-relevant info](https://github.com/rust-lang/rust/pull/120633) +* [`pattern_analysis`: track usefulness without interior mutability](https://github.com/rust-lang/rust/pull/120324) +* [account for non-overlapping unmet trait bounds in suggestion](https://github.com/rust-lang/rust/pull/120507) +* [account for unbounded type param receiver in suggestions](https://github.com/rust-lang/rust/pull/120396) +* [add support for custom JSON targets when using build-std](https://github.com/rust-lang/rust/pull/120232) +* [add unstable `-Z direct-access-external-data` cmdline flag for `rustc`](https://github.com/rust-lang/rust/pull/119162) +* [allow restricted trait impls under `#[allow_internal_unstable(min_specialization)]`](https://github.com/rust-lang/rust/pull/120870) +* [always check the result of `pthread_mutex_lock`](https://github.com/rust-lang/rust/pull/120238) +* [avoid ICE in drop recursion check in case of invalid drop impls](https://github.com/rust-lang/rust/pull/120801) +* [avoid a collection and iteration on empty passes](https://github.com/rust-lang/rust/pull/120853) +* [avoid accessing the HIR in the happy path of `coherent_trait`](https://github.com/rust-lang/rust/pull/120835) +* [bail out of drop elaboration when encountering error types](https://github.com/rust-lang/rust/pull/120802) +* [build DebugInfo for async closures](https://github.com/rust-lang/rust/pull/120844) +* [check that the ABI of the instance we are inlining is correct](https://github.com/rust-lang/rust/pull/120944) +* [clean inlined type alias with correct param-env](https://github.com/rust-lang/rust/pull/120956) +* [continue to borrowck even if there were previous errors](https://github.com/rust-lang/rust/pull/120550) +* [coverage: split out counter increment sites from BCB node/edge counters](https://github.com/rust-lang/rust/pull/120564) +* [create `try_new` function for ThinBox](https://github.com/rust-lang/rust/pull/110483) +* [deduplicate `tcx.instance_mir(instance)` calls in `try_instance_mir`](https://github.com/rust-lang/rust/pull/120778) +* [don't expect early-bound region to be local when reporting errors in RPITIT well-formedness](https://github.com/rust-lang/rust/pull/120707) +* [don't skip coercions for types with errors](https://github.com/rust-lang/rust/pull/120895) +* [emit a diagnostic for invalid target options](https://github.com/rust-lang/rust/pull/120631) +* [emit more specific diagnostics when enums fail to cast with `as`](https://github.com/rust-lang/rust/pull/120822) +* [encode `coroutine_for_closure` for foreign crates](https://github.com/rust-lang/rust/pull/120897) +* [exhaustiveness: prefer "`0..MAX` not covered" to "`_` not covered"](https://github.com/rust-lang/rust/pull/120727) +* [fix ICE for deref coercions with type errors](https://github.com/rust-lang/rust/pull/120972) +* [fix `ErrorGuaranteed` unsoundness with stash/steal](https://github.com/rust-lang/rust/pull/120828) +* [fix cycle error when a static and a promoted are mutually recursive](https://github.com/rust-lang/rust/pull/120960) +* [fix more `ty::Error` ICEs in MIR passes](https://github.com/rust-lang/rust/pull/120817) +* [for E0223, suggest associated functions that are similar to the path](https://github.com/rust-lang/rust/pull/120632) +* [for a rigid projection, recursively look at the self type's item bounds to fix the `associated_type_bounds` feature](https://github.com/rust-lang/rust/pull/120584) +* [gracefully handle non-WF alias in `assemble_alias_bound_candidates_recur`](https://github.com/rust-lang/rust/pull/120899) +* [harmonize `AsyncFn` implementations, make async closures conditionally impl `Fn*` traits](https://github.com/rust-lang/rust/pull/120712) +* [hide impls if trait bound is proven from env](https://github.com/rust-lang/rust/pull/120836) +* [hir: make sure all `HirId`s have corresponding HIR Node`s`](https://github.com/rust-lang/rust/pull/120206) +* [improve 'generic param from outer item' error for `Self` and inside `static`/`const` items](https://github.com/rust-lang/rust/pull/119939) +* [improve normalization of `Pointee::Metadata`](https://github.com/rust-lang/rust/pull/120354) +* [improve pretty printing for associated items in trait objects](https://github.com/rust-lang/rust/pull/120739) +* [introduce `enter_forall` to supercede `instantiate_binder_with_placeholders`](https://github.com/rust-lang/rust/pull/120544) +* [lowering unnamed fields and anonymous adt](https://github.com/rust-lang/rust/pull/115367) +* [make `min_exhaustive_patterns` match `exhaustive_patterns` better](https://github.com/rust-lang/rust/pull/120775) +* [make it so that async-fn-in-trait is compatible with a concrete future in implementation](https://github.com/rust-lang/rust/pull/120103) +* [make privacy visitor use types more (instead of HIR)](https://github.com/rust-lang/rust/pull/113671) +* [make traits / trait methods detected by the dead code lint](https://github.com/rust-lang/rust/pull/118257) +* [mark "unused binding" suggestion as maybe incorrect](https://github.com/rust-lang/rust/pull/120470) +* [match lowering: consistently lower bindings deepest-first](https://github.com/rust-lang/rust/pull/120214) +* [merge `impl_polarity` and `impl_trait_ref` queries](https://github.com/rust-lang/rust/pull/120919) +* [more internal emit diagnostics cleanups](https://github.com/rust-lang/rust/pull/120833) +* [move path implementations into `sys`](https://github.com/rust-lang/rust/pull/120776) +* [normalize type outlives obligations in NLL for new solver](https://github.com/rust-lang/rust/pull/120513) +* [print image input file and checksum in CI only](https://github.com/rust-lang/rust/pull/120827) +* [print kind of coroutine closure](https://github.com/rust-lang/rust/pull/120896) +* [properly handle `async` block and `async fn` in `if` exprs without `else`](https://github.com/rust-lang/rust/pull/120696) +* [provide more suggestions on invalid equality where bounds](https://github.com/rust-lang/rust/pull/120751) +* [record coroutine kind in coroutine generics](https://github.com/rust-lang/rust/pull/120746) +* [remove some `unchecked_claim_error_was_emitted` calls](https://github.com/rust-lang/rust/pull/120735) +* [resolve: unload speculatively resolved crates before freezing cstore](https://github.com/rust-lang/rust/pull/119592) +* [rework support for async closures; allow them to return futures that borrow from the closure's captures](https://github.com/rust-lang/rust/pull/120361) +* [static mut: allow mutable reference to arbitrary types, not just slices and arrays](https://github.com/rust-lang/rust/pull/117614) +* [stop bailing out from compilation just because there were incoherent traits](https://github.com/rust-lang/rust/pull/120558) +* [suggest `[tail @ ..]` on `[..tail]` and `[...tail]` where `tail` is unresolved](https://github.com/rust-lang/rust/pull/120597) +* [suggest less bug-prone construction of Duration in docs](https://github.com/rust-lang/rust/pull/119242) +* [suggest name value cfg when only value is used for check-cfg](https://github.com/rust-lang/rust/pull/120435) +* [suggest pattern tests when modifying exhaustiveness](https://github.com/rust-lang/rust/pull/120763) +* [suggest turning `if let` into irrefutable `let` if appropriate](https://github.com/rust-lang/rust/pull/120479) +* [suppress suggestions in derive macro](https://github.com/rust-lang/rust/pull/120272) +* [take empty `where` bounds into account when suggesting predicates](https://github.com/rust-lang/rust/pull/120874) +* [toggle `assert_unsafe_precondition` in codegen instead of expansion](https://github.com/rust-lang/rust/pull/120594) +* [turn the "no saved object file in work product" ICE into a translatable fatal error](https://github.com/rust-lang/rust/pull/120865) +* [warn on references casting to bigger memory layout](https://github.com/rust-lang/rust/pull/118983) +* [unstably allow constants to refer to statics and read from immutable statics](https://github.com/rust-lang/rust/pull/119614) +* [use the same mir-opt bless targets on all platforms](https://github.com/rust-lang/rust/pull/120060) +* [enable MIR JumpThreading by default](https://github.com/rust-lang/rust/pull/117206) +* [fix mir pass ICE in the presence of other errors](https://github.com/rust-lang/rust/pull/120782) +* [miri: fix ICE with symbolic alignment check on extern static](https://github.com/rust-lang/rust/pull/120683) +* [miri: implement the `mmap64` foreign item](https://github.com/rust-lang/miri/pull/3285) +* [prevent running some code if it is already in the map](https://github.com/rust-lang/rust/pull/120579) +* [A trait's local impls are trivially coherent if there are no impls](https://github.com/rust-lang/rust/pull/120834) +* [use `ensure` when the result of the query is not needed beyond its `Result`ness](https://github.com/rust-lang/rust/pull/120771) +* [implement SystemTime for UEFI](https://github.com/rust-lang/rust/pull/120351) +* [implement sys/thread for UEFI](https://github.com/rust-lang/rust/pull/120938) +* [core/time: avoid divisions in `Duration::new`](https://github.com/rust-lang/rust/pull/120308) +* [core: add Duration constructors](https://github.com/rust-lang/rust/pull/120307) +* [make `NonZero` constructors generic](https://github.com/rust-lang/rust/pull/120521) +* [reconstify `Add`](https://github.com/rust-lang/rust/pull/120381) +* [replace pthread `RwLock` with custom implementation](https://github.com/rust-lang/rust/pull/110211) +* [simd intrinsics: add `simd_shuffle_generic` and other missing intrinsics](https://github.com/rust-lang/rust/pull/119213) +* [cargo: test-support: remove special case for `$message_type`](https://github.com/rust-lang/cargo/pull/13424) +* [cargo: don't add the new package to workspace.members if there is no existing workspace in Cargo.toml](https://github.com/rust-lang/cargo/pull/13391) +* [cargo: enable edition migration for 2024](https://github.com/rust-lang/cargo/pull/13429) +* [cargo: feat: add hint for adding members to workspace](https://github.com/rust-lang/cargo/pull/13411) +* [cargo: fix confusing error messages for sparse index replaced source](https://github.com/rust-lang/cargo/pull/13433) +* [cargo: fix: don't duplicate comments when editing TOML](https://github.com/rust-lang/cargo/pull/13402) +* [cargo: relax a test to permit warnings to be emitted, too](https://github.com/rust-lang/cargo/pull/13415) +* [rustdoc: Correctly generate path for non-local items in source code pages](https://github.com/rust-lang/rust/pull/120596) +* [bindgen: add target mappings for `riscv64imac` and `riscv32imafc`](https://github.com/rust-lang/rust-bindgen/pull/2751) +* [bindgen: feat: add `headers` option](https://github.com/rust-lang/rust-bindgen/pull/2743) +* [clippy: `mem_replace_with_default` No longer triggers on unused expression](https://github.com/rust-lang/rust-clippy/pull/12278) +* [clippy: `similar_names`: don't raise if the first character is different](https://github.com/rust-lang/rust-clippy/pull/12258) +* [clippy: `to_string_trait_impl`: avoid linting if the impl is a specialization](https://github.com/rust-lang/rust-clippy/pull/12264) +* [clippy: `unconditional_recursion`: compare by `Ty`s instead of DefId`s`](https://github.com/rust-lang/rust-clippy/pull/12177) +* [clippy: don't allow derive macros to silence `disallowed_macros`](https://github.com/rust-lang/rust-clippy/pull/12267) +* [clippy: don't lint `incompatible_msrv` in test code](https://github.com/rust-lang/rust-clippy/pull/12261) +* [clippy: extend `NONMINIMAL_BOOL` lint](https://github.com/rust-lang/rust-clippy/pull/12248) +* [clippy: fix broken URL in `Lint Configuration`](https://github.com/rust-lang/rust-clippy/pull/12272) +* [clippy: fix false positive in `redundant_type_annotations` lint](https://github.com/rust-lang/rust-clippy/pull/12216) +* [clippy: add autofixes for `unnecessary_fallible_conversions`](https://github.com/rust-lang/rust-clippy/pull/12070) +* [clippy: fix: ICE when array index exceeds usize](https://github.com/rust-lang/rust-clippy/pull/12266) +* [clippy: refactor `implied_bounds_in_impls` lint](https://github.com/rust-lang/rust-clippy/pull/12269) +* [clippy: return `Some` from `walk_to_expr_usage` more](https://github.com/rust-lang/rust-clippy/pull/11812) +* [clippy: stop linting `blocks_in_conditions` on `match` with weird attr macro case](https://github.com/rust-lang/rust-clippy/pull/12040) +* [rust-analyzer: abstract more over ItemTreeLoc-like structs](https://github.com/rust-lang/rust-analyzer/pull/16525) +* [rust-analyzer: better error message for when proc-macros have not yet been built](https://github.com/rust-lang/rust-analyzer/pull/16462) +* [rust-analyzer: add "unnecessary else" diagnostic and fix](https://github.com/rust-lang/rust-analyzer/pull/16502) +* [rust-analyzer: add break and return postfix keyword completions](https://github.com/rust-lang/rust-analyzer/pull/16454) +* [rust-analyzer: add diagnostic with fix to replace trailing `return ;` with ``](https://github.com/rust-lang/rust-analyzer/pull/16460) +* [rust-analyzer: add incorrect case diagnostics for traits and their associated items](https://github.com/rust-lang/rust-analyzer/pull/16477) +* [rust-analyzer: allow cargo check to run on only the current package](https://github.com/rust-lang/rust-analyzer/pull/16510) +* [rust-analyzer: completion list suggests constructor like & builder methods first](https://github.com/rust-lang/rust-analyzer/pull/16117) +* [rust-analyzer: improve support for ignored proc macros](https://github.com/rust-lang/rust-analyzer/pull/15923) +* [rust-analyzer: introduce term search to rust-analyzer](https://github.com/rust-lang/rust-analyzer/pull/16092) +* [rust-analyzer: create `UnindexedProject` notification to be sent to the client](https://github.com/rust-lang/rust-analyzer/pull/15863) +* [rust-analyzer: substitute `$saved_file` in custom check commands](https://github.com/rust-lang/rust-analyzer/pull/15476) +* [rust-analyzer: fix incorrect inlining of functions that come from MBE macros](https://github.com/rust-lang/rust-analyzer/pull/16497) +* [rust-analyzer: `waker_getters` tracking issue from 87021 for 96992](https://github.com/rust-lang/rust-analyzer/pull/16134) +* [rust-analyzer: fix macro transcriber emitting incorrect lifetime tokens](https://github.com/rust-lang/rust-analyzer/pull/16530) +* [rust-analyzer: fix target layout fetching](https://github.com/rust-lang/rust-analyzer/pull/16545) +* [rust-analyzer: fix tuple structs not rendering visibility in their fields](https://github.com/rust-lang/rust-analyzer/pull/16509) +* [rust-analyzer: highlight rustdoc](https://github.com/rust-lang/rust-analyzer/pull/16541) +* [rust-analyzer: preserve where clause when builtin derive](https://github.com/rust-lang/rust-analyzer/pull/16484) +* [rust-analyzer: recover from missing argument in call expressions](https://github.com/rust-lang/rust-analyzer/pull/16124) +* [rust-analyzer: remove unnecessary `.as_ref()` in generate getter assist](https://github.com/rust-lang/rust-analyzer/pull/16487) +* [rust-analyzer: validate literals in proc-macro-srv `FreeFunctions::literal_from_str`](https://github.com/rust-lang/rust-analyzer/pull/16547) +* [rust-analyzer: implement `literal_from_str` for proc macro server](https://github.com/rust-lang/rust-analyzer/pull/16446) +* [rust-analyzer: implement convert to guarded return assist for `let` statement with type that implements `std::ops::Try`](https://github.com/rust-lang/rust-analyzer/pull/16424) ### Rust Compiler Performance Triage @@ -256,7 +401,11 @@ Please see the latest [Who's Hiring thread on r/rust](INSERT_LINK_HERE) # Quote of the Week - +> 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](https://wiki.alopex.li/ElixirNitpicks#Misc) + +Thanks to [Brian Kung](https://users.rust-lang.org/t/twir-quote-of-the-week/328/1522) for the suggestion! [Please submit quotes and vote for next week!](https://users.rust-lang.org/t/twir-quote-of-the-week/328)