Warning
This post was published 183 days ago. The information described in this article may have changed.
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.
thread_local!
contextThis week's crate is ralertsinua, a text user interface for getting information about Russian air raids in Ukraine.
Thanks to Vladyslav Batyrenko for the suggestion!
Please submit your suggestions and votes for next 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:
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.
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.
Are you a new or experienced speaker looking for a place to share something cool? This section highlights events that are being planned and are accepting submissions to join their event as a speaker.
If you are an event organizer hoping to expand the reach of your event, please submit a link to the submission website through a PR to TWiR.
364 pull requests were merged in the last week
x86_64-unknown-linux-none
targetrust-lld
on nightly x86_64-unknown-linux-gnu
rustc_hir_typeck
: Account for skipped_ref_pats
in expr_use_visitor
rustc_resolve
cleanups#[do_not_recommend]
attribute if present#[inline]
to float Debug
fallback used by cfg(no_fp_fmt_parse)
fn into_raw_with_allocator
to Rc/Arc/Weakgenerics.is_empty()
and generics.is_own_empty,
rather than using generics' attributesexpand_weak_alias_tys
posix_memalign
for aligned allocationsaligned_alloc
; posix_memalign
is better-behavednext_node
is else-less if in get_return_block
CoverageIdsInfo::mcdc_bitmap_bytes
is never neededRUST_MIN_STACK=ice rustc hello.rs
find_best_leaf_obligation
causes inference side-effectsaggregate_raw_ptr
intrinsic codegen!Unpin
coroutines;
in macro_rules
EvalCtxt
generic over InferCtxtLike
match_projection_projections
considering shallow resolvabilityFileDescription::{read, write}
access to the MiriInterpCx
aligned_alloc
for unixesthrow_unsup_format!
instead of returning ENOTSUP
in the mmap shimBox<str>
Arc<str>
read_exact
and read_buf_exact
for &[u8]
and io:Cursor
f16
and f128
with as
Duration
construction into Duration::from_
{secs
, millis
, micros
, nanos
}BorrowedBuf
and BorrowedCursor
methodsVec
Debug
impl for Term
simpleru
N::checked_sub
f128
float to integer conversion functionsf128
powi
fo f16
and f128
f16
and f128
From<f16> for f64
check-cfg
lint config for the unexpected_cfgs
lintbuild_with_symlink_to_path_dependency_with_build_script_in_git
libsecret
by its SONAME
, libsecret-1.so.0
write_atomic
AliasedNonLocalStripper
-
(stdin) support in rustdocassigning_clones
: move to pedantic
so it is allow by defaultdoc_lazy_continuation
: do not warn on End
eventspanic!()
in testsno_effect
missing_panic_docs
for panics in const
environmentsmatch_same_arms
messages, enable rustfix testneedless_borrows_for_generic_args
const_raw_ptr_deref
is met when linting missing_const_for_fn
Fairly quiet week with the exception of a very large improvement coming from the switch to rust-lld
on nightly Linux. This can have very large impacts on benchmarks where linking dominates the build time (e.g., ripgrep
, exa
, small binaries like hello-world
). Aside from that change, there were a few small regressions that were either deemed worth it or are still being investigated.
Triage done by @rylev. Revision range: 9105c57b..1d0e4afd
Summary:
(instructions:u) | mean | range | count |
---|---|---|---|
Regressions ❌ (primary) |
0.7% | [0.1%, 2.5%] | 30 |
Regressions ❌ (secondary) |
0.5% | [0.2%, 0.8%] | 5 |
Improvements ✅ (primary) |
-30.4% | [-71.7%, -0.4%] | 35 |
Improvements ✅ (secondary) |
-25.6% | [-70.9%, -0.5%] | 75 |
All ❌✅ (primary) | -16.1% | [-71.7%, 2.5%] | 65 |
4 Regressions, 1 Improvement, 4 Mixed; 2 of them in rollups 66 artifact comparisons made in total
Changes to Rust follow the Rust RFC (request for comments) process. These are the RFCs that were approved for implementation 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.
std::env::{set_var, remove_var}
unsafe in edition 2024slice_flatten
!
fall back to !
PathBuf::set_extension
would add a path separatorLazyCell
and LazyLock
#[export_ordinal(n)]
attribute#[diagnostic::blocking]
attributeRusty Events between 2024-05-22 - 2024-06-19 🦀
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
In other words, I do not want the compiler to just insert code to uphold the bare minimum guarantees, I want the compiler to check my work for me and assist me in developing an algorithm I can confidently assert is right.
Thanks to scottmcm 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
🏷️ Rust_feed