Commit Graph

37840 Commits

Author SHA1 Message Date
Richo Healey
f230683b1a Fix PEP8 in get-snapshot 2015-01-27 01:09:38 -08:00
Richo Healey
6af36031e2 Fix PEP8 in gdb pretty printer 2015-01-27 01:09:38 -08:00
bors
e365e4c054 Auto merge of #21564 - steveklabnik:doc_cell, r=alexcrichton 2015-01-27 08:40:39 +00:00
bors
1c87af2eba Auto merge of #21646 - dotdash:default_target_cpu, r=Aatch
Using `generic` as the target cpu limits the generated code to the bare basics for the arch, while we can probably assume that we'll actually be running on somewhat modern hardware. This updates the default target CPUs for the x86 and x86_64 archs to match clang's behaviour.

Refs #20777
2015-01-27 05:15:04 +00:00
Brian Anderson
3c172392cf Merge fixes 2015-01-26 20:57:46 -08:00
bors
a6a6fadbb9 Auto merge of #21543 - alexcrichton:old-io, r=aturon
In preparation for the I/O rejuvination of the standard library, this commit
renames the current `io` module to `old_io` in order to make room for the new
I/O modules. It is expected that the I/O RFCs will land incrementally over time
instead of all at once, and this provides a fresh clean path for new modules to
enter into as well as guaranteeing that all old infrastructure will remain in
place for some time.

As each `old_io` module is replaced it will be deprecated in-place for new
structures in `std::{io, fs, net}` (as appropriate).

This commit does *not* leave a reexport of `old_io as io` as the deprecation
lint does not currently warn on this form of use. This is quite a large breaking
change for all imports in existing code, but all functionality is retained
precisely as-is and path statements simply need to be renamed from `io` to
`old_io`.

[breaking-change]
2015-01-27 02:46:09 +00:00
Vojtech Kral
ec4981ece8 Thread native name setting, fix #10302 2015-01-27 03:41:49 +01:00
Carol Nichols
ebd2d8db76 Correct a typo in a deprecation warning 2015-01-26 21:09:50 -05:00
Carol Nichols
b8b52d61f3 Add examples to documentation of SliceExt methods 2015-01-26 21:09:50 -05:00
Victory
ac285d5531 Don't use if we can avoid it 2015-01-26 20:18:24 -05:00
Victory
23fd8cad04 cleanup depricated uint in rand mod and rand os 2015-01-26 19:48:29 -05:00
Brian Anderson
abc56a011a Make '-A warnings' apply to all warnings, including feature gate warnings 2015-01-26 16:29:27 -08:00
Alex Crichton
5d836cdf86 std: Rename Writer::write to Writer::write_all
In preparation for upcoming changes to the `Writer` trait (soon to be called
`Write`) this commit renames the current `write` method to `write_all` to match
the semantics of the upcoming `write_all` method. The `write` method will be
repurposed to return a `usize` indicating how much data was written which
differs from the current `write` semantics. In order to head off as much
unintended breakage as possible, the method is being deprecated now in favor of
a new name.

[breaking-change]
2015-01-26 16:01:58 -08:00
Alex Crichton
3a07f859b8 Fallout of io => old_io 2015-01-26 16:01:16 -08:00
Alex Crichton
f72b164510 std: Rename io to old_io
In preparation for the I/O rejuvination of the standard library, this commit
renames the current `io` module to `old_io` in order to make room for the new
I/O modules. It is expected that the I/O RFCs will land incrementally over time
instead of all at once, and this provides a fresh clean path for new modules to
enter into as well as guaranteeing that all old infrastructure will remain in
place for some time.

As each `old_io` module is replaced it will be deprecated in-place for new
structures in `std::{io, fs, net}` (as appropriate).

This commit does *not* leave a reexport of `old_io as io` as the deprecation
lint does not currently warn on this form of use. This is quite a large breaking
change for all imports in existing code, but all functionality is retained
precisely as-is and path statements simply need to be renamed from `io` to
`old_io`.

[breaking-change]
2015-01-26 16:01:16 -08:00
Brian Anderson
5a6fb8eb98 Merge remote-tracking branch 'rust-lang/master'
Conflicts:
	src/librustc/lint/builtin.rs
	src/librustc/lint/context.rs
2015-01-26 15:42:32 -08:00
bors
a637365b10 Auto merge of #21606 - arielb1:clean-cast, r=huonw
This also makes the cast error messages somewhat more uniform.
2015-01-26 22:19:44 +00:00
Jeff Belgum
b93843e1c9 add split_off method to vec with tests 2015-01-26 14:08:38 -08:00
Akos Kiss
ea50bf8850 Unconditionally disable LLVM's FastISel on AArch64
Before ca07e256f62f772d14c42f41af46f2aeacc54983, LLVM's AArch64FastISel
had a sign (and zero?) extension bug. Until rustc gets its LLVM past
that commit, the way of workaround is to pass an option to LLVM that
forces the disabling of FastISel (which would normally kick in for -O0).

