Commit Graph

58456 Commits

Author SHA1 Message Date
Brian Anderson
6135cbc9e2 std: Flatten the num directory to reflect the module layout
This makes it dissimilar to how core is structured on disk, but
more predictable on its own.
2016-11-01 17:08:24 +00:00
Brian Anderson
c251884575 Clean up and add more comments to libstd/lib.rs 2016-11-01 17:08:24 +00:00
Brian Anderson
8f5bb1f7c0 std: Remove unused test feature 2016-11-01 17:08:24 +00:00
Brian Anderson
ee71dc5476 Document sys_common and sys 2016-11-01 17:08:24 +00:00
Brian Anderson
ca30691813 std: Move sys_common to libstd/sys_common
Make the directory structure reflect the module structure. I've always
found the existing structure confusing.
2016-11-01 17:08:24 +00:00
Brian Anderson
f3a709dc52 std: Move platform-specific out of sys_common::util 2016-11-01 17:08:24 +00:00
Brian Anderson
219c018894 std: Move platform-specific code out of libstd/lib.rs 2016-11-01 17:08:24 +00:00
Brian Anderson
6d54cd4b2c std: Move a plattform-specific constant to sys::stdio 2016-11-01 17:08:24 +00:00
Brian Anderson
8b2600dbf9 Document reasoning for supporting both fast and OS TLS in the same bin 2016-11-01 17:08:24 +00:00
Brian Anderson
568840707c std: Move elf TLS to sys::fast_thread_local 2016-11-01 17:08:24 +00:00
Mikhail Modin
a0e7e357a7 Improve "Doesn't live long enough" error
case with different lifetime with spans
2016-11-01 19:39:28 +03:00
Mark-Simulacrum
6720e0191c Add tracking issue number to Result::unwrap_or_default unstable annotation. 2016-11-01 09:47:09 -06:00
Guillaume Gomez
f5c192a4b7 Rollup merge of #37495 - buntine:master, r=steveklabnik
Commented out final 'main' function in order to fit within pattern of…

… other examples and prevent incorrect indentation
2016-11-01 16:15:52 +01:00
Guillaume Gomez
d2f5d26a71 Rollup merge of #37485 - xfix:patch-2, r=steveklabnik
Don't mention "*" dependency version in guessing game example

It's a bad practice as far [RFC 1241](https://github.com/rust-lang/rfcs/blob/master/text/1241-no-wildcard-deps.md) is concerned, and introducing it in early tutorial may as well make it feel legitimate.
2016-11-01 16:15:52 +01:00
Guillaume Gomez
d5a2510574 Rollup merge of #37484 - pfrenssen:patch-1, r=steveklabnik
Update "Testing" chapter for 1.12

I followed the "Testing" chapter using Rust 1.12.1 but there are some differences. By default the `tests` module is now also generated by `cargo new`, and the console output is updated.
2016-11-01 16:15:52 +01:00
Guillaume Gomez
7e805eae8e Rollup merge of #37316 - ollie27:docs_links, r=GuillaumeGomez
Fix a few links in the docs

r? @steveklabnik
2016-11-01 16:15:52 +01:00
Guillaume Gomez
ed96e4fd2e Rollup merge of #37296 - srinivasreddy:librustc_driver, r=nikomatsakis
run rustfmt on librustc_driver folder
2016-11-01 16:15:51 +01:00
Guillaume Gomez
9820bd02a1 Rollup merge of #37059 - jfirebaugh:unused-RangeExpression, r=alexcrichton
Remove TypeOrigin::RangeExpression

This variant became unused in #30884.
2016-11-01 16:15:51 +01:00
Guillaume Gomez
79d3d26c2e Rollup merge of #36849 - diwic:69-fromutf8-doc, r=alexcrichton
str: Fix documentation typo

from_utf8 returns a Result, not an Option.

Signed-off-by: David Henningsson diwic@ubuntu.com
2016-11-01 16:15:51 +01:00
Marcin Fatyga
655effedf2 Merge branch 'master' of https://github.com/rust-lang/rust
Conflicts:
	src/libcoretest/lib.rs
2016-11-01 15:26:22 +01:00
bors
ea4b94dab0 Auto merge of #37332 - nikomatsakis:incr-comp-benchmark-2, r=michaelwoerister
add more incremental reuse test cases

