Commit Graph

84503 Commits

Author SHA1 Message Date
Felix S. Klock II
8532c1896d Alpha-rename BorrowExplanation::emit to BorrowExplanation::add_explanation_to_diagnostic.
(I found it confusing to have calls to an `emit` method in our
error_reporting module where that `emit` method *wasn't* the
`DiagnosticBuffer::emit` method.)
2018-10-05 10:43:14 +02:00
Felix S. Klock II
74f8263032 Fix debug! to reflect rename of explain_why_borrow_contains_point. 2018-10-05 10:39:39 +02:00
Felix S. Klock II
a75afd82c9 Update doc for explain_why_borrow_contains_point to reflect its newer API. 2018-10-05 10:39:39 +02:00
Felix S. Klock II
4fff54381b Add flag to mir::LocalDecl to track whether its a temp from some subexpr a block tail expression.
Slightly refactored the `LocalDecl` construction API in the process.
2018-10-05 10:39:39 +02:00
Oliver Schneider
ec74d3533a Stabilize min_const_fn 2018-10-05 10:36:14 +02:00
Vadim Petrochenkov
0d8e9cd4df Reapply the macro_rules disambiguation changes from master 2018-10-05 11:46:12 +04:00
Vadim Petrochenkov
c29fb80c05 Reapply the derive helper changes from master 2018-10-05 11:40:52 +04:00
Vadim Petrochenkov
8994c6d417 expansion: Remove restriction on use of macro attributes with test/bench
The restrictions were introduced in https://github.com/rust-lang/rust/pull/54277 and no longer necessary now because legacy plugins are now expanded in usual left-to-right order
2018-10-05 11:40:40 +04:00
Vadim Petrochenkov
60a1d4e6c2 resolve: Keep more precise traces for expanded macro resolutions
`NameBinding`s instead of `Def`s
2018-10-05 11:40:40 +04:00
Vadim Petrochenkov
050bd32958 resolve: Merge resolution for macro_rules into the common early in-scope resolution function
`fn resolve_legacy_scope`/`fn resolve_lexical_macro_path_segment` -> `fn early_resolve_ident_in_lexical_scope`
2018-10-05 11:40:40 +04:00
bors
61f5ca7d64 Auto merge of #54703 - davidtwco:issue-52086, r=nikomatsakis
error message when trying to move from an Rc or Arc is ungreat

Fixes #52086.

r? @nikomatsakis
2018-10-05 07:40:36 +00:00
Vadim Petrochenkov
05a46815e4 resolve: Support value namespace in fn resolve_lexical_macro_path_segment 2018-10-05 11:40:19 +04:00
Vadim Petrochenkov
7b69088d15 expansion: Expand attribute macros registered by legacy plugins in usual left-to-right order 2018-10-05 11:40:19 +04:00
Vadim Petrochenkov
dd6347a6b9 resolve: Integrate inert attributes registererd by legacy plugins into macro resolution 2018-10-05 11:40:19 +04:00
Vadim Petrochenkov
a7cce470b6 Fix two UI tests with locale-dependent output 2018-10-05 11:37:48 +04:00
ljedrz
7ad21a88e6 rustc/ty: improve stack shifting and remove related allocations 2018-10-05 09:00:54 +02:00
ljedrz
0ee6b54c24 rustc/ty: move a faster early return up 2018-10-05 09:00:54 +02:00
ljedrz
e153103c38 rustc/ty: improve allocations 2018-10-05 09:00:53 +02:00
ljedrz
029e2618d0 rustc/ty: simplify common patterns 2018-10-05 09:00:53 +02:00
ljedrz
91fc573172 rustc/ty: use Cow<str> where applicable 2018-10-05 09:00:39 +02:00
ljedrz
2ff117df50 rustc/ty: whitespace fixes 2018-10-05 08:58:05 +02:00
Gabriel Majeri
6ba5584712 Address review comments 2018-10-05 08:50:17 +03:00
Kazuyoshi Kato
2feea63b4b rustdoc: overflow:auto doesn't work nicely on small screens
This property was introduced by 3f92ff34b5, but looks it doesn't
overwrap even without the property.

Fixes #54672.
2018-10-04 21:31:16 -07:00
bors
b8bea5a0a6 Auto merge of #54017 - alexcrichton:wasm-atomics2, r=sfackler
std: Start implementing wasm32 atomics

This commit is an initial start at implementing the standard library for
wasm32-unknown-unknown with the experimental `atomics` feature enabled. None of
these changes will be visible to users of the wasm32-unknown-unknown target
because they all require recompiling the standard library. The hope with this is
that we can get this support into the standard library and start iterating on it
in-tree to enable experimentation.

Currently there's a few components in this PR:

* Atomic fences are disabled on wasm as there's no corresponding atomic op and
  it's not clear yet what the convention should be, but this will change in the
  future!
* Implementations of `Mutex`, `Condvar`, and `RwLock` were all added based on
  the atomic intrinsics that wasm has.
* The `ReentrantMutex` and thread-local-storage implementations panic currently
  as there's no great way to get a handle on the current thread's "id" yet.

