2023-08-16
本文由 ChatGPT(gpt-3.5-turbo-1106) 翻译。
欢迎阅读本期 本周 Rust 速递!Rust 是一种让每个人都能构建可靠高效软件的编程语言。本文是 Rust 语言和社区进展的每周总结。 如果你希望某些内容被提及,请在 Twitter 上标记我们 @ThisWeekInRust 或者在 mastodon.social 上标记 @ThisWeekinRust,或者通过 向我们提交 pull request 来告诉我们。如果你希望参与其中,我们欢迎你的 贡献。
本周 Rust 速递 的开发是公开在 GitHub 上进行的,并且归档可以在 this-week-in-rust.org 上查看。如果你发现本周内容有任何错误,请提交 PR。
本周的精选 Crate 是 agree,这是一个实现了 Shamir's Secret Sharing 的命令行工具。
特别感谢 Alexander Weber 自荐该 Crate!
一直想要为开源项目做贡献,但不知道从哪里开始吗?每周我们都会从 Rust 社区中挑选一些任务供你选择并开始!
其中一些任务可能会有导师提供帮助,请访问任务页面获取更多信息。
如果你是 Rust 项目所有者,并且正在寻找贡献者,请在这里提交任务。
上周共合并了 344 个拉取请求。
riscv-interrupt-{m,s} 调用约定max_atomic_width 为 16](https://github.com/rust-lang/rust/pull/114495)max_atomic_width 为 32cvar.wait_while 替换 condv 的 while 循环Expr::can_have_side_effects() 对于结构体/枚举/数组/元组字面量不正确rustc_data_structures: base_n 性能优化:移除不必要的 utf8 检查offset_of: 防止无效使用(包括非定长字段)mir_drops_elaborated 查询invalid_reference_casting lint 与 mem::transmute__rust_alloc_error_handler_should_panicrust.codegen-backends 在反序列化时进行更好的错误处理predicates_for_object_candidate 中从等式中上升出嵌套目标impl const 降级绑定到宿主效果参数CString;,它被解析为函数调用type_of 来确定项是否具有内在的 shiminternal_features 降级为警告*const [type error] does not implement the Copy traitglobal_allocator 扩展中生成更好的函数参数名称unconditional_recursion 警告检测到递归析构trait_ref_is_knowabletry_coerce 中的目标类型SOCK_SEQPACKET+CMSG 发送给父进程ImplSource::Param 中删除 const 修饰resolve_vars_with_obligations 的冗余调用opt-dist 中重命名方法#[expect] 的处理与 dead_code lint 处理方式保持一致compare_method_predicate_entailment 中在处理 wf obligation 之前选择约束DefKind 中存储类型别名的延迟属性!Send/!Sync类型上使用 Arcopt-dist 中使用正确的 llvm-profdata 二进制文件#[macro_export] 时发出警告abi_thiscall<*const T>::sub 中的否定运算不会溢出Option::take_ifLinkedList 代码中使用 ptr::Uniqueascii::Char 的拷贝方法从 as_ 改名为 to_Vars 和 VarsOs 提供更好的 Debug 输出int_roundingsIterator::map_windowscompare_bytes 内部函数,代替直接调用 memcmpf32 和 f64 添加 gamma 函数--help 更容易浏览TargetInfo 的问题cargo test 进程通过信号终止,则提示使用 --nocapture 标志generic-simd 特性时编译macro_rules! 定义的格式化--file-lines 帮助文档iter_overeager_cloned: 检测 .cloned().filter() 和 .cloned().find()filter_map_bool_then: 不要在晚期绑定的区域上导致内部错误 (ICE)manual_retain: 为 binary_heap 添加 lint 案例redundant_guards: 不再对浮点字面量进行 lintredundant_locals: 修复在 mutated shadows 上的假阳性check.ignore 来列出 cargo check 中要忽略的诊断信息 (dead_code, unused_imports, ...)only_types 配置将 traits 从全局符号中过滤掉的问题#[cfg]convert_named_struct_to_tuple_struct 中的 unwrap2023年8月16日至2023年9月13日之间的 Rust 活动 🦀
如果您正在举办 Rust 活动,请将其添加到[日历]中,以便在此处提及。请记得也添加活动链接。发送电子邮件给Rust 社区团队以获得访问权限。
请查看最新的 r/rust 招聘帖子
已经有
0
天了,自上次有人尝试并且失败地使用
unsafe来规避生命周期系统。
感谢mdHMUpeyf8yluPfXI提供建议!
This Week in Rust 的编辑者: nellshamrell, llogiq, cdmistman, ericseppanen, extrawurst, andrewpollack, U007D, kolharsam, joelmarcey, mariannegoldin, bennyvasquez.
邮箱列表由 Rust 基金会 赞助