]> git.lizzy.rs Git - rust.git/commitdiff
Auto merge of #24251 - alexcrichton:unsafe-from-raw-fd, r=aturon
authorbors <bors@rust-lang.org>
Tue, 14 Apr 2015 00:07:50 +0000 (00:07 +0000)
committerbors <bors@rust-lang.org>
Tue, 14 Apr 2015 00:07:50 +0000 (00:07 +0000)
As pointed out in [RFC issue 1043][rfc] it is quite useful to have the standard
I/O types to provide the contract that they are the sole owner of the underlying
object they represent. This guarantee enables writing safe interfaces like the
`MemoryMap` API sketched out in that issue.

[rfc]: https://github.com/rust-lang/rfcs/issues/1043

As constructing objects from these raw handles may end up violating these
ownership gurantees, the functions for construction are now marked unsafe.

[breaking-change]
Closes rust-lang/rfcs#1043


Trivial merge