Skip to content

Commit e3b7e6c

Browse files
committed
Tweak relese notes + rebase fixes
1 parent fb77443 commit e3b7e6c

File tree

11 files changed

+50
-24
lines changed

11 files changed

+50
-24
lines changed

Diff for: RELEASES.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Version 1.0.0-beta (April 2015)
3434
downcasting via the `Any` trait is effectively limited to
3535
concrete types. This helps retain the potentially-important
3636
"parametricity" property: generic code cannot behave differently
37-
for different type arguments.
37+
for different type arguments except in minor ways.
3838
* The `unsafe_destructor` feature is now deprecated in favor of
3939
the [new `dropck`][dropck]. This change is a major reduction in
4040
unsafe code.
@@ -78,7 +78,7 @@ Version 1.0.0-beta (April 2015)
7878
[scoped]: http://static.rust-lang.org/doc/master/std/thread/fn.scoped.html
7979
[moar-ufcs]: https://github.com/rust-lang/rust/pull/22172
8080
[prim-inherent]: https://github.com/rust-lang/rust/pull/23104
81-
[overflow]: https://github.com/rust-lang/rust/pull/22532
81+
[overflow]: https://github.com/rust-lang/rfcs/blob/master/text/0560-integer-overflow.md
8282
[metadata-shrink]: https://github.com/rust-lang/rust/pull/22971
8383
[self-sized]: https://github.com/rust-lang/rust/pull/22301
8484
[assoc-where]: https://github.com/rust-lang/rust/pull/22512

Diff for: src/liblibc/lib.rs

+34-11
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,6 @@ pub mod types {
291291
}
292292

293293
pub mod bsd44 {
294-
use core::clone::Clone;
295294
use types::common::c95::{c_void};
296295
use types::os::arch::c95::{c_char, c_int, c_uint};
297296

@@ -313,7 +312,7 @@ pub mod types {
313312
#[cfg(target_pointer_width = "64")]
314313
pub __ss_pad2: [u8; 128 - 2 * 8],
315314
}
316-
impl Clone for sockaddr_storage {
315+
impl ::core::clone::Clone for sockaddr_storage {
317316
fn clone(&self) -> sockaddr_storage { *self }
318317
}
319318
#[repr(C)]
@@ -376,7 +375,7 @@ pub mod types {
376375
pub sun_family: sa_family_t,
377376
pub sun_path: [c_char; 108]
378377
}
379-
impl Clone for sockaddr_un {
378+
impl ::core::clone::Clone for sockaddr_un {
380379
fn clone(&self) -> sockaddr_un { *self }
381380
}
382381

@@ -1634,12 +1633,15 @@ pub mod types {
16341633
pub sa_data: [u8; 14],
16351634
}
16361635
#[repr(C)]
1637-
#[derive(Copy, Clone)] pub struct sockaddr_storage {
1636+
#[derive(Copy)] pub struct sockaddr_storage {
16381637
pub ss_family: sa_family_t,
16391638
pub __ss_pad1: [u8; 6],
16401639
pub __ss_align: i64,
16411640
pub __ss_pad2: [u8; 112],
16421641
}
1642+
impl ::core::clone::Clone for sockaddr_storage {
1643+
fn clone(&self) -> sockaddr_storage { *self }
1644+
}
16431645
#[repr(C)]
16441646
#[derive(Copy, Clone)] pub struct sockaddr_in {
16451647
pub sin_family: sa_family_t,
@@ -1685,10 +1687,13 @@ pub mod types {
16851687
pub ai_next: *mut addrinfo,
16861688
}
16871689
#[repr(C)]
1688-
#[derive(Copy, Clone)] pub struct sockaddr_un {
1690+
#[derive(Copy)] pub struct sockaddr_un {
16891691
pub sun_family: sa_family_t,
16901692
pub sun_path: [c_char; 108]
16911693
}
1694+
impl ::core::clone::Clone for sockaddr_un {
1695+
fn clone(&self) -> sockaddr_un { *self }
1696+
}
16921697
}
16931698
}
16941699

