Skip to content

Commit 744cd06

Browse files
Rollup merge of #67394 - matthew-healy:update-libsyntax-ptr-docs, r=Dylan-DPC
Remove outdated references to @t from comments Closes #67341. This removes all references to `@T` from the comment in libsyntax/ptr.rs.
2 parents 2d71753 + e77a55b commit 744cd06

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

src/libsyntax/ptr.rs

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

0 commit comments

Comments
 (0)