Commit Graph

80106 Commits

Author SHA1 Message Date
Zack M. Davis
9df9c9df7b choose a less arbitrary span when parsing the empty visibility modifier
Visibility spans were added to the AST in #47799 (d6bdf296) as a
`Spanned<_>`—which means that we need to choose a span even in the case
of inherited visibility (what you get when there's no `pub` &c. keyword
at all). That initial implementation's choice is pretty
counterintuitive, which could matter if we want to use it as a site to
suggest inserting a visibility modifier, &c.

(The phrase "Schelling span" in the comment is meant in analogy to the
game-theoretic concept of a "Schelling point", a value that is chosen
simply because it's what one can expect to agree upon with other agents
in the absence of explicit coördination.)
2018-06-30 22:20:28 -07:00
bors
e953e4621e Auto merge of #51869 - nnethercote:rm-clone_from, r=nikomatsakis
Avoid needless allocations in `liveness_of_locals`.

We don't need to replace the heap-allocated bitset, we can just
overwrite its contents.

This speeds up most NLL benchmarks, the best by 1.5%.

r? @nikomatsakis
2018-07-01 04:23:29 +00:00
Andy Russell
5468e12ca0
add label to unknown meta item error 2018-06-30 21:38:18 -04:00
Alexander Regueiro
1c34227042 Modified expected error messages in accordance with rebase. 2018-07-01 02:26:31 +01:00
Andy Russell
f315943970
move deprecation-sanity test to ui 2018-06-30 20:44:21 -04:00
Andy Russell
011eaed59d
factor built-in attribute parsing into submodule 2018-06-30 20:44:20 -04:00
bors
33b40f5679 Auto merge of #51943 - oli-obk:miriup, r=kennytm
Update the miri submodule

r? @kennytm
2018-07-01 00:04:14 +00:00
Oliver Schneider
824c5dfa61 Also run the bootstrap in bootstrap mode 2018-07-01 01:50:12 +02:00
Oliver Schneider
8f55152f84 Did you mean to block nightlies on clippy? 2018-07-01 01:35:39 +02:00
Alexander Regueiro
13b82ecf80 Minor refactoring. 2018-06-30 23:53:52 +01:00
Alexander Regueiro
9f751a9c5a Added incremental test for interlinking static references. 2018-06-30 23:53:52 +01:00
Alexander Regueiro
f8132d39d2 Added tests fo referring to statics by value in other statics. 2018-06-30 23:52:33 +01:00
Alexander Regueiro
9e484720bf Added tests for writing to static mut's in statics. 2018-06-30 23:52:33 +01:00
Alexander Regueiro
a2cd95fd9e Fixed bug with miri const evaluation where allocation is recursively borrowed. 2018-06-30 23:52:33 +01:00
Alexander Regueiro
349d53c2a9 Added miri error for evaluating foreign statics.
Updated tests accordingly.
2018-06-30 23:52:33 +01:00
Alexander Regueiro
13931762e9 Loosened rules involving statics mentioning other statics.
Updated tests accordingly.
2018-06-30 23:52:33 +01:00
bors
48af7714d8 Auto merge of #51717 - Mark-Simulacrum:snap, r=alexcrichton
Bootstrap from 1.28.0 beta
2018-06-30 21:01:05 +00:00
Mark Simulacrum
3d68774968 Notice non-toplevel dll dependencies in rustbuild
Previously Cargo would hardlink all the dependencies into the "root" as
foo.dll and the `toplevel` array would get populated with these, but
that's no longer the case. Instead, cargo will only do this for the
final artifacts/final libraries.

Rustbuild is updated to continue looping through the artifacts mentioned
instead of early-returning. This should fix the bug.

@alexcrichton found the cause of this and suggested this fix.
2018-06-30 13:17:49 -07:00
Mark Simulacrum
ad97f8b491 Bootstrap from 1.28.0-beta.3 2018-06-30 13:17:49 -07:00
Jorge Aparicio
6531879e91 more s/llvm-tools/llvm-tools-preview/ 2018-06-30 14:40:36 -05:00
Wesley Wiser
faef6a30e6 Copy undef_masks correctly for repeated bytes 2018-06-30 15:20:10 -04:00
bors
74c89b0230 Auto merge of #51849 - nikomatsakis:issue-51820-places-conflict, r=eddyb
optimize `places_conflict` to avoid complex vectors etc

Fixes #51820
2018-06-30 18:55:09 +00:00
bors
8772747c5f Auto merge of #51862 - estebank:lifetime-spans, r=nikomatsakis
Point to lifetime spans on lifetime errors
2018-06-30 16:52:12 +00:00
Oliver Schneider
5f85e022e7 Update the miri submodule 2018-06-30 16:10:39 +02:00
bors
96b47337d9 Auto merge of #51828 - kennytm:no-simd-swap-for-mac, r=alexcrichton
Do not allow LLVM to increase a TLS's alignment on macOS.

This addresses the various TLS segfault on macOS 10.10.

