pub ThisWeekInRust {} – Telegram
pub ThisWeekInRust {}
990 subscribers
2 photos
2.41K links
Handpicked Rust updates,
delivered to your telegram.

Contacts: @sergeysova
Reposted from: https://this-week-in-rust.org
Source code: https://github.com/sergeysova/this_week_in_rust.rs
Another: @this_week_in_react
Download Telegram
Crate of the week: typetag

This week's crate is typetag, a small crate to allow for serde trait objects. Thanks to Christopher Durham for the suggestion!
Updates from core

HirIdification: add key HirId methods
https://github.com/rust-lang/rust/pull/58090

don't panic when accessing enum variant ctor using Self in match
https://github.com/rust-lang/rust/pull/58007

use LLVM intrinsics for saturating add/sub
https://github.com/rust-lang/rust/pull/58003

add MOVBE x86 CPU feature
https://github.com/rust-lang/rust/pull/57999

NVPTX target specification
https://github.com/rust-lang/rust/pull/57937

fix bug in integer range matching
https://github.com/rust-lang/rust/pull/57978

unused variable suggestions apply on all patterns
https://github.com/rust-lang/rust/pull/57899

add information to higher-ranked lifetimes conflicts error messages
https://github.com/rust-lang/rust/pull/57901

rustc: use multiple threads by default
https://github.com/rust-lang/rust/pull/57948

misc performance tweaks
https://github.com/rust-lang/rust/pull/57916

simplify ConstValue::ScalarPair
https://github.com/rust-lang/rust/pull/57442

mark str::trim* functions as #[must_use]
https://github.com/rust-lang/rust/pull/57106

override VecDeque's Iter::try_fold
https://github.com/rust-lang/rust/pull/57974

introduce into_raw_non_null on Rc and Arc
https://github.com/rust-lang/rust/pull/57934

implement Weak::{strong_count, weak_count}
https://github.com/rust-lang/rust/pull/56696

rename iter::unfold to iter::from_fn and remove explicit state
https://github.com/rust-lang/rust/pull/58062

stabilize std::error::Error::type_id
https://github.com/rust-lang/rust/pull/58048

stabilize split_ascii_whitespace
https://github.com/rust-lang/rust/pull/58047

cargo: fix overlapping progress with stdout
https://github.com/rust-lang/cargo/pull/6618

cargo: improve progress bar flickering
https://github.com/rust-lang/cargo/pull/6615
Crate of the week: log-derive

This week's crate is log-derive, a procedural macro to log function outputs. Thanks to elichai2 for the suggestion!
Updates from core

Initial addition of the Embedded Rust Book.
https://github.com/rust-lang/rust/pull/56291

Add const generics to the AST.
https://github.com/rust-lang/rust/pull/58191

Error on duplicate matcher bindings.
https://github.com/rust-lang/rust/pull/57617

libc: RFC 2235 - Implement PartialEq,Eq,Hash,Debug for all types.
https://github.com/rust-lang/libc/pull/1217

Lower constant patterns with ascribed types.
https://github.com/rust-lang/rust/pull/58161

Make intern_lazy_const actually intern its argument.
https://github.com/rust-lang/rust/pull/58207

Avoid committing to autoderef in object method probing.
https://github.com/rust-lang/rust/pull/57885

Add #[must_use] to core::task::Poll.
https://github.com/rust-lang/rust/pull/58145

Add #[must_use] message to Fn* traits.
https://github.com/rust-lang/rust/pull/58262

Avoid some bounds checks in binary_heap::{PeekMut,Hole}.
https://github.com/rust-lang/rust/pull/58123

Make -Zdump-mir dump shims.
https://github.com/rust-lang/rust/pull/58103

Cargo: Bail when trying to run "test --doc --no-run".
https://github.com/rust-lang/cargo/pull/6628

Improve error message and docs for non-UTF-8 bytes in stdio on Windows.
https://github.com/rust-lang/rust/pull/58136

Move privacy checking later in the pipeline and make some passes run in parallel.
https://github.com/rust-lang/rust/pull/58010

Overhaul syntax::fold::Folder.
https://github.com/rust-lang/rust/pull/58061

Factor out error reporting from smart_resolve_path_fragment fn.
https://github.com/rust-lang/rust/pull/58065

Do not ICE in codegen when using a extern_type static.
https://github.com/rust-lang/rust/pull/58192

hir: add more HirId methods.
https://github.com/rust-lang/rust/pull/58139

Implement more detailed self profiling.
https://github.com/rust-lang/rust/pull/58085

Add a forever unstable opt-out of const qualification checks.
https://github.com/rust-lang/rust/pull/56123

Initial implementation of rustfixable unused_imports lint.
https://github.com/rust-lang/rust/pull/56645

Add a query type which is always marked as red if it runs.
https://github.com/rust-lang/rust/pull/57770

Don't try to clean predicates involving ReErased.
https://github.com/rust-lang/rust/pull/57851

Deduplicate mismatched delimiter errors.
https://github.com/rust-lang/rust/pull/57944

Add suggestion for duplicated import.
https://github.com/rust-lang/rust/pull/57973

