Commit Graph

69856 Commits

Author SHA1 Message Date
Djzin
aed0c9c9c0 use lazy cached unreachable block - assign it to the function's closing brace 2017-11-14 06:33:39 +00:00
Djzin
829b70330e always add an unreachable branch on matches to give more info to llvm about which values are possible 2017-11-14 06:33:39 +00:00
bors
b5a3ab2e81 Auto merge of #45915 - michaelwoerister:removed-nodes-in-try-mark-green, r=alexcrichton
incr.comp.: Don't crash in DepGraph::try_mark_green() when encountering a removed input node.

Fixes a small regression that was introduced in #45867.

r? @nikomatsakis
2017-11-14 05:30:34 +00:00
bors
9b53f0a662 Auto merge of #45909 - sinkuu:issue-45885, r=arielb1
Normalize inlined function in MIR inliner

Fixes #45885

r? @arielb1
2017-11-14 02:05:37 +00:00
bors
212d74f1e7 Auto merge of #45436 - zilbuz:issue-44837, r=nikomatsakis
MIR-borrowck: add permisson checks to `fn access_lvalue`

WIP : Some FIXME left and some broken tests.

Fix #44837
2017-11-13 23:36:07 +00:00
Ariel Ben-Yehuda
824b307ff7 avoid the pprust infrastructure in macro expansion
This changes macro expansion to format the path of a macro directly
instead of usng the pprust infrastructure. The pprust infrastructure
tries to perform line-breaking in a slow fashion, which is undesired
when formatting the path of a macro.

This should to speed up expansion by a fair amount (I saw 20% on a
profiler on `rustc_mir`, and 50% of the time marked as "expansion" in
the profiler/time-passes is actually spent loading dependencies).
2017-11-14 01:24:36 +02:00
matthewjasper
a6824f18b8 Use the correct type for cannot move error 2017-11-13 22:40:22 +00:00
Guillaume Gomez
7e8fe9a63f Add missing links in FromStr docs 2017-11-13 23:25:52 +01:00
bors
e21df8020d Auto merge of #45903 - nrc:rustfmt-dist, r=alexcrichton
Distribute Rustfmt

r? @alexcrichton
2017-11-13 21:06:11 +00:00
Basile Desloges
cbad2e5720 mir-borrowck: Test for check_access_permissions() 2017-11-13 21:53:10 +01:00
Basile Desloges
37e08a5dca mir-borrowck: Check access permissions in access_lvalue() 2017-11-13 21:53:09 +01:00
Basile Desloges
0bb77bdb54 mir-borrowck: Move is_static_mut() to ty/utils.rs 2017-11-13 21:53:09 +01:00
QuietMisdreavus
02b3785f84 update codeblock-title test with new notice text 2017-11-13 11:44:19 -06:00
bors
8efbf7a4f0 Auto merge of #45890 - arielb1:self-first, r=eddyb
check::method - unify receivers before normalizing method signatures

Normalizing method signatures can unify inference variables, which can
cause receiver unification to fail. Unify the receivers first to avoid
that.

Fixes #36701.
Fixes #45801.
Fixes #45855.

r? @eddyb

beta-nominating because #43880 made this ICE happen in more cases (the code in that issue ICEs post-#43880 only, but the unit test here ICEs on all versions).
2017-11-13 17:42:13 +00:00
Michael Woerister
3bd333c988 incr.comp.: Add CacheEncoder for encoding query results into the incr.comp. cache. 2017-11-13 16:35:51 +01:00
gaurikholkar
39f468e668 fixing indentation 2017-11-13 20:19:54 +05:30
Michael Woerister
9ac102645f incr.comp.: Properly use ty::codec::decode_cnum() in rustc_metadata::decoder. 2017-11-13 15:48:52 +01:00
Michael Woerister
bc96d9d8c9 incr.comp.: Implement UseSpecializedXXcodable for DefIndex and DefId. 2017-11-13 15:46:46 +01:00
Sébastien Santoro
de8c57cb24 Use #!/usr/bin/env as shebang for Bash scripts
On some systems, the bash command could be available in another
directory than /bin. As such, to offer an env shebang is more
convenient.

This make sense even for docker scripts, as you can use Docker
on FreeBSD or SmartOS for example.
2017-11-13 14:33:12 +00:00
Michael Woerister
c08e03ac46 incr.comp.: Add position() method to TyEncoder. 2017-11-13 15:25:09 +01:00
bors
aca22a8f81 Auto merge of #45824 - dotdash:stack_pop, r=alexcrichton
Update LLVM to fix miscompiles with -Copt-level=z on Windows

