title | tags |
---|---|
Triage meeting 2021-10-12 |
triage-meeting |
- Meeting date: 2021-10-12
- Team members: nikomatsakis, pnkfelix
- Others: Mara, Mark
- Action item scribe: Mark
- Note-taker: Felix
- October 13 (tomorrow): where the where
- write-up: rust-lang/rust#89122
- nikomatsakis will update and transfer to a hackmd later
- October 20: safety considerations for dyn upcasting
- October 27: Forbidding unwinding from drop impls (lang-team#97)
- Touch base with Amanieu regarding a document
Need to close these issues:
- "Structural equality" lang-team#94
- "Non-terminal divergence between parser and macro matcher " lang-team#111
- "GATs and defaults" lang-team#115
Link: #96
- spastorino is picking this up
- creating a repo
Link: #102
Link: #116
Link: #118
Link: #121
Link: #122
Link: #62
Link: #76
Link: #113
None.
Check your boxes!
Link: rust-lang/rfcs#2991
Leave a comment seeing if someone wants to take this work over:
- Amend RFC
- Attempt to implement
Niko to comment
Link: rust-lang/rust#64796
- blocked on some change to
cfg(accessible)
- proposal: cancel FCP
- Niko to cancel FCP
Link: rust-lang/rust#71126
- Josh proposed FCP
- Take a look!
Link: rust-lang/rust#73255
- oli proposed FCP:
Link: rust-lang/rust#89122
- has design meeting, canceling FCP
Link: rust-lang/rust#88041
Link: rust-lang/rust#89509
Link: #96
None.
Link: rust-lang/rust#73255
- Pending FCP
Link: rust-lang/rust#81793
- Old PR since February rust-lang/rust#81793
- pnkfelix to review rust-lang/rust#81793 and either fcp merge or leave a comment of some kind
Link: rust-lang/rust#84223
- What is the change?
- Macro looks for
const { expr }
and changes the code that gets generated- gets generated to
static FOO: ... = <expr>
- gets generated to
- Macro looks for
- Why this change?
- Codegen improvement: the initial value of a thread-local is constant and not re-evaluated per thread
- Expected outcome?
- We stabilize the macro and eventually move it to use inline constants
- What is the risk?
- Currently accepts
const { ... }
syntax but desugars to astatic
- If set of expressions accepted as initial value for a static diverged from set that can appear in
const { ... }
this would be weird
- Currently accepts
- Niko to start FCP and summarize the above
Link: rust-lang/rust#87221
// `cfg_attr` is evaluated first, and written second so the lint is reported
// however, we cannot reorder the attributes because `my_trait_helper` is not in scope before `#[derive(MyTrait)]`
// but we can use `cfg_eval` to both evaluate `cfg_attr` and keep relative order of `MyTrait` and `my_trait_helper`
#[cfg_eval]
#[derive(MyTrait)]
#[cfg_attr(my_feature, my_trait_helper)]
struct S;
- Niko to leave a comment explaining why it seems like there isn't really a motivation:
- For derive, we are still going to have it, so it's just a workarond for a dumb lint? Why not make lint smarter?
- For other users, maybe they'd prefer to have the expansion occur in the lint, like derive, as that is more convenient?
- What exactly is the proposed lint?
- Wait! We misunderstood. Felix clarifies that the goal here is to move towards a future where things are "fully configured by default".
- And this is an "eager opt-in" in advance of the new edition.
- But that design isn't baked: it needs opt-out.
- So are we ready to be stabilizing?
- Niko to write a comment and reach out to petrochenkov to understand what's the plan here
Link: rust-lang/rust#87512
- Niko to fcp close as this is not a "bug fix"-oriented lint.
Link: rust-lang/rust#87520
- Someone needs to look really close
Link: rust-lang/rust#88041
Nothing to discuss.
Link: rust-lang/rust#88900
- Discussed before, Niko left a comment
- Action item: Close issue as no change is expected
Link: rust-lang/rust#89551
Questions to be raised on thread:
- WWRD? (What Would Ralf Do?)
- We should document:
- My only concern with const raw pointer deref is how and where to document that type-punning loads (i.e., raw-ptr-based transmutes) of pointers to integers are considered UB during CTFE.
- Answer
- But just from an implementation perspective I can't think of any reason how raw ptr deref could screw us now that we have stabilized transmutes and union field accesses. The reason we only stabilized unions and transmute first is that those were already allowed in const (outside const fn).
- We should document:
- Why separate
*const
from*mut
? Do we expect a difference in semantics, or is this just being very cautious?- Ah, this was discussed, but what is the "backdoor"?
- The reason I split it is because mutable references are unstable. If mutable pointer dereferencing is stabilized, doesn't that effectively open a back door?
- Is it "you could coerce a
&mut
to a*mut
and dereference that?"
- Ah, this was discussed, but what is the "backdoor"?
- Niko would like to request a pointer to documentation about the limits of UB in const code (per Ralf's comment here); in general, we need edits to the reference for what you can and can't do in const code
Link: rust-lang/reference#1088
- We discussed this before and requested a PR describing current state
- rust-lang/reference#1093 was opened in response
- This can be un-nominated, as eholk and I discussed this PR and felt like it might not be the right approach anyhow
- Felix to review rust-lang/reference#1093