#prog
Хайлайты из #rust:
* Ошибки нереализации трейтов теперь умеют идентифицировать sealed trait и объяснять ошибку в их терминах.
* Добавили UniqueRc, который владеет данными и потому позволяет их менять, но при этом может быть сконвертирован по ссылке в rc::Weak и по значению в Rc. Этот тип позволяет проще создавать циклические структуры, и, в отличие от Rc::new_cyclic, работает в случае, если "конструктор" может зафейлиться.
* Методы
* Ускорили .step_by() на диапазонах чисел.
* rustdoc: Allow whitespace as path separator like double colon. TL;DR: теперь можно при поиске в rustdoc использовать
Хайлайты из #rust:
* Ошибки нереализации трейтов теперь умеют идентифицировать sealed trait и объяснять ошибку в их терминах.
* Добавили UniqueRc, который владеет данными и потому позволяет их менять, но при этом может быть сконвертирован по ссылке в rc::Weak и по значению в Rc. Этот тип позволяет проще создавать циклические структуры, и, в отличие от Rc::new_cyclic, работает в случае, если "конструктор" может зафейлиться.
* Методы
ptr_eq
у счётчиков ссылок теперь игнорируют метаданные указателей (читай, Arc<dyn Trait>
сравнивает только указатели на данные, но не vtable).* Ускорили .step_by() на диапазонах чисел.
* rustdoc: Allow whitespace as path separator like double colon. TL;DR: теперь можно при поиске в rustdoc использовать
vec push
вместо vec::push
.GitHub
Account for sealed traits in privacy and trait bound errors by estebank · Pull Request #112686 · rust-lang/rust
On trait bound errors caused by super-traits, identify if the super-trait is publicly accessibly and if not, explain "sealed traits".
error[E0277]: the trait bound `S: Hidden` is not sati...
error[E0277]: the trait bound `S: Hidden` is not sati...
🔥6🖕1
Если у меня когда-то будет своя больница — назову её "Люди".
Чтобы про выздоровевших пациентов говорили, что их выписали из людей.
Чтобы про выздоровевших пациентов говорили, что их выписали из людей.
😁13🌚1
Forwarded from Баги с башкой
DDD - downgrade-driven debugging
"Видишь баг - откатись на версию, на которой все работало"
"Видишь баг - откатись на версию, на которой все работало"
Лайфхак: если вам стыдно что-то выкладывать — всегда можно соврать, что это предложка
😁18👎1
#prog #rust #article
Rust fact vs. fiction: 5 Insights from Google's Rust journey in 2022
Особенно интересен первый пункт:
> Rumor 1: Rust takes more than 6 months to learn – Debunked!
Based on our studies, more than 2/3 of respondents are confident in contributing to a Rust codebase within two months or less when learning Rust. Further, a third of respondents become as productive using Rust as other languages in two months or less. Within four months, that number increased to over 50%. Anecdotally, these ramp-up numbers are in line with the time we’ve seen for developers to adopt other languages, both inside and outside of Google.
Rust fact vs. fiction: 5 Insights from Google's Rust journey in 2022
Особенно интересен первый пункт:
> Rumor 1: Rust takes more than 6 months to learn – Debunked!
Based on our studies, more than 2/3 of respondents are confident in contributing to a Rust codebase within two months or less when learning Rust. Further, a third of respondents become as productive using Rust as other languages in two months or less. Within four months, that number increased to over 50%. Anecdotally, these ramp-up numbers are in line with the time we’ve seen for developers to adopt other languages, both inside and outside of Google.
Google Open Source Blog
Rust fact vs. fiction: 5 Insights from Google's Rust journey in 2022
Wondering about Rust? We're addressing rumors and providing insight gained from years of early adoption of Rust here at Google.
🔥9👍3