@@ -1933,7 +1938,7 @@ pub mod types {
19331938
pub type LPWSAPROTOCOLCHAIN = *mut WSAPROTOCOLCHAIN;
19341939

19351940
#[repr(C)]
1936-
#[derive(Copy, Clone)] pub struct WSAPROTOCOL_INFO {
1941+
#[derive(Copy)] pub struct WSAPROTOCOL_INFO {
19371942
pub dwServiceFlags1: DWORD,
19381943
pub dwServiceFlags2: DWORD,
19391944
pub dwServiceFlags3: DWORD,
@@ -1955,13 +1960,16 @@ pub mod types {
19551960
pub dwProviderReserved: DWORD,
19561961
pub szProtocol: [u8; WSAPROTOCOL_LEN as usize + 1],
19571962
}
1963+
impl ::core::clone::Clone for WSAPROTOCOL_INFO {
1964+
fn clone(&self) -> WSAPROTOCOL_INFO { *self }
1965+
}
19581966

19591967
pub type LPWSAPROTOCOL_INFO = *mut WSAPROTOCOL_INFO;
19601968

19611969
pub type GROUP = c_uint;
19621970

19631971
#[repr(C)]
1964-
#[derive(Copy, Clone)] pub struct WIN32_FIND_DATAW {
1972+
#[derive(Copy)] pub struct WIN32_FIND_DATAW {
19651973
pub dwFileAttributes: DWORD,
19661974
pub ftCreationTime: FILETIME,
19671975
pub ftLastAccessTime: FILETIME,
@@ -1973,6 +1981,9 @@ pub mod types {
19731981
pub cFileName: [wchar_t; 260], // #define MAX_PATH 260
19741982
pub cAlternateFileName: [wchar_t; 14],
19751983
}
1984+
impl ::core::clone::Clone for WIN32_FIND_DATAW {
1985+
fn clone(&self) -> WIN32_FIND_DATAW { *self }
1986+
}
19761987

19771988
pub type LPWIN32_FIND_DATAW = *mut WIN32_FIND_DATAW;
19781989
}
@@ -2073,13 +2084,16 @@ pub mod types {
20732084
}
20742085

20752086
#[repr(C)]
2076-
#[derive(Copy, Clone)] pub struct sockaddr_storage {
2087+
#[derive(Copy)] pub struct sockaddr_storage {
20772088
pub ss_len: u8,
20782089
pub ss_family: sa_family_t,
20792090
pub __ss_pad1: [u8; 6],
20802091
pub __ss_align: i64,
20812092
pub __ss_pad2: [u8; 112],
20822093
}
2094+
impl ::core::clone::Clone for sockaddr_storage {
2095+
fn clone(&self) -> sockaddr_storage { *self }
2096+
}
20832097

20842098
#[repr(C)]
20852099
#[derive(Copy, Clone)] pub struct sockaddr_in {
@@ -2135,11 +2149,14 @@ pub mod types {
21352149
}
21362150

21372151
#[repr(C)]
2138-
#[derive(Copy, Clone)] pub struct sockaddr_un {
2152+
#[derive(Copy)] pub struct sockaddr_un {
21392153
pub sun_len: u8,
21402154
pub sun_family: sa_family_t,
21412155
pub sun_path: [c_char; 104]
21422156
}
2157+
impl ::core::clone::Clone for sockaddr_un {
2158+
fn clone(&self) -> sockaddr_un { *self }
2159+
}
21432160

21442161
#[repr(C)]
21452162
#[derive(Copy, Clone)] pub struct ifaddrs {
@@ -2239,10 +2256,13 @@ pub mod types {
22392256
}
22402257

22412258
#[repr(C)]
2242-
#[derive(Copy, Clone)] pub struct pthread_attr_t {
2259+
#[derive(Copy)] pub struct pthread_attr_t {
22432260
pub __sig: c_long,
22442261
pub __opaque: [c_char; 36]
22452262
}
2263+
impl ::core::clone::Clone for pthread_attr_t {
2264+
fn clone(&self) -> pthread_attr_t { *self }
2265+
}
22462266
}
22472267
pub mod posix08 {
22482268
}
@@ -2345,10 +2365,13 @@ pub mod types {
23452365
}
23462366

23472367
#[repr(C)]
2348-
#[derive(Copy, Clone)] pub struct pthread_attr_t {
2368+
#[derive(Copy)] pub struct pthread_attr_t {
23492369
pub __sig: c_long,
23502370
pub __opaque: [c_char; 56]
23512371
}
2372+
impl ::core::clone::Clone for pthread_attr_t {
2373+
fn clone(&self) -> pthread_attr_t { *self }
2374+
}
23522375
}
23532376
pub mod posix08 {
23542377
}

Diff for: src/librustc/middle/traits/coherence.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ use syntax::ast;
2525
use syntax::codemap::{DUMMY_SP, Span};
2626
use util::ppaux::Repr;
2727

28-
#[derive(Copy)]
28+
#[derive(Copy, Clone)]
2929
struct ParamIsLocal(bool);
3030

3131
/// True if there exist types that satisfy both of the two given impls.

