Skip to content

Add an impl for Box<Error> from String. #30509

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

Merged
merged 2 commits into from
Jan 13, 2016
Merged

Add an impl for Box<Error> from String. #30509

merged 2 commits into from
Jan 13, 2016

Conversation

michaelsproul
Copy link
Contributor

Closes #30156.

@rust-highfive
Copy link
Contributor

r? @alexcrichton

(rust_highfive has picked a reviewer for you, use r? to override)

@alexcrichton
Copy link
Member

@bors: r+ 577b267138eda17809f891f50b70171cba2b2945

@@ -119,6 +119,15 @@ impl From<String> for Box<Error + Send + Sync> {
}
}

#[unstable(feature = "string_box_error", reason = "recently added", issue = "30156")]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Implementations aren't checked for stability so this should really be flagged stable.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was wondering about that. I'll amend the commit and do a push.

@michaelsproul
Copy link
Contributor Author

@alexcrichton this seems to have stalled (no acknowledgement from @bors), and the r+ needs to be on the new commit. It's holidays though so take it easy! 😄

@netvl
Copy link
Contributor

netvl commented Jan 9, 2016

Is there a reason why there is no similar implementation for &str?

@alexcrichton
Copy link
Member

@michaelsproul oh if the commit is updated it needs a new r+

As @netvl says actually, could you add an impl for &str as well?

@michaelsproul
Copy link
Contributor Author

Will fix it up soon.

@michaelsproul
Copy link
Contributor Author

Updated! I really like the &str implementation, great idea @netvl.

@alexcrichton
Copy link
Member

@bors: r+ c1e527f

cc @rust-lang/libs, just a heads up, seems easy though as we have From<&str> for Box<Error+Send+Sync> so it seems like there's no reason to not also have it for Box<Error>

bors added a commit that referenced this pull request Jan 13, 2016
@bors
Copy link
Collaborator

bors commented Jan 13, 2016

⌛ Testing commit c1e527f with merge ac9be00...

@bors bors merged commit c1e527f into rust-lang:master Jan 13, 2016
@brson brson added the beta-nominated Nominated for backporting to the compiler in the beta channel. label Jan 16, 2016
@brson
Copy link
Contributor

brson commented Jan 16, 2016

bhsausabsha on IRC asked for a backport

@bluss
Copy link
Member

bluss commented Jan 19, 2016

backporting would solve this beta regression IIUC #30634

@brson brson added the beta-accepted Accepted for backporting to the compiler in the beta channel. label Jan 19, 2016
@brson
Copy link
Contributor

brson commented Jan 19, 2016

Per @nikomatsakis accepted for backport. This fixes another regression.

@brson brson removed the beta-nominated Nominated for backporting to the compiler in the beta channel. label Jan 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beta-accepted Accepted for backporting to the compiler in the beta channel.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants