Skip to content
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

Nightly/beta regression? Sized + UnwindSafe #40011

Closed
dpc opened this issue Feb 21, 2017 · 5 comments
Closed

Nightly/beta regression? Sized + UnwindSafe #40011

dpc opened this issue Feb 21, 2017 · 5 comments
Labels
regression-from-stable-to-beta Performance or correctness regression from stable to beta.

Comments

@dpc
Copy link
Contributor

dpc commented Feb 21, 2017

use std::panic::UnwindSafe;

fn is_unwind_safe<T: UnwindSafe>() {}

trait Foo: UnwindSafe {}

fn main() {
    is_unwind_safe::<Box<[u8]>>();
    is_unwind_safe::<Box<Foo>>();
}

https://is.gd/xWwNn6

Compiles on stable, but fails on beta and nightly.

@alexcrichton alexcrichton added the regression-from-stable-to-beta Performance or correctness regression from stable to beta. label Feb 21, 2017
@alexcrichton
Copy link
Member

I don't recall any changes on the libs side offhand, but @rust-lang/compiler does this look familiar?

@TimNN
Copy link
Contributor

TimNN commented Feb 21, 2017

Introduced between nightly-2017-01-26 and nightly-2017-02-02 (Changes) (Sadly, no nightlies in between.

@eddyb
Copy link
Member

eddyb commented Feb 21, 2017

This is actually @petrochenkov's #39230 exposing a library bug (missing ?Sized):

impl<T: UnwindSafe> UnwindSafe for Unique<T> {}

EDIT: I checked, and also talked to @nikomatsakis: it seems this trait is the only one affected, and the OIBIT/"auto trait" feature is still gated, so this is fine to break, it's just this regression that wasn't caught.

@alexcrichton
Copy link
Member

Thanks for the investigation @eddyb!

alexcrichton added a commit to alexcrichton/rust that referenced this issue Feb 21, 2017
Add the `?Sized` bound as we don't require the type to be sized.

Closes rust-lang#40011
@alexcrichton
Copy link
Member

Sent a fix as #40020

eddyb added a commit to eddyb/rust that referenced this issue Feb 25, 2017
…ckler

std: Relax UnwindSafe impl for Unique

Add the `?Sized` bound as we don't require the type to be sized.

Closes rust-lang#40011
eddyb added a commit to eddyb/rust that referenced this issue Feb 25, 2017
…ckler

std: Relax UnwindSafe impl for Unique

Add the `?Sized` bound as we don't require the type to be sized.

Closes rust-lang#40011
alexcrichton added a commit to brson/rust that referenced this issue Feb 26, 2017
Add the `?Sized` bound as we don't require the type to be sized.

Closes rust-lang#40011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
regression-from-stable-to-beta Performance or correctness regression from stable to beta.
Projects
None yet
Development

No branches or pull requests

4 participants