Diff for: src/libstd/rt/unwind.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ pub mod eabi {
398398
pub struct DISPATCHER_CONTEXT;
399399

400400
#[repr(C)]
401-
#[derive(Copy)]
401+
#[derive(Copy, Clone)]
402402
pub enum EXCEPTION_DISPOSITION {
403403
ExceptionContinueExecution,
404404
ExceptionContinueSearch,

Diff for: src/libstd/sys/common/net.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,9 @@ pub fn socket(addr: SocketAddr, ty: libc::c_int) -> IoResult<sock_t> {
115115
Ipv4Addr(..) => libc::AF_INET,
116116
Ipv6Addr(..) => libc::AF_INET6,
117117
};
118-
match libc::socket(fam, ty, 0) {
118+
match libc::socket(fam, ty, 0) as i32 {
119119
-1 => Err(last_net_error()),
120-
fd => Ok(fd),
120+
fd => Ok(fd as sock_t),
121121
}
122122
}
123123
}

Diff for: src/libstd/sys/windows/c.rs

-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ pub type LPWSANETWORKEVENTS = *mut WSANETWORKEVENTS;
8989
pub type WSAEVENT = libc::HANDLE;
9090

9191
#[repr(C)]
92-
#[derive(Copy)]
9392
pub struct WSAPROTOCOL_INFO {
9493
pub dwServiceFlags1: libc::DWORD,
9594
pub dwServiceFlags2: libc::DWORD,

Diff for: src/libstd/sys/windows/tcp.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ use prelude::v1::*;
1515
use old_io::net::ip;
1616
use old_io::IoResult;
1717
use libc;
18+
use libc::consts::os::extra::INVALID_SOCKET;
1819
use mem;
1920
use ptr;
2021
use super::{last_error, last_net_error, sock_t};
@@ -183,8 +184,8 @@ impl TcpAcceptor {
183184
match unsafe {
184185
libc::accept(self.socket(), ptr::null_mut(), ptr::null_mut())
185186
} {
186-
-1 if wouldblock() => {}
187-
-1 => return Err(last_net_error()),
187+
INVALID_SOCKET if wouldblock() => {}
188+
INVALID_SOCKET => return Err(last_net_error()),
188189

189190
// Accepted sockets inherit the same properties as the caller,
190191
// so we need to deregister our event and switch the socket back

Diff for: src/libsyntax/diagnostic.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ fn stderr_isatty() -> bool {
371371
}
372372
#[cfg(windows)]
373373
fn stderr_isatty() -> bool {
374-
const STD_ERROR_HANDLE: libc::DWORD = -12;
374+
const STD_ERROR_HANDLE: libc::DWORD = -12i32 as libc::DWORD;
375375
extern "system" {
376376
fn GetStdHandle(which: libc::DWORD) -> libc::HANDLE;
377377
fn GetConsoleMode(hConsoleHandle: libc::HANDLE,

Diff for: src/libterm/win.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ impl<T: Write+Send+'static> WinConsole<T> {
104104
// terminal! Admittedly, this is fragile, since stderr could be
105105
// redirected to a different console. This is good enough for
106106
// rustc though. See #13400.
107-
let out = GetStdHandle(-11);
107+
let out = GetStdHandle(-11i32 as libc::DWORD);
108108
SetConsoleTextAttribute(out, accum);
109109
}
110110
}
@@ -116,7 +116,8 @@ impl<T: Write+Send+'static> WinConsole<T> {
116116
let bg;
117117
unsafe {
118118
let mut buffer_info = ::std::mem::uninitialized();
119-
if GetConsoleScreenBufferInfo(GetStdHandle(-11), &mut buffer_info) != 0 {
119+
if GetConsoleScreenBufferInfo(GetStdHandle(-11i32 as libc::DWORD),
120+
&mut buffer_info) != 0 {
120121
fg = bits_to_color(buffer_info.wAttributes);
121122
bg = bits_to_color(buffer_info.wAttributes >> 4);
122123
} else {

Diff for: src/libtest/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -757,7 +757,7 @@ fn stdout_isatty() -> bool {
757757
}
758758
#[cfg(windows)]
759759
fn stdout_isatty() -> bool {
760-
const STD_OUTPUT_HANDLE: libc::DWORD = -11;
760+
const STD_OUTPUT_HANDLE: libc::DWORD = -11i32 as libc::DWORD;
761761
extern "system" {
762762
fn GetStdHandle(which: libc::DWORD) -> libc::HANDLE;
763763
fn GetConsoleMode(hConsoleHandle: libc::HANDLE,

Diff for: src/test/compile-fail/coherence-impls-copy.rs

+2
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ impl Copy for MyType {}
2828

2929
impl Copy for &'static mut MyType {}
3030
//~^ ERROR E0206
31+
//~| ERROR E0277
32+
//~| ERROR E0277
3133
impl Clone for MyType { fn clone(&self) -> Self { *self } }
3234

3335
impl Copy for (MyType, MyType) {}

0 commit comments

Comments
 (0)