2023-01-18
本文由 ChatGPT(gpt-3.5-turbo-1106) 翻譯。
你好,歡迎來到另一期《本周 Rust 新聞》! Rust 是一種能讓每個人都能夠建立可靠且高效軟體的程式語言。 這是其進展和社群的每周摘要。 想要提及某事嗎?在 Twitter 上標記我們 @ThisWeekInRust,或在 mastodon.social 上標記 @ThisWeekinRust,或者發一個 PR 給我們。 想要參與嗎?我們樂意接受貢獻。
《本周 Rust 新聞》是在 GitHub 上公開開發。 如果本週的篇章出現任何錯誤,請提交一個 PR。
本周推荐的 Crate 是 syntactic-for,这是一个 Rust 宏,用于实现语法上的 "for" 循环。
感谢 Tor Hovland 的建议!
一直想要貢獻開源項目,但不知道從何開始嗎? 每周我們都會強調 Rust 社區中的一些任務,讓您可以選擇並開始參與!
部分任務可能會有導師提供幫助,請造訪任務頁面以獲取更多資訊。
如果您是 Rust 項目的擁有者,並且正在尋找貢獻者,請在這裡提交任務指南。
來自 Rust 專案的更新
上週有 458 個 [拉取請求被合併][merged]
detect struct literal needing parentheses
disable "split dwarf inlining" by default
emit a hint for bad call return types due to generic arguments
emit a single error for contiguous sequences of unknown tokens
emit only one nbsp error per file
enable atomic cas for bpf targets
exclude formatting commit from blame
feed a bunch of queries instead of tracking fields on TyCtxt
fix aarch64-unknown-linux-gnu_ilp32 target
aarch64-unknown-linux-gnu_ilp32 目标move autoderef to rustc_hir_analysis -> 將自動解參照移至 rustc_hir_analysis
new trait solver: rebase impl substs for gats correctly -> 新的 trait 解决器:正确地重新基于 gats 的 impl 替代
cargo: nightly Fix CVE-2022-46176: Missing SSH host key validation -> cargo:夜間修復 CVE-2022-46176:缺少 SSH 主機密鑰驗證
note predicate span on ImplDerivedObligation -> 在 ImplDerivedObligation 上標註謂詞範圍
only suggest adding type param if path being resolved was a type -> 只有當正在解析的路徑是一種類型時才建議添加類型參數
prefer non-[type error] candidates during selection -> 在選擇過程中優先選擇非「[类型错误]」的候選者
provide help on closures capturing self causing borrow checker errors -> 關於捕獲 self 造成借用檢查錯誤的閉包提供幫助
recover from where clauses placed before tuple struct bodies -> 從在元組結構體主體之前放置的 where 子句中恢復
remove unnecessary lseek syscall when using std::fs::read -> 在使用 std::fs::read 時刪除不必要的 lseek 系統調用
ToString 在 bool 上的实现::{core,std}::pin::pin!abi_efiapi 特性f16c_target_featurebool 时使用 is_empty& 的建议elaborate_predicatesiter::from_generator 的結果可 CloneAtomicPtr::as_mut_ptrpeek_mut() 的洩漏放大以確保 BinaryHeap 一直符合不變式mpsc::SyncSender 的自旋行為Unfold sink 返回錯誤時的恐慌FuturesOrderedcargo metadata 支援產物相依性codegen-backend 和 rustflagscast_possible_truncation 提示在可能发生截断时使用 TryFromexpl_impl_clone_on_copy: 忽略带有类型/常量参数的紧凑结构体needless_return: 在建议中移除所有分号unused_self: 如果方法体包含 todo!() 则不触发PartialEq 来实现 Hash(derive_hash_xor_eq)unchecked_duration_subtraction 移动到严格模式unlinked_file 诊断快速修复适用于内联模块PartialEq/PartialOrd 方法体static 而不是 constDisplay 实现2023年01月18日至2023年02月15日之间 Rust 之活动 🦀
以上是2023年1月至2月期間的線上 Rust 相關活動列表。
如果您正在舉辦 Rust 活動,請將其添加到日曆以便在此處進行提及。請記得添加活動鏈接。 要獲取訪問權限,請發送電子郵件至 Rust 社區團隊。
请查看最新的 r/rust 招聘贴。
對 Rust 的安全性保證的常見反對觀點:
- 您所綁定的庫中可能會發生段錯誤。
- 內存可能會物理性故障,導致懸空指針。
- 運行 Rust 程序的計算機可能會被隕石撞擊。
- 艾倫·圖靈可以從死裡復活並告訴每個人,他其實是編造了計算機科學,所有的程序都是無效的,包括所有的 Rust 程序。
感謝 Stephan Sokolow 的建議!
《Rust 本周新聞》的編輯:nellshamrell, llogiq, cdmistman, ericseppanen, extrawurst, andrewpollack, U007D, kolharsam, joelmarcey, mariannegoldin, bennyvasquez.
電子郵件列表由 Rust 基金會 贊助