---
# System prepended metadata

title: Libs-API Meeting 2022-12-06
tags: [Minutes, Libs Meetings]

---

# Libs-API Meeting 2022-12-06

###### tags: `Libs Meetings` `Minutes`

**Meeting Link**: https://meet.jit.si/rust-libs-meeting-crxoz2at8hiccp7b3ixf89qgxfymlbwr
**Attendees**: Amanieu, Josh, Mara

## Agenda

- Triage
- Anything else?

## Triage

### FCPs

20 rust-lang/rust T-libs-api FCPs

[yaahc (17)](https://rfcbot.rs/fcp/yaahc), [Amanieu (5)](https://rfcbot.rs/fcp/Amanieu), [m-ou-se (8)](https://rfcbot.rs/fcp/m-ou-se), [joshtriplett (10)](https://rfcbot.rs/fcp/joshtriplett), [BurntSushi (18)](https://rfcbot.rs/fcp/BurntSushi), [dtolnay (6)](https://rfcbot.rs/fcp/dtolnay)

### Nominated


- [3 `rust-lang/rust` `I-libs-api-nominated` items](https://github.com/rust-lang/rust/issues?q=label:I-libs-api-nominated+is:open)
  - rust.tf/83363 *Implement new proc macro diagnostics API*
    - Let's discuss when David is in the meeting.
  - rust.tf/101607 *Add \`cstr!\` macro.*
    - Closed in favor for c"" (RFC 3348).
  - rust.tf/103763 *\`Arc::ptr\_eq\` does not always return "true if the two Arcs point to the same allocation" as documented*
    - Let's fix this.
    - Example below.
    - Discussion about the same issue in ptr::eq.
- [1 `rust-lang/rfcs` `I-libs-api-nominated` items](https://github.com/rust-lang/rfcs/issues?q=label:I-libs-api-nominated+is:open)
  - rust.tf/rfc3308 *Add \`core::mem::offset\_of!\` RFC*
- [1 `rust-lang/libs-team` `T-libs-api` `I-nominated` items](https://github.com/rust-lang/libs-team/issues?q=label:T-libs-api+label:I-nominated+is:open)
  - github.com/rust-lang/libs-team/issues/122 *Revamp unstable MaybeUninit APIs*

Arc::ptr_eq example.
shows `false` in debug mode, `true` in release mode:
```rust=
use std::fmt;
use std::fmt::Debug;
use std::sync::Arc;

pub struct X;

#[repr(transparent)]
pub struct Wrapper(X);

impl Debug for X {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        f.write_str("X")
    }
}

impl Debug for Wrapper {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        f.write_str("X")
    }
}

fn main() {
    let x: Arc<X> = Arc::new(X);
    let w: Arc<Wrapper> = unsafe { std::mem::transmute(x.clone()) };
    let x: Arc<dyn Debug> = x;
    let w: Arc<dyn Debug> = w;

    println!("{:?}", Arc::ptr_eq(&x, &w));
}
```

Amanieu: for ptr::eq in general, vtables already get merged. Example where they get merged:

```rust=
trait Trait {}
struct Foo;
struct Bar;
impl Trait for Foo {}
impl Trait for Bar {}

pub fn foo() -> &'static dyn Trait {&Foo}
pub fn bar() -> &'static dyn Trait {&Bar}
```

This Eq impl shouldn't have happened:

https://doc.rust-lang.org/1.65.0/src/core/ptr/metadata.rs.html#244-251

### Stalled Tracking Issues

- [`rust-lang/rust` `T-libs-api` `C-tracking-issue` items](https://github.com/rust-lang/rust/issues?q=label:T-libs-api+label:C-tracking-issue+is:open+sort:updated-asc)