Allow #[repr(align(x))] on enums.
https://github.com/rust-lang/rust/pull/57998
Crate of the week: sysinfo

This week's crate is sysinfo, a system handler to get information and interact with processes. Thanks to GuillaumeGomez for the suggestion!
Updates from core

Implement incremental "fat" LTO
https://github.com/rust-lang/rust/pull/58378

Enable comparing fat pointers
https://github.com/rust-lang/rust/pull/58301

impl iter() for dyn Error
https://github.com/rust-lang/rust/pull/58289

Improve the error messages for missing stability attributes
https://github.com/rust-lang/rust/pull/58276

Cut down on number formating code size
https://github.com/rust-lang/rust/pull/58272

Reduce the size of hir::Expr
https://github.com/rust-lang/rust/pull/58258

Make saturating_add and saturating_sub const functions
https://github.com/rust-lang/rust/pull/58246

Stabilize slice_sort_by_cached_key
https://github.com/rust-lang/rust/pull/58074

Stabilize str::escape_* methods with new return types
https://github.com/rust-lang/rust/pull/58051

Stabilize the time_checked_add feature
https://github.com/rust-lang/rust/pull/58034

Update the future/task API
https://github.com/rust-lang/rust/pull/57992

Speed up the fast path for assert_eq! and assert_ne!
https://github.com/rust-lang/rust/pull/57815

cargo: Stabilize Alternative Registries
https://github.com/rust-lang/cargo/pull/6654
Crate of the week: num-format

This week's crate is num-format, a crate to format numbers to international standards. Thanks to Vikrant for the suggestion!
Updates from core

Add an unstable option to build proc macros for both the host and the target
https://github.com/rust-lang/cargo/pull/6547

Avoid ICE when region sneaks into impl trait
https://github.com/rust-lang/rust/pull/58649

Add const generics to the HIR
https://github.com/rust-lang/rust/pull/58503

Improve parsing diagnostic for negative supertrait bounds
https://github.com/rust-lang/rust/pull/57364

Optimise vec![false; N] to zero-alloc
https://github.com/rust-lang/rust/pull/58628

Add expected/provided byte alignments to validation error message
https://github.com/rust-lang/rust/pull/58658

Remove LazyTokenStream
https://github.com/rust-lang/rust/pull/58476

Add better error message for partial move
https://github.com/rust-lang/rust/pull/58199

Suggest removing parentheses surrounding lifetimes
https://github.com/rust-lang/rust/pull/58198

Use normal mutable borrows in matches
https://github.com/rust-lang/rust/pull/57609

Monomorphize less code in fs::{read, write}
https://github.com/rust-lang/rust/pull/58530

Make overflowing and wrapping negation const
https://github.com/rust-lang/rust/pull/58044

Fix overlapping references in BTree
https://github.com/rust-lang/rust/pull/58431

Relax some Ord bounds on BinaryHeap
https://github.com/rust-lang/rust/pull/58421

Relax some Hash bounds on HashMap and HashSet
https://github.com/rust-lang/rust/pull/58370

Turn duration consts into associated consts
https://github.com/rust-lang/rust/pull/58595

RangeInclusive internal iteration performance improvement
https://github.com/rust-lang/rust/pull/58122

Override VecDeque::try_rfold, also update iterator
https://github.com/rust-lang/rust/pull/58064

Stabilize TryFrom and TryInto with a convert::Infallible empty enum
https://github.com/rust-lang/rust/pull/58302

Stabilize iter::successors and iter::from_fn
https://github.com/rust-lang/rust/pull/58576

Destabilize fixed-width const defined atomic integers
https://github.com/rust-lang/rust/pull/58616

Deprecate the unstable Vec::resize_default
https://github.com/rust-lang/rust/pull/57656

Modify doctest's auto-fn main() to allow Results
https://github.com/rust-lang/rust/pull/56470

crates.io: Stop logging the referer header
https://github.com/rust-lang/crates.io/pull/1636
Crate of the week: shellfn

This week's crate is shellfn, a proc macro to easily and safely use shell noscripts in Rust. Thanks to Willi Kappler for the suggestion!
Updates from core

Support defining C compatible variadic functions
https://github.com/rust-lang/rust/pull/57760

Fix C-variadic function printing
https://github.com/rust-lang/rust/pull/58865

Add support for using a jobserver with Rayon
https://github.com/rust-lang/rust/pull/56946

Stabilize unrestricted_attribute_tokens
https://github.com/rust-lang/rust/pull/57367

Include bounds from promoted constants in NLL
https://github.com/rust-lang/rust/pull/57202

NLL: Type check operations with pointer types
https://github.com/rust-lang/rust/pull/58673

NLL: Remove LiveVar
https://github.com/rust-lang/rust/pull/58505

Self-Profiler: Make the profiler faster/more efficient
https://github.com/rust-lang/rust/pull/58425

Normalize the type Self resolves to in an impl
https://github.com/rust-lang/rust/pull/58757

Use internal iteration in all methods of Filter and FilterMap
https://github.com/rust-lang/rust/pull/58730
Crate of the week: multi_try

This week's crate is multi_try, a crate to simplify working with multiple results. Thanks to Azriel Hoh for the suggestion!