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
Crate of the week: packed_simd

This week's crate is packed_simd, a crate with portable SIMD vector types. Thanks to Gabriel Majeri for the suggestion!
Updates from core

Stabilize pattern_parentheses feature.
https://github.com/rust-lang/rust/pull/54497

Support an explicit annotation for marker traits.
https://github.com/rust-lang/rust/pull/53693

Better user experience when attempting to call associated functions with dot notation.
https://github.com/rust-lang/rust/pull/54308

Add "temporary value borrowed for too long" error.
https://github.com/rust-lang/rust/pull/54164

Remove -Z disable_ast_check_for_mutation_in_guard.
https://github.com/rust-lang/rust/pull/54676

Add a -C default-linker-libraries option.
https://github.com/rust-lang/rust/pull/54675

Implement the dbg!(..) macro.
https://github.com/rust-lang/rust/pull/54317

Add -Z emit-stack-sizes.
https://github.com/rust-lang/rust/pull/51946

impl trait in bindings (feature: impl-trait-existential-types.
https://github.com/rust-lang/rust/pull/53542

Make "await" a pseudo-edition keyword.
https://github.com/rust-lang/rust/pull/54411

Use full name to identify a macro in a FileName.
https://github.com/rust-lang/rust/pull/54338

Introduce the partition_dedup/by/by_key methods for slices.
https://github.com/rust-lang/rust/pull/54058

Rework how we handle outlives relationships.
https://github.com/rust-lang/rust/pull/54453

NLL: Get Polonius borrow check to work in simple cases.
https://github.com/rust-lang/rust/pull/54468

NLL: Be more permissive when checking access due to Match.
https://github.com/rust-lang/rust/pull/53438

NLL: Rework checking for borrows conflicting with drops.
https://github.com/rust-lang/rust/pull/54509

Don't lint non-extern-prelude extern crate's in Rust 2018.
https://github.com/rust-lang/rust/pull/54650

Deny the overflowing_literals lint for the 2018 edition.
https://github.com/rust-lang/rust/pull/54507

Rename slice::exact_chunks() to slice::chunks_exact().
https://github.com/rust-lang/rust/pull/54537

Avoid loading constructor attributes in AdtDef decoding.
https://github.com/rust-lang/rust/pull/54485

Panic when using mem::uninitialized or mem::zeroed on an uninhabited type.
https://github.com/rust-lang/rust/pull/54667

Improvements to finding LLVM's FileCheck.
https://github.com/rust-lang/rust/pull/54558

In which we include attributes in unused extern crate suggestion spans.
https://github.com/rust-lang/rust/pull/54488

In which inferable outlives-requirements are linted.
https://github.com/rust-lang/rust/pull/53013

Add a per-tree error cache to the obligation forest.
https://github.com/rust-lang/rust/pull/53255
News

Announcing the web-sys crate!
https://rustwasm.github.io/2018/09/26/announcing-web-sys.html

The relative performance of C and Rust.
http://dtrace.org/blogs/bmc/2018/09/28/the-relative-performance-of-c-and-rust/

Understanding compilers — for humans (version 2).
https://towardsdatascience.com/understanding-compilers-for-humans-version-2-157f0edb02dd

How I’ve found vulnerability in a popular Rust crate (and you can too).
https://medium.com/@shnatsel/how-ive-found-vulnerability-in-a-popular-rust-crate-and-you-can-too-3db081a67fb

lolbench: automagically and empirically discovering Rust performance regressions.
https://blog.anp.lol/rust/2018/09/29/lolbench/

This week in Rust and WebAssembly 8.
https://rustwasm.github.io/2018/10/01/this-week-in-rust-wasm-008.html

The embedded WG newsletter 12.
https://rust-embedded.github.io/blog/2018-09-25-newsletter-12/
Crate of the week: Evcxr

This week's crate is Evcxr, a Rust REPL and Rust Jupyter Kernel. Thanks to Willi Kappler for the suggestion!
Updates from core

merge proc_macro_ expansion feature gates as proc_macro_hygiene
https://github.com/rust-lang/rust/pull/52121

proptest basic validation
https://github.com/rust-lang/cargo/pull/6149

allow both explicit and elided lifetimes in the same impl header
https://github.com/rust-lang/rust/pull/54458

do not promote comparing function pointers
https://github.com/rust-lang/rust/pull/54702

nest the impl Trait existential item inside the return type
https://github.com/rust-lang/rust/pull/54741

do not normalize all non-scalar constants to a ConstValue::ScalarPair
https://github.com/rust-lang/rust/pull/54693

fix dead code lint for functions using impl Trait
https://github.com/rust-lang/rust/pull/54810

add suggestion for inverted function parameters
https://github.com/rust-lang/rust/pull/54804

suggest to use self for fake-self from other languages
https://github.com/rust-lang/rust/pull/54694

NLL: improve move error loop detection
https://github.com/rust-lang/rust/pull/54343

make NLL suggest "try removing &mut here"
https://github.com/rust-lang/rust/pull/54720

introduce TyKind::UnnormalizedProjection
https://github.com/rust-lang/rust/pull/54789

stabilize min_const_fn
https://github.com/rust-lang/rust/pull/54835

improve error message when trying to move from an Rc or Arc
https://github.com/rust-lang/rust/pull/54703

revisit work on cvoid
https://github.com/rust-lang/libc/pull/1086

fix Once perf regression
https://github.com/rust-lang/rust/pull/54662

make CStr::from_bytes_with_nul_unchecked() a const fn
https://github.com/rust-lang/rust/pull/54745

std: start implementing wasm32 atomics
https://github.com/rust-lang/rust/pull/54017

make spec_extend use for_each()
https://github.com/rust-lang/rust/pull/54761
Crate of the week: pest

This week's crate is pest, a Parsing Expression Grammar-based parser library. Thanks to CAD97 for the suggestion!
Updates from core

rustc: allow targets to specify SIMD args are by-val
https://github.com/rust-lang/rust/pull/55024

stabilize tool lints
https://github.com/rust-lang/rust/pull/54870

user annotations in patterns
https://github.com/rust-lang/rust/pull/54757

impl Eq+Hash for TyLayout
https://github.com/rust-lang/rust/pull/54936

prepare miri engine for enforcing validity invariant during execution
https://github.com/rust-lang/rust/pull/54762

miri engine: fix run-time validation
https://github.com/rust-lang/rust/pull/54955

fix handling of #[must_use] on unit and uninhabited types
https://github.com/rust-lang/rust/pull/54920

#[must_use] for associated functions is supposed to actually work
https://github.com/rust-lang/rust/pull/55003

the #[panic_handler] attribute can be applied to non-functions
https://github.com/rust-lang/rust/pull/54997

NLL is missing struct field suggestion
https://github.com/rust-lang/rust/pull/54831

add chalk rules related to associated type defs
https://github.com/rust-lang/rust/pull/54909

better Diagnostic for Trait Object Capture
https://github.com/rust-lang/rust/pull/54848

structured suggestions for unused-lifetimes lint
https://github.com/rust-lang/rust/pull/54686

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

use MaybeUninit in liballoc
https://github.com/rust-lang/rust/pull/54924

stabilize the Option::replace method
https://github.com/rust-lang/rust/pull/54904

std: implement Thread-local storage for wasm32-unknown-unknown
https://github.com/rust-lang/rust/pull/54951

std: synchronize global allocator on wasm32
https://github.com/rust-lang/rust/pull/54950

rustdoc: fix mobile docs
https://github.com/rust-lang/rust/pull/54869
Crate of the week: Noria

This week's crate is Noria, a new streaming data-flow system designed to act as a fast storage backend for read-heavy web applications. Thanks to Stevensonmt for the suggestion!
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