Right now the wasm32 target with atomics is unfortunately pretty unusable,
requiring a lot of manual things here and there to actually get it operational.
This will likely continue to evolve as the story for atomics and wasm unfolds,
but we also need more LLVM support for some operations like custom `global`
directives for this to work best.
2018-10-05 01:57:01 +00:00
bors
8c4ad4e9e4 Auto merge of #54649 - nikomatsakis:universes-refactor-1, r=scalexm
adopt "placeholders" to represent universally quantified regions

This does a few preliminary refactorings that lay some groundwork for moving towards universe integration. Two things, primarily:

- Rename from "skolemized" to "placeholder"
- When instantiating `for<'a, 'b, 'c>`, just create one universe for all 3 regions, and distinguish them from one another using the `BoundRegion`.
    - This is more accurate, and I think that in general we'll be moving towards a model of separating "binder" (universe, debruijn index) from "index within binder" in a number of places.
    - In principle, it feels the current setup of making lots of universes could lead to us doing the wrong thing, but I've actually not been able to come up with an example where this is so.

r? @scalexm
cc @arielb1
2018-10-04 20:28:57 +00:00
Andy Russell
0501ee23d5
add test for #29743 2018-10-04 15:50:23 -04:00
Andy Russell
e15e86b843
add test for #24338 2018-10-04 15:50:01 -04:00
Andy Russell
1ab1b1e6f8
add test for #28134 2018-10-04 15:49:29 -04:00
Philipp Hansch
769b3832fd
Further improve docs for FnDef and FnPtr 2018-10-04 20:30:02 +02:00
bors
a57f1c9c95 Auto merge of #54666 - matthewjasper:mir-function-spans, r=pnkfelix
[NLL] Improve "borrow later used here" messages

* In the case of two conflicting borrows, the later used message says which borrow it's referring to
* If the later use is a function call (from the users point of view) say that the later use is for the call. Point just to the function.

r? @pnkfelix
Closes #48643
2018-10-04 16:34:27 +00:00
Niko Matsakis
85b99561c6 s/skol_predicate/placeholder_predicate 2018-10-04 11:02:40 -04:00
Niko Matsakis
b99a8d7056 fix typo: s/tained/tainted/ 2018-10-04 11:02:40 -04:00
Niko Matsakis
068a6a256c remove occurences of skolemization 2018-10-04 11:02:40 -04:00
Niko Matsakis
21aaaac29b remove all occurences of skolemize 2018-10-04 11:02:40 -04:00
Niko Matsakis
cdb95b0f21 build up the placeholder indices as we go
Avoids a linear walk over the regions at the end.
2018-10-04 11:02:40 -04:00
Niko Matsakis
0887456401 extend NLL universe code to have >1 placeholder within one universe 2018-10-04 11:02:40 -04:00
Niko Matsakis
4c2fc333f0 create just one subuniverse per binder -- no need for more, really 2018-10-04 11:02:40 -04:00
Niko Matsakis
f8dd084ef1 reorder the placeholders and inference variables in hr::sub 2018-10-04 11:02:40 -04:00
Niko Matsakis
4cd4eae435 rename skolemized to placeholder 2018-10-04 11:02:40 -04:00
Niko Matsakis
a96510d066 select.rs: rustfmt 2018-10-04 11:02:39 -04:00
bors
5de52817c4 Auto merge of #54784 - Manishearth:clippyup, r=oli-obk
Update clippy

None
2018-10-04 14:08:12 +00:00
varkor
ea3d8f510d Ignore desugarings when comparing duplicate trait error messages 2018-10-04 14:48:32 +01:00
Jonas Schievink
e24f4d57b0 Convert conservative_impl_trait.rs to compile-pass 2018-10-04 14:57:31 +02:00
Jonas Schievink
31d5878a05 Convert issue-49556.rs to compile-pass 2018-10-04 14:55:40 +02:00
Jonas Schievink
7e5a13163e Convert issue-49376.rs to compile-pass 2018-10-04 14:53:16 +02:00
Jonas Schievink
12cabc824b Convert existential-minimal.rs to compile-pass 2018-10-04 14:51:26 +02:00
Jonas Schievink
62e9a09cfb Convert impl-trait/issue-42479.rs to compile-pass 2018-10-04 14:47:46 +02:00
Jonas Schievink
2e1ac08cb3 Call Foo::async_method in the async-await test 2018-10-04 14:44:46 +02:00
Jonas Schievink
3c46da8c82 Fix dead code lint for functions using impl Trait 2018-10-04 14:14:14 +02:00
bors
5472b0718f Auto merge of #54809 - pietroalbini:rollup, r=pietroalbini
Rollup of 10 pull requests

Successful merges:

 - #53523 (Add doc for impl From for Std Error)
 - #54746 (simplify some unused lints code)
 - #54761 (Make spec_extend use for_each())
 - #54769 (Fix typo in CONTRIBUTING.md)
 - #54773 (Update a FIXME in memory.rs)
 - #54777 (abolish ICE when pretty-printing async block)
 - #54780 (Remove duplicate predicates in `explicit_predicates_of`)
 - #54788 (A handful of cleanups for rustc/mir)
 - #54789 (Introduce `TyKind::UnnormalizedProjection`)
 - #54795 (remove padding from multiline format string label)

Failed merges:

r? @ghost
2018-10-04 11:39:50 +00:00