Commit Graph

76657 Commits

Author SHA1 Message Date
John Kåre Alsaker
472b416592 Querify all_traits 2018-04-10 14:39:57 +02:00
John Kåre Alsaker
49a2b80877 Make sure the lint store is only used on one thread 2018-04-10 14:39:33 +02:00
John Kåre Alsaker
26f16e85ff Add a Once type for values which are only written once 2018-04-10 14:39:33 +02:00
John Kåre Alsaker
60d0cbe532 Add insert_same extension to HashMap 2018-04-10 14:39:33 +02:00
John Kåre Alsaker
e5a602e364 Add OneThread which only allows its inner value to be used in one thread 2018-04-10 14:39:33 +02:00
bors
67712d7945 Auto merge of #49390 - Zoxc:sync-syntax, r=michaelwoerister
More thread-safety changes

r? @michaelwoerister
2018-04-10 09:00:27 +00:00
bors
a1c21ed7e2 Auto merge of #49504 - GuillaumeGomez:doc-all-types, r=QuietMisdreavus
Add page to list all crate's items

r? @QuietMisdreavus
2018-04-10 06:23:52 +00:00
bors
5d7f892356 Auto merge of #49258 - zackmdavis:not_going_to_recover, r=petrochenkov
suggest `!` for erroneous identifier `not`

![not_recovery](https://user-images.githubusercontent.com/1076988/37753255-3b669c42-2d59-11e8-9071-efad8eaf3086.png)

This supersedes #48858.

r? @petrochenkov
2018-04-10 03:27:43 +00:00
bors
a8a8d6b5bf Auto merge of #49435 - tmandry:rule-implied-bound-from-trait, r=nikomatsakis
chalkify: Implement lowering rule Implied-Bound-From-Trait

For #49177.

TODO:
- [x] Implement where clauses besides trait and projection predicates
- [x] Is the output of the `lower_trait_higher_rank` test correct?
- [ ] Remove `Self::Trait` from the query `tcx.predicates_of(<trait_id>).predicates`
- [ ] Consider moving tests to compile-fail to make them more manageable
2018-04-10 00:32:54 +00:00
bors
880fbd7c4e Auto merge of #49811 - alexcrichton:fix-android, r=SimonSapin
std: Be sure to modify atomics in tests

See #49775 for some more information but it looks like this is working around an
LLVM bug for the time being.

Closes #49775
2018-04-09 21:41:10 +00:00
Alex Crichton
69c3830c44 std: Be sure to modify atomics in tests
See #49775 for some more information but it looks like this is working around an
LLVM bug for the time being.

Closes #49775
2018-04-09 12:57:03 -07:00
Zack M. Davis
ba0dd8eb02 in which ! is suggested for erroneous identifier not
Impressing confused Python users with magical diagnostics is perhaps
worth this not-grossly-unreasonable (only 40ish lines) extra complexity
in the parser?

Thanks to Vadim Petrochenkov for guidance.

This resolves #46836.
2018-04-09 08:45:12 -07:00
Zack M. Davis
944c401736 don't suggest placing code in block if next token is open-brace
Thanks to the inestimably inimitable Esteban "Estebank" Küber for
pointing this out.

This is relevant to #46836.
2018-04-09 08:45:12 -07:00
bors
4b9b70c394 Auto merge of #49805 - nrc:update, r=kennytm
Update Rustfmt

r? @alexcrichton

Fixes broken rustfmt
2018-04-09 11:04:15 +00:00
Nick Cameron
7e297ff96a Update Rustfmt 2018-04-09 21:55:07 +12:00
bors
561fb39559 Auto merge of #49778 - tamird:install-relative-prefix, r=Mark-Simulacrum
rustbuild: canonicalize prefix `install_sh`

Testing:
```
  $ git diff
  diff --git a/config.toml.example b/config.toml.example
  index 9dd3002506..b47bc490cd 100644
  --- a/config.toml.example
  +++ b/config.toml.example
  @@ -196,7 +196,7 @@
   [install]

   # Instead of installing to /usr/local, install to this path instead.
  -#prefix = "/usr/local"
  +prefix = "install-prefix"

   # Where to install system configuration files
   # If this is a relative path, it will get installed in `prefix` above
  $ mkdir install-prefix
  $ ./x.py install -i --stage 0 --config config.toml.example
  ...
  $ ls install-prefix/
  bin	lib	share
```

Closes #36989.

r? @Mark-Simulacrum
2018-04-09 06:05:49 +00:00
bors
8ae79efce3 Auto merge of #49673 - ollie27:stab, r=sfackler
Correct a few stability attributes

* `const_indexing` language feature was stabilized in 1.26.0 by #46882
* `Display` impls for `PanicInfo` and `Location` were stabilized in 1.26.0 by #47687
* `TrustedLen` is still unstable so its impls should be as well even though `RangeInclusive` was stabilized by #47813
* `!Send` and `!Sync` for `Args` and `ArgsOs` were stabilized in 1.26.0 by #48005
* `EscapeDefault` has been stable since 1.0.0 so should continue to show that even though it was moved to core in #48735

This could be backported to beta like #49612
2018-04-09 03:32:32 +00:00
bors
292685e896 Auto merge of #49770 - tamird:csv-dumper-comment, r=nrc
Remove mention of CsvDumper

...it was removed in 9a47160.

Updates #18582.

r? @nrc
2018-04-09 00:50:39 +00:00
Tamir Duberstein
94879023ad
rustbuild: canonicalize prefix install_sh
Testing:
```
  $ git diff
  diff --git a/config.toml.example b/config.toml.example
  index 9dd3002506..b47bc490cd 100644
  --- a/config.toml.example
  +++ b/config.toml.example
  @@ -196,7 +196,7 @@
   [install]

   # Instead of installing to /usr/local, install to this path instead.
  -#prefix = "/usr/local"
  +prefix = "install-prefix"

   # Where to install system configuration files
   # If this is a relative path, it will get installed in `prefix` above
  $ mkdir install-prefix
  $ ./x.py install -i --stage 0 --config config.toml.example
  ...
  $ ls install-prefix/
  bin	lib	share
```

Closes #36989.
2018-04-08 18:57:59 -04:00
bors
12f1ae60a9 Auto merge of #49774 - danc86:configure.py-tools, r=alexcrichton
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 21:40:44 +00:00
bors
b7da1aaff6 Auto merge of #49771 - tamird:incremental-no-stage-1, r=Mark-Simulacrum
Don't default to stage 1 with incremental

Closes #43177.

r? @Mark-Simulacrum
2018-04-08 19:11:47 +00:00
bors
7327d9d0e2 Auto merge of #49759 - ollie27:rustbuild_cargo, r=Mark-Simulacrum
rustbuild: Fix setting initial cargo

Fixes #49741

r? @Mark-Simulacrum
2018-04-08 16:44:22 +00:00
bors
5f50718225 Auto merge of #49758 - bjorn3:miri_public_write_discriminant_value, r=oli-obk
miri: Make write_discriminant_value public
2018-04-08 14:12:13 +00:00
bors
beab37c904 Auto merge of #49752 - sinkuu:fix_incrcmp_str_lit, r=oli-obk
[incremental] Hash `Allocation`s

`HashSet::insert` returns `true` if the value did not exist, which is the timing we want to hash the `Allocation`.

Fixes #49595

cc @oli-obk
2018-04-08 10:01:59 +00:00
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
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
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