Skip to content

Commit a32498d

Browse files
committed
Make ~fn non-copyable, make &fn copyable, split barefn/closure types,
correct handling of moves for struct-record update. Part of #3678. Fixes #2828, #3904, #4719.
1 parent 82d7396 commit a32498d

File tree

187 files changed

+2053
-2361
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

187 files changed

+2053
-2361
lines changed

src/compiletest/compiletest.rc

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ pub fn test_opts(config: config) -> test::TestOpts {
159159
}
160160
}
161161

162-
pub fn make_tests(config: config) -> ~[test::TestDesc] {
162+
pub fn make_tests(config: config) -> ~[test::TestDescAndFn] {
163163
debug!("making tests from %s",
164164
config.src_base.to_str());
165165
let mut tests = ~[];
@@ -196,13 +196,14 @@ pub fn is_test(config: config, testfile: &Path) -> bool {
196196
return valid;
197197
}
198198

199-
pub fn make_test(config: config, testfile: &Path) ->
200-
test::TestDesc {
201-
test::TestDesc {
202-
name: make_test_name(config, testfile),
199+
pub fn make_test(config: config, testfile: &Path) -> test::TestDescAndFn {
200+
test::TestDescAndFn {
201+
desc: test::TestDesc {
202+
name: make_test_name(config, testfile),
203+
ignore: header::is_test_ignored(config, testfile),
204+
should_fail: false
205+
},
203206
testfn: make_test_closure(config, testfile),
204-
ignore: header::is_test_ignored(config, testfile),
205-
should_fail: false
206207
}
207208
}
208209

src/libcore/at_vec.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@
1010

1111
//! Managed vectors
1212
13-
// NB: transitionary, de-mode-ing.
14-
#[forbid(deprecated_mode)];
15-
#[forbid(deprecated_pattern)];
16-
1713
use cast::transmute;
1814
use kinds::Copy;
1915
use iter;

src/libcore/bool.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@
99
// except according to those terms.
1010

1111

12-
// NB: transitionary, de-mode-ing.
13-
#[forbid(deprecated_mode)];
14-
#[forbid(deprecated_pattern)];
15-
1612
//! Boolean logic
1713
1814
use bool;

src/libcore/cast.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
//! Unsafe operations
12-
#[forbid(deprecated_mode)]
13-
1411
#[abi = "rust-intrinsic"]
1512
extern mod rusti {
1613
fn forget<T>(-x: T);

src/libcore/char.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@
1010

1111
//! Utilities for manipulating the char type
1212
13-
// NB: transitionary, de-mode-ing.
14-
#[forbid(deprecated_mode)];
15-
#[forbid(deprecated_pattern)];
16-
1713
use char;
1814
use cmp::Eq;
1915
use option::{None, Option, Some};

src/libcore/cleanup.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@
1010

1111
#[doc(hidden)];
1212

13-
// NB: transitionary, de-mode-ing.
14-
#[forbid(deprecated_mode)];
15-
#[forbid(deprecated_pattern)];
16-
1713
use libc::{c_char, c_void, intptr_t, uintptr_t};
1814
use ptr::{mut_null, null, to_unsafe_ptr};
1915
use repr::BoxRepr;

src/libcore/cmp.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,6 @@ and `Eq` to overload the `==` and `!=` operators.
2020
2121
*/
2222

23-
// NB: transitionary, de-mode-ing.
24-
#[forbid(deprecated_mode)];
25-
#[forbid(deprecated_pattern)];
26-
2723
/**
2824
* Trait for values that can be compared for equality
2925
* and inequality.

src/libcore/container.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@
1010

1111
//! Container traits
1212
13-
#[forbid(deprecated_mode)];
14-
#[forbid(deprecated_pattern)];
15-
1613
use option::Option;
1714

1815
pub trait Container {

src/libcore/core.rc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,6 @@ Implicitly, all crates behave as if they included the following prologue:
4848
// Don't link to core. We are core.
4949
#[no_core];
5050

51-
#[warn(deprecated_mode)];
52-
#[warn(deprecated_pattern)];
5351
#[warn(vecs_implicitly_copyable)];
5452
#[deny(non_camel_case_types)];
5553
#[allow(deprecated_self)];

src/libcore/dlist.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,6 @@ Do not use ==, !=, <, etc on doubly-linked lists -- it may not terminate.
1818
1919
*/
2020

21-
// NB: transitionary, de-mode-ing.
22-
#[forbid(deprecated_mode)];
23-
#[forbid(deprecated_pattern)];
24-
2521
use kinds::Copy;
2622
use managed;
2723
use option::{None, Option, Some};

0 commit comments

Comments
 (0)