Fixes #45034
2017-11-13 14:20:15 +00:00
Michael Woerister
8cbc02238d incr.comp.: Include header when loading cache files in order to get the same byte offsets as when saving. 2017-11-13 15:13:44 +01:00
bors
b7ccb0a5a7 Auto merge of #45810 - SimonSapin:ac-dc, r=aturon
Disable LLVM assertions on Nightly, enable them in "alt" builds.

Per IRC discussion https://mozilla.logbot.info/rust-infra/20171106#c13812170-c13812204

Background: https://internals.rust-lang.org/t/disabling-llvm-assertions-in-nightly-builds/5388/14
2017-11-13 11:46:55 +00:00
bors
e312c8a8c3 Auto merge of #45956 - kennytm:rollup, r=kennytm
Rollup of 9 pull requests

- Successful merges: #45828, #45892, #45893, #45914, #45917, #45927, #45933, #45952, #45954
- Failed merges:
2017-11-13 09:13:00 +00:00
kennytm
48d2627c38 Rollup merge of #45954 - udoprog:fix-style, r=kennytm
Fix style in interner test
2017-11-13 17:09:48 +08:00
kennytm
8c9d500b19 Rollup merge of #45952 - zackmdavis:singular_projection, r=estebank
deduplicate projection error (E0271) messages

The `ErrorId` variant takes a u16 so that `DiagnosticMessageId` can retain
its `Copy` status (the present author's first choice having been the "EXXX"
code as a string).

The duplicated "type mismatch resolving `{}`" literal is unfortunate, but
the `struct_span_err!` macro (which we want to mark that error code as
used) is fussy about taking a literal, and the one-time-diagnostics set
needs an owned string.

This is concerning #33941 and probably #45805!

r? @estebank
2017-11-13 17:09:47 +08:00
kennytm
3604737b95 Rollup merge of #45933 - shanavas786:refactor-filter, r=alexcrichton
Refactor Option::filter method
2017-11-13 17:09:46 +08:00
kennytm
574dff9052 Rollup merge of #45927 - sinkuu:mir-borrowck-closure, r=estebank
MIR-borrowck: fix diagnostics for closures

Emit notes for captured variables in the same manner as AST borrowck.

```
error[E0499]: cannot borrow `x` as mutable more than once at a time (Ast)
  --> $DIR/borrowck-closures-two-mut.rs:24:24
   |
23 |     let c1 = to_fn_mut(|| x = 4);
   |                        -- - previous borrow occurs due to use of `x` in closure
   |                        |
   |                        first mutable borrow occurs here
24 |     let c2 = to_fn_mut(|| x = 5); //~ ERROR cannot borrow `x` as mutable more than once
   |                        ^^ - borrow occurs due to use of `x` in closure
   |                        |
   |                        second mutable borrow occurs here
25 | }
   | - first borrow ends here

error[E0499]: cannot borrow `x` as mutable more than once at a time (Mir)
  --> $DIR/borrowck-closures-two-mut.rs:24:24
   |
23 |     let c1 = to_fn_mut(|| x = 4);
   |                        -- - previous borrow occurs due to use of `x` in closure
   |                        |
   |                        first mutable borrow occurs here
24 |     let c2 = to_fn_mut(|| x = 5); //~ ERROR cannot borrow `x` as mutable more than once
   |                        ^^ - borrow occurs due to use of `x` in closure
   |                        |
   |                        second mutable borrow occurs here
25 | }
   | - first borrow ends here
```

Fixes #45362.
2017-11-13 17:09:45 +08:00
kennytm
5d9b63ce7f Rollup merge of #45917 - ollie27:compiletest_stamp, r=alexcrichton
compiletest: Fix a couple of test re-run issues

* Re-run rustdoc tests if rustdoc or htmldocck.py was updated.
* Put stamp files in the correct subdirectories to avoid clashes when
the file names match but the subdirectory doesn't.
2017-11-13 17:09:44 +08:00
kennytm
e349b18150 Rollup merge of #45914 - michaelwoerister:fix-test-header-parsing, r=alexcrichton
Fix test case header parsing code in presence of multiple revisions.

The previous code would parse the TestProps, and then parse them again with a revision set, adding some elements (like aux_builds) a second time to the existing TestProps.
2017-11-13 17:09:43 +08:00
kennytm
331862ef11 Rollup merge of #45893 - redox-os:futex_timeout, r=alexcrichton
Redox: Use futex timeout to implement CondVar::wait_timeout

`CondVar::wait_timeout` is implemented by supplying a `TimeSpec` pointer to `futex`. In addition, all calls to `unimplemented!()` have been removed from the Redox `sys` module.

