-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Implement unsafe trait
and unsafe impl
from the OIBIT RFC
#19703
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
Conversation
try!(self.head("")); | ||
try!(self.print_unsafety(unsafety)); | ||
try!(self.word_nbsp(visibility_qualified(item.vis, | ||
"trait").as_slice())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't the unsafe
go in the middle? This looks like it'll print unsafe pub trait
instead of pub unsafe trait
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good point, have to modify the test (as you also pointed out)
Could you also add a |
r=me modulo a few nits |
1148399
to
c822b7c
Compare
Needs a rebase |
c822b7c
to
5e477eb
Compare
@nikomatsakis This needs a rebase. |
…d integrating into rustdoc etc.
5e477eb
to
7855893
Compare
Implement `unsafe trait` and `unsafe impl` from the OIBIT RFC Reviewed-by: acrichto
This PR allows declaring traits and impls as `unsafe`. An `unsafe` trait requires an `unsafe` impl. An `unsafe` impl does not permit unsafe code within its interior (unless that code is contained within an unsafe block or unsafe fn, as normal). The commits are standalone. r? @alexcrichton cc #13231
This PR allows declaring traits and impls as
unsafe
. Anunsafe
trait requires anunsafe
impl. Anunsafe
impl does not permit unsafe code within its interior (unless that code is contained within an unsafe block or unsafe fn, as normal). The commits are standalone.r? @alexcrichton
cc #13231