Skip to content

Latest commit

 

History

History
215 lines (157 loc) · 20.7 KB

#418.md

File metadata and controls

215 lines (157 loc) · 20.7 KB

Olá e seja bem vindo a outra edição de esta semana em: Rust! #418 (24/11/2021). 🌟

Rust é uma linguagem de programação que empodera à todos nós a criar software eficiente e de confiança (seguro). Este é um resumo do progresso da linguagem e de sua comunidade! Deseja que algo seja mencionado aqui? Envie um tweet para: @ThisWeekInRust ou crie um Pull Request. Quer colaborar? A gente ama contribuições!

"Esta semana em Rust" é abertamente desenvolvido através do GitHub. Se você encontrar algum erro, por favor, crie um Pull Request.

O Tradutor (@luisvonmuller) toma a liberdade de fazer sinalizações através de ASCII Emojis para a tradução tentando sinalizar as informações que mais relevante em sua opinião.

Atualizações da comunidade Rust 🦀

Da fundação Rust - (Rust Foundation).

Atualizações no Projeto/Ferramentas:

Observações, pensamentos e ideias ou artigos:

Seja Conduzido através de rust (Artigos/Vídeos ou Podcasts):

Outros

Pacote para Rust (uma Crate) da semana:

O pacote (crate) desta semana é: rustc_codegen_nvvm, um backend para o compilador do rust como foco na biblioteca CUDA da NVIDIA.

Obrigado à troiganto pela sugestão.

Por favor, submita o seu "pacote" e também vote através desse link

Convite à participar

Você sempre quis contribuir à um projeto open source mas não soube onde começar? Todas as semanas a gente destaca algumas tarefas pertinentes a comunidade rust para você começar!

Algumas destas tasks podem até ter mentores disponíveis para auxílio, visite as páginas para mais informações:

Artichoke

Ockam

Se você é um "dono" de projeto Rust e está procurando por colaboradores divulgue isto: aqui.

Outros

A tradução do This Week in rust para o português do Brasil 🇧🇷 é feito por: Luís Von Müller

Conversem, debatam em r/rust

Atualizações do Projeto em si (A linguagem, cargo, clippy, analyzer, etc.)..

284 pull requests were [merged in the last week][merged]

[merged]: https://github.com/search?q=is%3Apr+org%3Arust-lang+is%3Amerged+merged%3A2021-11-15..2021-11-22

* [stabilize `-Z strip` as `-C strip`](https://github.com/rust-lang/rust/pull/90058)
* [permit const panics in stable const contexts in stdlib](https://github.com/rust-lang/rust/pull/90687)
* [simplify `for` loop desugar](https://github.com/rust-lang/rust/pull/90352)
* [warn on `#[must_use]` use on async fn's](https://github.com/rust-lang/rust/pull/89610)
* [suggest `&str.chars()` on attempt to `&str.iter()`](https://github.com/rust-lang/rust/pull/90803)
* [suggest `await` in more situations where infer types are involved](https://github.com/rust-lang/rust/pull/91022)
* [suggest removal of arguments for unit variant, not replacement](https://github.com/rust-lang/rust/pull/90961)
* [try all stable method candidates first before trying unstable ones](https://github.com/rust-lang/rust/pull/90329)
* [point at source of trait bound obligations in more places](https://github.com/rust-lang/rust/pull/89580)
* [print escaped string if char literal has multiple characters, but only one printable character](https://github.com/rust-lang/rust/pull/90861)
* [improve `ManuallyDrop` suggestion](https://github.com/rust-lang/rust/pull/90901)
* [improve diagnostics when a static lifetime is expected](https://github.com/rust-lang/rust/pull/90667)
* [improve suggestions for compatible variants on type mismatch](https://github.com/rust-lang/rust/pull/90575)
* [fix float ICE](https://github.com/rust-lang/rust/pull/90927)
* [fix await suggestion on non-future type](https://github.com/rust-lang/rust/pull/90933)
* [fix incorrect handling of `TraitRef`s when emitting suggestions](https://github.com/rust-lang/rust/pull/90819)
* [avoid suggesting literal formatting that turns into member access](https://github.com/rust-lang/rust/pull/90989)
* [address performance regression introduced by recent ADT drop requirements fix](https://github.com/rust-lang/rust/pull/90845)
* [optimize `impl Hash for ObligationCauseData` by not hashing `ObligationCauseCode` variant fields](https://github.com/rust-lang/rust/pull/90996)
* [add IEEE 754-2019 minimun and maximum functions for `f32`/`f64`](https://github.com/rust-lang/rust/pull/91008)
* [make char conversion functions unstably `const`](https://github.com/rust-lang/rust/pull/89258)
* [make slice → `str` conversion and related functions `const`](https://github.com/rust-lang/rust/pull/90607)
* [mark `<*const _>::align_offset` and `<*mut _>::align_offset` as `const fn`](https://github.com/rust-lang/rust/pull/90958)
* [mark `Arc::from_inner` / `Rc::from_inner` as `unsafe`](https://github.com/rust-lang/rust/pull/89741)
* [stabilize `File::options`](https://github.com/rust-lang/rust/pull/85766)
* [add `Vec::retain_mut`](https://github.com/rust-lang/rust/pull/90772)
* [implement `Termination` for `Result<Infallible, E>`](https://github.com/rust-lang/rust/pull/88601)
* [implement `clone_from` for `State`](https://github.com/rust-lang/rust/pull/90535)
* [miri: portable SIMD: basic binops](https://github.com/rust-lang/miri/pull/1918)
* [arch: work-around buggy Intel chips erroneously reporting BMI1/BMI2 support](https://github.com/rust-lang/stdarch/pull/1249)
* [arch: complete armv8 instructions](https://github.com/rust-lang/stdarch/pull/1256)
* [log: add `Log` implementation for `&impl Log` and `Arc<impl Log>`](https://github.com/rust-lang/log/pull/471)
* [cargo: add `--message-format` for `install` command](https://github.com/rust-lang/cargo/pull/10107)
* [cargo: enhance error message for target auto-discovery](https://github.com/rust-lang/cargo/pull/10090)
* [cargo: warn when alias shadows external subcommand](https://github.com/rust-lang/cargo/pull/10082)
* [clippy: add new lint `octal_escapes`](https://github.com/rust-lang/rust-clippy/pull/8007)
* [clippy: allow `suboptimal_flops` in `const` functions](https://github.com/rust-lang/rust-clippy/pull/8009)
* [clippy: avoid inline hints with double backticks for `doc-markdown`](https://github.com/rust-lang/rust-clippy/pull/8011)
* [clippy: don't show `no_effect` warning on unit structs implementing `fn_once`](https://github.com/rust-lang/rust-clippy/pull/7898)
* [clippy: fix ICE on `undocumented_unsafe_blocks`](https://github.com/rust-lang/rust-clippy/pull/7988)
* [clippy: fix `manual_map` with unsafe functions](https://github.com/rust-lang/rust-clippy/pull/7968)
* [clippy: fix `needless_collect`'s tendency to suggest code requiring multiple mutable borrows of the same value.](https://github.com/rust-lang/rust-clippy/pull/7982)
* [clippy: fix behavior-changing `manual_split_once` suggestion and add new lint `needless_splitn`](https://github.com/rust-lang/rust-clippy/pull/7896)
* [clippy: fix `shadow_same` false positives for async function arguments](https://github.com/rust-lang/rust-clippy/pull/7997)
* [clippy: improve `needless_borrow` lint](https://github.com/rust-lang/rust-clippy/pull/7977)
* [clippy: improve heuristic for eagerness suggestion](https://github.com/rust-lang/rust-clippy/pull/7639)
* [clippy: fix suggestion in `option_map_or_none`](https://github.com/rust-lang/rust-clippy/pull/7971)
* [rustfmt: preserve normalized comments after last list item](https://github.com/rust-lang/rustfmt/pull/5091)

### Rust Compiler Performance Triage


This week, there were a number of cases where the `incr-unchanged` variants of `inflate` went up or down by 5% to 6%; we believe these are instances of increased noise in benchmarks documented on [rustc-perf#1105](https://github.com/rust-lang/rustc-perf/issues/1105). I was tempted to remove these from the report, but its non-trivial to re-construct the report "as if" some benchmark were omitted.

Otherwise, there were some nice wins for performance. For example, PR [#90996](https://github.com/rust-lang/rust/issues/90996) more than halved the time to document builds of `diesel` by revising how we hash `ObligationCauseData`. If anyone is interested, it might be good to follow-up on the effects of PR [#90352](https://github.com/rust-lang/rust/issues/90352), "Simplify `for` loop desugar", where we have hypothesized that the increased compilation time is due to more LLVM optimizations being applied.

Triage done by **@pnkfelix**.
Revision range: [934624fe..22c2d9dd](https://perf.rust-lang.org/?start=934624fe5f66ce3fb8abf0597a6deb079783335f&end=22c2d9ddbf356bcdb718e88ca6ee3665e1e42690&absolute=false&stat=instructions%3Au)

1 Regressions, 3 Improvements, 8 Mixed; 3 of them in rollups
34 comparisons made in total

[Full report here](https://github.com/rust-lang/rustc-perf/blob/master/triage/2021-11-23.md)

### Approved RFCs

Changes to Rust follow the Rust [RFC (request for comments) process](https://github.com/rust-lang/rfcs#rust-rfcs). These
are the RFCs that were approved for implementation this week:

[Constrained Naked Functions](https://github.com/rust-lang/rfcs/pull/2972)
[Cargo --crate-type CLI Argument](https://github.com/rust-lang/rfcs/pull/3180)

### Final Comment Period

Every week [the team](https://www.rust-lang.org/team.html) announces the
'final comment period' for RFCs and key PRs which are reaching a
decision. Express your opinions now.

### [RFCs](https://github.com/rust-lang/rfcs/labels/final-comment-period)

* *No RFCs entered final comment period this week.*

### [Tracking Issues & PRs](https://github.com/rust-lang/rust/labels/final-comment-period)

* [disposition: merge] [Stabilize some MaybeUninit behavior as const](https://github.com/rust-lang/rust/pull/90896)
* [disposition: merge] [Document setgroups call caused by std::os::unix::process::CommandExt.uid](https://github.com/rust-lang/rust/pull/90292)
* [disposition: merge] [Tracking Issue for const-initialized thread locals](https://github.com/rust-lang/rust/issues/84223)
* [disposition: merge] [Tracking Issue for NonZeroUn::is_power_of_two (feature nonzero_is_power_of_two)](https://github.com/rust-lang/rust/issues/81106)
* [disposition: merge] [Tracking Issue for #![feature(available_parallelism)]](https://github.com/rust-lang/rust/issues/74479)
* [disposition: merge] [Tracking Issue for inline assembly (asm!)](https://github.com/rust-lang/rust/issues/72016)
* [disposition: merge] [Tracking Issue for cargo report future-incompat](https://github.com/rust-lang/rust/issues/71249)

### [New RFCs](https://github.com/rust-lang/rfcs/pulls)

* RFC Update: [Clarify that RFC1520 does not permit the compiler to replace calls to Clone::clone with a memcpy](https://github.com/rust-lang/rfcs/pull/3197)

Discuss on r/rust