pub ThisWeekInRust {} – Telegram
pub ThisWeekInRust {}
989 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
Updates from core

mir-inlining: don't inline virtual calls
https://github.com/rust-lang/rust/pull/55046

reject partial init and reinit of uninitialized data
https://github.com/rust-lang/rust/pull/54941

improve verify_llvm_ir config option
https://github.com/rust-lang/rust/pull/55031

add missing lifetime fragment specifier to error message
https://github.com/rust-lang/rust/pull/55025

rustc: fix (again) simd vectors by-val in ABI
https://github.com/rust-lang/rust/pull/55073

resolve: scale back hard-coded extern prelude additions on 2015 edition
https://github.com/rust-lang/rust/pull/54671

resolve: do not skip extern prelude during speculative resolution
https://github.com/rust-lang/rust/pull/55102

allow explicit matches on ! without warning
https://github.com/rust-lang/rust/pull/55119

deduplicate some code and compile-time values around vtables
https://github.com/rust-lang/rust/pull/55016

NLL: propagate bounds from generators
https://github.com/rust-lang/rust/pull/55013

NLL lacks various special case handling of closures
https://github.com/rust-lang/rust/pull/54976

NLL: fix migrate mode issue by not buffering lints
https://github.com/rust-lang/rust/pull/55135

NLL: change compare-mode=nll to use borrowck=migrate
https://github.com/rust-lang/rust/pull/55134

NLL: use new region infer errors when explaining borrows
https://github.com/rust-lang/rust/pull/55069

NLL type annotations in multisegment path
https://github.com/rust-lang/rust/pull/55093

add filtering option to rustc_on_unimplemented and reword Iterator E0277 errors
https://github.com/rust-lang/rust/pull/54946

custom E0277 diagnostic for Path
https://github.com/rust-lang/rust/pull/54979

unused_patterns lint
https://github.com/rust-lang/rust/pull/54820

check the type of statics and constants for Sizedness
https://github.com/rust-lang/rust/pull/55004

miri: layout should not affect CTFE checks
https://github.com/rust-lang/rust/pull/55142

added graphviz visualization for obligation forests
https://github.com/rust-lang/rust/pull/54486

replace CanonicalVar with DebruijnIndex
https://github.com/rust-lang/rust/pull/52984

stabilize slice::chunks_exact(), chunks_exact_mut(), rchunks(), rchunks_mut(), rchunks_exact(), rchunks_exact_mut()
https://github.com/rust-lang/rust/pull/55178

add a copysign function to f32 and f64
https://github.com/rust-lang/rust/pull/55169

don't warn about parentheses on match (return)
https://github.com/rust-lang/rust/pull/55166

handle underscore bounds in unexpected places
https://github.com/rust-lang/rust/pull/55162

fix ICE and report a human readable error
https://github.com/rust-lang/rust/pull/55071

add slice::rchunks(), rchunks_mut(), rchunks_exact() and rchunks_exact_mut()
https://github.com/rust-lang/rust/pull/54580

unify multiple errors on single typo in match pattern
https://github.com/rust-lang/rust/pull/55156

fix LLVMRustInlineAsmVerify return type mismatch
https://github.com/rust-lang/rust/pull/55128

miri engine: hooks for basic stacked borrows
https://github.com/rust-lang/rust/pull/55125

add support for 'cargo check --all-features'
https://github.com/rust-lang/rust.vim/pull/265

cargo: add PackageError wrappers for activation errors
https://github.com/rust-lang/cargo/pull/6175

rustdoc: use dyn keyword when rendering dynamic traits
https://github.com/rust-lang/rust/pull/55077

rustdoc: don't prefer dynamic linking in doc tests
https://github.com/rust-lang/rust/pull/54939

rustdoc: add lint for doc without codeblocks
https://github.com/rust-lang/rust/pull/54349

detect if access to localStorage is forbidden by the user's browser
https://github.com/rust-lang/rust/pull/55080

librustdoc: disable spellcheck for search field
https://github.com/rust-lang/rust/pull/55161

