unique-immutable-borrows is a misnomer and no longer exists in rustc

オープン
#1,959 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
ドキュメント
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
rust
領域
documentation

調査の方向性

closure キャプチャにおける一意な不変借用についての Reference セクションから始め、rustc のコンテキストについて rust-lang/rust の issue #112056 と pull request #112119 を読んでください。借用をもはや不変として説明せず、現在の rustc の動作に一致するように、用語と説明を見直してください。

索引モデルが issue の本文から書いたものです。

説明

A-closures

https://doc.rust-lang.org/nightly/reference/types/closure.html#unique-immutable-borrows-in-captures

This borrow kind exists to support capturing let x = &mut whatever and mutating through x without triggering the non-soundness critical "missing mut binding" error.

Stating that it's immutable is wrong and for rustc itself, has been actively dangerous: https://github.com/rust-lang/rust/issues/112056

We've since removed this borrow kind in rustc itself: https://github.com/rust-lang/rust/pull/112119. I am not totally sure how to rework this, but "unique immutable" is imo definitely the wrong perspective

主要言語
Rust
スター
1.6k
フォーク
618
平均マージ
5時間 48分
マージ済み PR(30日)
3

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

rust-lang/reference のほかの issue

rust-lang/reference の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。