Commit Graph

58417 Commits

Author SHA1 Message Date
bors
7c69b0d5ae Auto merge of #37491 - Mark-Simulacrum:closure-ice, r=eddyb
Fix ICE when printing closures, and other similar types

Follow-up of https://github.com/rust-lang/rust/pull/37459, further fixes those problems.

Potentially actually fixes #36622, though @eddyb may want to not let that close if the rename of RUST_LOG is deemed part of that issue.

Potentially should be beta-nominated as well?

r? @eddyb
2016-11-01 12:20:03 -07:00
Niko Matsakis
4501e5a52f remove erroneous E0045 annotation
The old parse code kept going even though it wasn't
supposed to, leading to an E0045 ("feature not allowed
on beta") printout
2016-11-01 14:08:56 -04:00
Niko Matsakis
6236ee14af add -Z continue-parse-after-error to parse-fail tests
The new handling fixed a latent bug in the parser error handling where
it would only abort after the second error (when configured to stop
after the first error). This is because the check for `error_count != 0`
was occuring before the increment. Since the increment is tied to the
`emit()` call now this no longer occurs.
2016-11-01 14:08:56 -04:00
Niko Matsakis
ad46ad6a77 pacify the mercilous tidy 2016-11-01 14:08:56 -04:00
Niko Matsakis
fa9ebfc74e move compile-fail tests to ui tests
gets more comprehensive coverage in `ui`
2016-11-01 14:08:56 -04:00
Niko Matsakis
222349931e apply review feedback nits
- correct indentation
- rename `from_cause` to `from_obligation_cause`
- break up `compare_impl_method` into fns
- delete some blank lines and correct comment
2016-11-01 14:08:56 -04:00
Niko Matsakis
b6597528bd update extra_requirement_in_impl to #37166 2016-11-01 14:08:56 -04:00
Niko Matsakis
92529255c5 update test error messages
We've got a new revised message for E0273; just drop back to the error
code, since the ui tests check for the full appearance now.
2016-11-01 14:08:56 -04:00
Niko Matsakis
61c777baec introduce new origin for Trait+'b
This helps us to preserve the existing errors.
2016-11-01 14:08:56 -04:00
Niko Matsakis
a20b062663 update ref file 2016-11-01 14:08:56 -04:00
Niko Matsakis
0c03a886d3 run compare method in old-broken-way and new-good-way 2016-11-01 14:08:56 -04:00
Niko Matsakis
84ac618e8b go back to supplying diagnostic 2016-11-01 14:08:56 -04:00
Niko Matsakis
2b5bc487c5 improve early lint to use multispan from diagnostic 2016-11-01 14:08:56 -04:00
Niko Matsakis
0aeab9a390 move early lint over to multispan 2016-11-01 14:08:56 -04:00
Niko Matsakis
ddabd509a8 compare-method lint 2016-11-01 14:08:56 -04:00
Niko Matsakis
f652651275 retool EarlyLint to track a Diagnostic 2016-11-01 14:07:45 -04:00
Niko Matsakis
888a92cef3 separate Diagnostic from DiagnosticBuilder 2016-11-01 14:07:45 -04:00
Niko Matsakis
75bc8bfa92 introduce EarlyLint type
For now, this type just replaces a tuple, but it will eventually grow
the ability to carry more structured information.
2016-11-01 14:07:45 -04:00
Niko Matsakis
bd5fa7532d cleanup error reporting and add ui tests 2016-11-01 14:04:14 -04:00
Niko Matsakis
e77cc9c983 elaborate T: 'a dependencies 2016-11-01 14:04:14 -04:00
Niko Matsakis
ce340af738 move outlives_components onto tcx 2016-11-01 14:04:14 -04:00
Jared Roesch
f3cc374927 introduce fn-ctxt so we can invoke regionck code 2016-11-01 14:04:14 -04:00
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