Hello and welcome to another issue of This Week in Rust!
Rust is a programming language empowering everyone to build reliable and efficient software.
This is a weekly summary of its progress and community.
Want something mentioned? Tag us at @ThisWeekInRust on Twitter or @ThisWeekinRust on mastodon.social, or send us a pull request.
Want to get involved? We love contributions.
This Week in Rust is openly developed on GitHub and archives can be viewed at this-week-in-rust.org.
If you find any errors in this week's issue, please submit a PR.
This week's crate is symbols, a utility to quickly create proc-macros to solidify database tables into enums enabling compile time foreign key checks.
Thanks to Marco Napetti for the self-suggestion!
Please submit your suggestions and votes for next week!
Always wanted to contribute to open-source projects but did not know where to start?
Every week we highlight some tasks from the Rust community for you to pick and get started!
Some of these tasks may also have mentors available, visit the task page for more information.
If you are a Rust project owner and are looking for contributors, please submit tasks here.
369 pull requests were merged in the last week
- add
-Zfunction-return={keep,thunk-extern} option
- account for
! arm in tail match expr
- add
never_patterns feature gate
- add
pretty_terminator to pretty stable-mir
- add an assume that the index is inbounds to
slice::get_unchecked
rustc_span : Use correct edit distance start length for suggestions
- added
linker_arg(s) Linker trait methods for link-arg to be prefixed "-Wl," for cc-like linker args and not verbatim
- allow setting
rla labels via rustbot
- avoid per-register closure expansions
generic_const_exprs : suggest to add the feature, not use it
- change
SwitchTarget representation in StableMIR
rustc_hir_typeck : Fix ICE when probing for non-ASCII function alternative
- constProp: correctly remove const if unknown value assigned to it
- coverage: skip spans that can't be un-expanded back to the function body
- cut code size for feature hashing
- detect Python-like slicing and suggest how to fix
- detect and reject malformed
repr(Rust) hints
- dispose
llvm::TargetMachines prior to llvm::Context being disposed
- dont suggest
! for path in function call if it has generic args
- eagerly return
ExprKind::Err on yield /await in wrong coroutine context
- effects: run
enforce_context_effects for all method calls
- explain a good reason for why LocalValue does not store the type of the local
- fix ICE:
fn_arg_names: unexpected item DefId(..)
- fix
PartialEq args when #[const_trait] is enabled
- fix an ICE when a valtree failed to evaluate
- fix parser ICE from attrs
- fix the issue of suggesting unwrap/expect for shorthand field
- give dev-friendly error message for incorrect config profiles
- handle recursion limit for subtype and well-formed predicates
- implement thread parking for xous
- more targeted errors when extern types end up in places they should not
- new solver: improve instrument annotations
- on Fn arg mismatch for a fn path, suggest a closure
- pass +forced-atomics feature for riscv32{i,im,imc}-unknown-none-elf
- perform LTO optimisations with wasm-ld + -Clinker-plugin-lto
- print list of missing target features when calling a function with target features outside an unsafe block
- provide structured suggestion for type mismatch in loop
- remove the memcpy-on-equal-ptrs assumption
- replace
once_cell::sync::OnceCell with std OnceLock
- report errors in jobserver inherited through environment variables
- restore
#![no_builtins] crates participation in LTO
- restrict what symbols can be used in
#[diagnostic::on_unimplemented] format strings
- rustc: harmonize
DefKind and DefPathData
- simplify indenting in THIR printing
- tweak message on ADT with private fields building
- tweak parsing recovery of enums, for exprs and match arm patterns
- warn against using intrinsics that leave the scope of our memory model
- add more information to StableMIR Instance
- codegen, miri: fix computing the offset of an unsized field in a packed
struct
- miri: support 'promising' alignment for symbolic alignment check
- miri: SIMD bitmasks: use 'round up to multiple of 8' rather than 'clamp to at least 8'
- miri: add new SIMD intrinsics
- miri: remove Stacked Borrows GC heuristics
- also add
is_empty to const raw slices
- move exposed-provenance APIs into separate feature gate
- stabilize C string literals
- add substring API for
OsStr
- optimize
str::iter::Chars::advance_by
- add
track_caller for arith ops
- expand in-place iteration specialization to Flatten, FlatMap and ArrayChunks
- cargo resolver: De-prioritize no-rust-version in MSRV resolver
- cargo resolver: Remove unused public-deps error handling
- cargo toml: Decouple logic from schema
- cargo: add
--public for cargo add
- cargo: add more doc comments for gc changes
- cargo: reorder
--remap-path-prefix flags for -Zbuild-std
- cargo: fixed uninstall a running binary failed on Windows
- cargo: fixes error count display is different when there's only one error left
- cargo: have cargo add --optional
<dep> create a <dep> = "dep:<dep> feature
- cargo: include declared list of features in fingerprint for
-Zcheck-cfg
- cargo: remove the outdated comment
- rustdoc: Add highlighting for comments in items declaration
- rustdoc-search: allow spaces around
: in path query
- clippy:
missing_asserts_for_indexing : accept length equality checks
- clippy:
option_if_let_else : do not trigger on expressions returning ()
- clippy:
redundant_closure_call : avoid duplicated async keyword when triggering on closure that returns async block
- clippy:
redundant_guards : catch is_empty , starts_with and ends_with on slices and str s
- clippy: add lint against unit tests in doctests
- clippy: allow
allow ing upper_case_acronyms on enum variants
- clippy: expanding lint
blocks_in_if_conditions to check match expr as well
- clippy: new lint:
repeat_vec_with_capacity
- rust-analyzer: debug use cargo workspace root as
cwd
- rust-analyzer: implement completion for the callable fields
- rust-analyzer: initial support for implicit drop inlay hint
- rust-analyzer: don't make
MissingMatchArms diagnostic for empty match body
- rust-analyzer: improve error handling for top-level
let statements
A small number of perf changes that unfortunately led to quite a few perf regressions. A large chunk of those regressions were in rustdoc and were considered acceptable since rustdoc is now doing strictly more work. Some other regressions have already been fixed and will hopefully soon be merged. The last of the regressions are still under investigation, but hopefully they will be resolved soon.
Triage done by @rylev.
Revision range: df0295f0..9358642e
Summary:
(instructions:u) |
mean |
range |
count |
Regressions ❌ (primary) |
3.0% |
[0.2%, 12.3%] |
53 |
Regressions ❌ (secondary) |
4.1% |
[0.2%, 11.6%] |
102 |
Improvements ✅ (primary) |
-0.3% |
[-0.5%, -0.1%] |
65 |
Improvements ✅ (secondary) |
-0.6% |
[-1.2%, -0.2%] |
25 |
All ❌✅ (primary) |
1.1% |
[-0.5%, 12.3%] |
118 |
4 Regressions, 1 Improvements, 1 Mixed; 1 of them in rollups
60 artifact comparisons made in total
Full report here
Changes to Rust follow the Rust RFC (request for comments) process. These
are the RFCs that were approved for implementation this week:
- No RFCs were approved this week.
Every week, the team announces the 'final comment period' for RFCs and key PRs
which are reaching a decision. Express your opinions now.
- No RFCs entered Final Comment Period this week.
- No Language Reference RFCs entered Final Comment Period this week.
- No Unsafe Code Guideline RFCs entered Final Comment Period this week.
An important step for RFC implementation is for people to experiment with the
implementation and give feedback, especially before stabilization. The following
RFCs would benefit from user testing before moving forward:
- No RFCs issued a call for testing this week.
If you are a feature implementer and would like your RFC to appear on the above list, add the new call-for-testing
label to your RFC along with a comment providing testing instructions and/or guidance on which aspect(s) of the feature
need testing.
Rusty Events between 2023-12-06 - 2024-01-03 🦀
- 2023-12-06 | Virtual (Indianapolis, IN, US) | Indy Rust
- 2023-12-10 | Virtual (Cardiff, UK) | Rust and C++ Cardiff
- 2023-12-12 | Virtual | Mainmatter
- 2023-12-12 | Virtual (Dallas, TX, US) | Dallas Rust
- 2023-12-14 | Virtual (Charlottesville, NC, US) | Charlottesville Rust Meetup
- 2023-12-14 | Virtual (Nuremberg, DE) | Rust Nuremberg
- 2023-12-17 | Virtual (Tel Aviv, IL) | Code Mavens
- 2023-12-18 | Virtual (Munich, DE) | Rust Munich
- 2023-12-19 | Virtual (Berlin, DE) | OpenTechSchool Berlin
- 2023-12-19 | Virtual (Washington, DC, US) | Rust DC
- 2023-12-20 | Virtual (Vancouver, BC, CA) | Vancouver Rust
- 2023-12-26 | Virtual (Dallas, TX, US) | Dallas Rust
- 2023-12-28 | Virtual (Charlottesville, NC, US) | Charlottesville Rust Meetup
- 2024-01-03 | Virtual (Indianapolis, IN, US) | Indy Rust
- 2023-12-07 | Seattle, WA, US | Seattle Rust User Group
- 2023-12-11 | Minneapolis, MN, US | Minneapolis Rust Meetup
- 2023-12-12 | Seattle, WA, US | Cap Hill Rust Coding/Hacking/Learning
- 2023-12-12 | New York, NY, US | Rust NYC
- 2023-12-13 | Chicago, IL, US | Deep Dish Rust
- 2023-12-14 | Lehi, UT, US | Utah Rust
- 2023-12-14 | Mountain View, CA, US | Mountain View Rust Meetup
- 2023-12-15 | Somerville, MA, US | Boston Rust Meetup
- 2023-12-19 | San Francisco, CA, US | San Francisco Rust Study Group
- 2023-12-27 | Austin, TX, US | Rust ATX
If you are running a Rust event please add it to the calendar to get
it mentioned here. Please remember to add a link to the event too.
Email the Rust Community Team for access.
Please see the latest Who's Hiring thread on r/rust
NVIDIA's firmware, Airlie said, comes with a set of include files that, in turn, define structures that change over time. To deal with these changes, the driver is going to need some sort of automated ABI generation; he noted that the developers working on the Apple M1 GPU driver have run into the same problem. This problem could be made easier to tackle, he suggested, if the driver were, like the M1 driver, to be rewritten in Rust.
– Jonathan Corbet paraphrasing David Airlie on Linux Weekly News
Thanks to Brian Kung for the suggestion!
Please submit quotes and vote for next week!
This Week in Rust is edited by: nellshamrell, llogiq, cdmistman, ericseppanen, extrawurst, andrewpollack, U007D, kolharsam, joelmarcey, mariannegoldin, bennyvasquez.
Email list hosting is sponsored by The Rust Foundation
Discuss on r/rust
|