r? @michaelwoerister

This is basically a port of the "private method in impl". It works better when it's a top-level fn. =)
2016-11-01 07:04:33 -07:00
Michael Woerister
e3025a0733 ICH: Hash expression spans if their source location is captured for panics 2016-11-01 09:41:46 -04:00
bors
ac968c4664 Auto merge of #37299 - devonhollowood:result-unwrap-or-default, r=alexcrichton
Add `unwrap_or_default` method to `Result`

Fixes #37025
2016-11-01 03:53:42 -07:00
bors
73f5cad6c4 Auto merge of #37178 - apasel422:issue-37136, r=alexcrichton
Implement `RefUnwindSafe` for atomic types

Closes #37136
2016-11-01 00:44:50 -07:00
bors
265ab659b2 Auto merge of #36595 - bluss:hashmap-usize-for-hash, r=alexcrichton
hashmap: Store hashes as usize internally

We can't use more than usize's bits of a hash to select a bucket anyway,
so we only need to store that part in the table. This should be an
improvement for the size of the data structure on 32-bit platforms.
Smaller data means better cache utilization and hopefully better
performance.

Fixes #36567
2016-10-31 21:36:39 -07:00
bors
69ec350f59 Auto merge of #37497 - iirelu:proper-vec-brackets-2, r=steveklabnik
Make all vec! macros use square brackets: Attempt 2

[The last PR](https://github.com/rust-lang/rust/pull/37476) ended with tears after a valiant struggle with git. I managed to clean up the completely broken history of that into a brand spanking new PR! Yay!

Original:

> Everyone hates the old syntax. I hope. Otherwise this PR has some controversy I wasn't expecting.

> This would be the perfect time to write a lint recommending vec![..] when you use another style.

> Disclaimer: I may have broken something. If I have, I'll fix them when the tests come in. Luckily the chance for a non-syntactical error is pretty low in all this.
2016-10-31 16:29:03 -07:00
iirelu
e593c3b893 Changed most vec! invocations to use square braces
Most of the Rust community agrees that the vec! macro is clearer when
called using square brackets [] instead of regular brackets (). Most of
these ocurrences are from before macros allowed using different types of
brackets.

There is one left unchanged in a pretty-print test, as the pretty
printer still wants it to have regular brackets.
2016-10-31 22:51:40 +00:00
Tim Neumann
f7107f32c2 rustbuild+configure: convert unix style paths on windows 2016-10-31 22:44:52 +01:00
Tim Neumann
5cb5c85152 rustbuild+configure: improve bin/exe joining 2016-10-31 22:44:52 +01:00
Tim Neumann
dce460028e detect gdb version & rust support in compiletest 2016-10-31 21:12:59 +01:00
Tim Neumann
6554fb0d8d add gdb_native_rust config to compiletest 2016-10-31 21:12:59 +01:00
Tim Neumann
9253e1206e adapt debuginfo tests for gdb with native rust support 2016-10-31 21:12:59 +01:00
arthurprs
eba93c3a0f Don't reuse RandomState seeds 2016-10-31 21:12:27 +01:00
Christopher Serr
b926e8d089 Add missing space in mutable_transmutes lint 2016-10-31 19:41:22 +01:00
bors
f26eedb571 Auto merge of #37191 - zackmdavis:we_heard_you_the_first_time_really, r=nikomatsakis
introing one-time diagnostics: only emit "lint level defined here" once

This is a revised resubmission of PR #34084 (which was closed due to inactivity on account of time constraints on the author's part).
---

We introduce a new `one_time_diagnostics` field on
`rustc::session::Session` to hold a hashset of diagnostic messages we've
set once but don't want to see again (as uniquified by span and message
text), "lint level defined here" being the motivating example dealt with
here.

This is in the matter of #24690.
---

r? @nikomatsakis
2016-10-31 10:56:25 -07:00
Alex Crichton
20c301330c rustc: Add knowledge of Windows subsystems.
This commit is an implementation of [RFC 1665] which adds support for the
`#![windows_subsystem]` attribute. This attribute allows specifying either the
"windows" or "console" subsystems on Windows to the linker.

[RFC 1665]: https://github.com/rust-lang/rfcs/blob/master/text/1665-windows-subsystem.md