Fix #51794.
Fix #51758.
Fix #50867.
Fix #48866.
Fix #46355.
Fix #44056.
2018-06-30 14:00:24 +00:00
kennytm
e3d113eca9
Do not allow LLVM to increase a TLS's alignment on macOS. 2018-06-30 21:36:03 +08:00
Matthew Jasper
c613aa5a95 Improve error messages when assigning to a local that starts initialized 2018-06-30 11:02:38 +01:00
Oliver Schneider
7879369fa6 Remove some global state from the lowering pass 2018-06-30 11:45:11 +02:00
Oliver Schneider
87005c0fd9 Remove unused field 2018-06-30 11:45:11 +02:00
Oliver Schneider
6641233b34 Reduce repetition around lower_method_sig 2018-06-30 11:45:11 +02:00
Oliver Schneider
82091d421a Deduplicate IsAsync::Async match 2018-06-30 11:45:10 +02:00
bors
bfc1ee4968 Auto merge of #51762 - petrochenkov:oh-hi-mark, r=oli-obk
hygiene: Implement transparent marks and use them for call-site hygiene in proc-macros

Fixes https://github.com/rust-lang/rust/issues/50050
2018-06-30 09:19:21 +00:00
bors
acf50b79be Auto merge of #51806 - oli-obk:lowering_cleanups1, r=cramertj
Lowering cleanups [1/N]
2018-06-30 07:10:18 +00:00
Zack M. Davis
6cc78bf8d7 in which we plug the crack where ?-desugaring leaked into errors
Most of the time, it's not a problem that the types of the arm bodies in
a desugared-from-`?` match are different (that is, specifically: in `x?`
where x is a `Result<A, B>`, the `Ok` arm body is an `A`, whereas the
`Err` arm diverges to return a `Result<A, B>`), because they're being
assigned to different places. But in tail position, the types do need to
match, and our error message was explicitly referring to "match arms",
which is confusing when there's no `match` in the sweetly sugared
source.

It is not without some misgivings that we pollute the clarity-of-purpose
of `note_error_origin` with the suggestion to wrap with `Ok` (the other
branches are pointing out the odd-arm-out in the HIR that is the origin
of the error; the new branch that issues the `Ok` suggestion is serving
a different purpose), but it's the natural place to do it given that
we're already matching on `ObligationCauseCode::MatchExpressionArm {
arm_span, source }` there.

Resolves #51632.
2018-06-29 22:11:39 -07:00
Wesley Wiser
84fe0c40a1 Fix relocations to include repeated values 2018-06-30 00:44:58 -04:00
bors
87ecf5442c Auto merge of #51178 - GabrielMajeri:os-str-compare, r=SimonSapin
Implement PartialEq between &str and OsString

This fixes #49854.

It allows equality comparison between `OsString` values and `str` references, such as `os_string == "something"`.
2018-06-30 04:03:14 +00:00
Wesley Wiser
c431f3fab9 Inline a few UndefMask methods.
This saves 2.5 seconds on the test program.
2018-06-29 23:33:17 -04:00
Jorge Aparicio
807cd36381 rename rustc's lld to rust-lld
to not shadow the system installed LLD when linking with LLD.

Before:

- `-C linker=lld -Z linker-flavor=ld.lld` uses rustc's LLD
- It's not possible to use a system installed LLD that's named `lld`

With this commit:

- `-C linker=rust-lld -Z linker-flavor=ld.lld` uses rustc's LLD
- `-C linker=lld -Z linker-flavor=ld.lld` uses the system installed LLD
2018-06-29 22:20:00 -05:00
Taylor Cramer
a2b21e5819 Make Waker and LocalWaker Unpin
These types never project pinned-ness into their contents,
so it is safe for them to be `Unpin`.
2018-06-29 19:33:16 -07:00
Taylor Cramer
2ce61c0aed Implement Unpin for references
These don'town the backing storage for their data,
so projecting `PinMut` into their fields is already unsound.
2018-06-29 19:31:55 -07:00
Wesley Wiser
8f969ed376 Optimize copy_undef_mask() to use one pass
This saves 0.5 seconds on the test compilation.
2018-06-29 22:26:15 -04:00
Taylor Cramer
3265189b68 Use in-tree libbacktrace on Fuchsia 2018-06-29 18:04:26 -07:00
Wesley Wiser
1ffa99d218 Optimize copy_undef_mask() by lifting some loop invariant operations
This saves 4.5 seconds and takes the compile time down to 5.5 seconds.
2018-06-29 20:22:35 -04:00
Vadim Petrochenkov
84f1bc8b66 Address comments 2018-06-30 01:53:32 +03:00
Vadim Petrochenkov
b69d51162b Restore the old behavior of $crate in nested macro_rules
`$crate` is not resolved at def-site of a macro, but rather at "transitive def-site"
2018-06-30 01:53:32 +03:00
Vadim Petrochenkov
9f92fce77c Fortify dummy span checking 2018-06-30 01:53:32 +03:00
Vadim Petrochenkov
297109ea32 proc-macro: Use transparent marks for call-site hygiene 2018-06-30 01:53:32 +03:00
Vadim Petrochenkov
99ecdb3f5f hygiene: Implement transparent marks 2018-06-30 01:53:32 +03:00
Vadim Petrochenkov
09856c85b7 expansion: Give names to some fields of SyntaxExtension 2018-06-30 01:53:32 +03:00
Vadim Petrochenkov
1328bdeef8 resolve: Cleanup resolve_crate_root 2018-06-30 01:53:32 +03:00