]> git.lizzy.rs Git - rust.git/log
rust.git
8 years agorustfmt liballoc
Nick Cameron [Wed, 23 Sep 2015 22:00:54 +0000 (10:00 +1200)]
rustfmt liballoc

8 years agoAuto merge of #28569 - semarie:stdcpp-tests, r=alexcrichton
bors [Wed, 23 Sep 2015 18:55:01 +0000 (18:55 +0000)]
Auto merge of #28569 - semarie:stdcpp-tests, r=alexcrichton

extend the search path of libraries to /usr/local/lib in `run-make`
testsuite. It should permit to find libstdc++.so on usual directory.

r? @alexcrichton

8 years agoAuto merge of #28603 - steveklabnik:small_config_fix, r=alexcrichton
bors [Wed, 23 Sep 2015 16:07:04 +0000 (16:07 +0000)]
Auto merge of #28603 - steveklabnik:small_config_fix, r=alexcrichton

We don't actually probe for javac in all circumstances, so if you have
javac installed, but don't have antlr4 installed, and you're on Mac OS
X, then you'll get a message that javac is missing, even though that's
wrong.

To fix this, let's just be a bit more generic in the message, so that
it's the same no matter what part of the lexer tests you're missing.

cc
https://www.reddit.com/r/rust/comments/3m199d/running_make_check_on_the_source_code_says_javac/

8 years agoMake lexer tooling message more generic
Steve Klabnik [Wed, 23 Sep 2015 15:43:49 +0000 (11:43 -0400)]
Make lexer tooling message more generic

We don't actually probe for javac in all circumstances, so if you have
javac installed, but don't have antlr4 installed, and you're on Mac OS
X, then you'll get a message that javac is missing, even though that's
wrong.

To fix this, let's just be a bit more generic in the message, so that
it's the same no matter what part of the lexer tests you're missing.

cc
https://www.reddit.com/r/rust/comments/3m199d/running_make_check_on_the_source_code_says_javac/

8 years agoAuto merge of #28585 - ranma42:simpler-panic, r=alexcrichton
bors [Wed, 23 Sep 2015 03:56:27 +0000 (03:56 +0000)]
Auto merge of #28585 - ranma42:simpler-panic, r=alexcrichton

This is part of some cleanup I did while investigating #28129.
This also ensures that `on_panic` is run even if the user has registered too many callbacks.

8 years agoAuto merge of #28580 - wesleywiser:split_out_type_lints, r=alexcrichton
bors [Wed, 23 Sep 2015 02:11:18 +0000 (02:11 +0000)]
Auto merge of #28580 - wesleywiser:split_out_type_lints, r=alexcrichton

Move out the `TypeLimits` and `ImproperCTypes` lints into a separate module.

Part of #22206

8 years agoAuto merge of #28535 - petrochenkov:name, r=nrc
bors [Wed, 23 Sep 2015 00:25:42 +0000 (00:25 +0000)]
Auto merge of #28535 - petrochenkov:name, r=nrc

Part of https://github.com/rust-lang/rust/issues/6993