Fixes #21627
2015-01-26 22:55:34 +01:00
Simonas Kazlauskas
8e2a44a951 Fix broken links in TRPL→More Strings
Fixes #21665
2015-01-26 23:09:17 +02:00
Manish Goregaokar
6a90eca8fc Add on_unimplemented note to Index 2015-01-27 02:19:52 +05:30
bors
8ec3a833d5 Auto merge of #21617 - alexcrichton:less-quotes, r=nikomatsakis
This ends up propagating all the way out to the output of dep-info which then
makes Cargo think that files are not existent (it thinks the files have quotes
in their name) when they in fact do.
2015-01-26 19:44:12 +00:00
Tshepang Lekhonkhobe
f1c22a0b4c bench: this file has not compiled at least since March last year
See 579eb2400b
2015-01-26 21:27:08 +02:00
Tobias Bucher
cbcb191b97 Remove comment about UnsafeCells and static
It has actually been safe to put an `UnsafeCell` into a non-mutable `static`
since the `const` change.
2015-01-26 17:45:21 +01:00
bors
16286f5cf9 Auto merge of #21614 - kvark:typedef, r=huonw
Fixes #21497 

I don't know if this can be tested with built-in tests.
2015-01-26 15:39:13 +00:00
Oliver Schneider
82b0b0fcc7 fallout 2015-01-26 16:27:28 +01:00
Oliver Schneider
85b80aa1e1 don't ignore errors in encode and allow hashmaps with enum keys
closes #21470 on main rust repository
was fixed on rust-lang/rustc-serialize (see https://github.com/rust-lang/rustc-serialize/pull/32)
2015-01-26 16:27:28 +01:00
bors
977c44ade0 Auto merge of #21401 - kballard:optimize-shrink-to-fit, r=nikomatsakis
Don't reallocate when capacity is already equal to length

`Vec::shrink_to_fit()` may be called on vectors that are already the
correct length. Calling out to `reallocate()` in this case is a bad idea
because there is no guarantee that `reallocate()` won't allocate a new
buffer anyway, and based on performance seen in external benchmarks, it
seems likely that it is in fact reallocating a new buffer.

Before:

    test string::tests::bench_exact_size_shrink_to_fit         ... bench:        45 ns/iter (+/- 2)

After:

    test string::tests::bench_exact_size_shrink_to_fit         ... bench:        26 ns/iter (+/- 1)
2015-01-26 13:01:00 +00:00
Nelson Chen
e0dc9bd275 Add same "-webkit-overflow-scrolling: touch" to the table of contents in the book. 2015-01-26 02:37:17 -08:00
Nelson Chen
f7f80ce61a Add "-webkit-overflow-scrolling: touch" to book CSS for the page wrapper.
This change permits native momentum scrolling in Safari on iOS in the book.
2015-01-26 02:37:01 -08:00
bors
59dcba5d14 Auto merge of #21610 - sfackler:debug-lint, r=alexcrichton
Closes #20855

r? @alexcrichton
2015-01-26 10:26:54 +00:00
Björn Steinbrink
296c74de96 Default to Pentium 4 as the x86 target CPU on Windows/Linux/DragonFly
Limiting ourselves to a generic x86 instruction set doesn't seem useful.
Both users running those systems on original i386 hardware might as well
manually specify a target cpu ;-)

Clang uses the same default.
2015-01-26 09:58:56 +01:00
Björn Steinbrink
bca25aeeb4 Use more specific target CPUs on Darwin
Macs don't come with anything older than a Yonah (32bit) or Core2 (64bit),
so we can default to those targets. Clang does the same.
2015-01-26 09:58:55 +01:00
Flavio Percoco
fde4472848 Make Unix and Windows impls consistent
There are some explicit Send/Sync implementations for Window's types
that don't exist in Unix. While the end result will be the same, I
believe it's clearer if we keep the explicit implementations consistent
by making the os-specific types Send/Sync where needed and possible.

This commit addresses tcp. Existing differences below:

src/libstd/sys/unix/tcp.rs
unsafe impl Sync for TcpListener {}
unsafe impl Sync for AcceptorInner {}

src/libstd/sys/windows/tcp.rs
unsafe impl Send for Event {}
unsafe impl Sync for Event {}
unsafe impl Send for TcpListener {}
unsafe impl Sync for TcpListener {}
unsafe impl Send for TcpAcceptor {}
unsafe impl Sync for TcpAcceptor {}
unsafe impl Send for AcceptorInner {}
unsafe impl Sync for AcceptorInner {}
2015-01-26 09:12:28 +01:00
Flavio Percoco
fff5600925 Make Unix and Windows impls consistent
There are some explicit Send/Sync implementations for Window's types
that don't exist in Unix. While the end result will be the same, I
believe it's clearer if we keep the explicit implementations consistent
by making the os-specific types Send/Sync where needed and possible.

