Felix S. Klock II
e437e499d1
Implement Borrow/BorrowMut/ToOwned relationships betweed IdxSetBuf and IdxSet.
2017-12-13 13:50:40 -06:00
Felix S. Klock II
39e126c001
Refactoring alpha-rename place
(BorrowData
field) to borrowed_place
.
2017-12-13 13:50:40 -06:00
Felix S. Klock II
e123117cb7
Refactoring: Allow BlockSets.on_entry
to denote locally accumulated intrablock state.
...
(Still musing about whether it could make sense to revise the design
here to make these constraints on usage explicit.)
2017-12-13 13:50:39 -06:00
Felix S. Klock II
d4add5d52a
Refactoring: pull bitvector initialization out from other parts of dataflow.
...
This is meant to ease development of multi-stage dataflow analyses
where the output from one analysis is used to initialize the state
for the next; in such a context, you cannot start with `bottom_value`
for all the bits.
2017-12-13 13:50:39 -06:00
Esteban Küber
d4b8e99540
Move error checks out of span for easier to follow .stderr
2017-12-13 11:27:18 -08:00
Niko Matsakis
237dd41211
correct comment in test
2017-12-13 12:20:29 -05:00
Niko Matsakis
51847a1b18
add FIXME related to constant well-formedness
2017-12-13 12:20:28 -05:00
Niko Matsakis
abd6d0d76e
comments for defining_ty
and compute_indices
...
Plus an extra assertion.
2017-12-13 12:20:28 -05:00
Niko Matsakis
75ac071cd6
document return value of add_live_point
2017-12-13 12:20:28 -05:00
Niko Matsakis
f6723a9592
improve comments on safe_to_unsafe_fn_ty
and coerce_closure_fn_ty
2017-12-13 12:20:28 -05:00
Niko Matsakis
7a20a3f161
change to use an O(1) data structure for looking up point indices
...
Converting a `RegionElementIndex` to a `Location` is O(n) though could
trivially be O(log n), but we don't do it that much anyhow -- just on
error and debugging.
2017-12-13 12:20:28 -05:00
Niko Matsakis
77663a677d
refactor region value bitmatrix
2017-12-13 12:20:27 -05:00
Niko Matsakis
a30e2259da
fix closure tests now that MIR typeck works properly
...
These tests had FIXMEs for errors that were not previously being
reported.
2017-12-13 12:20:27 -05:00
Konrad Borowski
524c3ff472
Remove Sync and Send implementation for RawTable
...
The implementation was introduced when changing hash storage from
Unique to *mut, but it was changed back to Unique.
2017-12-13 14:53:39 +01:00
bors
3dfbc88a62
Auto merge of #46550 - jseyfried:cleanup_builtin_hygiene, r=nrc
...
macros: hygienize use of `core`/`std` in builtin macros
Today, if a builtin macro wants to access an item from `core` or `std` (depending `#![no_std]`), it generates `::core::path::to::item` or `::std::path::to::item` respectively (c.f. `fn std_path()` in `libsyntax/ext/base.rs`).
This PR refactors the builtin macros to instead always emit `$crate::path::to::item` here. That is, the def site of builtin macros is taken to be in `extern crate core;` or `extern crate std;`. Since builtin macros are macros 1.0 (i.e. mostly unhygienic), changing the def site can only effect the resolution of `$crate`.
r? @nrc
2017-12-13 11:09:55 +00:00
Niko Matsakis
decbbb3fc0
when reifying a safe fn as an unsafe fn ptr, insert two casts
...
Otherwise, `run-pass/typeck-fn-to-unsafe-fn-ptr.rs` fails the MIR type checker.
2017-12-13 06:03:28 -05:00
Niko Matsakis
d5cff0740f
normalize fn sig as part of reification
2017-12-13 06:03:28 -05:00
Santiago Pastorino
0c26d8fcd1
Mir typeck Cast for Unsize value
2017-12-13 06:03:28 -05:00
Santiago Pastorino
14700e58b4
Mir typeck Cast for ClosureFnPtr value
2017-12-13 06:03:27 -05:00
Santiago Pastorino
ae035cb731
Extract coerce_closure_fn_ty function
2017-12-13 06:03:27 -05:00
Santiago Pastorino
900d4d5bda
Mir typeck Cast for UnsafeFnPtr value
2017-12-13 06:03:27 -05:00
Santiago Pastorino
7d56131e83
Mir typeck Cast for ReifyFnPtr value
2017-12-13 06:03:27 -05:00
Santiago Pastorino
86355480bd
Restructure a bit check_aggregate_rvalue code
2017-12-13 06:03:27 -05:00
Santiago Pastorino
4449240d1e
Add more debug logs
2017-12-13 06:03:26 -05:00
Santiago Pastorino
688ab5af81
Check functions predicates
2017-12-13 06:03:26 -05:00
Santiago Pastorino
5010496677
Check Aggregate predicates
2017-12-13 06:03:26 -05:00
Santiago Pastorino
c9159262d1
Check NullaryOp Rvalue
2017-12-13 06:03:26 -05:00
Niko Matsakis
7f20b9142d
fix universal regions to handle constant expressions like [T; 22]
2017-12-13 06:03:25 -05:00
Santiago Pastorino
d6772cb972
Check Repeat Rvalue
2017-12-13 06:03:25 -05:00
bors
61100840e5
Auto merge of #46419 - jseyfried:all_imports_in_metadata, r=nrc
...
Record all imports (`use`, `extern crate`) in the crate metadata
This PR adds non-`pub` `use` and `extern crate` imports in the crate metadata since hygienic macros invoked in other crates may use them. We already include all other non-`pub` items in the crate metadata. This improves import suggestions in some cases.
Fixes #42337 .
r? @nrc
2017-12-13 08:32:25 +00:00
Jeffrey Seyfried
85d19b3335
Improve pretty printing $crate::
paths.
2017-12-12 22:32:19 -08:00
Felix S. Klock II
171c2aeb25
Expanded HIR --unpretty hir,identified
to include HIR local id.
...
Having the HIR local id is useful for cases like understanding the
ReScope identifiers, which are now derived from the HIR local id, and
thus one can map an ReScope back to the HIR node, once one knows what
those local ids are.
2017-12-13 00:15:17 -06:00
Felix S. Klock II
93c4ffe72f
Revised graphviz rendering API to avoid requiring borrowed state.
...
Made `do_dataflow` and related API `pub(crate)`.
2017-12-13 00:15:17 -06:00
Felix S. Klock II
35bcd9913e
Regression test for issue #46112 .
2017-12-12 23:18:53 -06:00
bors
dcf3db47c7
Auto merge of #46616 - cramertj:impl-trait-elision, r=nikomatsakis
...
Implement impl Trait lifetime elision
Fixes #43396 .
There's one weird ICE in the interaction with argument-position `impl Trait`. I'm still debugging it-- I've left a test for it commented out with a FIXME.
Also included a FIXME to ensure that `impl Trait` traits are caught under the lint in https://github.com/rust-lang/rust/issues/45992 .
r? @nikomatsakis
2017-12-13 04:19:26 +00:00
Sunjay Varma
8cfaf1bab2
Trait item lifetime resolution for GATs
2017-12-12 21:23:52 -05:00
bors
691f022767
Auto merge of #46613 - petrochenkov:absext, r=nikomatsakis
...
Resolve absolute paths as extern under a feature flag
cc https://github.com/rust-lang/rust/issues/44660
r? @nikomatsakis
2017-12-13 01:44:36 +00:00
Kornel
2f33093ed6
Remove message that prevents Cargo from working with --print=native-static-libs
2017-12-13 01:43:01 +00:00
Felix S. Klock II
43406d2681
Fix #46112 : visible_parent_map construction needs a BFS over whole crate forest.
2017-12-12 19:06:19 -06:00
Eduard-Mihai Burtescu
95c0ad0cb9
rustc: unpack newtyped of #[repr(simd)] vector types.
2017-12-13 01:57:56 +02:00
bors
442b7bd10a
Auto merge of #46570 - AgustinCB:issue-46553, r=oli-obk
...
Ignore `unsopported constant expr` error
Fixes #46553
2017-12-12 23:08:56 +00:00
Jeffrey Seyfried
f79c7e442d
Refactor MarkData
field modern: bool
to kind: MarkKind
.
2017-12-12 13:15:09 -08:00
Jeffrey Seyfried
8dbe79ae5e
Fix fallout in tests.
2017-12-12 13:15:03 -08:00
Vadim Petrochenkov
b07e26e36e
Resolve absolute paths as extern under a feature flag
2017-12-13 00:02:23 +03:00
Vadim Petrochenkov
9552b9cfd2
rustc_metadata: Refactor away ExternCrateInfo
2017-12-12 23:50:35 +03:00
bors
6a36019440
Auto merge of #46696 - kennytm:rollup, r=kennytm
...
Rollup of 4 pull requests
- Successful merges: #46668 , #46672 , #46691 , #46694
- Failed merges:
2017-12-12 20:31:17 +00:00
kennytm
80d1de97ad
Rollup merge of #46694 - kennytm:temporarily-use-old-travis-image, r=aidanhs
...
Temporarily use the old Travis image.
Use it until travis-ci/travis-ci#8891 is fixed.
(See also https://blog.travis-ci.com/2017-12-12-new-trusty-images-q4-launch )
r? @aidanhs
2017-12-13 04:28:09 +08:00
kennytm
37cc63ab13
Rollup merge of #46691 - varkor:contrib-3, r=rkruppe
...
Fix return value of `LLVMRustMetadataAsValue`
`LLVMRustMetadataAsValue` would previously return `void`, despite the
corresponding Rust function expecting to return a `ValueRef`.
2017-12-13 04:28:08 +08:00
kennytm
6a365417c0
Rollup merge of #46672 - GuillaumeGomez:fix-type-filter-search, r=QuietMisdreavus
...
Fix type filter in rustdoc js
Fixes #46612 .
r? @QuietMisdreavus
2017-12-13 04:28:06 +08:00
kennytm
c6ce7dae23
Rollup merge of #46668 - GuillaumeGomez:mobile-sidebar, r=QuietMisdreavus
...
Fix mobile doc style and improve search bar
Fixes #46593 .
r? @QuietMisdreavus
2017-12-13 04:28:05 +08:00