crates.io: add a missing index on crates
https://github.com/rust-lang/crates.io/pull/1527
Crate of the week: static-assertions

This week's crate is static-assertions, a crate that does what it says on the tin – allow you to write static assertions. Thanks to llogiq for the suggestion!
Updates from core

compile the libstd we distribute with -Ccodegen-unit=1
https://github.com/rust-lang/rust/pull/55264

implement by-value object safety
https://github.com/rust-lang/rust/pull/54183

report const eval error inside the query
https://github.com/rust-lang/rust/pull/53821

path suggestions in Rust 2018 should point out the change in semantics
https://github.com/rust-lang/rust/pull/55185

suggest appropriate syntax on missing lifetime specifier in return type
https://github.com/rust-lang/rust/pull/55173

Macro diagnostics tweaks
https://github.com/rust-lang/rust/pull/55292

list allowed tokens after macro fragments
https://github.com/rust-lang/rust/pull/55301

make unused-parens suggestions heed what the user actually wrote
https://github.com/rust-lang/rust/pull/55138

fix suggestion on renamed import conflict
https://github.com/rust-lang/rust/pull/55113

suggest to remove prefix b in cfg attribute lint string
https://github.com/rust-lang/rust/pull/54929

lint reasons (RFC #2383, part 1)
https://github.com/rust-lang/rust/pull/54683

point at macro definition when no rules expect token
https://github.com/rust-lang/rust/pull/55298

fix an ICE in the min_const_fn analysis
https://github.com/rust-lang/rust/pull/55412

avoid unnecessary allocations in float_lit and integer_lit
https://github.com/rust-lang/rust/pull/55384

add a "cheap" mode for compute_missing_ctors
https://github.com/rust-lang/rust/pull/55167

use SmallVec for the queue in coerce_unsized
https://github.com/rust-lang/rust/pull/55383

shrink Statement
https://github.com/rust-lang/rust/pull/55346

introduce type-op for user-type anoscription in NLL
https://github.com/rust-lang/rust/pull/55323

NLL: cast causes failure to promote to static
https://github.com/rust-lang/rust/pull/55385

rustc: tweak filenames encoded into metadata
https://github.com/rust-lang/rust/pull/54626

unimplement ExactSizeIterator for MIR traversing iterators
https://github.com/rust-lang/rust/pull/55271

miri engine: stacked Borrows NG
https://github.com/rust-lang/rust/pull/55270

validity: assert that unions are non-empty
https://github.com/rust-lang/rust/pull/55379

allow extern statics with an extern type
https://github.com/rust-lang/rust/pull/55257

add extern crate items to extern prelude
https://github.com/rust-lang/rust/pull/54658

rewrite the UnconditionalRecursion lint to use MIR
https://github.com/rust-lang/rust/pull/54490

#[inline] a bunch of trivial methods of NonNull
https://github.com/rust-lang/rust/pull/55426

add ManuallyDrop::take
https://github.com/rust-lang/rust/pull/55421

add MaybeUninit::new
https://github.com/rust-lang/rust/pull/55244

add line numbers option to rustdoc
https://github.com/rust-lang/rust/pull/54921

fix rustdoc ICE when checking blanket impls
https://github.com/rust-lang/rust/pull/55258
Crate of the week: dutree

This week's crate is dutree, a command line tool that produces a colorful tree view of your disk usage. Thanks to gilescope for the suggestion!
Updates from core

fix DWARF generation for enums
https://github.com/rust-lang/rust/pull/54004

add libproc_macro to rust-src distribution
https://github.com/rust-lang/rust/pull/55280

remove the alloc_jemalloc crate
https://github.com/rust-lang/rust/pull/55238

add Retagging statements
https://github.com/rust-lang/rust/pull/55316

implement object-safety and dynamic dispatch for arbitrary_self_types
https://github.com/rust-lang/rust/pull/54383

universes refactor 3
https://github.com/rust-lang/rust/pull/55305

correct alignment of atomic types and (re)add Atomic{I,U}128
https://github.com/rust-lang/rust/pull/55410

rustc_target: pass contexts by reference, not value
https://github.com/rust-lang/rust/pull/55665

take advantage of impl Iterator in (transitive/elaborate)_bounds
https://github.com/rust-lang/rust/pull/55473

change a flat_map with 0/1-element vecs to a filter_map
https://github.com/rust-lang/rust/pull/55476

improve a few cases of collecting to an FxHash(Map/Set)
https://github.com/rust-lang/rust/pull/55205

crates.io: ensure only exact name matches are added to the index
https://github.com/rust-lang/crates.io/pull/1550

use SmallVec within MoveData
https://github.com/rust-lang/rust/pull/55574

tweak MatcherPos::matches
https://github.com/rust-lang/rust/pull/55558

make -Z ls list the actual filename of external dependencies
https://github.com/rust-lang/rust/pull/55555

syntax: improve a few allocations
https://github.com/rust-lang/rust/pull/55542

pass suggestions as impl Iterator instead of Vec
https://github.com/rust-lang/rust/pull/55536

fix invalid_const_promotion test on some archs
https://github.com/rust-lang/rust/pull/55575

add raw_entry API to HashMap
https://github.com/rust-lang/rust/pull/54043

cargo: configure tar to not set mtime
https://github.com/rust-lang/cargo/pull/6257

rustdoc: hide default impls items
https://github.com/rust-lang/rust/pull/54162

rustdoc: refactor: centralize all command-line argument parsing
https://github.com/rust-lang/rust/pull/55515
Crate of the week: parse_wiki_text

This week's crate is parse_wiki_text, a crate to parse MediaWiki entries into a tree of elements. Thanks to Fredrik for the suggestion!
Updates from core

remove support for building against LLVM 4
https://github.com/rust-lang/rust/pull/55698

use lld directly for Fuchsia target
https://github.com/rust-lang/rust/pull/55106

support memcpy/memmove with differing src/dst alignment
https://github.com/rust-lang/rust/pull/55633

treat "proc-macro" crate type the same as proc-macro = true
https://github.com/rust-lang/cargo/pull/6256

custom diagnostic when trying to doc comment argument
https://github.com/rust-lang/rust/pull/55451

enforce unused-must-use lint in macros
https://github.com/rust-lang/rust/pull/55569

don't print opt fuel messages to stdout because it breaks Rustbuild
https://github.com/rust-lang/rust/pull/55495

NLL: fix ICE with elided lifetimes
https://github.com/rust-lang/rust/pull/55822

NLL: update box insensitivity test
https://github.com/rust-lang/rust/pull/55801

NLL: missing errors for borrows of union fields
https://github.com/rust-lang/rust/pull/55696

NLL: unions not reinitialized after assignment into field
https://github.com/rust-lang/rust/pull/55657

consume optimization fuel from the MIR inliner
https://github.com/rust-lang/rust/pull/55739

take supertraits into account when calculating associated types
https://github.com/rust-lang/rust/pull/55687

typecheck patterns of all match arms first, so we get types for bindings
https://github.com/rust-lang/rust/pull/55819

don't inline virtual calls (take 2)
https://github.com/rust-lang/rust/pull/55802

use SmallVec to avoid allocations in from_decimal_string
https://github.com/rust-lang/rust/pull/55816

un-P my Lit! Don't allocate it in vain
https://github.com/rust-lang/rust/pull/55777

don't Box the TyCtxt::associated_items
https://github.com/rust-lang/rust/pull/55604

make MatcherPos::stack a SmallVec
https://github.com/rust-lang/rust/pull/55525

improve creation of 3 IndexVecs
https://github.com/rust-lang/rust/pull/55755

implement rotate using funnel shift on LLVM >= 7
https://github.com/rust-lang/rust/pull/55650

value visitors for miri
Value visitors for miri

remove the alloc_system crate
https://github.com/rust-lang/rust/pull/55660

std: improve codegen size of accessing TLS
https://github.com/rust-lang/rust/pull/55518

std: enable usage of thread_local! through imports
https://github.com/rust-lang/rust/pull/55597

choose predicates without inference variables over those with them
https://github.com/rust-lang/rust/pull/55453

minor standard library constification
https://github.com/rust-lang/rust/pull/55278

fix Rc/Arc allocation layout
https://github.com/rust-lang/rust/pull/55764

fix undefined behavior in Rc/Arc allocation
https://github.com/rust-lang/rust/pull/54922

cargo: avoid retaining all rustc output in memory
https://github.com/rust-lang/cargo/pull/6289

cargo: timeout batch downloads, not each download
https://github.com/rust-lang/cargo/pull/6285

cargo: small things to help with fuzz tests
https://github.com/rust-lang/cargo/pull/6274

cargo: don't include build noscripts in --out-dir
https://github.com/rust-lang/cargo/pull/6300
Crate of the week: cargo-nono

This week's crate is cargo-nono, a cargo subcommand to check a crate's dependencies for no-std compatibility. Thanks to Hobofan for the suggestion!
Updates from core

remove "approx env bounds" if we already know from trait
https://github.com/rust-lang/rust/pull/56043

resolve: implement uniform paths 2.0
https://github.com/rust-lang/rust/pull/56042

chalk lowering rule: ProjectionEq-Normalize
https://github.com/rust-lang/rust/pull/52153

miri backtrace improvements
https://github.com/rust-lang/rust/pull/55970

fix emission of niche-filling discriminant values
https://github.com/rust-lang/rust/pull/55701

avoid shared ref in UnsafeCell::get
https://github.com/rust-lang/rust/pull/56012

CTFE: dynamically make sure we do not call non-const-fn
https://github.com/rust-lang/rust/pull/56007

reattach all grandchildren when constructing specialization graph
https://github.com/rust-lang/rust/pull/54906

ty: return impl Iterator from Predicate::walk_tys
https://github.com/rust-lang/rust/pull/55949

a handful of hir tweaks
https://github.com/rust-lang/rust/pull/55930

make miri value visitor useful for mutation
https://github.com/rust-lang/rust/pull/55916

miri enum discriminant handling: Fix treatment of pointers, better error when it is undef
https://github.com/rust-lang/rust/pull/55894

more precise spans for temps and their drops
https://github.com/rust-lang/rust/pull/55781

reference count crate_inherent_implss return value
https://github.com/rust-lang/rust/pull/55882

unix RwLock: avoid racy access to write_locked
https://github.com/rust-lang/rust/pull/55865

forward the ABI of the non-zero sized fields of an union if they have the same ABI
https://github.com/rust-lang/rust/pull/55834

a few tweaks to iterations/collecting
https://github.com/rust-lang/rust/pull/55827

move static_assert! into librustc_data_structures
https://github.com/rust-lang/rust/pull/55805

wrap some query results in Lrc
https://github.com/rust-lang/rust/pull/55778

avoid converting bytes to UTF-8 strings to print, just pass bytes to stdout/err
https://github.com/rust-lang/rust/pull/55754

impl_stable_hash_for: support enums and tuple structs with generic parameters
https://github.com/rust-lang/rust/pull/55722

std: Synchronize access to global env during exec
https://github.com/rust-lang/rust/pull/55939

add mem::forget_unsized() for forgetting unsized values
https://github.com/rust-lang/rust/pull/55785

core/char: speed up to_digit() for radix <= 10
https://github.com/rust-lang/rust/pull/55932

add VecDeque::resize_with
https://github.com/rust-lang/rust/pull/56016

add FromIterator<A> to Box<[A]>
https://github.com/rust-lang/rust/pull/55843

speed up String::from_utf16
https://github.com/rust-lang/rust/pull/55530

cargo: add c alias for check
https://github.com/rust-lang/cargo/pull/6218

cargo: distinguish custom build invocations
https://github.com/rust-lang/cargo/pull/6331

cargo: allow crate_type=bin examples to run
https://github.com/rust-lang/cargo/pull/6330

rustdoc: properly calculate spans for intra-doc link resolution errors
https://github.com/rust-lang/rust/pull/55962
Crate of the week: cargo-sweep

This week's crate is cargo-sweep, a cargo subcommand to clean cargo's various temporaries. Thanks to Viktor Holmgren for the suggestion!