Commit Graph

76875 Commits

Author SHA1 Message Date
Dan Callaghan
51b17db770
configure.py --tools should set a list instead of a string
Currently the --tools option does not work because it is setting a string value
for 'build.tools'. It should be a list of strings instead.
2018-04-08 14:59:15 +10:00
bors
66fcc56444 Auto merge of #49714 - nikomatsakis:issue-49631, r=eddyb
mem-categorization, coherence fix

make mem-categorization use adjusted type for patterns: Fixes #49631

do not propagate `Err` when determing causal info: Fixes #48728

r? @eddyb
2018-04-08 03:03:25 +00:00
Tamir Duberstein
b204b498c5
Don't default to stage 1 with incremental
Closes #43177.
2018-04-07 22:32:21 -04:00
Tamir Duberstein
f144bdfa9d
Remove mention of CsvDumper
...it was removed in 9a47160.

Updates #18582.
2018-04-07 22:21:50 -04:00
Shotaro Yamada
b9e04e51db Print region in case of ICE 2018-04-08 10:34:39 +09:00
bors
08ad376e48 Auto merge of #49704 - leodasvacas:fix-#49344, r=nikomatsakis
Fix regression in defaults #49344

Fixes #49344 by not checking the well-formedness wrt defaults of predicates that contain lifetimes, which is consistent with not checking generic predicates.

r? @nikomatsakis
2018-04-08 00:28:24 +00:00
bors
056f589fb8 Auto merge of #49678 - bobtwinkles:fix_multiple_activations, r=nikomatsakis
two-phase borrows: support multiple activations in one statement

The need for this has arisen since the introduction of two-phase borrows on
method autorefs in #49348. r'ing @pnkfelix to keep things off Niko's plate so he can make this redundant, and @pnkfelix is familiar with the code.

Fixes #49635
Fixes #49662

r? @pnkfelix
2018-04-07 19:49:39 +00:00
bors
780707490f Auto merge of #49672 - alexcrichton:fix-another-std-core-cycle, r=michaelwoerister
Fix another circular deps link args issue

It turns out that the support in #49316 wasn't enough to handle all cases
notably the example in #48661. The underlying bug was connected to panic=abort
where lang items were listed in the `missing_lang_items` sets but didn't
actually exist anywhere.

This caused the linker backend to deduce that start-group/end-group wasn't
needed because not all items were defined. Instead the missing lang items that
don't actually need to have a definition are filtered out and not considered for
the start-group/end-group arguments

Closes #48661
2018-04-07 17:14:46 +00:00
bors
8228d8e176 Auto merge of #49692 - sinkuu:main_fix, r=arielb1
Fix ICE with `main`'s return type containing lifetimes

Fixes #48890
2018-04-07 14:33:48 +00:00
Oliver Middleton
ccc049d547 rustbuild: Fix setting initial cargo 2018-04-07 15:10:36 +01:00
bjorn3
2ff7e73cb5
miri: Make write_discriminant_value public 2018-04-07 14:39:24 +02:00
bors
8c2d7b2da3 Auto merge of #49661 - alexcrichton:bump-bootstrap, r=nikomatsakis
Bump the bootstrap compiler to 1.26.0 beta

Holy cow that's a lot of `cfg(stage0)` removed and a lot of new stable language
features!
2018-04-07 11:58:38 +00:00
Guillaume Gomez
1292e51e73 Improve code 2018-04-07 13:10:49 +02:00
bors
04fef17143 Auto merge of #49753 - kennytm:rollup, r=kennytm
Rollup of 9 pull requests

Successful merges:

 - #49510 (Fix anchor position on fields)
 - #49652 (Fix anchors issue when everything is collapsed)
 - #49702 (std: Inline some Termination-related methods)
 - #49728 (add emit_debug_gdb_scripts target option and ..)
 - #49731 (add THUMB targets to rustup manifest)
 - #49742 (Using X headings instead of 0.X #49739)
 - #49748 (proc_macro: Improve Debug representations)
 - #49750 (bootstrap: Remove the fast path)
 - #49503 (Inject the `compiler_builtins` crate whenever the `core` crate is injected)

Failed merges:
2018-04-07 09:30:10 +00:00
gaurikholkar
cbde62c2cc fix tidy errors 2018-04-07 14:36:29 +05:30
gaurikholkar
e5a96a4b95 modify the error message- CR Comments 2018-04-07 13:17:16 +05:30
kennytm
24b3a97986
Rollup merge of #49503 - oli-obk:extern_crate_compiler_builtins, r=alexcrichton
Inject the `compiler_builtins` crate whenever the `core` crate is injected
2018-04-07 15:36:57 +08:00
Oliver Schneider
679657b863
Inject the compiler_builtins crate whenever the core crate is injected 2018-04-07 09:24:35 +02:00
kennytm
3e0b15f824
Rollup merge of #49750 - ishitatsuyuki:boot-no-fast, r=Mark-Simulacrum
bootstrap: Remove the fast path

