--- title: Triage meeting 2023-05-02 tags: triage-meeting --- # T-lang meeting agenda * Meeting date: 2023-05-02 ## Attendance * Team members: nikomatsakis * Others: ## Meeting roles * Action item scribe: nikomatsakis * Note-taker: tmandry ## Scheduled meetings - "The #[diagnostic] attribute namespace" [lang-team#204](https://github.com/rust-lang/lang-team/issues/204) ## Announcements or custom items * [A Mirror For Rust: Compile-Time Reflection Report](https://soasis.org/posts/a-mirror-for-rust-a-plan-for-generic-compile-time-introspection-in-rust/#a-mirror-for-rust-compile-time-reflection-report) - Please have a look at this proposal. ### Planning meeting tomorrow nikomatsakis: I can't attend the planning meeting tomorrow, have jury duty! I would us to talk about the AFIT / RPITIT / ART stabilization plans though. ### RPITIT RFC posted + stabilization plans nikomatsakis: I kicked off fcp merge on [RFC #3425](https://github.com/rust-lang/rfcs/pull/3425) (RPITIT). I'd like to discuss fast tracking stabilization here, this is a huge enabler for the ecosystem. ### Interesting compile time reflection article https://soasis.org/posts/a-mirror-for-rust-a-plan-for-generic-compile-time-introspection-in-rust/#a-mirror-for-rust-compile-time-reflection-report ## Action item review * [Action items list](https://hackmd.io/gstfhtXYTHa3Jv-P_2RK7A) ## Pending lang team project proposals None. ## PRs on the lang-team repo None. ## RFCs waiting to be merged None. ## `S-waiting-on-team` ### "Tracking issue for dyn upcasting coercion" rust#65991 **Link:** https://github.com/rust-lang/rust/issues/65991 Issue around "exponential blowup" in depth of trait inheritance tree nikomatsakis/tmandry: Can optimize these out with LTO pnkfelix: Don't want to rely on LTO. pnkfelix: What about opting out? nikomatsakis: I don't think people are really going to need it, so we'd be paying the complexity up front, and if they do need it they'll want to opt out for other traits they don't control. pnkfelix: We can always add the opt-out later. Though don't want to break backcompat in std. nikomatsakis: Reviewed std, don't have deep inheritance trees. nikomatsakis: binary size definitely an isssue for rust, unconvinced that this is a huge contributor, would prefer to address more holistically tmandry: I too am worried about binary size and might be swayed by a demonstration where someone finds this has a big impact on binary size nikomatsakis: I think vtables are always generated, we could add a `-Z` flag perhaps to turn the vtables off, or maybe just assess size of vtables in binary Meeting consensus: * Adding an opt-in makes the language more complex, means users have to remember to opt-in; limiting to one supertrait makes language more complex * this behavior is the current behavior, so it doesn't seem to be a big problem in practice * Backwards compatible to the language to add an opt-out * But std would be committed to supporting upcasting * Or potentially to address via LTO, compiler flags, or other mechanisms * Would like to have concrete examples to work from so we know the mechanism is addressing a real problem successfully * Could also be addressed as a kind of linker feature, adding in the tables on an "as needed" basis * could be swayed by data in some form ### "expand: Change how `#![cfg(FALSE)]` behaves on crate root" rust#110141 **Link:** https://github.com/rust-lang/rust/pull/110141 tmandry: No concerns nikomatsakis: [regressions listed here](https://github.com/rust-lang/rust/pull/110141#issuecomment-1504095766); nothing that stands out as a redflag, this could be considered a bugfix ## Proposed FCPs **Check your boxes!** ### "unsafe attributes" rfcs#3325 - **Link:** https://github.com/rust-lang/rfcs/pull/3325 - [**Tracking Comment**](https://github.com/rust-lang/rfcs/pull/3325#issuecomment-1396911253): > Team member @joshtriplett has proposed to merge this. The next step is review by the rest of the tagged team members: > > * [x] @joshtriplett > * [x] @nikomatsakis > * [x] @pnkfelix > * [x] @scottmcm > * [x] @tmandry > > Concerns: > > * ~~change-syntax-to-drop-parentheses~~ resolved by https://github.com/rust-lang/rfcs/pull/3325#issuecomment-1458714974 > * ~~maybe-make-this-part-of-next-edition~~ resolved by https://github.com/rust-lang/rfcs/pull/3325#issuecomment-1458690311 > * syntax-not-ideal (https://github.com/rust-lang/rfcs/pull/3325#issuecomment-1458714974) > > Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! > > cc @rust-lang/lang-advisors: FCP proposed for lang, please feel free to register concerns. > See [this document](https://github.com/rust-lang/rfcbot-rs/blob/master/README.md) for info about what commands tagged team members can give me. - [**Initiating Comment**](https://github.com/rust-lang/rfcs/pull/3325#issuecomment-1396911218): > @rfcbot merge tmandry: We've been stuck on this for the past N lang-team meetings. ```rust #[unsafe no_mangle] fn main() {} #[unsafe(no_mangle)] fn main() {} #[unsafe { no_mangle }] fn main() {} ``` nikomatsakis: I agree that the parentheses made me think it was an attributed *named* `unsafe` versus a `no_mangle` being an attribute that *is* unsafe. I don't know that this is a big problem, but it's true. lokathor: this seems like a realistic example... ```rust #[cfg_attr(foo, unsafe(no_mangle))] ``` ...would this potentially cause an impl problem? nikomatsakis: would this form be accepted by the ecosystem? I am not sure if it would be? ```rust #[cfg_attr(foo, unsafe no_mangle)] ``` As a bonus for it looking an attribute named unsafe, it would "just work" in the grammar. urgau: `#[unsafe::no_mangle]` ? lokathor: that wouldn't be nearly as backwards compatible, is one problem. Questions: ```rust #[proc_macro] #[unsafe(...)] // what does proc-macro see #[unsafe(proc_macro(...))] // what does proc-macro see ``` tmandry to author comment. Yay! ### "RFC: UTF-8 characters and escape codes in (byte) string literals" rfcs#3349 - **Link:** https://github.com/rust-lang/rfcs/pull/3349 - [**Tracking Comment**](https://github.com/rust-lang/rfcs/pull/3349#issuecomment-1396747916): > Team member @joshtriplett has proposed to merge this. The next step is review by the rest of the tagged team members: > > * [x] @joshtriplett > * [x] @nikomatsakis > * [ ] @pnkfelix > * [ ] @scottmcm > * [ ] @tmandry > > Concerns: > > * raw-byte-strings-with-unicode (https://github.com/rust-lang/rfcs/pull/3349#issuecomment-1396747889) > * waiting-on-update-re-using-char-and-string-tables (https://github.com/rust-lang/rfcs/pull/3349#issuecomment-1503875165) > > Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! > > cc @rust-lang/lang-advisors: FCP proposed for lang, please feel free to register concerns. > See [this document](https://github.com/rust-lang/rfcbot-rs/blob/master/README.md) for info about what commands tagged team members can give me. - [**Initiating Comment**](https://github.com/rust-lang/rfcs/pull/3349#issuecomment-1396747889): > I do think we should permit `br"¥¥¥"`, but I don't think we should make any of the other changes proposed in that table, for the reasons @m-ou-se stated. > > I'm going to go ahead and propose FCP for this. This does *not* preclude making further changes to how this information is presented. > > @rfcbot merge > > @rfcbot concern raw-byte-strings-with-unicode ### "RFC: Start working on a Rust specification" rfcs#3355 - **Link:** https://github.com/rust-lang/rfcs/pull/3355 - [**Tracking Comment**](https://github.com/rust-lang/rfcs/pull/3355#issuecomment-1513641410): > Team member @tmandry has proposed to merge this. The next step is review by the rest of the tagged team members: > > * [ ] @joshtriplett > * [ ] @nikomatsakis > * [ ] @pnkfelix > * [ ] @scottmcm > * [x] @tmandry > > No concerns currently listed. > > Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! > > cc @rust-lang/lang-advisors: FCP proposed for lang, please feel free to register concerns. > See [this document](https://github.com/rust-lang/rfcbot-rs/blob/master/README.md) for info about what commands tagged team members can give me. - [**Initiating Comment**](https://github.com/rust-lang/rfcs/pull/3355#issuecomment-1513641387): > @rfcbot fcp merge > > We talked about this in the lang team triage meeting and agreed that this is ultimately a council-level decision. That said, it seems like a good idea to get formal lang team buy-in ahead of the council making a decision on this. > > Since we can do that now while the council is still forming, I'm opening an FCP for it. **Note that this will still need a _separate_ FCP to actually be merged once the governance council is formed.** ### "The `#[diagnostic]` attribute namespace" rfcs#3368 - **Link:** https://github.com/rust-lang/rfcs/pull/3368 - [**Tracking Comment**](https://github.com/rust-lang/rfcs/pull/3368#issuecomment-1505729113): > Team member @tmandry has proposed to merge this. The next step is review by the rest of the tagged team members: > > * [ ] @Aaron1011 > * [x] @cjgillot > * [x] @davidtwco > * [x] @eddyb > * [x] @estebank > * [ ] @joshtriplett > * [ ] @lcnr > * [x] @matthewjasper > * [x] @michaelwoerister > * [ ] @nagisa > * [ ] @nikomatsakis > * [x] @oli-obk > * [ ] @petrochenkov > * [ ] @pnkfelix > * [ ] @scottmcm > * [x] @tmandry > * [ ] @wesleywiser > > Concerns: > > * doesnt-pull-its-weight (https://github.com/rust-lang/rfcs/pull/3368#issuecomment-1514914043) > * is-attribute-namespace-tool-module (https://github.com/rust-lang/rfcs/pull/3368#issuecomment-1514908284) > * ~~lang-team-signoff~~ resolved by https://github.com/rust-lang/rfcs/pull/3368#issuecomment-1528150248 > * ~~translation~~ resolved by https://github.com/rust-lang/rfcs/pull/3368#issuecomment-1511696325 > * ~~version-namespace~~ resolved by https://github.com/rust-lang/rfcs/pull/3368#issuecomment-1528150248 > > Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! > > cc @rust-lang/lang-advisors: FCP proposed for lang, please feel free to register concerns. > See [this document](https://github.com/rust-lang/rfcbot-rs/blob/master/README.md) for info about what commands tagged team members can give me. - [**Initiating Comment**](https://github.com/rust-lang/rfcs/pull/3368#issuecomment-1505729088): > @rfcbot merge > > I think we should merge this RFC, modulo some concerns I note below. > > It would be good to merge it soon so we can get the `#[diagnostic]` namespace parsed by rustc, so any crate using it in the future won't have to bump its MSRV past the first rustc version that knows about `#[diagnostic]` (even if it doesn't support any attributes yet – unknown attributes are allowed to be no-ops in the RFC). > > ## Concerns > > @rfcbot concern version-namespace > > I personally think we should not include the version namespace in the current proposal but include it as a future possibility. @oli-obk pointed out to me that we can always decide to include a version namespace later, and choose to require it in a new edition if we decide that it was a mistake to let you use a diagnostic attribute _without_ a version. However, I think we should choose the more ergonomic option for now. > > This doesn't necessarily represent the whole lang team's opinion (sorry for churn around that), but I'll try to push on getting consensus here. > > @rfcbot concern lang-team-signoff > > Several members of the lang team don't necessarily want to bypass the lang team for the stabilization process, though I'm sympathetic to the argument that there could be too much high-frequency churn and don't want the lang team to get in the way of progress. I propose modifying the RFC to say that the lang team can choose to adopt an expedited process for stabilization of new attributes and fields with an FCP (this would not require a new RFC). > > ## Additional feedback > > I think it would be ideal to strengthen the wording around warning on unrecognized lints or fields. I think these should _always_ be a warn-by-default lint. > > We may want to make it possible for a diagnostic attribute to affect or create new warn-by-default lints, which by my read is not allowed in the current RFC ("Any attribute in this namespace may... only affect the messages emitted by a compiler in case of a failed compilation.") > > Personally I think it's reasonable to allow affecting existing warnings in the current RFC, and leave the creation of new ones as a future possibility. Or if either of these were considered and rejected, the RFC should say why. ### "Tracking issue for RFC 2515, "Permit impl Trait in type aliases"" rust#63063 - **Link:** https://github.com/rust-lang/rust/issues/63063 - [**Tracking Comment**](https://github.com/rust-lang/rust/issues/63063#issuecomment-1360043090): > Team member @nikomatsakis has proposed to merge this. The next step is review by the rest of the tagged team members: > > * [x] @cramertj > * [x] @joshtriplett > * [x] @nikomatsakis > * [ ] @pnkfelix > * [ ] @scottmcm > > Concerns: > > * ~~~~ resolved by https://github.com/rust-lang/rust/issues/63063#issuecomment-1361432898 > * docs (https://github.com/rust-lang/rust/issues/63063#issuecomment-1364525286) > * function-defining-uses (https://github.com/rust-lang/rust/issues/63063#issuecomment-1385946789) > > Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! > > cc @rust-lang/lang-advisors: FCP proposed for lang, please feel free to register concerns. > See [this document](https://github.com/rust-lang/rfcbot-rs/blob/master/README.md) for info about what commands tagged team members can give me. - [**Initiating Comment**](https://github.com/rust-lang/rust/issues/63063#issuecomment-1360043060): > @rfcbot fcp merge > > This has been a long-time coming. Let's Do This! > > [Stabilization report in this comment.](https://github.com/rust-lang/rust/issues/63063#issuecomment-1354392317) scottmcm: Last week we needed niko? <https://hackmd.io/Yg28CAXiRzCZkNW_v9ivKw#%E2%80%9CTracking-issue-for-RFC-2515-%E2%80%9CPermit-impl-Trait-in-type-aliases%E2%80%9D%E2%80%9D-rust63063> ### "Stabilise inline_const" rust#104087 - **Link:** https://github.com/rust-lang/rust/pull/104087 - [**Tracking Comment**](https://github.com/rust-lang/rust/pull/104087#issuecomment-1350231887): > Team member @scottmcm has proposed to merge this. The next step is review by the rest of the tagged team members: > > * [x] @cramertj > * [x] @joshtriplett > * [x] @nikomatsakis > * [ ] @pnkfelix > * [x] @scottmcm > > Concerns: > > * ~~expectations-around-panics-in-inline-const~~ resolved by https://github.com/rust-lang/rust/pull/104087#issuecomment-1449080210 > * optimization-dependent-errors (https://github.com/rust-lang/rust/pull/104087#issuecomment-1449080210) > * ~~post-monomorphization-errors~~ resolved by https://github.com/rust-lang/rust/pull/104087#issuecomment-1448730779 > * should-unused-code-cause-errors (https://github.com/rust-lang/rust/pull/104087#issuecomment-1410921524) > > Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! > > cc @rust-lang/lang-advisors: FCP proposed for lang, please feel free to register concerns. > See [this document](https://github.com/rust-lang/rfcbot-rs/blob/master/README.md) for info about what commands tagged team members can give me. - [**Initiating Comment**](https://github.com/rust-lang/rust/pull/104087#issuecomment-1350231871): > Restarting the FCP from https://github.com/rust-lang/rust/pull/104087#issuecomment-1315946122 > > @rfcbot fcp merge ### "Stabilize `anonymous_lifetime_in_impl_trait`" rust#107378 - **Link:** https://github.com/rust-lang/rust/pull/107378 - [**Tracking Comment**](https://github.com/rust-lang/rust/pull/107378#issuecomment-1430287200): > Team member @joshtriplett has proposed to merge this. The next step is review by the rest of the tagged team members: > > * [x] @joshtriplett > * [ ] @nikomatsakis > * [ ] @pnkfelix > * [ ] @scottmcm > * [ ] @tmandry > > Concerns: > > * elaborate-cases-and-future-directions (https://github.com/rust-lang/rust/pull/107378#issuecomment-1480280524) > * why-not-higher-rank (https://github.com/rust-lang/rust/pull/107378#issuecomment-1480280524) > > Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! > > cc @rust-lang/lang-advisors: FCP proposed for lang, please feel free to register concerns. > See [this document](https://github.com/rust-lang/rfcbot-rs/blob/master/README.md) for info about what commands tagged team members can give me. - [**Initiating Comment**](https://github.com/rust-lang/rust/pull/107378#issuecomment-1430287177): > We discussed this in today's @rust-lang/lang meeting, and we think this is ready for an FCP to merge: > > @rfcbot merge > > We'd also like to make sure that future work on type-alias impl Trait (TAIT) doesn't automatically assume anonymous lifetimes will work there, and thinks carefully about how or if that should work. ### "TAIT defining scope options" rust#107645 - **Link:** https://github.com/rust-lang/rust/issues/107645 - [**Tracking Comment**](https://github.com/rust-lang/rust/issues/107645#issuecomment-1468728438): > Team member @nikomatsakis has proposed to merge this. The next step is review by the rest of the tagged team members: > > * [x] @joshtriplett > * [x] @nikomatsakis > * [x] @pnkfelix > * [x] @scottmcm > * [x] @tmandry > > Concerns: > > * explicit-alternative (https://github.com/rust-lang/rust/issues/107645#issuecomment-1469979788) > * why-not-just-the-return-type (https://github.com/rust-lang/rust/issues/107645#issuecomment-1468796621) > > Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! > > cc @rust-lang/lang-advisors: FCP proposed for lang, please feel free to register concerns. > See [this document](https://github.com/rust-lang/rfcbot-rs/blob/master/README.md) for info about what commands tagged team members can give me. - [**Initiating Comment**](https://github.com/rust-lang/rust/issues/107645#issuecomment-1468728409): > @rfcbot fcp merge > > I propose that we accept https://github.com/rust-lang/rust/pull/107809. It implements a conservative path forward. Basically any function that constraints a TAIT but doesn't list the TAIT in its arguments/return type is a hard error, giving us room to change the behavior in the future. > > ### Final behavior as I understand it > > * A TAIT has a *defining scope* that corresponds to the enclosing module or item. > * A *defining use* for a TAIT is any item that (a) is within the defining scope and (b) contains a function that lists the TAIT in the argument or return types, either before or after normalization (*see edge case below). > * Within the defining scope, an item is called *constraining* if it puts constraints on the value of the TAIT. i.e., for the item to type check, the hidden type of the TAIT must have a particular value. This could occur because of a `let` (e.g., `let x: TAIT = 22_u32`), a return (e.g., `return 22_u32` in a function whose return type is `TAIT`), or in other ways. > * Any *constraining* item within the defining scope that is not a *defining use* is a hard error. This means we can later opt to allow such a use; or to allow it with an annotation of some kind; or to make other such changes. > * All *defining uses* must fully infer the hidden type of the TAIT and must infer the same type for the TAIT. > * WIthin the defining scope, TAITs must always be given generic arguments (e.g., `fn foo<T>() -> TAIT<T>` and not `fn foo() -> TAIT<u32>`). This ensures inference is tractable and well-defined. > > ### Current bugs and limitations (forwards compatible to change) > > * Within the defining scope, attempts to check whether `TAIT` implements an auto-trait will yield a cycle error unless the auto-trait is listed in the TAIT's bounds. This is suboptimal, but the ideal fix is unclear. > * A function that has an argument which is an associated type referencing a TAIT (e.g. `<TAIT as SomeTrait>::SomeItem`) ought to be considered a *defining use*. However, in the compiler today, if that associated type can be normalized, and the normalized form does not reference the TAIT, the function is not. This can only cause more errors. > > @rustbot labels -I-lang-nominated ### "Make late_bound_lifetime_arguments a hard error." rust#108782 - **Link:** https://github.com/rust-lang/rust/pull/108782 - [**Tracking Comment**](https://github.com/rust-lang/rust/pull/108782#issuecomment-1468627626): > Team member @nikomatsakis has proposed to merge this. The next step is review by the rest of the tagged team members: > > * [ ] @joshtriplett > * [x] @nikomatsakis > * [ ] @pnkfelix > * [x] @scottmcm > * [ ] @tmandry > > Concerns: > > * types-team-input (https://github.com/rust-lang/rust/pull/108782#issuecomment-1477170467) > * unclear-motivation (https://github.com/rust-lang/rust/pull/108782#issuecomment-1522295931) > > Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! > > cc @rust-lang/lang-advisors: FCP proposed for lang, please feel free to register concerns. > See [this document](https://github.com/rust-lang/rfcbot-rs/blob/master/README.md) for info about what commands tagged team members can give me. - [**Initiating Comment**](https://github.com/rust-lang/rust/pull/108782#issuecomment-1468627594): > @rfcbot fcp merge > > Discussed in a (minimally attended) lang-team triage meeting and we are in favor of moving forward with this. > ## Active FCPs None. ## P-critical issues None. ## Nominated RFCs, PRs and issues discussed this meeting (none yet, move things from the section below as they are discussed) ### "RFC: Start working on a Rust specification" rfcs#3355 **Link:** https://github.com/rust-lang/rfcs/pull/3355 removing nomination label, pending merge ### "expand: Change how `#![cfg(FALSE)]` behaves on crate root" rust#110141 **Link:** https://github.com/rust-lang/rust/pull/110141 ### "dyn Trait comparison should not include the vtable pointer" rust#106447 **Link:** https://github.com/rust-lang/rust/issues/106447 nikomatsakis: I don't feel good about equality discarding the vtable. Feels like IEEE-level mistake to me. Two things should not be equal if they can have totally different behavior when you call the methods. scottmcm: Start by adding an `addr_eq` and suggest people call that instead? lokathor: can you cast to `usize`? nikomatsakis: you can, but do we want to encourage that? scottmcm: I think we want to tell them to use a fn that says exactly what they are trying to do. If I had the option to just disable it entirely and you have to write a function call that is clearer ... pnkfelix: what should derive(Eq) do?! nikomatsakis: we should fix compiler to compare the vtables. scottmcm: hard because dynamic linking nikomatsakis: we could compare the type-id scottmcm: I think they don't have type-id unless they have `Any` in it pnkfelix: are type-id always there or not? scottmcm: breaking change to make this ### "Remove misleading target feature aliases" rust#107707 **Link:** https://github.com/rust-lang/rust/pull/107707 Nightly only breakage. But if people are using old aliases, their behavior will silently change. lokathor: target feature will tell you if you are trying to use a target feature that doesn't exist in the target, so people should get warnings. pnkfelix: ok, I'm happy with that, good enough. ## Nominated RFCs, PRs and issues NOT discussed this meeting ### "Make pointer_structural_match lint warn by default" rust#110166 **Link:** https://github.com/rust-lang/rust/pull/110166