Commit Graph

40450 Commits

Author SHA1 Message Date
Alex Crichton
9754b06cd8 rustc: Remove support for old_impl_check
This commit removes compiler support for the `old_impl_check` attribute which
should in theory be entirely removed now. The last remaining use of it in the
standard library has been updated by moving the type parameter on the
`old_io::Acceptor` trait into an associated type. As a result, this is a
breaking change for all current users of the deprecated `old_io::Acceptor`
trait. Code can be migrated by using the `Connection` associated type instead.

[breaking-change]
2015-03-26 13:25:33 -07:00
Tshepang Lekhonkhobe
3e100ff038 book: make it one sentence 2015-03-26 22:10:59 +02:00
Or Neeman
dac552f255 doc: change 0u32..10 to 0..10 2015-03-26 13:24:20 -06:00
Alex Crichton
43bfaa4a33 Mass rename uint/int to usize/isize
Now that support has been removed, all lingering use cases are renamed.
2015-03-26 12:10:22 -07:00
Adenilson Cavalcanti
7d3bf47323 Adding more information about the behavior of Arc/Rc
when you perform a clone() call.
2015-03-26 12:05:21 -07:00
bors
53a183f027 Auto merge of #23359 - erickt:quote, r=pnkfelix
This PR allows the quote macros to unquote trait items, impl items, where clauses, and paths.
2015-03-26 18:43:56 +00:00
Felix S. Klock II
e2cc8b1436 add feature flags required post rebase. 2015-03-26 19:31:53 +01:00
Alex Crichton
77de3ee6e5 syntax: Remove parsing of old slice syntax
This syntax has been deprecated for quite some time, and there were only a few
remaining uses of it in the codebase anyway.
2015-03-26 10:24:44 -07:00
Alex Crichton
36ef29abf7 Register new snapshots 2015-03-26 09:57:05 -07:00
bors
199bdcfeff Auto merge of #23680 - erickt:inline, r=cmr
before:

test bench_read_slice  ... bench:        68 ns/iter (+/- 56)
test bench_read_vec    ... bench:        78 ns/iter (+/- 21)
test bench_write_slice ... bench:       133 ns/iter (+/- 46)
test bench_write_vec   ... bench:       308 ns/iter (+/- 69)

after:

test bench_read_slice  ... bench:        32 ns/iter (+/- 10)
test bench_read_vec    ... bench:        32 ns/iter (+/- 8)
test bench_write_slice ... bench:        53 ns/iter (+/- 12)
test bench_write_vec   ... bench:       247 ns/iter (+/- 172)
2015-03-26 16:10:23 +00:00
Steve Klabnik
c153fc1da1 New section of the book: nightly rust
Now that feature flags are only on nightly, it's good to split this stuff out.
2015-03-26 11:42:45 -04:00
Erick Tryzelaar
c5b8763753 Deprecate as_mut_slice methods
This is technically a breaking change as it deprecates and unstables
some previously stable apis that were missed in the last round of
deprecations.

[breaking change]
2015-03-26 07:29:06 -07:00
bors
557d4346a2 Auto merge of #21237 - erickt:derive-assoc-types, r=erickt
This PR adds support for associated types to the `#[derive(...)]` syntax extension. In order to do this, it switches over to using where predicates to apply the type constraints. So now this:

```rust
type Trait {
    type Type;
}

#[derive(Clone)]
struct Foo<A> where A: Trait {
    a: A,
    b: <A as Trait>::Type,
}
```

Gets expended into this impl:

```rust
impl<A: Clone> Clone for Foo<A> where
    A: Trait,
    <A as Trait>::Type: Clone,
{
    fn clone(&self) -> Foo<T> {
        Foo {
            a: self.a.clone(),
            b: self.b.clone(),
        }
    }
}
```
2015-03-26 13:38:41 +00:00
Felix S. Klock II
aab4bef939 Add tests exercising the dropflag checking functionality. 2015-03-26 14:08:55 +01:00
Felix S. Klock II
4053b00112 Use -Z force-dropflag-checks=on/off for emitting sanity-check.
(That is, added config and debugflag a la check-overflow but for drop
flag sanity-check.)

Remove now-unused import of NoDebugInfo from trans::glue.
2015-03-26 14:08:55 +01:00
Felix S. Klock II
601eca3b53 Added instability markers to POST_DROP_* consts, and related opt-in's.
(Reviewed rest of code; did not see other `pub` items that needed such
treatment.)

