Skip to content

Commit fd98c27

Browse files
authored
Merge pull request #3237 from llogiq/twir-442
C/QotW + notable changes
2 parents c6c727c + 5066647 commit fd98c27

File tree

1 file changed

+61
-3
lines changed

1 file changed

+61
-3
lines changed

draft/2022-05-11-this-week-in-rust.md

Lines changed: 61 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@ and just ask the editors to select the category.
5454

5555
## Crate of the Week
5656

57-
<!-- COTW goes here -->
57+
This week's crate is [enum\_dispatch](https://crates.io/crates/enum_dispatch), a proc-macro-attribute to replace dynamic dispatch with enum dispatch to gain performance.
58+
59+
Thanks to [David Mason](https://users.rust-lang.org/t/crate-of-the-week/2704/1059) for the suggestion!
5860

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

@@ -73,7 +75,57 @@ If you are a Rust project owner and are looking for contributors, please submit
7375

7476
## Updates from the Rust Project
7577

76-
<!-- Rust updates go here -->
78+
377 pull requests were [merged in the last week][merged]
79+
80+
[merged]: https://github.com/search?q=is%3Apr+org%3Arust-lang+is%3Amerged+merged%3A2022-05-02..2022-05-09
81+
82+
* [rustc + avr = ❤️❤️ back again](https://github.com/rust-lang/llvm-project/pull/139)
83+
* [support tool lints with the `#[expect]` attribute](https://github.com/rust-lang/rust/pull/95542) (RFC [#2383](https://rust-lang.github.io/rfcs/2383-lint-reasons.html))
84+
* [remove `#[rustc_deprecated]`](https://github.com/rust-lang/rust/pull/95960)
85+
* [suggest fully qualified path with appropriate params](https://github.com/rust-lang/rust/pull/96772)
86+
* [report that opaque types are not allowed in impls even in the presence of other errors](https://github.com/rust-lang/rust/pull/96673)
87+
* [warn on unused `#[doc(hidden)]` attributes on trait impl items](https://github.com/rust-lang/rust/pull/96008)
88+
* [use source callsite in `check_argument_types` suggestion](https://github.com/rust-lang/rust/pull/96589)
89+
* [followups for method call error change](https://github.com/rust-lang/rust/pull/96155)
90+
* [don't cache results of coinductive cycle](https://github.com/rust-lang/rust/pull/96458)
91+
* [speed up `Token::{ident,lifetime}`](https://github.com/rust-lang/rust/pull/96683)
92+
* [overhaul `MacArgs`](https://github.com/rust-lang/rust/pull/96546)
93+
* [generalize "incoherent impls" impl for user defined types](https://github.com/rust-lang/rust/pull/96520)
94+
* [optimize `promote_consts` by caching the results of `validate_local`](https://github.com/rust-lang/rust/pull/96815)
95+
* [codegen\_gcc: implement more SIMD intrinsics](https://github.com/rust-lang/rustc_codegen_gcc/pull/172)
96+
* [codegen\_gcc: use the provided pointee type in `<Builder as BuilderMethods>::load`](https://github.com/rust-lang/rustc_codegen_gcc/pull/170)
97+
* [stabilize `bool::then_some`](https://github.com/rust-lang/rust/pull/96628)
98+
* [add a dedicated length-prefixing method to `Hasher`](https://github.com/rust-lang/rust/pull/94598)
99+
* [fix panic in `Path::strip_prefix`](https://github.com/rust-lang/rust/pull/93675)
100+
* [make `sys::windows::os_str::Slice` `repr(transparent)`](https://github.com/rust-lang/rust/pull/96802)
101+
* [futures: remove `Fuse`s from `select`, and only poll non-terminated streams](https://github.com/rust-lang/futures-rs/pull/2583)
102+
* [hashbrown: remove third copy operation for `RustcOccupiedEntry::insert`](https://github.com/rust-lang/hashbrown/pull/329)
103+
* [cargo: extend pkgid syntax with `@` support](https://github.com/rust-lang/cargo/pull/10582)
104+
* [cargo: improve support of condition compilation checking](https://github.com/rust-lang/cargo/pull/10566)
105+
* [cargo: when documenting private items in a binary, ignore warnings about links to private items](https://github.com/rust-lang/cargo/pull/10142)
106+
* [rust-analyzer: remove handling of `#[rustc_deprecated]`](https://github.com/rust-lang/rust-analyzer/pull/11983)
107+
* [rust-analyzer: lower values of char and byte literals](https://github.com/rust-lang/rust-analyzer/pull/12157)
108+
* [rust-analyzer: sort items by trait definition assist](https://github.com/rust-lang/rust-analyzer/pull/12142)
109+
* [rust-analyzer: allow auto importing starting segments of use items](https://github.com/rust-lang/rust-analyzer/pull/12188)
110+
* [rust-analyzer: don't show assoc. type binding completions when invalid](https://github.com/rust-lang/rust-analyzer/pull/12199)
111+
* [rust-analyzer: fix import insertion inserting after last comment in a file](https://github.com/rust-lang/rust-analyzer/pull/12197)
112+
* [rust-analyzer: fix panic when a macro passes a float token to another macro](https://github.com/rust-lang/rust-analyzer/pull/12178)
113+
* [rust-analyzer: fix snippets triggering where they shouldn't](https://github.com/rust-lang/rust-analyzer/pull/12175)
114+
* [rust-analyzer: remap float parts as integers when parsed as indices](https://github.com/rust-lang/rust-analyzer/pull/12185)
115+
* [rust-analyzer: resolve assoc. types of supertraits in the IDE layer](https://github.com/rust-lang/rust-analyzer/pull/12198)
116+
* [rust-analyzer: try not to invalidate state when the proc macro preference didn't change](https://github.com/rust-lang/rust-analyzer/pull/12171)
117+
* [rust-analyzer: fix macro expansion with float tokens](https://github.com/rust-lang/rust-analyzer/pull/12177)
118+
* [rust-analyzer: split float literal tokens at `.` to fix parsing of tuple field accesses](https://github.com/rust-lang/rust-analyzer/pull/12149)
119+
* [clippy: address `unnecessary_to_owned` false positive](https://github.com/rust-lang/rust-clippy/pull/8794)
120+
* [clippy: create lint against unexpectedly late drop for temporaries in match scrutinee expressions](https://github.com/rust-lang/rust/pull/94206)
121+
* [clippy: fix `cast_lossless` to avoid warning on `usize` to `f64` conversion](https://github.com/rust-lang/rust-clippy/pull/8778)
122+
* [clippy: ignore type aliases in `init_numbered_fields`](https://github.com/rust-lang/rust-clippy/pull/8780)
123+
* [clippy: lint `empty_lint_after_outer_attr` on argumentless macros](https://github.com/rust-lang/rust-clippy/pull/8790)
124+
* [clippy: move `only_used_in_recursion` to nursery](https://github.com/rust-lang/rust-clippy/pull/8783)
125+
* [clippy: optionally allow `expect` and `unwrap` in tests](https://github.com/rust-lang/rust-clippy/pull/8802)
126+
* [clippy: support negative ints in `manual_range_contains`](https://github.com/rust-lang/rust-clippy/pull/8763)
127+
* [clippy: `identity_op` false positive in front of if](https://github.com/rust-lang/rust-clippy/pull/8730)
128+
* [rustfmt: fix `wrap_comments` breaking up type links](https://github.com/rust-lang/rustfmt/pull/5262)
77129

78130
### Rust Compiler Performance Triage
79131

@@ -215,7 +267,13 @@ They should be of the form:
215267

216268
# Quote of the Week
217269

218-
<!-- QOTW goes here -->
270+
> At Cloudflare we have big Rust projects/teams and onboard new developers regularly.
271+
>
272+
> There is a learning curve. Rust is rigid and unforgiving, and noobs need assistance when the compiler says “no” (although error messages and Clippy do a good job for common mistakes).
273+
>
274+
> However, the big upside is that noobs can contribute safely to Rust projects. Rust limits severity of the damage an inexperienced programmer can cause. Once they manage to get the code to compile, it already has lots of correctness guarantees. “Bad” Rust code may just clone more than strictly necessary, or write 10 lines of code for something that has a helper method in the stdlib, but it won’t corrupt memory or blindly run the happy path without checking for errors. Rust prefers to be locally explicit, so it’s also easy to review.
275+
276+
[Kornel.Lesiński on lobste.rs](https://lobste.rs/s/ksj3ii/rust_is_hard_yes_does_it_matter)
219277

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

0 commit comments

Comments
 (0)