Warning
This post was published 263 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.
This week's crate is cargo-unfmt, a formatter that formats your code into block-justified text, which sacrifices some readability for esthetics.
Thanks to Felix Prasanna for the self-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.
COPY FROM
statement to avoid importing unwanted datato_timezone
functionIf 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.
431 pull requests were merged in the last week
dyn Trait
in CFIdrop_in_place
CurrentGcx
type to let the deadlock handler access TyCtxt
f16
and f128
Partial
)Ord
methods in the ambiguous_wide_pointer_comparisons
lintUnreachablePropagation
for coverage buildsSelf
instantiationself
resolutionty::Err
on binding that isn't from current HIR OwnerUbChecks
for non-standard librariesrustc_never_type_options
attributeConstructCoroutineInClosureShim
, pass receiver by mut ref, not mut pointerTyCtxt::coroutine_layout
take coroutine's kind parameterPlace
instead of keeping a PlaceBuilder
aroundEq
candidates in the failure case tooenum
indices to be contiguous'static
in next-solver canonicalizerPointee::Metadata
DerefMut
and DerefPure
on deref!()
patterns when appropriateUnresolvedImportError
include_bytes!
Align
type when parsing alignment attributesopt_suggest_box_span
eagerlyptr.is_aligned,
move ptr.is_aligned_to
to a new feature gateunchecked_{add,sub,mul}
{integer}::from_str_radix
constantcore::char::CaseMappingIter
Vec::pop_if
RawVec::reserve_for_push
UnixStream
: override read_buf
num::NonZero::get
can be 1 transmute instead of 2env!
when env var is not valid Unicodefutures::io::{BufReader,BufWriter}
not require inner trait bound{,n}
as an equivalent to {0,n}
nounset
modelarge_stack_frames
: print total size and largest componenttype_id_on_box
: lint on any Box<dyn _>
String
in span_lint*
functions directly to avoid unnecessary clonesfilter_map_identity
when the closure is typedmanual_unwrap_or_default
in const functionduplicated_attribute
lint on "complex" cfg
slet_unit
and use ()
directly insteadmanual_unwrap_or_default
suggestion ignoring side-effectslen_zero
with macrosTry
trait when linting question_mark
box_default
to style, do not suggest turbofishesmixed_attributes_style
to stylelegacy_numeric_constants
manual_clamp
to const case, bring it out of nurseryrust-analyzer.cargo.allTargets
to configure passing --all-targets
to cargo invocationsenum
variantsA pretty quiet week, with most changes (dropped from the report below) being due to continuing bimodality in the performance data. No particularly notable changes landed.
Triage done by @simulacrum. Revision range: 73476d49..3d5528c
1 Regressions, 2 Improvements, 5 Mixed; 0 of them in rollups 61 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.
clone_from()
in core/stdSeek::seek
_relativeNonZero
cstr_count_bytes
unnameable_types
freeze
intrinsic and related library functionsRusty Events between 2024-04-03 - 2024-05-01 🦀
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
Panstromek: I remember reading somewhere (probably here) that borrow checking has
O(n^3)
asymptotic complexity, relative to the size of the function.Nadrieril: Compared to match exhaustiveness which is NP-hard and trait solving which is undecidable, a polynomial complexity feels refreshingly sane.
– Panstromek and Nadrieril on zulip
Thanks to Kevin Reid 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