Skip to content

Commit 5e25e23

Browse files
committed
add 2021-05-19 may updates
1 parent 8b443eb commit 5e25e23

File tree

1 file changed

+246
-0
lines changed

1 file changed

+246
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,246 @@
1+
---
2+
tags: design-meeting
3+
---
4+
5+
# 2021-05-19: May status updates
6+
7+
8+
## Attending
9+
10+
* Team: nikomatsakis, cramertj, joshtriplett, scottmcm
11+
* Other: simulacrum
12+
* Action item scribe: simulacrum
13+
* Minutes scribe: nikomatsakis
14+
15+
## Updates
16+
17+
### Questions to consider for updates
18+
19+
* What are recent topics of discussion?
20+
* Any exciting developments since the last check-in?
21+
* Any points where the group is stuck and the lang-team could weigh in?
22+
* Any potential design meeting topics?
23+
* Any other concerns?
24+
25+
## Updates from active groups and projects
26+
27+
* [Project board](https://github.com/rust-lang/lang-team/projects/2)
28+
* Active projects (design phase)
29+
* [Const evaluation](https://github.com/rust-lang/lang-team/issues/22)
30+
* [Async foundation](https://github.com/rust-lang/lang-team/issues/33)
31+
* [Const generics](https://github.com/rust-lang/lang-team/issues/51)
32+
* [Deref Patterns](https://github.com/rust-lang/lang-team/issues/88)
33+
* [Denying semicolons in expression macro bodies](https://github.com/rust-lang/rust/issues/79813)
34+
* [Safe transmute](https://github.com/rust-lang/lang-team/issues/21)
35+
* Active projects (implementation)
36+
* [Tracking Issue for RFC 3086: macro metavariable expressions](https://github.com/rust-lang/rust/issues/83527)
37+
* [RFC 2229](https://github.com/rust-lang/lang-team/issues/50)
38+
* [Never type stabilization](https://github.com/rust-lang/lang-team/issues/60#issuecomment-814509681)
39+
* [FFI Unwind](https://github.com/rust-lang/lang-team/issues/19)
40+
* Active projects (evaluation)
41+
* [Inline assembly](https://github.com/rust-lang/rust/issues/72016)
42+
* [Instruction set attribute](https://github.com/rust-lang/rust/issues/74727)
43+
* Active projects (stabilization)
44+
* [Stabilize pat2015 but leave :pat2021 gated](https://github.com/rust-lang/rust/pull/83386)
45+
* [Tracking issue for X.., ..X, and ..=X](https://github.com/rust-lang/rust/issues/67264)
46+
47+
## Update from docs team
48+
49+
I would like help with reviews if anyone can find the time.
50+
51+
https://github.com/rust-lang/reference/pull/1010 — Revert "Temporarily remove pat_param."
52+
https://github.com/rust-lang/reference/pull/1011 — Rearrange HRTB grammar.
53+
https://github.com/rust-lang/reference/pull/1016 — Add crate and module to glossary.
54+
https://github.com/rust-lang/reference/pull/1022 — Expand on Unicode identifiers.
55+
https://github.com/rust-lang/reference/pull/1026 — Fix type_length_limit example.
56+
57+
Some of these should be very easy.
58+
59+
## Notes and minutes
60+
61+
### const evaluation
62+
63+
What is a val tree?
64+
65+
* Tree whose leaves are integers
66+
* Represent different Rust aggregate types:
67+
* `(1, 2, 3)` becomes
68+
* ()
69+
* 1
70+
* 2
71+
* 3
72+
* Val trees may be important for "structural equality"
73+
* what does it mean when you match vs have const generics etc
74+
* Could be a nice inside rust blog post
75+
* Action item: Niko to suggest authoring an Inside Rust blog post
76+
* Changing arguments to intrinsics to be required to be constants
77+
* You sometimes need inline constants
78+
* but constant literals, named constants work fine
79+
80+
### async foundations
81+
82+
* Vision doc has ended its brainstorming period
83+
* Trying to build up a kind of skill tree of ideas
84+
* Had generator meeting
85+
86+
### const generics
87+
88+
* Working towards a document on plans in this area
89+
* Documenting structural equality vs. partial equality etc.
90+
* Ralf is working on a proposal here
91+
* const parameter defaults stabilization
92+
* some concern around moving ahead without some discussion or RFC
93+
* Taylor notes that type param defaults aren't quite what is desired
94+
* But types and constants working differently may be very surprising
95+
* Consts may be 'interesting' where types are not, but we don't know if this is true
96+
* syntactic vs. inference based defaults
97+
* C++ uses types(?) vs. value generics for some stuff, but [I am not following]
98+
* May want to request an RFC
99+
* may be short
100+
* identify use cases
101+
* ordering of types and consts playing into defaults
102+
* Action item: want an RFC, at least for guide-level section
103+
* cover at least:
104+
* ordering (types vs consts)
105+
* examples of uses
106+
* ...
107+
* scottmcm: I'd love to see, for example, a description of how a `SmallVec<T, N = .....>` would be implemented, what kinds of things can go in the default, when that default is used vs inferred, etc. (All the kinds of problems people hit with `HashMap`'s `S` and how that's relates here.)
108+
* Default [T; 0]
109+
* Currently implemented for zero-length arrays without a T: Default bound
110+
* Would like default with T: Default for all N lengths
111+
* proposed hack to avoid extending specialization, via a lang item
112+
* currently only Default is being discussed because other traits were not implemented specially for N=0
113+
* Hack could be applied elsewhere if needed, but sort of iffy
114+
* There's likely some unblocking of usage, but we don't know
115+
* Is there a super compelling motivational use case like serde?
116+
* Issue for doing it for all the other ones: Most core trait impls for empty arrays are over-constrained https://github.com/rust-lang/rust/issues/52246
117+
118+
119+
# denying trailing semicolons
120+
121+
* Now denying lint in std/compiler, crater run in progress
122+
123+
# safe transmute
124+
125+
* No update this month
126+
127+
# deref patterns
128+
129+
* Possibly stuck around syntax of the pattern
130+
* The list of stdlib types last brought for consideration was
131+
- `Box`
132+
- `Arc`
133+
- `Rc`
134+
- `Vec`
135+
- `String` -- the only one we might caveat, because of the latent desire to have zero-capacity static strings, but also high motivation
136+
- For `DerefMut` I think it would be observable, even if it's lazy.
137+
- `Pin<P>`
138+
* cramertj: I'd like to be able to match on string literals
139+
* josh: matching against literals feels like you don't want to have to write `box`, but creating variables makes sense
140+
* (it's ambiguous, in some sense)
141+
* vec is also very appealing for the same reason
142+
143+
Example:
144+
145+
```rust=
146+
let v: Vec<u32> = vec![1, 2, 3];
147+
let w: Box<[u32]> = v.clone().into_boxed_slice();
148+
149+
match (v, w) {
150+
([..], [..]) => { }
151+
}
152+
153+
let s: String = "xyz".to_string();
154+
155+
match s {
156+
"string literal" => todo!("this should just work"),
157+
my_str => todo!("this should require syntax if you want my_str to be &str rather than String"),
158+
}
159+
160+
let b = Box::new(...);
161+
match b {
162+
box inside => { } // need to clarify the distinction here
163+
}
164+
165+
match b: Box<String> {
166+
a @ "string_literal" => /* do you want the String or the Box<String>? (or the &str?) */
167+
}
168+
169+
match b: &&Foo {
170+
a @ Foo { .. } => /* a: &&Foo? */
171+
}
172+
```
173+
174+
* Consensus that the above examples should work
175+
* Suggestion: Move ahead with non-explicit syntax for the time being, tackle that question later
176+
* Binding mode examples
177+
178+
```rust=
179+
let b = Box::new(SomeStruct { ... });
180+
181+
match b {
182+
SomeStruct { x, y } => { /* moves */ }
183+
}
184+
185+
match b {
186+
SomeStruct { ref x, ref y } => { /* borrows */ }
187+
}
188+
189+
match &b {
190+
SomeStruct { x, y } => { /* borrows */ }
191+
}
192+
```
193+
Josh: Would prefer syntax for this (as opposed to the above examples with literal values)
194+
Scott: existing binding modes feature is clear precedent (in the sense of "something done or said that may serve as an example or rule to authorize or justify a subsequent act of the same or an analogous kind") for this, though there are certainly those not fond of that feature. Perhaps the same things being pondered there (like we've discussed `SomeStruct { x: &Foo }` in the past) could help here too.
195+
Josh: For reference, binding modes was not originally presented as a generalized concept that should be extended in the future, so much as a specific proposal. The premise seemed to be "it shouldn't matter if you have a reference"; that doesn't necessarily support the idea that "it shouldn't matter that you have a Vec/Box/Rc/Arc".
196+
(further discussion deferred)
197+
198+
* Action item: Mark to write up a doc or something and we will discuss it
199+
200+
## RFC 2229
201+
202+
* Improved diagnostics
203+
* Migrations detect changes in trait impls
204+
* working on insignificant destructors (e.g., those deallocating memory)
205+
* Mark: Maybe also Arc/Rc?
206+
* will work on good statistics, but estimate is ~80% of closures don't change size
207+
* in principle didn't have to change size at all
208+
* but that would be harder: this implementation didn't change MIR or borrowck really
209+
* some digging into actual cases, some investigation suggests that simple optimizations like capturing the whole thing would be easy enough
210+
* Any analysis on async block sizes?
211+
* Taylor would like to get tests and some size estimates
212+
213+
## Never type
214+
215+
* Still experimenting with algorithms that try to avoid breakage
216+
* It's really painful, no clear solutions yet
217+
218+
## ffi-unwind
219+
220+
* C-unwind issues remain top priority
221+
* longjmp etc have not received much attention
222+
223+
## inline asm
224+
225+
* no official update this month
226+
227+
228+
## instruction set attribute
229+
230+
* work still ongoing
231+
* no clear next steps
232+
233+
## stabilized without documentation
234+
235+
* extended key value attributes didn't have much here
236+
* suggestion: file an issue on the reference tracking this
237+
* stabilization report template with a "known person" who will document it
238+
* Ember has an additional stage after stabilization, "recommended", where you stabilize, and then documentation etc happens
239+
* Possible problem: stabilized but not great in practice, this is not great
240+
* Ember uses editions here
241+
* Stage for "stabilized but not satisfied with docs.
242+
243+
244+
## typeid bug experiments
245+
246+
* No actual update, may initiate a project here

0 commit comments

Comments
 (0)