New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tracking issue for tweaks to object safety (RFC 2027) #43561

withoutboats opened this Issue Jul 30, 2017 · 3 comments


None yet
2 participants

withoutboats commented Jul 30, 2017

This is the tracking issue for RFC 2027, tweaks to object safety (rust-lang/rfcs#2027)


  • Implement
  • Document
  • Stabilize

This comment has been minimized.


withoutboats commented Jul 30, 2017

If anyone can mentor I'd be excited to try to implement this.

From my naive perspective, it seems like what we need to do is stop checking object safety at certain points (possibly determining if a type is well formed?) and start checking it at other points (checking if the object type implements its corresponding trait). More insight would be great, cc'ing @eddyb


This comment has been minimized.


eddyb commented Jul 30, 2017

I'm afraid @nikomatsakis understands the details here much better than me.


This comment has been minimized.


withoutboats commented Aug 7, 2017

I experimented with implementing this, but I definitely don't know what I'm doing. I noticed some interesting cases.

trait Foo: Sized { }

fn foo(_: &Foo) { panic!() }

fn main {
    let x: Box<Foo>;

Today these types are just invalid types, but I believe this RFC would make them valid. You would just never be able to initialize x or call foo. I didn't consider these in the RFC, but it seems fine to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment