]> git.lizzy.rs Git - rust.git/commitdiff
Rollup merge of #67394 - matthew-healy:update-libsyntax-ptr-docs, r=Dylan-DPC
authorMazdak Farrokhzad <twingoow@gmail.com>
Thu, 19 Dec 2019 09:30:00 +0000 (10:30 +0100)
committerGitHub <noreply@github.com>
Thu, 19 Dec 2019 09:30:00 +0000 (10:30 +0100)
Remove outdated references to @T from comments

Closes #67341.

This removes all references to `@T` from the comment in libsyntax/ptr.rs.

src/libsyntax/ptr.rs

index d987dc855b6156ec8c7ae2fbdd272167a1c47540..e75cc8b1756d15cbac9260e0ee2066cedad00ebc 100644 (file)
@@ -1,17 +1,12 @@
 //! The AST pointer.
 //!
-//! Provides `P<T>`, a frozen owned smart pointer, as a replacement for `@T` in
-//! the AST.
+//! Provides `P<T>`, a frozen owned smart pointer.
 //!
 //! # Motivations and benefits
 //!
 //! * **Identity**: sharing AST nodes is problematic for the various analysis
 //!   passes (e.g., one may be able to bypass the borrow checker with a shared
-//!   `ExprKind::AddrOf` node taking a mutable borrow). The only reason `@T` in the
-//!   AST hasn't caused issues is because of inefficient folding passes which
-//!   would always deduplicate any such shared nodes. Even if the AST were to
-//!   switch to an arena, this would still hold, i.e., it couldn't use `&'a T`,
-//!   but rather a wrapper like `P<'a, T>`.
+//!   `ExprKind::AddrOf` node taking a mutable borrow).
 //!
 //! * **Immutability**: `P<T>` disallows mutating its inner `T`, unlike `Box<T>`
 //!   (unless it contains an `Unsafe` interior, but that may be denied later).