You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/2025h2/README.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,7 +30,7 @@ This period we have (((#FLAGSHIP GOALS))) flagship goals, broken out into four t
30
30
31
31
*[Beyond the `&`](#beyond-the-), making it possible to create user-defined smart pointers that are as ergonomic as Rust's built-in references `&`.
32
32
*[Unblocking dormant traits](#unblocking-dormant-traits), extending the core capabilities of Rust's trait system to unblock long-desired features for language interop, lending iteration, and more.
33
-
*[Flexible, fast(er) Rust builds](#flexible-faster-rust-builds), making Rust's builds fasterand improving support for specialized build scenarios like embedded usage and sanitizers.
33
+
*[Flexible, fast(er) compilation](#flexible-faster-rust-compilation), making it faster to build Rust programs and improving support for specialized build scenarios like embedded usage and sanitizers.
34
34
*[Higher-level Rust](#higher-level-rust), making higher-level usage patterns in Rust easier.
35
35
36
36
### "Beyond the `&`"
@@ -53,11 +53,11 @@ Rust's trait system is one of its most powerful features, but it has a number of
53
53
* The work to [expand Rust's `Sized` hierarchy](./scalable-vectors.md) will permit us to express types that are neither `Sized` nor `?Sized`, such as extern types (which have no size) or Arm's Scalable Vector Extension (which have a size that is known at runtime, but not compilation time). This goal builds on [RFC #3729][] and [RFC #3838][], authored in previous project goal periods.
54
54
*[In-place initialization](./in-place-initialization.md) allows creating structs and values that are tied to a particular place in memory. While useful directly for projects doing advanced C interop, it also unblocks expanding `dyn Trait` to support for `async fn` and `-> impl Trait` methods, as compiling such methods requires the ability for the callee to return a future whose size is not known to the caller.
The "Flexible, fast(er) Rust builds" initiative focuses on improving Rust's build system to better serve both specialized use cases and everyday development workflows:
60
+
The "Flexible, fast(er) compilation" initiative focuses on improving Rust's build system to better serve both specialized use cases and everyday development workflows:
61
61
62
62
* We are improving compilation performance through (1) [parallel compilation in the compiler front-end](./parallel-front-end.md), which delivers 20-30% faster builds, and (2) [making the Cranelift backend production-ready for development use](./production-ready-cranelift.md), offering roughly 20% faster code generation compared to LLVM for debug builds.
63
63
* We are working to [stabilize a core MVP of the `-Zbuild-std` feature](./build-std.md), which allows developers to rebuild the standard library from source with custom compiler flags. This unblocks critical use cases for embedded developers and low-level projects like Rust for Linux, while also enabling improvements like using sanitizers with the standard library or building `std` with debug information.
Copy file name to clipboardExpand all lines: src/2025h2/autoreborrow-traits.md
+22-38Lines changed: 22 additions & 38 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -61,6 +61,26 @@ An improvement is needed.
61
61
- Gather feedback from users, especially `reborrow` crate users.
62
62
- Implement nightly support for recursive reborrowing.
63
63
64
+
65
+
The basic idea of autoreborrowing is simple enough: when a reborrowable type is encountered at a coercion
66
+
site, attempt a reborrow operation. The `Pin<&mut T>` special-case in the
67
+
compiler already exists and could probably be reimagined to rely on a `Reborrow` trait.
68
+
69
+
Complications arise when reborrowing becomes recursive: if a `struct X { a: A, b: B }` contains two
70
+
reborrowable types `A` and `B`, then we'd want the reborrow of `X` to be performed "piecewise". As an
71
+
example, the following type should, upon reborrow, only invalidate any values that depend on the `'a` lifetime while any values dependent on the `'b` lifetime should still be usable as normal.
72
+
73
+
```rust
74
+
structX<'a, 'b> {
75
+
a:&'amutA,
76
+
b:&'bB,
77
+
}
78
+
```
79
+
80
+
To enable this, reborrowing needs to be defined as a recursive operation but what the "bottom-case" is, that
81
+
is the question. One option would be to use `!Copy + Reborrow` fields, another would use core marker types
82
+
like `PhantomExclusive<'a>` and `PhantomShared<'b>` to discern the difference.
83
+
64
84
### The "shiny future" we are working towards
65
85
66
86
`Pin` ergonomics group should be able to get rid of special-casing of `Pin` reborrowing in rustc.
@@ -90,48 +110,12 @@ Users of `reborrow` crate and similar should be enabled to move to core solution
| Discussion and moral support |![Team][][lang]| Normal RFC process |
96
117
| Standard reviews |![Team][][compiler]| Trait-impl querying in rustc to replace `Pin<&mut T>` special case |
118
+
| Lang-team experiment |![Team][][lang]| allows coding pre-RFC; only for trusted contributors |
97
119
| Do the work |@aapoalas||
98
120
99
-
### Experiment with Reborrow trait design
100
-
101
-
The basic idea of autoreborrowing is simple enough: when a reborrowable type is encountered at a coercion
102
-
site, attempt a reborrow operation.
103
-
104
-
Complications arise when reborrowing becomes recursive: if a `struct X { a: A, b: B }` contains two
105
-
reborrowable types `A` and `B`, then we'd want the reborrow of `X` to be performed "piecewise". As an
106
-
example, the following type should, upon reborrow, only invalidate any values that depend on the `'a` lifetime while any values dependent on the `'b` lifetime should still be usable as normal.
107
-
108
-
```rust
109
-
structX<'a, 'b> {
110
-
a:&'amutA,
111
-
b:&'bB,
112
-
}
113
-
```
114
-
115
-
To enable this, reborrowing needs to be defined as a recursive operation but what the "bottom-case" is, that
116
-
is the question. One option would be to use `!Copy + Reborrow` fields, another would use core marker types
117
-
like `PhantomExclusive<'a>` and `PhantomShared<'b>` to discern the difference.
0 commit comments