mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-29 02:03:53 +00:00
Tweak relese notes + rebase fixes
This commit is contained in:
parent
fb77443213
commit
e3b7e6caa2
@ -34,7 +34,7 @@ Version 1.0.0-beta (April 2015)
|
|||||||
downcasting via the `Any` trait is effectively limited to
|
downcasting via the `Any` trait is effectively limited to
|
||||||
concrete types. This helps retain the potentially-important
|
concrete types. This helps retain the potentially-important
|
||||||
"parametricity" property: generic code cannot behave differently
|
"parametricity" property: generic code cannot behave differently
|
||||||
for different type arguments.
|
for different type arguments except in minor ways.
|
||||||
* The `unsafe_destructor` feature is now deprecated in favor of
|
* The `unsafe_destructor` feature is now deprecated in favor of
|
||||||
the [new `dropck`][dropck]. This change is a major reduction in
|
the [new `dropck`][dropck]. This change is a major reduction in
|
||||||
unsafe code.
|
unsafe code.
|
||||||
@ -78,7 +78,7 @@ Version 1.0.0-beta (April 2015)
|
|||||||
[scoped]: http://static.rust-lang.org/doc/master/std/thread/fn.scoped.html
|
[scoped]: http://static.rust-lang.org/doc/master/std/thread/fn.scoped.html
|
||||||
[moar-ufcs]: https://github.com/rust-lang/rust/pull/22172
|
[moar-ufcs]: https://github.com/rust-lang/rust/pull/22172
|
||||||
[prim-inherent]: https://github.com/rust-lang/rust/pull/23104
|
[prim-inherent]: https://github.com/rust-lang/rust/pull/23104
|
||||||
[overflow]: https://github.com/rust-lang/rust/pull/22532
|
[overflow]: https://github.com/rust-lang/rfcs/blob/master/text/0560-integer-overflow.md
|
||||||
[metadata-shrink]: https://github.com/rust-lang/rust/pull/22971
|
[metadata-shrink]: https://github.com/rust-lang/rust/pull/22971
|
||||||
[self-sized]: https://github.com/rust-lang/rust/pull/22301
|
[self-sized]: https://github.com/rust-lang/rust/pull/22301
|
||||||
[assoc-where]: https://github.com/rust-lang/rust/pull/22512
|
[assoc-where]: https://github.com/rust-lang/rust/pull/22512
|
||||||
|
@ -291,7 +291,6 @@ pub mod types {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub mod bsd44 {
|
pub mod bsd44 {
|
||||||
use core::clone::Clone;
|
|
||||||
use types::common::c95::{c_void};
|
use types::common::c95::{c_void};
|
||||||
use types::os::arch::c95::{c_char, c_int, c_uint};
|
use types::os::arch::c95::{c_char, c_int, c_uint};
|
||||||
|
|
||||||
@ -313,7 +312,7 @@ pub mod types {
|
|||||||
#[cfg(target_pointer_width = "64")]
|
#[cfg(target_pointer_width = "64")]
|
||||||
pub __ss_pad2: [u8; 128 - 2 * 8],
|
pub __ss_pad2: [u8; 128 - 2 * 8],
|
||||||
}
|
}
|
||||||
impl Clone for sockaddr_storage {
|
impl ::core::clone::Clone for sockaddr_storage {
|
||||||
fn clone(&self) -> sockaddr_storage { *self }
|
fn clone(&self) -> sockaddr_storage { *self }
|
||||||
}
|
}
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
@ -376,7 +375,7 @@ pub mod types {
|
|||||||
pub sun_family: sa_family_t,
|
pub sun_family: sa_family_t,
|
||||||
pub sun_path: [c_char; 108]
|
pub sun_path: [c_char; 108]
|
||||||
}
|
}
|
||||||
impl Clone for sockaddr_un {
|
impl ::core::clone::Clone for sockaddr_un {
|
||||||
fn clone(&self) -> sockaddr_un { *self }
|
fn clone(&self) -> sockaddr_un { *self }
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1634,12 +1633,15 @@ pub mod types {
|
|||||||
pub sa_data: [u8; 14],
|
pub sa_data: [u8; 14],
|
||||||
}
|
}
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
#[derive(Copy, Clone)] pub struct sockaddr_storage {
|
#[derive(Copy)] pub struct sockaddr_storage {
|
||||||
pub ss_family: sa_family_t,
|
pub ss_family: sa_family_t,
|
||||||
pub __ss_pad1: [u8; 6],
|
pub __ss_pad1: [u8; 6],
|
||||||
pub __ss_align: i64,
|
pub __ss_align: i64,
|
||||||
pub __ss_pad2: [u8; 112],
|
pub __ss_pad2: [u8; 112],
|
||||||
}
|
}
|
||||||
|
impl ::core::clone::Clone for sockaddr_storage {
|
||||||
|
fn clone(&self) -> sockaddr_storage { *self }
|
||||||
|
}
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
#[derive(Copy, Clone)] pub struct sockaddr_in {
|
#[derive(Copy, Clone)] pub struct sockaddr_in {
|
||||||
pub sin_family: sa_family_t,
|
pub sin_family: sa_family_t,
|
||||||
@ -1685,10 +1687,13 @@ pub mod types {
|
|||||||
pub ai_next: *mut addrinfo,
|
pub ai_next: *mut addrinfo,
|
||||||
}
|
}
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
#[derive(Copy, Clone)] pub struct sockaddr_un {
|
#[derive(Copy)] pub struct sockaddr_un {
|
||||||
pub sun_family: sa_family_t,
|
pub sun_family: sa_family_t,
|
||||||
pub sun_path: [c_char; 108]
|
pub sun_path: [c_char; 108]
|
||||||
}
|
}
|
||||||
|
impl ::core::clone::Clone for sockaddr_un {
|
||||||
|
fn clone(&self) -> sockaddr_un { *self }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1933,7 +1938,7 @@ pub mod types {
|
|||||||
pub type LPWSAPROTOCOLCHAIN = *mut WSAPROTOCOLCHAIN;
|
pub type LPWSAPROTOCOLCHAIN = *mut WSAPROTOCOLCHAIN;
|
||||||
|
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
#[derive(Copy, Clone)] pub struct WSAPROTOCOL_INFO {
|
#[derive(Copy)] pub struct WSAPROTOCOL_INFO {
|
||||||
pub dwServiceFlags1: DWORD,
|
pub dwServiceFlags1: DWORD,
|
||||||
pub dwServiceFlags2: DWORD,
|
pub dwServiceFlags2: DWORD,
|
||||||
pub dwServiceFlags3: DWORD,
|
pub dwServiceFlags3: DWORD,
|
||||||
@ -1955,13 +1960,16 @@ pub mod types {
|
|||||||
pub dwProviderReserved: DWORD,
|
pub dwProviderReserved: DWORD,
|
||||||
pub szProtocol: [u8; WSAPROTOCOL_LEN as usize + 1],
|
pub szProtocol: [u8; WSAPROTOCOL_LEN as usize + 1],
|
||||||
}
|
}
|
||||||
|
impl ::core::clone::Clone for WSAPROTOCOL_INFO {
|
||||||
|
fn clone(&self) -> WSAPROTOCOL_INFO { *self }
|
||||||
|
}
|
||||||
|
|
||||||
pub type LPWSAPROTOCOL_INFO = *mut WSAPROTOCOL_INFO;
|
pub type LPWSAPROTOCOL_INFO = *mut WSAPROTOCOL_INFO;
|
||||||
|
|
||||||
pub type GROUP = c_uint;
|
pub type GROUP = c_uint;
|
||||||
|
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
#[derive(Copy, Clone)] pub struct WIN32_FIND_DATAW {
|
#[derive(Copy)] pub struct WIN32_FIND_DATAW {
|
||||||
pub dwFileAttributes: DWORD,
|
pub dwFileAttributes: DWORD,
|
||||||
pub ftCreationTime: FILETIME,
|
pub ftCreationTime: FILETIME,
|
||||||
pub ftLastAccessTime: FILETIME,
|
pub ftLastAccessTime: FILETIME,
|
||||||
@ -1973,6 +1981,9 @@ pub mod types {
|
|||||||
pub cFileName: [wchar_t; 260], // #define MAX_PATH 260
|
pub cFileName: [wchar_t; 260], // #define MAX_PATH 260
|
||||||
pub cAlternateFileName: [wchar_t; 14],
|
pub cAlternateFileName: [wchar_t; 14],
|
||||||
}
|
}
|
||||||
|
impl ::core::clone::Clone for WIN32_FIND_DATAW {
|
||||||
|
fn clone(&self) -> WIN32_FIND_DATAW { *self }
|
||||||
|
}
|
||||||
|
|
||||||
pub type LPWIN32_FIND_DATAW = *mut WIN32_FIND_DATAW;
|
pub type LPWIN32_FIND_DATAW = *mut WIN32_FIND_DATAW;
|
||||||
}
|
}
|
||||||
@ -2073,13 +2084,16 @@ pub mod types {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
#[derive(Copy, Clone)] pub struct sockaddr_storage {
|
#[derive(Copy)] pub struct sockaddr_storage {
|
||||||
pub ss_len: u8,
|
pub ss_len: u8,
|
||||||
pub ss_family: sa_family_t,
|
pub ss_family: sa_family_t,
|
||||||
pub __ss_pad1: [u8; 6],
|
pub __ss_pad1: [u8; 6],
|
||||||
pub __ss_align: i64,
|
pub __ss_align: i64,
|
||||||
pub __ss_pad2: [u8; 112],
|
pub __ss_pad2: [u8; 112],
|
||||||
}
|
}
|
||||||
|
impl ::core::clone::Clone for sockaddr_storage {
|
||||||
|
fn clone(&self) -> sockaddr_storage { *self }
|
||||||
|
}
|
||||||
|
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
#[derive(Copy, Clone)] pub struct sockaddr_in {
|
#[derive(Copy, Clone)] pub struct sockaddr_in {
|
||||||
@ -2135,11 +2149,14 @@ pub mod types {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
#[derive(Copy, Clone)] pub struct sockaddr_un {
|
#[derive(Copy)] pub struct sockaddr_un {
|
||||||
pub sun_len: u8,
|
pub sun_len: u8,
|
||||||
pub sun_family: sa_family_t,
|
pub sun_family: sa_family_t,
|
||||||
pub sun_path: [c_char; 104]
|
pub sun_path: [c_char; 104]
|
||||||
}
|
}
|
||||||
|
impl ::core::clone::Clone for sockaddr_un {
|
||||||
|
fn clone(&self) -> sockaddr_un { *self }
|
||||||
|
}
|
||||||
|
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
#[derive(Copy, Clone)] pub struct ifaddrs {
|
#[derive(Copy, Clone)] pub struct ifaddrs {
|
||||||
@ -2239,10 +2256,13 @@ pub mod types {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
#[derive(Copy, Clone)] pub struct pthread_attr_t {
|
#[derive(Copy)] pub struct pthread_attr_t {
|
||||||
pub __sig: c_long,
|
pub __sig: c_long,
|
||||||
pub __opaque: [c_char; 36]
|
pub __opaque: [c_char; 36]
|
||||||
}
|
}
|
||||||
|
impl ::core::clone::Clone for pthread_attr_t {
|
||||||
|
fn clone(&self) -> pthread_attr_t { *self }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
pub mod posix08 {
|
pub mod posix08 {
|
||||||
}
|
}
|
||||||
@ -2345,10 +2365,13 @@ pub mod types {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
#[derive(Copy, Clone)] pub struct pthread_attr_t {
|
#[derive(Copy)] pub struct pthread_attr_t {
|
||||||
pub __sig: c_long,
|
pub __sig: c_long,
|
||||||
pub __opaque: [c_char; 56]
|
pub __opaque: [c_char; 56]
|
||||||
}
|
}
|
||||||
|
impl ::core::clone::Clone for pthread_attr_t {
|
||||||
|
fn clone(&self) -> pthread_attr_t { *self }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
pub mod posix08 {
|
pub mod posix08 {
|
||||||
}
|
}
|
||||||
|
@ -25,7 +25,7 @@ use syntax::ast;
|
|||||||
use syntax::codemap::{DUMMY_SP, Span};
|
use syntax::codemap::{DUMMY_SP, Span};
|
||||||
use util::ppaux::Repr;
|
use util::ppaux::Repr;
|
||||||
|
|
||||||
#[derive(Copy)]
|
#[derive(Copy, Clone)]
|
||||||
struct ParamIsLocal(bool);
|
struct ParamIsLocal(bool);
|
||||||
|
|
||||||
/// True if there exist types that satisfy both of the two given impls.
|
/// True if there exist types that satisfy both of the two given impls.
|
||||||
|
@ -398,7 +398,7 @@ pub mod eabi {
|
|||||||
pub struct DISPATCHER_CONTEXT;
|
pub struct DISPATCHER_CONTEXT;
|
||||||
|
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
#[derive(Copy)]
|
#[derive(Copy, Clone)]
|
||||||
pub enum EXCEPTION_DISPOSITION {
|
pub enum EXCEPTION_DISPOSITION {
|
||||||
ExceptionContinueExecution,
|
ExceptionContinueExecution,
|
||||||
ExceptionContinueSearch,
|
ExceptionContinueSearch,
|
||||||
|
@ -115,9 +115,9 @@ pub fn socket(addr: SocketAddr, ty: libc::c_int) -> IoResult<sock_t> {
|
|||||||
Ipv4Addr(..) => libc::AF_INET,
|
Ipv4Addr(..) => libc::AF_INET,
|
||||||
Ipv6Addr(..) => libc::AF_INET6,
|
Ipv6Addr(..) => libc::AF_INET6,
|
||||||
};
|
};
|
||||||
match libc::socket(fam, ty, 0) {
|
match libc::socket(fam, ty, 0) as i32 {
|
||||||
-1 => Err(last_net_error()),
|
-1 => Err(last_net_error()),
|
||||||
fd => Ok(fd),
|
fd => Ok(fd as sock_t),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -89,7 +89,6 @@ pub type LPWSANETWORKEVENTS = *mut WSANETWORKEVENTS;
|
|||||||
pub type WSAEVENT = libc::HANDLE;
|
pub type WSAEVENT = libc::HANDLE;
|
||||||
|
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
#[derive(Copy)]
|
|
||||||
pub struct WSAPROTOCOL_INFO {
|
pub struct WSAPROTOCOL_INFO {
|
||||||
pub dwServiceFlags1: libc::DWORD,
|
pub dwServiceFlags1: libc::DWORD,
|
||||||
pub dwServiceFlags2: libc::DWORD,
|
pub dwServiceFlags2: libc::DWORD,
|
||||||
|
@ -15,6 +15,7 @@ use prelude::v1::*;
|
|||||||
use old_io::net::ip;
|
use old_io::net::ip;
|
||||||
use old_io::IoResult;
|
use old_io::IoResult;
|
||||||
use libc;
|
use libc;
|
||||||
|
use libc::consts::os::extra::INVALID_SOCKET;
|
||||||
use mem;
|
use mem;
|
||||||
use ptr;
|
use ptr;
|
||||||
use super::{last_error, last_net_error, sock_t};
|
use super::{last_error, last_net_error, sock_t};
|
||||||
@ -183,8 +184,8 @@ impl TcpAcceptor {
|
|||||||
match unsafe {
|
match unsafe {
|
||||||
libc::accept(self.socket(), ptr::null_mut(), ptr::null_mut())
|
libc::accept(self.socket(), ptr::null_mut(), ptr::null_mut())
|
||||||
} {
|
} {
|
||||||
-1 if wouldblock() => {}
|
INVALID_SOCKET if wouldblock() => {}
|
||||||
-1 => return Err(last_net_error()),
|
INVALID_SOCKET => return Err(last_net_error()),
|
||||||
|
|
||||||
// Accepted sockets inherit the same properties as the caller,
|
// Accepted sockets inherit the same properties as the caller,
|
||||||
// so we need to deregister our event and switch the socket back
|
// so we need to deregister our event and switch the socket back
|
||||||
|
@ -371,7 +371,7 @@ fn stderr_isatty() -> bool {
|
|||||||
}
|
}
|
||||||
#[cfg(windows)]
|
#[cfg(windows)]
|
||||||
fn stderr_isatty() -> bool {
|
fn stderr_isatty() -> bool {
|
||||||
const STD_ERROR_HANDLE: libc::DWORD = -12;
|
const STD_ERROR_HANDLE: libc::DWORD = -12i32 as libc::DWORD;
|
||||||
extern "system" {
|
extern "system" {
|
||||||
fn GetStdHandle(which: libc::DWORD) -> libc::HANDLE;
|
fn GetStdHandle(which: libc::DWORD) -> libc::HANDLE;
|
||||||
fn GetConsoleMode(hConsoleHandle: libc::HANDLE,
|
fn GetConsoleMode(hConsoleHandle: libc::HANDLE,
|
||||||
|
@ -104,7 +104,7 @@ impl<T: Write+Send+'static> WinConsole<T> {
|
|||||||
// terminal! Admittedly, this is fragile, since stderr could be
|
// terminal! Admittedly, this is fragile, since stderr could be
|
||||||
// redirected to a different console. This is good enough for
|
// redirected to a different console. This is good enough for
|
||||||
// rustc though. See #13400.
|
// rustc though. See #13400.
|
||||||
let out = GetStdHandle(-11);
|
let out = GetStdHandle(-11i32 as libc::DWORD);
|
||||||
SetConsoleTextAttribute(out, accum);
|
SetConsoleTextAttribute(out, accum);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -116,7 +116,8 @@ impl<T: Write+Send+'static> WinConsole<T> {
|
|||||||
let bg;
|
let bg;
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut buffer_info = ::std::mem::uninitialized();
|
let mut buffer_info = ::std::mem::uninitialized();
|
||||||
if GetConsoleScreenBufferInfo(GetStdHandle(-11), &mut buffer_info) != 0 {
|
if GetConsoleScreenBufferInfo(GetStdHandle(-11i32 as libc::DWORD),
|
||||||
|
&mut buffer_info) != 0 {
|
||||||
fg = bits_to_color(buffer_info.wAttributes);
|
fg = bits_to_color(buffer_info.wAttributes);
|
||||||
bg = bits_to_color(buffer_info.wAttributes >> 4);
|
bg = bits_to_color(buffer_info.wAttributes >> 4);
|
||||||
} else {
|
} else {
|
||||||
|
@ -757,7 +757,7 @@ fn stdout_isatty() -> bool {
|
|||||||
}
|
}
|
||||||
#[cfg(windows)]
|
#[cfg(windows)]
|
||||||
fn stdout_isatty() -> bool {
|
fn stdout_isatty() -> bool {
|
||||||
const STD_OUTPUT_HANDLE: libc::DWORD = -11;
|
const STD_OUTPUT_HANDLE: libc::DWORD = -11i32 as libc::DWORD;
|
||||||
extern "system" {
|
extern "system" {
|
||||||
fn GetStdHandle(which: libc::DWORD) -> libc::HANDLE;
|
fn GetStdHandle(which: libc::DWORD) -> libc::HANDLE;
|
||||||
fn GetConsoleMode(hConsoleHandle: libc::HANDLE,
|
fn GetConsoleMode(hConsoleHandle: libc::HANDLE,
|
||||||
|
@ -28,6 +28,8 @@ impl Copy for MyType {}
|
|||||||
|
|
||||||
impl Copy for &'static mut MyType {}
|
impl Copy for &'static mut MyType {}
|
||||||
//~^ ERROR E0206
|
//~^ ERROR E0206
|
||||||
|
//~| ERROR E0277
|
||||||
|
//~| ERROR E0277
|
||||||
impl Clone for MyType { fn clone(&self) -> Self { *self } }
|
impl Clone for MyType { fn clone(&self) -> Self { *self } }
|
||||||
|
|
||||||
impl Copy for (MyType, MyType) {}
|
impl Copy for (MyType, MyType) {}
|
||||||
|
Loading…
Reference in New Issue
Block a user