Driveby: fix typo in comment in ptr.rs.
2015-03-26 14:08:55 +01:00
Felix S. Klock II
5733726508 A better core::mem::dropped implementation suggested by huonw on the PR. 2015-03-26 14:08:55 +01:00
Felix S. Klock II
5bc35b1852 filling-drop: switch DTOR_NEEDED and DTOR_DONE to non-trivial values. 2015-03-26 14:08:55 +01:00
Felix S. Klock II
7c671e5177 Regression tests for issues uncovered only post the run-pass and compile-fail tests.
(I.e. the idea being, lets catch errors in these basic constructs
sometime *before* we start doing the doc tests.)
2015-03-26 14:08:54 +01:00
Felix S. Klock II
3902190ac4 Switch drop-flag to u8 to allow special tags to instrument state.
Refactored code so that the drop-flag values for initialized
(`DTOR_NEEDED`) versus dropped (`DTOR_DONE`) are given explicit names.

Add `mem::dropped()` (which with `DTOR_DONE == 0` is semantically the
same as `mem::zeroed`, but the point is that it abstracts away from
the particular choice of value for `DTOR_DONE`).

Filling-drop needs to use something other than `ptr::read_and_zero`,
so I added such a function: `ptr::read_and_drop`.  But, libraries
should not use it if they can otherwise avoid it.

Fixes to tests to accommodate filling-drop.
2015-03-26 14:08:54 +01:00
bors
1501f33e76 Auto merge of #23711 - alexcrichton:ip-addr, r=aturon
This commits adds back an `IpAddr` enum matching the `SocketAddr` enum, but
without a port. The enumeration is `#[unstable]`. The `lookup_host` function and
iterator are also destabilized behind a new feature gate due to questions around
the semantics of returning `SocketAddr` values.
2015-03-26 09:43:35 +00:00
bors
b0fd67b3e7 Auto merge of #23691 - richo:dedup-typeorigin-mergable, r=eddyb
I've started on refactoring the error handling code to avoid the need to reparse generated errors in `span_*`, but would rather land this incrementally as one monolithic PR (and have un-fond memories of merge conflicts from various other monoliths)

r? @eddyb
2015-03-26 05:44:26 +00:00
Richo Healey
c193fe4f3c infer: Drop pointless format! calls 2015-03-25 21:44:22 -07:00
Richo Healey
e15bebfefa infer: Refactor Display impl 2015-03-25 21:44:21 -07:00
Richo Healey
385b5a3a7d infer: Move TypeOrigin formatting onto it's enum
This doesn't actually solve the issue that prompted this, at:

https://github.com/rust-lang/rust/blob/master/src/librustc/session/mod.rs#L262-271

But skimming the cfg it appears that all type information has been
discarded long before that point.
2015-03-25 21:44:21 -07:00
bors
d4ba1caa99 Auto merge of #23718 - alexcrichton:flaky-test, r=huonw
It's considered an error to access stdout while a process is being shut down, so
tweak this test a bit to actually wait for the child thread to exit.