This commit addresses pipe

src/libstd/sys/unix/pipe.rs
unsafe impl Send for UnixListener {}
unsafe impl Sync for UnixListener {}

src/libstd/sys/windows/pipe.rs
unsafe impl Send for UnixStream {}
unsafe impl Sync for UnixStream {}
unsafe impl Send for UnixListener {}
unsafe impl Sync for UnixListener {}
unsafe impl Send for UnixAcceptor {}
unsafe impl Sync for UnixAcceptor {}
unsafe impl Send for AcceptorState {}
unsafe impl Sync for AcceptorState {}
2015-01-26 09:12:26 +01:00
bors
7615e187c6 Auto merge of #21605 - huonw:omg-muscle-memory, r=eddyb
I'm beginning to suspect it's impossible to avoid accidentally writing
`#[deriving]` at least once in every program, and it results in
non-intuitive error messages: "Foo doesn't have any method in scope
`clone`" despite there being a `#[deriv...(Clone)]` attribute!

Also, lots of documentation around the internet uses `#[deriving]` so
providing this guidance is very helpful (lots of people ask in #rust
about this error).
2015-01-26 07:49:01 +00:00
Sébastien Marie
d553ed66c7 shell 'case' statement don't need 'break'
the syntax of 'case' is:
`case word in [[(] pattern [| pattern] ...) list ;; ] ... esac`

`list` don't have to issue `break`. `break` is normally used to exit a
`for`, `until` or `while` loop.
2015-01-26 08:32:34 +01:00
Brian Anderson
d179ba3b8e Merge remote-tracking branch 'rust-lang/master'
Conflicts:
	src/libcore/cmp.rs
	src/libcore/fmt/mod.rs
	src/libcore/iter.rs
	src/libcore/marker.rs
	src/libcore/num/f32.rs
	src/libcore/num/f64.rs
	src/libcore/result.rs
	src/libcore/str/mod.rs
	src/librustc/lint/builtin.rs
	src/librustc/lint/context.rs
	src/libstd/sync/mpsc/mod.rs
	src/libstd/sync/poison.rs
2015-01-25 22:14:06 -08:00
bors
9252525196 Auto merge of #21598 - eddyb:there-are-no-boxed-closures, r=brson 2015-01-26 04:49:37 +00:00
Peter Atashian
8f38eae7ad wrmdir -> RemoveDirectoryW
Signed-off-by: Peter Atashian <retep998@gmail.com>
2015-01-25 23:00:21 -05:00
Eduard Burtescu
9690be5ece Adjust most comments and messages to not use "unboxed". 2015-01-26 04:15:09 +02:00
Eduard Burtescu
e0afa82c67 Remove every mention of "onceness". 2015-01-26 04:15:09 +02:00
Eduard Burtescu
50a370aa2d Remove dead code related to old closures. 2015-01-26 04:15:09 +02:00
Eduard Burtescu
ab9c773cdb librustc: remove unused DefUpvar field. 2015-01-26 04:15:09 +02:00
Eduard Burtescu
11ef6f1349 Remove "unboxed" attribute in code referring to new closures. 2015-01-26 04:15:09 +02:00
bors
47621db62c Auto merge of #21574 - japaric:walk-projections, r=nikomatsakis
closes #21363

r? @nikomatsakis
2015-01-25 23:55:55 +00:00
bors
458a6a2f6e Auto merge of #21561 - edwardw:deref, r=nikomatsakis
As part of #20432, upvar checking is now moved out of regionck to its
own pass and before regionck. But regionck has some type resolution of
its own. Without them, now separated upvar checking may be tripped over
by residue `ty_infer`.

Closes #21306
2015-01-25 21:20:37 +00:00
Steven Fackler
70214915b0 Add a missing fmt::Debug impl lint
Closes #20855
2015-01-25 11:22:41 -08:00
bors
c80e556e15 Auto merge of #21519 - michaelwoerister:misc, r=eddyb
Two minor improvements that have been on my TODO list for a while:
* Clang uses a size of `-1` for arrays of unknown size and we should do that too as it will tell LLVM to omit the size information in debuginfo.
* There was no LLDB test case for handling the optimized enum representation introduced by @luqmana. This PR finally adds one.
2015-01-25 18:46:33 +00:00
Jorge Aparicio
bff462302b cleanup: s/impl Copy/#[derive(Copy)]/g 2015-01-25 11:20:38 -05:00