Skip to content

C/QotW + notable changes #3336

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 9, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
100 changes: 97 additions & 3 deletions draft/2022-06-08-this-week-in-rust.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ and just ask the editors to select the category.

## Crate of the Week

<!-- COTW goes here -->
This week's crate is [osmpbf](https://lib.rs/crates/osmpbf) an OpenStreetMap pbf-file reader.

Thanks to [Kornel](https://users.rust-lang.org/t/crate-of-the-week/2704/1065) for the suggestion.

[Please submit your suggestions and votes for next week][submit_crate]!

Expand All @@ -70,7 +72,93 @@ If you are a Rust project owner and are looking for contributors, please submit

## Updates from the Rust Project

<!-- Rust updates go here -->
385 pull requests were [merged in the last week][merged]

[merged]: https://github.com/search?q=is%3Apr+org%3Arust-lang+is%3Amerged+merged%3A2022-05-30..2022-06-06

* [support the `#[expect]` attribute on fn parameters](https://github.com/rust-lang/rust/pull/97715) (RFC #[2383](https://rust-lang.github.io/rfcs/2383-lint-reasons.html))
* [tighten spans for bad fields in struct deriving `Copy`](https://github.com/rust-lang/rust/pull/97722)
* [add a suggestion to replace parentheses with angle brackets on associated trait constraint](https://github.com/rust-lang/rust/pull/97656)
* [diagnose anonymous lifetimes errors more uniformly between async and regular fns](https://github.com/rust-lang/rust/pull/97023)
* [do not ICE when failing to normalize during inlining](https://github.com/rust-lang/rust/pull/97696)
* [fail gracefully when encountering an HRTB in APIT](https://github.com/rust-lang/rust/pull/97683)
* [fix reachability analysis for const methods](https://github.com/rust-lang/rust/pull/97716)
* [fix wrong suggestion for adding where clauses](https://github.com/rust-lang/rust/pull/97640)
* [suggest `extern crate foo` when failing to resolve `use foo`](https://github.com/rust-lang/rust/pull/97264)
* [suggest adding `{}` for `'label: non_block_expr`](https://github.com/rust-lang/rust/pull/97759)
* [suggest adding a semicolon to a closure without block](https://github.com/rust-lang/rust/pull/97371)
* [suggest `?` when method is missing on `Result<T, _>` but found on `T`](https://github.com/rust-lang/rust/pull/96271)
* [use strict provenance APIs](https://github.com/rust-lang/rust/pull/97764)
* [provide more context when denying invalid type params](https://github.com/rust-lang/rust/pull/97471)
* [optimize the diagnostic generation for `extern unsafe`](https://github.com/rust-lang/rust/pull/97172)
* [improve soundness of `rustc_data_structures`](https://github.com/rust-lang/rust/pull/97707)
* [on E0204 suggest missing type param bounds](https://github.com/rust-lang/rust/pull/97664)
* [interpret: better control over whether we read data with provenance](https://github.com/rust-lang/rust/pull/97684)
* [miri: add support for `_COARSE` clocks](https://github.com/rust-lang/miri/pull/2165)
* [miri: save a created event for zero-size reborrows](https://github.com/rust-lang/miri/pull/2145)
* [miri: weak memory emulation using store buffers](https://github.com/rust-lang/miri/pull/1963)
* [miri: adjust for better provenance control](https://github.com/rust-lang/miri/pull/2183)
* [miri: make Miri's scheduler proper round-robin](https://github.com/rust-lang/miri/pull/2197)
* [iterate over `maybe_unused_trait_imports` when checking dead trait imports](https://github.com/rust-lang/rust/pull/97609)
* [inline `bridge::Buffer` methods](https://github.com/rust-lang/rust/pull/97604)
* [lazify `SourceFile::lines`](https://github.com/rust-lang/rust/pull/97575)
* [lazily allocate and initialize pthread locks](https://github.com/rust-lang/rust/pull/97647)
* [add windows application manifest to rustc-main](https://github.com/rust-lang/rust/pull/96737)
* [Implement faster memcmp for x86_64](https://github.com/rust-lang/compiler-builtins/pull/467)
* [inline `Vec`'s `Deref/DerefMut`](https://github.com/rust-lang/rust/pull/97553)
* [add unicode fast path to `is_printable`](https://github.com/rust-lang/rust/pull/97526)
* [additional `*mut [T]` methods](https://github.com/rust-lang/rust/pull/95594)
* [expose `get_many_mut` and `get_many_unchecked_mut` to `HashMap`](https://github.com/rust-lang/rust/pull/94647)
* [implement `[OsStr]::join`](https://github.com/rust-lang/rust/pull/96881) &nbsp;
* [make `from{,_mut}_ptr_range` const](https://github.com/rust-lang/rust/pull/97419)
* [stabilize `box_into_pin`](https://github.com/rust-lang/rust/pull/97397)
* [stabilize `toowned_clone_into`](https://github.com/rust-lang/rust/pull/97455)
* [stabilize {slice, array}`::from_ref`](https://github.com/rust-lang/rust/pull/97366)
* [hashbrown: add shortcircuit in iteration if we yielded all elements](https://github.com/rust-lang/hashbrown/pull/338)
* [futures: fix orderings in `LocalPool` waker](https://github.com/rust-lang/futures-rs/pull/2608)
* [futures: switch to `FuturesOrdered` dynamically in `try_join_all`](https://github.com/rust-lang/futures-rs/pull/2556)
* [futures: stream: fix `Chunk` adapters size hints](https://github.com/rust-lang/futures-rs/pull/2611)
* [cargo: emit warning upon encountering multiple packages with the same name](https://github.com/rust-lang/cargo/pull/10701)
* [cargo: expose rust-version through env var](https://github.com/rust-lang/cargo/pull/10713)
* [rustdoc: improve calculation of "Impls on Foreign Types"](https://github.com/rust-lang/rust/pull/97613)
* [rustdoc: also index impl trait and raw pointers](https://github.com/rust-lang/rust/pull/97592)
* [rustdoc: avoid including impl blocks with filled-in generics](https://github.com/rust-lang/rust/pull/97130)
* [clippy: clippy book](https://github.com/rust-lang/rust-clippy/pull/7359)
* [clippy: add lint `almost_complete_letter_range`](https://github.com/rust-lang/rust-clippy/pull/8918)
* [clippy: add lint `needless_parens_on_range_literals`](https://github.com/rust-lang/rust-clippy/pull/8933)
* [clippy: add lint `mismatching_type_param_order`](https://github.com/rust-lang/rust-clippy/pull/8831)
* [clippy: new lint `swap_ptr_to_ref`](https://github.com/rust-lang/rust-clippy/pull/8916)
* [clippy: new lint: `borrow_deref_ref`](https://github.com/rust-lang/rust-clippy/pull/7930)
* [clippy: add `as_underscore` lint](https://github.com/rust-lang/rust-clippy/pull/8934)
* [clippy: improve `for_loops_over_fallibles` to detect the usage of iter, iter_mut and into_iterator](https://github.com/rust-lang/rust-clippy/pull/8941)
* [clippy: fix `use_self` false negative with on struct and tuple struct patterns](https://github.com/rust-lang/rust-clippy/pull/8899)
* [clippy: fix `manual_range_contains` false negative with chains of `&&` and `||`](https://github.com/rust-lang/rust-clippy/pull/8884)
* [clippy: when setting suggestion for significant_drop_in_scrutinee, add suggestion for MoveAndClone for non-ref](https://github.com/rust-lang/rust-clippy/pull/8902)
* [clippy: `needless_return` checks for macro expr in return stmts](https://github.com/rust-lang/rust-clippy/pull/8932)
* [clippy: don't lint `useless_transmute` on types with erased regions](https://github.com/rust-lang/rust-clippy/pull/8564)
* [clippy: `cast_abs_to_unsigned`: do not remove cast if it's required](https://github.com/rust-lang/rust-clippy/pull/8876)
* [clippy: remove `large_enum_variant` suggestion for `Copy` types](https://github.com/rust-lang/rust-clippy/pull/8906)
* [clippy: fix `manual_find_map` and `manual_filter_map`: check clone method](https://github.com/rust-lang/rust-clippy/pull/8930)
* [clippy: fix ICE in shadow lints](https://github.com/rust-lang/rust-clippy/pull/8913)
* [clippy: needless_late_init: fix ICE when all branches return the never type](https://github.com/rust-lang/rust-clippy/pull/8912)
* [clippy: set correct `ParamEnv` for `derive_partial_eq_without_eq`](https://github.com/rust-lang/rust-clippy/pull/8869)
* [rust-analyzer: increase worker thread stack and name them](https://github.com/rust-lang/rust-analyzer/pull/12466)
* [rust-analyzer: move trait_impl completion analysis into CompletionContext](https://github.com/rust-lang/rust-analyzer/pull/12461)
* [rust-analyzer: order auto-imports by relevance](https://github.com/rust-lang/rust-analyzer/pull/12333)
* [rust-analyzer: cleaer status bar bg color / command when server status returns to OK](https://github.com/rust-lang/rust-analyzer/pull/12435)
* [rust-analyzer: support `$$` in macros](https://github.com/rust-lang/rust-analyzer/pull/12451)
* [rust-analyzer: `Merge imports` assist can merge multiple selected imports](https://github.com/rust-lang/rust-analyzer/pull/12452)
* [rust-analyzer: don't remove diagnostic with empty message](https://github.com/rust-lang/rust-analyzer/pull/12440)
* [rust-analyzer: resolving import panics and improve import resolution](https://github.com/rust-lang/rust-analyzer/pull/12347)
* [rust-analyzer: type-mismatch when using equals w/ a trait bound](https://github.com/rust-lang/rust-analyzer/pull/12336)
* [rust-analyzer: cleanup output channels when restarting server](https://github.com/rust-lang/rust-analyzer/pull/12470)
* [rust-analyzer: fix VSCode config patching incorrectly patching some configs](https://github.com/rust-lang/rust-analyzer/pull/12427)
* [rust-analyzer: fix completions disappearing when typing two keys in quick succession](https://github.com/rust-lang/rust-analyzer/pull/12431)
* [rust-analyzer: fix match to if let assist for wildcard pats](https://github.com/rust-lang/rust-analyzer/pull/12467)
* [rust-analyzer: fix trait impl completions using wrong insert position](https://github.com/rust-lang/rust-analyzer/pull/12475)
* [rust-analyzer: restart the server instead of reloading the window when config changes](https://github.com/rust-lang/rust-analyzer/pull/12471)
* [rust-analyzer: float display impl](https://github.com/rust-lang/rust-analyzer/pull/12425)
* [rust-analyzer: parsing of `?` opt-out trait bounds](https://github.com/rust-lang/rust-analyzer/pull/12444)

### Rust Compiler Performance Triage

Expand Down Expand Up @@ -186,7 +274,13 @@ They should be of the form:

# Quote of the Week

<!-- QOTW goes here -->
> I wrote a bespoke time-series database in Rust a few years ago, and it has had exactly one issue since I stood it up in production, and that was due to pessimistic filesystem access patterns, rather than the language. This thing is handling hundreds of thousands of inserts per second, and it's even threaded.
>
> Given that I've been programming professionally for over a decade in Python, Perl, Ruby, C, C++, Javascript, Java, and Rust, I'll pick Rust absolutely any time that I want something running that I won't get called at 3 AM to fix. It probably took me 5 times as long to write it as if I did it in Go or Python, but I guarantee it's saved me 10 times as much time I would have otherwise spent triaging, debugging, and running disaster recovery.

– [Taywee on hacker news](https://news.ycombinator.com/item?id=31616966)

Thanks to [Erich Gubler](https://users.rust-lang.org/t/twir-quote-of-the-week/328/1250) for the suggestion.

[Please submit quotes and vote for next week!](https://users.rust-lang.org/t/twir-quote-of-the-week/328)

Expand Down