Related to https://github.com/rust-lang/rust/pull/45892
2017-11-13 17:09:42 +08:00
kennytm
563af5d260 Rollup merge of #45892 - redox-os:is_absolute_fix, r=alexcrichton
Redox: Return true from Path::is_absolute if a Path contains root or a scheme

In Redox, different subsystems have different filesystem paths. However, the majority of applications using the `Path::is_absolute` function really only want to know if a path is absolute from the perspective of the scheme it is currently running in, usually `file:`. This makes both `file:/` and `/` return `true` from `Path::is_absolute`, meaning that most code does not have to check if it is running on Redox.

Code that wants to know if a path contains a scheme can implement such a check on its own.

Related to https://github.com/rust-lang/rust/pull/45893
2017-11-13 17:09:41 +08:00
kennytm
e3ca816d36 Rollup merge of #45828 - pornel:printoption, r=nrc
Remove deprecated message

Follow up of #43067
2017-11-13 17:09:40 +08:00
John-John Tedro
b8891eebe4 Fix style in interner test 2017-11-13 07:55:20 +01:00
bors
c8c1424bf4 Auto merge of #45673 - GuillaumeGomez:rustdoc-type-search-generic, r=QuietMisdreavus
Search over generic types in docs

This is what I was talking about @QuietMisdreavus. Now we have generics.

Waiting for #45617 to get merged.
2017-11-13 06:54:24 +00:00
Zack M. Davis
5cc488d250 deduplicate projection error (E0271) messages
The `ErrorId` variant takes a u16 so that `DiagnosticMessageId` can retain
its `Copy` status (the present author's first choice having been the "EXXX"
code as a string).

The duplicated "type mismatch resolving `{}`" literal is unfortunate, but
the `struct_span_err!` macro (which we want to mark that error code as
used) is fussy about taking a literal, and the one-time-diagnostics set
needs an owned string.

This is concerning #33941 and probably #45805!
2017-11-12 19:34:27 -08:00
Shotaro Yamada
f99142b977 Fix comments 2017-11-13 12:25:13 +09:00
bors
783c6ec55d Auto merge of #45949 - Mark-Simulacrum:cargo-next, r=alexcrichton
Bump cargo to master

Includes a few bugfixes, and updates the Cargo book.

Critically includes https://github.com/rust-lang/cargo/pull/4716. This
unblocks (in theory) crater runs.
2017-11-13 01:53:12 +00:00
Jeff Crocker
642468858f
Updated exported incremental compilation hash tests 2017-11-12 16:24:41 -08:00
Jeff Crocker
44528cb7be
Fix indexing expressions test copy/paste docs 2017-11-12 16:20:22 -08:00
Jeff Crocker
b30b442ce1
Update if-expressions incremental hash tests 2017-11-12 16:13:42 -08:00
Nick Fitzgerald
c9c7d9f57a incr: Make unary_and_binary_exprs.rs use except-style incremental checking
Part of #44924
2017-11-12 16:12:29 -08:00
Jeff Crocker
e9e876d92e
Update panic expressions w/o overflow checks tests 2017-11-12 15:48:43 -08:00
bors
7f43981ebf Auto merge of #45623 - mneumann:dragonfly-ci, r=alexcrichton
Add ci for DragonFly
2017-11-12 23:31:58 +00:00
Mark Simulacrum
1f921ec9cf Bump cargo to master.
Includes a few bugfixes, and updates the Cargo book.

Critically includes https://github.com/rust-lang/cargo/pull/4716. This
unblocks (in theory) crater runs.
2017-11-12 16:21:00 -07:00
Jeff Crocker
59592b11b7
Update panic expression incremental tests 2017-11-12 14:57:43 -08:00
Nick Cameron
97d21e29df review changes 2017-11-13 10:51:30 +13:00
Nick Cameron
63d854acf2 Distribute Rustfmt 2017-11-13 10:51:29 +13:00
bors
79cfce3d35 Auto merge of #44167 - cengizIO:master, r=nikomatsakis
Improve SubSupConflict with a named and an anonymous lifetime parameter #42701

Hello!

This fixes #42701.

## UPDATE 01
Tests are producing different results between different env builds.
This inconsistency might take a long time to investigate and fix. So, be patient

## UPDATE 02
Changed an `FxHashMap` with a `BTreeMap`. Inconsistency seems to be resolved for now.
2017-11-12 21:04:41 +00:00
Guillaume Gomez
0e4c829f2b Add "As parameters" items as well 2017-11-12 21:38:24 +01:00