Previously all Rust executables were compiled as the "console" subsystem which
meant that if you wanted a graphical application it would erroneously pop up a
console whenever opened. When compiling an application, however, this is
undesired behavior and the "windows" subsystem is used instead to have control
over user interactions.

This attribute is validated, but ignored on all non-Windows platforms.

cc #37499
2016-10-31 10:03:41 -07:00
bors
bf5b824c1c Auto merge of #37494 - GuillaumeGomez:rollup, r=GuillaumeGomez
Rollup of 5 pull requests

- Successful merges: #37438, #37458, #37462, #37475, #37486
- Failed merges:
2016-10-31 07:22:58 -07:00
Seo Sanghyeon
07c8a25f42 Remove unused type aliases 2016-10-31 23:14:27 +09:00
Bunts Thy Unholy
8483732c9a Removed commented main functions entirely. This fits in with other examples in the Closures section 2016-10-31 23:41:38 +11:00
Bunts Thy Unholy
32fb2527d9 Commented out final 'main' function in order to fit within pattern of other examples and prevent incorrect indentation 2016-10-31 22:45:03 +11:00
Guillaume Gomez
0a59eba0e8 Rollup merge of #37486 - msiglreith:pr_doc_bitandassign, r=apasel422
Fix typo in the BitAndAssign operator documentation

The name of the operator should be `&=` instead of `&`.
2016-10-31 12:27:24 +01:00
Guillaume Gomez
aa80a8c0a9 Rollup merge of #37475 - AndiDog:feature/error-explanation-E0532, r=GuillaumeGomez
Add E0532 error explanation

This resolves one of the error list in https://github.com/rust-lang/rust/issues/35347 - just because I stumbled over it today.

I assumed the error code should be removed from `register_diagnostics!` because it's now defined above.

Since that is my first code contribution, please check that all is in order. It would be helpful to know how to run the test for the `compile_fail,E0532` part. I did `make check-stage1-cfail NO_REBUILD=1` but that doesn't test the inlined example.

r? @GuillaumeGomez
2016-10-31 12:27:24 +01:00
Guillaume Gomez
46cfba29cf Rollup merge of #37462 - Mark-Simulacrum:remove-obsolete-fixme, r=petrochenkov
Remove outdated fixme comment.

Linked issue has been closed, but the comment was not removed.

If this is still an issue, then the comment should probably be updated.

r? @petrochenkov
2016-10-31 12:27:24 +01:00
Guillaume Gomez
6627cb8928 Rollup merge of #37458 - nrc:save-span-errs2, r=petrochenkov
Fix more spans in deriving::generic

r? @petrochenkov
2016-10-31 12:27:23 +01:00
Guillaume Gomez
48def35f1b Rollup merge of #37438 - Cobrand:index_doc, r=GuillaumeGomez
improve docs for Index and IndexMut

This mainly changes the boring example of Foo/Bar of `IndexMut` into a better one.

Also added explanations about syntactic sugar for `v[index]`.

Closes #36329
2016-10-31 12:27:23 +01:00
bors
074d30d030 Auto merge of #37465 - pftbest:rust-llvm-2016-10-29, r=alexcrichton
LLVM: Update submodule to rust-llvm-2016-10-29 branch.

Fixes #37227
2016-10-31 02:52:54 -07:00
Jeffrey Seyfried
6c4b551403 Cleanup Resolver::disallowed_shadowing. 2016-10-31 06:56:06 +00:00
bors
4497196ba5 Auto merge of #37439 - michaelwoerister:remove-sha256, r=alexcrichton
Replace all uses of SHA-256 with BLAKE2b.

Removes the SHA-256 implementation and replaces all uses of it with BLAKE2b, which we already use for debuginfo type guids and incremental compilation hashes. It doesn't make much sense to have two different cryptographic hash implementations in the compiler and Blake has a few advantages over SHA-2 (computationally less expensive, hashes of up to 512 bits).
2016-10-30 23:37:18 -07:00
bors
8f1fc86533 Auto merge of #37489 - nagisa:unnecessary-clone, r=eddyb
Do not clone Mir unnecessarily

r? @eddyb
2016-10-30 20:30:38 -07:00
Mark-Simulacrum
0dfc046772 Fix ICE when printing closures, and other similar types 2016-10-30 20:20:10 -06:00