This patch replaces `Ident`s with `Name`s in data structures of HIR and updates the dependent crates to compile and pass `make check`.
Some HIR structures still use `Ident`s, namely `PathSegment`, `PatIdent`, `ExprWhile`, `ExprLoop`, `ExprBreak` and `ExprAgain`,  they need them for resolve (but `PathSegment` is special, see https://github.com/rust-lang/rust/issues/6993#issuecomment-141256292).

r? @nrc

8 years agoAuto merge of #28504 - Eljay:fix-trait-privacy, r=nrc
bors [Tue, 22 Sep 2015 22:42:00 +0000 (22:42 +0000)]
Auto merge of #28504 - Eljay:fix-trait-privacy, r=nrc

Fixes #16264 / #18241.

As far as I can tell, it should be impossible for a trait to be inaccessible if it's in scope, so this check is unnecessary. Are there any cases where this check is actually needed?

8 years agoAuto merge of #28369 - ebfull:fix-higher-ranked, r=nikomatsakis
bors [Tue, 22 Sep 2015 20:57:43 +0000 (20:57 +0000)]
Auto merge of #28369 - ebfull:fix-higher-ranked, r=nikomatsakis

Fixes #28279.

Currently

`common_supertype(*mut for<'a> Fn(&'a usize), *mut for<'a> Fn(&'a usize) + 'static)`

equals `*mut Fn(&usize)` which seems to be caused by `higher_ranked_sub()` allowing region variables to escape the comparison. This prevents inference from working properly with stuff like `Rc<Fn(&T)>`.

r? @nikomatsakis

8 years agoAuto merge of #28543 - gandro:netbsd, r=alexcrichton
bors [Tue, 22 Sep 2015 19:13:39 +0000 (19:13 +0000)]
Auto merge of #28543 - gandro:netbsd, r=alexcrichton

These changes introduce the ability to cross-compile working binaries for NetBSD/amd64. Previous support added in PR #26682 shared all its code with the OpenBSD implementation, and was therefore never functional (e.g. linking against non-existing symbols and using wrong type definitions). Nonetheless, the previous patches were a great starting point and made my work significantly easier. :smiley:

Because there are no stage0 snapshots for NetBSD (yet), I used a cross-compiler for NetBSD 7.0 RC3 and only tested some toy programs (threading and channels, stack guards, a small TCP/IP echo server and some other platform dependent bits). If someone could point me to documentation on how to generate a stage0 snapshot from a cross-compiler I'm happy to run the full test suite.

A few other notes regarding Rust on NetBSD/amd64:
- To preserve binary compatibility, NetBSD introduces new symbols for system call wrappers on breaking ABI changes and keeps the old (legacy) symbols around, see [this documentation](https://www.netbsd.org/docs/internals/en/chap-processes.html#syscalls_master) for some details. I went ahead and modified the `libc` and `std` crate to use the current (renamed) symbols instead of the legacy ones where I found them, but I might have missed some. Notably using the `sigaction` symbol (deprecated in 1998) instead of `__sigaction14` even triggers SIGSYS (bad syscall) on my amd64 setup. I also changed the type definitions to use the most recent version.
- NetBSD's gdb doesn't really support position independent executables, so you might want to turn that off for debugging, see [NetBSD Problem Report #48250](https://gnats.netbsd.org/48250).
- For binaries invoked using a relative path, NetBSD supports `$ORIGIN` only for short `rpath`s (~64 chars or so, I'm told). If running an executable fails with `execname not specified in AUX vector: No such file or directory`, consider invoking the binary using its full absolute path.

8 years agoFix rebase
Vadim Petrochenkov [Tue, 22 Sep 2015 17:46:23 +0000 (20:46 +0300)]
Fix rebase

8 years agoRemove unwind::register
Andrea Canciani [Tue, 22 Sep 2015 16:51:04 +0000 (18:51 +0200)]
Remove unwind::register

The `register` function is unstable and it is not used anymore, hence
it can be removed (together with the now-unused `Callback` type and
`static` variables).

8 years agoRestore `fold_ident` and `visit_ident`
Vadim Petrochenkov [Tue, 22 Sep 2015 16:42:51 +0000 (19:42 +0300)]
Restore `fold_ident` and `visit_ident`

8 years agoUse Names in the remaining HIR structures with exception of...
Vadim Petrochenkov [Sun, 20 Sep 2015 13:47:24 +0000 (16:47 +0300)]
Use Names in the remaining HIR structures with exception of...
PathSegment, PatIdent, ExprWhile, ExprLoop, ExprBreak and ExprAgain - they need Idents for resolve

8 years agoUse Names in path fragments and MacroDef
Vadim Petrochenkov [Sun, 20 Sep 2015 11:51:40 +0000 (14:51 +0300)]
Use Names in path fragments and MacroDef

8 years agorun-make: search libstdc++ in /usr/local/lib too
Sébastien Marie [Mon, 21 Sep 2015 17:17:25 +0000 (19:17 +0200)]
run-make: search libstdc++ in /usr/local/lib too

extend the search path of libraries to /usr/local/lib in `run-make`
testsuite. It should permit to find libstdc++.so on usual directory.

8 years agoUse Names in hir::{Field, ExprMethodCall, ExprField}
Vadim Petrochenkov [Sun, 20 Sep 2015 11:00:18 +0000 (14:00 +0300)]
Use Names in hir::{Field, ExprMethodCall, ExprField}

8 years agoUse Names in HIR Items
Vadim Petrochenkov [Sun, 20 Sep 2015 01:50:30 +0000 (04:50 +0300)]
Use Names in HIR Items

8 years agoUse Names in HIR visitors and folders
Vadim Petrochenkov [Sun, 20 Sep 2015 00:34:12 +0000 (03:34 +0300)]
Use Names in HIR visitors and folders

8 years agoEncode/decode Names as strings
Vadim Petrochenkov [Sun, 20 Sep 2015 00:06:29 +0000 (03:06 +0300)]
Encode/decode Names as strings

8 years agoAuto merge of #28584 - ranma42:simpler-innertry, r=alexcrichton
bors [Tue, 22 Sep 2015 16:24:06 +0000 (16:24 +0000)]
Auto merge of #28584 - ranma42:simpler-innertry, r=alexcrichton

This simplifies a little inner_try and avoids multiple accesses to TLS.

8 years agoAuto merge of #28582 - jedireza:patch-1, r=huonw
bors [Tue, 22 Sep 2015 12:59:28 +0000 (12:59 +0000)]
Auto merge of #28582 - jedireza:patch-1, r=huonw

Fixed typo in example code.

8 years agoFix alignment of pthread types on NetBSD
Sebastian Wicki [Tue, 22 Sep 2015 09:48:00 +0000 (11:48 +0200)]
Fix alignment of pthread types on NetBSD

8 years agoAuto merge of #28578 - gandro:nodefaultlibs, r=alexcrichton
bors [Tue, 22 Sep 2015 09:19:47 +0000 (09:19 +0000)]
Auto merge of #28578 - gandro:nodefaultlibs, r=alexcrichton

This patch basically adds a target option for omitting the `-nodefaultlibs` flag when invoking the linker. I am not sure if this is the correct or only way to approach this problem, so any feedback is welcome.

Motivation: I'm currently working on a Rust target specification for the [rumprun](/rumpkernel/rumprun) unikernel. rumprun is based on rump kernels and uses NetBSDs libc and drivers to provide a POSIXy environment. It provides its own linker wrapper that generates binaries which can be "baked" into a unikernel after configuration. Using `-nodefaultlibs` on the rumprun linker will prevent it from selecting the search paths for the rumprun libraries. My current target implementation for rumprun is here: gandro/rust@295744b2ee2378f41a20d4b498b8f1991a75e93c

Currently, only a target that `is_like_windows` will omit the `-nodefaultlibs` flag, but since rumprun is not like Windows otherwise, I think a separate flag makes more sense. This might be a breaking change for target specifications that have the `is_like_windows` option set to true. Such targets need to set `no_default_libraries` to false in order to restore the old behavior.

8 years agoSimplify inner_try in std::rt::unwind::try
Andrea Canciani [Tue, 22 Sep 2015 06:58:47 +0000 (08:58 +0200)]
Simplify inner_try in std::rt::unwind::try

Resolve the TLS PANICKING variable just once and re-use it as needed.

8 years agoSimplify on_panic callback handling
Andrea Canciani [Tue, 22 Sep 2015 06:40:15 +0000 (08:40 +0200)]
Simplify on_panic callback handling

The registration of `panicking::on_panic` as a general-purpose
callback is overcomplicated and can fail.

Instead, invoking it explicitly removes the need for locking and paves
the way for further improvements.

8 years agoAdd UFCS privacy test.
Lee Jeffery [Tue, 22 Sep 2015 08:06:43 +0000 (09:06 +0100)]
Add UFCS privacy test.

8 years agoAuto merge of #28574 - Eljay:hoedown-3.0.5, r=alexcrichton
bors [Tue, 22 Sep 2015 05:20:01 +0000 (05:20 +0000)]
Auto merge of #28574 - Eljay:hoedown-3.0.5, r=alexcrichton

Closes #28251.

8 years agoUpdate error-handling.md
Reza Akhavan [Tue, 22 Sep 2015 04:33:15 +0000 (21:33 -0700)]
Update error-handling.md

8 years agoAuto merge of #28427 - DiamondLovesYou:gdb-debug-script-load, r=alexcrichton
bors [Tue, 22 Sep 2015 03:35:55 +0000 (03:35 +0000)]
Auto merge of #28427 - DiamondLovesYou:gdb-debug-script-load, r=alexcrichton

This is so LLVM isn't forced to load every byte of it. Also sets the alignment of
the load. Adds a test for the debug script section.

r? @alexcrichton

8 years agoAuto merge of #28364 - petrochenkov:usegate, r=alexcrichton
bors [Tue, 22 Sep 2015 01:12:26 +0000 (01:12 +0000)]
Auto merge of #28364 - petrochenkov:usegate, r=alexcrichton

Closes https://github.com/rust-lang/rust/issues/28075
Closes https://github.com/rust-lang/rust/issues/28388

r? @eddyb
cc @brson

8 years agoSplit out the type lints into a new module
Wesley Wiser [Tue, 22 Sep 2015 00:58:57 +0000 (20:58 -0400)]
Split out the type lints into a new module

Part of #22206

8 years agoAdd `no_default_libraries` target linker option
Sebastian Wicki [Mon, 21 Sep 2015 17:02:46 +0000 (19:02 +0200)]
Add `no_default_libraries` target linker option

If set to false, `-nodefaultlibs` is not passed to the linker. This
was the default behavior on Windows, but it should be configurable
per target.

This is a [breaking-change] for target specifications that have
the `is_like_windows` option set to true. Such targets need to
set `no_default_libraries` to false in order to restore the old
behavior.

8 years agoAuto merge of #28567 - sanxiyn:save-lto, r=alexcrichton
bors [Mon, 21 Sep 2015 22:32:28 +0000 (22:32 +0000)]
Auto merge of #28567 - sanxiyn:save-lto, r=alexcrichton

This is useful for debugging LTO issues, #28066 for example.

8 years agoAvoid loading the whole gdb debug scripts section.
Richard Diamond [Tue, 15 Sep 2015 21:22:16 +0000 (16:22 -0500)]
Avoid loading the whole gdb debug scripts section.

This is so LLVM isn't forced to load every byte of it. Also sets the alignment of
the load. Adds a test for the debug script section.

8 years agoUpgrade hoedown to 3.0.5.
Eljay [Mon, 21 Sep 2015 19:51:28 +0000 (20:51 +0100)]
Upgrade hoedown to 3.0.5.

8 years agoAuto merge of #28566 - Ms2ger:AsmDialect, r=sanxiyn
bors [Mon, 21 Sep 2015 20:06:50 +0000 (20:06 +0000)]
Auto merge of #28566 - Ms2ger:AsmDialect, r=sanxiyn

8 years agoVarious fixes for NetBSD/amd64
Sebastian Wicki [Sun, 20 Sep 2015 15:39:52 +0000 (17:39 +0200)]
Various fixes for NetBSD/amd64

8 years agoAuto merge of #28562 - llogiq:shootout, r=alexcrichton
bors [Mon, 21 Sep 2015 18:21:56 +0000 (18:21 +0000)]
Auto merge of #28562 - llogiq:shootout, r=alexcrichton

Since 1.3.0 the BufWriter has seen tremendous speedups. So when I use it in the shootout benchmarks, I see some nice speedup (which up to 1.2.0 was nixed by the pessimizations during initialization).

8 years agoAuto merge of #28531 - whitequark:patch-1, r=Gankro
bors [Mon, 21 Sep 2015 16:36:26 +0000 (16:36 +0000)]
Auto merge of #28531 - whitequark:patch-1, r=Gankro

With -O2, LLVM's inliner can remove this code, but this does not happen
with -O1 and lower. As a result, dropping Vec<u8> was linear with length,
resulting in abysmal performance for large buffers.

See issue #24280.

8 years agoSave bitcode before LTO when -C save-temps is given
Seo Sanghyeon [Mon, 21 Sep 2015 15:33:17 +0000 (00:33 +0900)]
Save bitcode before LTO when -C save-temps is given

8 years agoUse ast::AsmDialect's variants qualified, and drop the pointless prefix.
Ms2ger [Mon, 21 Sep 2015 09:45:04 +0000 (11:45 +0200)]
Use ast::AsmDialect's variants qualified, and drop the pointless prefix.

8 years agoAuto merge of #28565 - apasel422:issue-28561, r=Manishearth
bors [Mon, 21 Sep 2015 14:45:49 +0000 (14:45 +0000)]
Auto merge of #28565 - apasel422:issue-28561, r=Manishearth

Closes #28561.

r? @Manishearth

8 years agoAdd tests for macro-based impls
Andrew Paseltiner [Mon, 21 Sep 2015 14:42:18 +0000 (10:42 -0400)]
Add tests for macro-based impls

Closes #28561.

8 years agoRemove hir::AsmDialect in favour of ast::AsmDialect.
Ms2ger [Mon, 21 Sep 2015 14:12:53 +0000 (16:12 +0200)]
Remove hir::AsmDialect in favour of ast::AsmDialect.

8 years agoAuto merge of #28563 - baskerville:trpl-typo, r=bluss
bors [Mon, 21 Sep 2015 12:24:52 +0000 (12:24 +0000)]
Auto merge of #28563 - baskerville:trpl-typo, r=bluss

8 years agoTRPL: Fix typo
Bastien Dejean [Mon, 21 Sep 2015 10:37:58 +0000 (12:37 +0200)]
TRPL: Fix typo

8 years agoAuto merge of #28560 - Manishearth:fix-fnptr-impls, r=nrc
bors [Mon, 21 Sep 2015 10:37:08 +0000 (10:37 +0000)]
Auto merge of #28560 - Manishearth:fix-fnptr-impls, r=nrc

(12 was chosen to be consistent with what we do for tuples)

Fixes #28559

8 years agoUse BufWriter in fasta-redux for a nice speedup
llogiq [Mon, 21 Sep 2015 09:24:58 +0000 (11:24 +0200)]
Use BufWriter in fasta-redux for a nice speedup

8 years agoMake function pointers implement traits for up to 12 parameters
Manish Goregaokar [Mon, 21 Sep 2015 08:51:30 +0000 (14:21 +0530)]
Make function pointers implement traits for up to 12 parameters

(12 was chosen to be consistent with what we do for tuples)

Fixes #28559

8 years agoAuto merge of #28548 - steveklabnik:gh28545, r=alexcrichton
bors [Mon, 21 Sep 2015 06:07:03 +0000 (06:07 +0000)]
Auto merge of #28548 - steveklabnik:gh28545, r=alexcrichton

so say so in the FAQ

Fixes #28545

8 years agoAuto merge of #28555 - GuillaumeGomez:error_codes, r=Manishearth
bors [Mon, 21 Sep 2015 04:24:06 +0000 (04:24 +0000)]
Auto merge of #28555 - GuillaumeGomez:error_codes, r=Manishearth

8 years agoAuto merge of #28552 - apasel422:issue-28527, r=Manishearth
bors [Mon, 21 Sep 2015 02:40:40 +0000 (02:40 +0000)]
Auto merge of #28552 - apasel422:issue-28527, r=Manishearth

Closes #28527.

r? @Manishearth

8 years agoAuto merge of #28541 - baskerville:trpl-two-typos, r=steveklabnik
bors [Mon, 21 Sep 2015 00:58:03 +0000 (00:58 +0000)]
Auto merge of #28541 - baskerville:trpl-two-typos, r=steveklabnik

r? @steveklabnik

8 years agoAuto merge of #28539 - rkruppe:shuffle-num-internals, r=alexcrichton
bors [Sun, 20 Sep 2015 23:14:58 +0000 (23:14 +0000)]
Auto merge of #28539 - rkruppe:shuffle-num-internals, r=alexcrichton

Move private bignum module to core::num, because it is not only used in flt2dec.
Extract private 80-bit soft-float into new core::num module for the same reason.

8 years agoAuto merge of #28534 - marcusklaas:fix-mod-inner-span, r=alexcrichton
bors [Sun, 20 Sep 2015 21:31:24 +0000 (21:31 +0000)]
Auto merge of #28534 - marcusklaas:fix-mod-inner-span, r=alexcrichton

Fixes https://github.com/rust-lang/rust/issues/28520.

r? @alexcrichton or @nrc?

8 years agoReplace `ast::Mac_` enum with struct
Andrew Paseltiner [Sun, 20 Sep 2015 20:15:37 +0000 (16:15 -0400)]
Replace `ast::Mac_` enum with struct

Closes #28527.

8 years agoWe are production ready
Steve Klabnik [Sun, 20 Sep 2015 19:52:25 +0000 (15:52 -0400)]
We are production ready

so say so in the FAQ

Fixes #28545

8 years agoAuto merge of #28429 - wesleywiser:split_up_lints, r=alexcrichton
bors [Sun, 20 Sep 2015 19:48:12 +0000 (19:48 +0000)]
Auto merge of #28429 - wesleywiser:split_up_lints, r=alexcrichton

This breaks out some of the lints defined in `librustc_lint/builtin.rs` into two new modules: `unused` for the `UNUSED_*` lints and `bad_style` for the various style related lints as suggested in #22206. `builtin.rs` could probably get broken up more but this is a start.

8 years agoAdd comment.
whitequark [Sun, 20 Sep 2015 19:19:30 +0000 (22:19 +0300)]
Add comment.

8 years agoFix style.
whitequark [Sun, 20 Sep 2015 19:15:39 +0000 (22:15 +0300)]
Fix style.

8 years agoAuto merge of #28501 - semarie:stdcpp-path, r=alexcrichton
bors [Sun, 20 Sep 2015 18:04:52 +0000 (18:04 +0000)]
Auto merge of #28501 - semarie:stdcpp-path, r=alexcrichton

By default, the linker in use under OpenBSD is the linker of base, which
don't include /usr/local/lib where libstdc++ of gcc-4.9 lives. We need
to add this directory to linker-path-search (using -L).

Search the path of libstdc++.a, which is a known name (libstdc++.so has
SO_VERSION) in the same directory.

r? @alexcrichton

this commit needs #28495 to be commited first. It should be the last piece for building rustc under OpenBSD from scratch.

8 years agoTRPL: Fix two typos
Bastien Dejean [Sun, 20 Sep 2015 17:13:43 +0000 (19:13 +0200)]
TRPL: Fix two typos

8 years agoPass libstdc++.so path to linker under OpenBSD
Sébastien Marie [Fri, 18 Sep 2015 21:02:05 +0000 (23:02 +0200)]
Pass libstdc++.so path to linker under OpenBSD

By default, the linker in use under OpenBSD is the linker of base, which
don't include /usr/local/lib where libstdc++ of gcc-4.9 lives. We need
to add this directory to linker-path-search (using -L).

Search the path of libstdc++.a, which is a known name (libstdc++.so has
SO_VERSION) in the same directory.

8 years agoReorganize core::num internals
Robin Kruppe [Sun, 20 Sep 2015 16:34:33 +0000 (18:34 +0200)]
Reorganize core::num internals

Move private bignum module to core::num, because it is not only used in flt2dec.
Extract private 80-bit soft-float into new core::num module for the same reason.

8 years agoAuto merge of #28499 - semmaz:doc-anchor-fix, r=steveklabnik
bors [Sun, 20 Sep 2015 16:21:43 +0000 (16:21 +0000)]
Auto merge of #28499 - semmaz:doc-anchor-fix, r=steveklabnik

This changes how rustic generate `id` and `href` attributes for section header anchor. Now they are more github-like.

Also fixes breakage in docs caused by this and broken links in "Error Handling" section of book.

r? @steveklabnik
cc @alexcrichton

8 years agoAuto merge of #28532 - Eljay:misc-fixes, r=bluss
bors [Sun, 20 Sep 2015 13:39:57 +0000 (13:39 +0000)]
Auto merge of #28532 - Eljay:misc-fixes, r=bluss

As the title says, just cleaning up some old stuff.

8 years agoFix the overly long inner spans of inline mods
Marcus Klaas [Sun, 20 Sep 2015 12:06:58 +0000 (14:06 +0200)]
Fix the overly long inner spans of inline mods

8 years agoMiscellaneous cleanup for old issues.
Lee Jeffery [Sun, 20 Sep 2015 10:35:08 +0000 (11:35 +0100)]
Miscellaneous cleanup for old issues.

8 years agorustdoc: added tests for header rendering & minor fixes
Simon Mazur [Sat, 19 Sep 2015 01:43:59 +0000 (04:43 +0300)]
rustdoc: added tests for header rendering & minor fixes

8 years agorustdoc: remove redundant test
Simon Mazur [Fri, 18 Sep 2015 18:39:05 +0000 (21:39 +0300)]
rustdoc: remove redundant test

8 years agorustdoc: some code style improvements
Simon Mazur [Fri, 18 Sep 2015 18:34:16 +0000 (21:34 +0300)]
rustdoc: some code style improvements

8 years agodoc: Fix broken links
Simon Mazur [Fri, 18 Sep 2015 14:12:58 +0000 (17:12 +0300)]
doc: Fix broken links

8 years agorustdoc: Changed section headers anchor rendering
Simon Mazur [Fri, 18 Sep 2015 12:05:35 +0000 (15:05 +0300)]
rustdoc: Changed section headers anchor rendering

8 years agoAdd error codes for librustc_typeck
Guillaume Gomez [Sun, 20 Sep 2015 10:02:56 +0000 (12:02 +0200)]
Add error codes for librustc_typeck

8 years agoDo not drop_in_place elements of Vec<T> if T doesn't need dropping
whitequark [Sun, 20 Sep 2015 08:04:01 +0000 (11:04 +0300)]
Do not drop_in_place elements of Vec<T> if T doesn't need dropping

With -O2, LLVM's inliner can remove this code, but this does not happen
with -O1 and lower. As a result, dropping Vec<u8> was linear with length,
resulting in abysmal performance for large buffers.

8 years agoAuto merge of #28529 - Manishearth:rollup, r=Manishearth
bors [Sun, 20 Sep 2015 07:32:46 +0000 (07:32 +0000)]
Auto merge of #28529 - Manishearth:rollup, r=Manishearth

- Successful merges: #28463, #28507, #28522, #28525, #28526
- Failed merges:

8 years agoRollup merge of #28526 - Manishearth:expand-clone, r=eddyb
Manish Goregaokar [Sun, 20 Sep 2015 05:46:27 +0000 (11:16 +0530)]
Rollup merge of #28526 - Manishearth:expand-clone, r=eddyb

This reduces some clones of `Vec`s. These are not deep copies since the
token tree is made using `Rc`s, so this won't be a major improvement.

r? @eddyb

8 years agoRollup merge of #28525 - Wallacoloo:book-4.8-double-more, r=steveklabnik
Manish Goregaokar [Sun, 20 Sep 2015 05:46:27 +0000 (11:16 +0530)]
Rollup merge of #28525 - Wallacoloo:book-4.8-double-more, r=steveklabnik

This is a simple grammar fix in which the previous author accidentally repeated a word when (s)he shouldn't have.

8 years agoRollup merge of #28522 - apasel422:issue-28091, r=alexcrichton
Manish Goregaokar [Sun, 20 Sep 2015 05:46:27 +0000 (11:16 +0530)]
Rollup merge of #28522 - apasel422:issue-28091, r=alexcrichton

Closes #28091.

r? @huonw

8 years agoRollup merge of #28507 - Manishearth:const-stable, r=alexcrichton
Manish Goregaokar [Sun, 20 Sep 2015 05:46:27 +0000 (11:16 +0530)]
Rollup merge of #28507 - Manishearth:const-stable, r=alexcrichton

Fixes #28490

cc #24111

8 years agoRollup merge of #28463 - critiqjo:book-concurrency, r=steveklabnik
Manish Goregaokar [Sun, 20 Sep 2015 05:46:26 +0000 (11:16 +0530)]
Rollup merge of #28463 - critiqjo:book-concurrency, r=steveklabnik

Fixes #28458

Details about `Arc` may be too soon to be described together with `Sync`... Tell me what you think.

r? @steveklabnik

8 years agoAuto merge of #28503 - marcusklaas:pub-extern, r=alexcrichton
bors [Sun, 20 Sep 2015 05:44:45 +0000 (05:44 +0000)]
Auto merge of #28503 - marcusklaas:pub-extern, r=alexcrichton

Fixes https://github.com/rust-lang/rust/issues/28472.

8 years agoAuto merge of #28519 - wthrowe:fixup-28321, r=alexcrichton
bors [Sun, 20 Sep 2015 03:57:13 +0000 (03:57 +0000)]
Auto merge of #28519 - wthrowe:fixup-28321, r=alexcrichton

I assume the expected error changed during the development of pull
request #28321 and that wasn't noticed because the test was
accidentally not running.

r? @nikomatsakis

8 years agoAuto merge of #28506 - Manishearth:no_mac, r=eddyb
bors [Sun, 20 Sep 2015 02:00:04 +0000 (02:00 +0000)]
Auto merge of #28506 - Manishearth:no_mac, r=eddyb

It's not being called or used, and `Mac`s don't exist at either lint phase.

8 years agoDon't recommend const fns on a stable build without a note about nightlies
Manish Goregaokar [Sat, 19 Sep 2015 03:59:04 +0000 (09:29 +0530)]
Don't recommend const fns on a stable build without a note about nightlies

Fixes #28490

8 years agoMove tts instead of cloning in expansion
Manish Goregaokar [Sun, 20 Sep 2015 01:15:19 +0000 (06:45 +0530)]
Move tts instead of cloning in expansion

8 years agoFix "more more" typo
Colin Wallace [Sun, 20 Sep 2015 00:19:29 +0000 (17:19 -0700)]
Fix "more more" typo

8 years agoAuto merge of #28512 - lfairy:snapshot-pyc, r=alexcrichton
bors [Sun, 20 Sep 2015 00:12:12 +0000 (00:12 +0000)]
Auto merge of #28512 - lfairy:snapshot-pyc, r=alexcrichton

Closes #28508

r? @brson

8 years agoFeature-gate `#[no_debug]` and `#[omit_gdb_pretty_printer_section]`
Andrew Paseltiner [Sat, 19 Sep 2015 20:33:47 +0000 (16:33 -0400)]
Feature-gate `#[no_debug]` and `#[omit_gdb_pretty_printer_section]`

Closes #28091.

8 years agoSplit out the UNUSED_* lints into a new module
Wesley Wiser [Tue, 15 Sep 2015 22:58:19 +0000 (18:58 -0400)]
Split out the UNUSED_* lints into a new module

Part of #22206

8 years agoSplit out the bad_style lints into a new module
Wesley Wiser [Tue, 15 Sep 2015 02:36:39 +0000 (22:36 -0400)]
Split out the bad_style lints into a new module

Part of #22206

8 years agoAuto merge of #28345 - japaric:op-assign, r=nmatsakis
bors [Sat, 19 Sep 2015 21:19:29 +0000 (21:19 +0000)]
Auto merge of #28345 - japaric:op-assign, r=nmatsakis

Implements overload-able augmented/compound assignments, like `a += b` via the `AddAssign` trait, as specified in RFC [953]

[953]: https://github.com/rust-lang/rfcs/blob/master/text/0953-op-assign.md

r? @nikomatsakis

8 years agoAuto merge of #28516 - steveklabnik:rollup, r=steveklabnik
bors [Sat, 19 Sep 2015 19:28:59 +0000 (19:28 +0000)]
Auto merge of #28516 - steveklabnik:rollup, r=steveklabnik

- Successful merges: #28400, #28430, #28443, #28483, #28485, #28496, #28511, #28515
- Failed merges:

8 years agoMove test to the right directory and make it pass
William Throwe [Sat, 19 Sep 2015 16:49:56 +0000 (12:49 -0400)]
Move test to the right directory and make it pass

I assume the expected error changed during the development of pull
request #28321 and that wasn't noticed because the test was
accidentally not running.

8 years agoAuto merge of #28497 - apasel422:issue-28493, r=Gankro
bors [Sat, 19 Sep 2015 17:40:56 +0000 (17:40 +0000)]
Auto merge of #28497 - apasel422:issue-28493, r=Gankro

When both the key and value types were zero-sized, `BTreeMap` previously
called `heap::allocate` with `size == 0` for leaf nodes, which is
undefined behavior, and jemalloc would attempt to read invalid memory,
crashing the process.

This avoids undefined behavior by allocating enough space to store one
edge in leaf nodes that would otherwise have `size == 0`. Although this
uses extra memory, maps with zero-sized key types that have sensible
implementations of the ordering traits can only contain a single
key-value pair (and therefore only a single leaf node), and maps with
key and value types that are both zero-sized have few uses, if any.

Furthermore, this is a temporary fix that will likely be unnecessary
once the `BTreeMap` implementation is rewritten to use parent pointers.

Closes #28493.

8 years agotrpl: Improve clarity in Concurrency
critiqjo [Thu, 17 Sep 2015 15:00:17 +0000 (20:30 +0530)]
trpl: Improve clarity in Concurrency

8 years agoRollup merge of #28515 - alex:patch-1, r=steveklabnik
Steve Klabnik [Sat, 19 Sep 2015 15:15:49 +0000 (11:15 -0400)]
Rollup merge of #28515 - alex:patch-1, r=steveklabnik

Repertory is a real world, but it doesn't really make sense in that context.

8 years agoRollup merge of #28511 - llogiq:printdoc, r=steveklabnik
Steve Klabnik [Sat, 19 Sep 2015 15:15:49 +0000 (11:15 -0400)]
Rollup merge of #28511 - llogiq:printdoc, r=steveklabnik

This closes #28510.

8 years agoRollup merge of #28496 - davidszotten:fix_error_anchors, r=steveklabnik
Steve Klabnik [Sat, 19 Sep 2015 15:15:48 +0000 (11:15 -0400)]
Rollup merge of #28496 - davidszotten:fix_error_anchors, r=steveklabnik