This is rarely noticed, but when you have old submodules, not updating them will cause you run into https://github.com/rust-lang/cargo/issues/4678.

(Reopen of #49721)

r? @alexcrichton
2018-04-07 14:51:34 +08:00
kennytm
3f26d01635
Rollup merge of #49748 - alexcrichton:proc-macro-debug, r=dtolnay
proc_macro: Improve Debug representations

This commit improves the `fmt::Debug` output of `proc_macro` data structures by
primarily focusing on the representation exposed by `proc_macro` rather than the
compiler's own internal representation. This cuts down quite a bit on assorted
wrapper types and ensure a relatively clean output.

Closes #49720
2018-04-07 14:51:33 +08:00
kennytm
7e28c0f72d
Rollup merge of #49742 - Pulkit07:master, r=steveklabnik
Using X headings instead of 0.X #49739

Fix #49739
2018-04-07 14:51:32 +08:00
kennytm
97511b120b
Rollup merge of #49731 - japaric:std-thumb-for-real, r=alexcrichton
add THUMB targets to rustup manifest

as instructed in https://github.com/rust-lang/rust/pull/49563#issuecomment-379271327

r? @alexcrichton
2018-04-07 14:51:31 +08:00
kennytm
c3eb990716
Rollup merge of #49728 - japaric:no-debug_gdb_scripts, r=alexcrichton
add emit_debug_gdb_scripts target option and ..

set it to false for no-std targets like ARM Cortex-M and MSP430. For the rationale of this change see the comment in thumb_base.rs

this is a temporary workaround until #44993 is implemented

r? @alexcrichton or @michaelwoerister
2018-04-07 14:51:30 +08:00
kennytm
496f026775
Rollup merge of #49702 - alexcrichton:inline-methods, r=Mark-Simulacrum
std: Inline some Termination-related methods

These were showing up in tests and in binaries but are trivially optimize-able
away, so add `#[inline]` attributes so LLVM has an opportunity to optimize them
out.
2018-04-07 14:51:28 +08:00
kennytm
91e81fa2a3
Rollup merge of #49652 - GuillaumeGomez:anchor-collapsed, r=QuietMisdreavus
Fix anchors issue when everything is collapsed

Fixes #49455.

@frewsxcv does it seem good for you like this?

r? @QuietMisdreavus
2018-04-07 14:51:27 +08:00
kennytm
c41b2d6111
Rollup merge of #49510 - GuillaumeGomez:anchor-field-position, r=QuietMisdreavus
Fix anchor position on fields

Take a look at `Option` variants for example and try to click on `§` to get the issue.

r? @QuietMisdreavus
2018-04-07 14:51:26 +08:00
David Tolnay
52766b5747
Print proc_macro spans as a half-open range
A span covering a single byte, such as for an operator `+` token, should
print as e.g. `80..81` rather than `80...81`. The lo end of the range is
inclusive and the hi end is exclusive.
2018-04-06 22:57:45 -07:00
bors
e0a9bd0f3c Auto merge of #49419 - leodasvacas:small-typeck-refactorings, r=nikomatsakis
Small typeck refactorings

Some code improvements I noticed while reading the code.
2018-04-07 05:33:11 +00:00
Shotaro Yamada
3832e8b3e3 [incremental] Hash Allocations 2018-04-07 12:48:33 +09:00
bors
ee1014e505 Auto merge of #49222 - Zoxc:print-query-stack, r=nikomatsakis
Print query stack on ICEs

ICE output is now:
```
thread 'rustc' panicked at 'no borrowck', librustc_borrowck\borrowck\mod.rs:95:5
note: Run with `RUST_BACKTRACE=1` for a backtrace.
query stack during panic:
#0 [borrowck] processing `main`
  --> no-std.rs:10:1
   |
10 | fn main() {}
   | ^^^^^^^^^
end of query stack

error: internal compiler error: unexpected panic

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports

note: rustc 1.26.0-dev running on x86_64-pc-windows-msvc
```

Fixes #42529.

r? @eddyb
2018-04-07 02:51:17 +00:00
bors
5911314efd Auto merge of #49623 - steveklabnik:update-mdbook, r=GuillaumeGomez
update mdbook

This includes search for all books, a long-requested feature!
2018-04-07 00:20:21 +00:00
Alex Crichton
6c08bb8b08 proc_macro: Improve Debug representations
This commit improves the `fmt::Debug` output of `proc_macro` data structures by
primarily focusing on the representation exposed by `proc_macro` rather than the
compiler's own internal representation. This cuts down quite a bit on assorted
wrapper types and ensure a relatively clean output.

Closes #49720
2018-04-06 15:20:57 -07:00
bors
0e35dddbd3 Auto merge of #49392 - retep007:nll-issue-48962, r=nikomatsakis
fixes move analysis

Fixed compiler error by correct checking when dereferencing

Fix #48962

r? @nikomatsakis
2018-04-06 21:50:12 +00:00
Alex Crichton
d985344b93 proc_macro: Generalize FromIterator impl
While never intended to be stable we forgot that trait impls are insta-stable!
This construction of `FromIterator` wasn't our first choice of how to stabilize
the impl but our hands are tied at this point, so revert back to the original
definition of `FromIterator` before #49597

Closes #49725
2018-04-06 13:01:14 -07:00
Pulkit Goyal
ee880b96ae Using X headings instead of 0.X #49739 2018-04-07 00:42:47 +05:30
bobtwinkles
bacd120957 Add test from #49736
Fixes #49736
2018-04-06 15:00:45 -04:00
Tyler Mandry
7ac35eaa12 chalkify: Implement Rule Implied-Bound-From-Trait 2018-04-06 13:05:45 -05:00
bors
eeea94c11d Auto merge of #49064 - QuietMisdreavus:piercing-the-veil, r=GuillaumeGomez
rustdoctest: suppress the default allow(unused) under --display-warnings

If you're passing rustdoc `--display-warnings`, you probably want to see the default ones too. This change modifies `test::make_test` to suppress the default `#![allow(unused)]` if the `--display-warnings` CLI flag was provided to rustdoc.

cc https://github.com/rust-lang/rust/issues/41574
2018-04-06 17:38:41 +00:00
gaurikholkar
e18a83be88 fix ui test 2018-04-06 23:03:20 +05:30
bors
7678d5021e Auto merge of #48779 - michaelwoerister:share-generics4, r=alexcrichton
Allow for re-using monomorphizations in upstream crates.

Followup to #48611. This implementation is pretty much finished modulo failing tests if there are any. Not quite ready for review yet though.

### DESCRIPTION

This PR introduces a `share-generics` mode for RLIBs and Rust dylibs. When a crate is compiled in this mode, two things will happen:
- before instantiating a monomorphization in the current crate, the compiler will look for that monomorphization in all upstream crates and link to it, if possible.
- monomorphizations are not internalized during partitioning. Instead they are added to the list of symbols exported from the crate.

This results in less code being translated and LLVMed. However, there are also downsides:
- it will impede optimization somewhat, since fewer functions can be internalized, and
- Rust dylibs will have bigger symbol tables since they'll also export monomorphizations.

Consequently, this PR only enables the `shared-generics` mode for opt-levels `No`, `Less`, `Size`, and `MinSize`, and for when incremental compilation is activated. `-O2` and `-O3` will still generate generic functions per-crate.

Another thing to note is that this has a somewhat similar effect as MIR-only RLIBs, in that monomorphizations are shared, but it is less effective because it cannot share monomorphizations between sibling crates:

```
         A        <--- defines `fn foo<T>() { .. }`
       /   \
      /     \
     B       C    <--- both call `foo<u32>()`
      \     /
       \   /
         D        <--- calls `foo<u32>()` too
```

With `share-generics`, both `B` and `C` have to instantiate `foo<u32>` and only `D` can re-use it (from either `B` or `C`). With MIR-only RLIBs, `B` and `C` would not instantiate anything, and in `D` we would then only instantiate `foo<u32>` once.
On the other hand, when there are many leaf crates in the graph (e.g. when compiling many individual test binaries) then the `share-generics` approach will often be more effective.

### TODO
 - [x] Add codegen test that makes sure monomorphizations can be internalized in non-Rust binaries.
 - [x] Add codegen-units test that makes sure we share generics.
 - [x] Add run-make test that makes sure we don't export any monomorphizations from non-Rust binaries.
 - [x] Review for reproducible-builds implications.
2018-04-06 15:01:27 +00:00
gaurikholkar
6686d104c8 tidy fix 2018-04-06 20:28:00 +05:30
Jorge Aparicio
f9bfd8117a add THUMB targets to rustup manifest 2018-04-06 16:35:03 +02:00
gaurikholkar
e6938ee08e fix ui test 2018-04-06 20:04:07 +05:30
gaurikholkar
1fb25fbbe3 reduce nested loops in the code 2018-04-06 20:00:21 +05:30
John Kåre Alsaker
4fd188e5f3 Print query stack on ICEs 2018-04-06 16:23:31 +02:00
Shotaro Yamada
20c499da0b Fix ICE with impl Trait 2018-04-06 23:17:25 +09:00
Jorge Aparicio
1eed662fc4 refactor: simplify needs_gdb_debug_scripts_section 2018-04-06 15:48:06 +02:00
Jorge Aparicio
ea08bdf30c add emit_debug_gdb_scripts target option and ..
set it to false for no-std targets like ARM Cortex-M and MSP430. For the rationale of this change
see the comment in thumb_base.rs
2018-04-06 15:47:57 +02:00
bors
2253216ec5 Auto merge of #49335 - GuillaumeGomez:remove-unneeded-trait-implementations-title, r=QuietMisdreavus
Remove unneeded trait implementations titles

r? @QuietMisdreavus
2018-04-06 12:03:16 +00:00
Michael Woerister
61991a544f Update run-make/symbol-visibility to also cover shared-generics 2018-04-06 12:14:08 +02:00