This was discovered with a recent [snap-mac3 failure](http://buildbot.rust-lang.org/builders/snap3-mac/builds/164/steps/test/logs/stdio)
2015-03-26 02:33:36 +00:00
Tamir Duberstein
d9d2236b09 Add iOS triple mapping so tests can run 2015-03-25 18:18:34 -07:00
Tamir Duberstein
71386e5774 Alphabetize 2015-03-25 18:18:30 -07:00
Alex Crichton
54f16b818b rustc: Remove support for int/uint
This commit removes all parsing, resolve, and compiler support for the old and
long-deprecated int/uint types.
2015-03-25 16:39:00 -07:00
Alex Crichton
8165bc14fb std: Add net::IpAddr, destabilize lookup_host
This commits adds back an `IpAddr` enum matching the `SocketAddr` enum, but
without a port. The enumeration is `#[unstable]`. The `lookup_host` function and
iterator are also destabilized behind a new feature gate due to questions around
the semantics of returning `SocketAddr` values.
2015-03-25 16:18:31 -07:00
Alex Crichton
02c6f6b049 test: Make a test less flaky
It's considered an error to access stdout while a process is being shut down, so
tweak this test a bit to actually wait for the child thread to exit.
2015-03-25 15:26:39 -07:00
bors
27901849e0 Auto merge of #23695 - sae-bom:mac-android-debuginfo, r=alexcrichton
1. when mac-android cross compile and make-check , make it use gdb instead of lldb so as to it passes debuginfo tests.
2. ignore some tests on aarch64
2015-03-25 21:29:50 +00:00
bors
a3b13610c5 Auto merge of #23434 - alexcrichton:misc-stab, r=aturon
Now that we check the stability of fields, the fields of this struct should also
be stable.
2015-03-25 18:59:00 +00:00
Erick Tryzelaar
92e72ee15e Speed up reading/writing slices with #[inline]
When built with `rustc -O`:

before:

test bench_read_slice  ... bench:        68 ns/iter (+/- 56)
test bench_read_vec    ... bench:        78 ns/iter (+/- 21)
test bench_write_slice ... bench:       133 ns/iter (+/- 46)
test bench_write_vec   ... bench:       308 ns/iter (+/- 69)

after:

test bench_read_slice  ... bench:        32 ns/iter (+/- 10)
test bench_read_vec    ... bench:        32 ns/iter (+/- 8)
test bench_write_slice ... bench:        53 ns/iter (+/- 12)
test bench_write_vec   ... bench:       247 ns/iter (+/- 172)
2015-03-25 09:07:46 -07:00
bors
a923278c62 Auto merge of #23697 - Manishearth:rollup, r=Manishearth
- Successful merges: #23617, #23664, #23680, #23684, #23692, #23693
- Failed merges:
2015-03-25 14:14:04 +00:00
Manish Goregaokar
e962a1d51e Rollup merge of #23702 - dotdash:match_reass, r=eddyb
The reassignment checker effectively only checks whether the last
assignment in a body affects the discriminant, but it should of course
check all the assignments.

Fixes #23698
2015-03-25 19:44:32 +05:30
Manish Goregaokar
2354fc9fac Rollup merge of #23693 - semarie:openbsd-pathbuf-new, r=nikomatsakis
`PathBuf::new` have been changed. Use `PathBuf::from` instead.

Apply the same change for freebsd too, while here.
2015-03-25 19:44:08 +05:30
Manish Goregaokar
4283b2ab50 Rollup merge of #23692 - yjh0502:fix/simd-overflow, r=pnkfelix
Disable overflow checking on SIMD operations, fix #23037
2015-03-25 19:44:08 +05:30
Manish Goregaokar
5a5845dc01 Rollup merge of #23684 - tamird:ios-fallout, r=alexcrichton
r? @aturon cc @alexcrichton
2015-03-25 19:44:08 +05:30
Björn Steinbrink
cc259fb6c3 Always properly copy values into bindings when mutating the match discriminant
The reassignment checker effectively only checks whether the last
assignment in a body affects the discriminant, but it should of course
check all the assignments.

Fixes #23698
2015-03-25 14:50:04 +01:00
Manish Goregaokar
5535767228 Rollup merge of #23664 - bluss:std-docs, r=steveklabnik
Main motivation was to update docs for the removal or "demotion" of certain extension traits. The update to the slice docs was larger, since the text was largely outdated.
2015-03-25 17:12:13 +05:30
Manish Goregaokar
b6783e6b46 Rollup merge of #23617 - steveklabnik:gh23564, r=Manishearth
Fixes #23564
2015-03-25 17:12:13 +05:30
Sae-bom Kim
c66a2b7393 Ignore some tests on aarch64 2015-03-25 18:17:33 +09:00
Sae-bom Kim
a99936b397 make it use gdb instead of lldb when mac-android cross compile 2015-03-25 18:12:35 +09:00
bors
928e2e2394 Auto merge of #23670 - cmr:vec-push-slowpath, r=pcwalton
Makes Vec::push considerably smaller: 25 instructions, rather than 42, on
x86_64.
2015-03-25 07:47:30 +00:00
Sébastien Marie
eefb8e2065 unbreak bitrig/openbsd build after 8389253d
`PathBuf::new` have been changed. Use `PathBuf::from` instead.

Apply the same change for freebsd too, while here.
2015-03-25 08:44:35 +01:00
Jihyun Yu
1663665be0 Fix ICE on SIMD overflow checking
Disable overflow checking on SIMD operations, fix #23037
2015-03-25 15:17:10 +09:00
Camille Roussel
053d58e180 Update pointers.md 2015-03-24 21:46:09 -07:00
Tamir Duberstein
eb5ed10330 [iOS] Fallout from 8389253 2015-03-24 18:50:38 -07:00
bors
593db005d4 Auto merge of #23681 - alexcrichton:rollup, r=alexcrichton 2015-03-25 01:42:42 +00:00