Commit Graph

70145 Commits

Author SHA1 Message Date
Eduard-Mihai Burtescu
260c41b4b8 rustc_trans: do not introspect LLVM aggregate field types. 2017-11-19 02:14:28 +02:00
Eduard-Mihai Burtescu
b8671bef97 rustc_trans: remove obsolete Type methods. 2017-11-19 02:14:28 +02:00
Eduard-Mihai Burtescu
386d59dc89 rustc_trans: use a predictable layout for constant ADTs. 2017-11-19 02:14:28 +02:00
Eduard-Mihai Burtescu
f44b099187 rustc_trans: avoid working with sizes/offsets and alignments as integers. 2017-11-19 02:14:24 +02:00
Garrett Berg
44da4a0656 Add doc for Reading from &str and some related cleanup 2017-11-18 16:45:04 -07:00
Eduardo Pinho
0855ea1832 impl From<T> for RwLock<T> 2017-11-18 21:05:06 +00:00
bors
6160040d85 Auto merge of #46039 - oli-obk:test_suggestions, r=petrochenkov
Remove left over dead code from suggestion diagnostic refactoring

More cleanups after #41876 and #45741
2017-11-18 20:52:19 +00:00
Eduard-Mihai Burtescu
9deea47c96 rustc_mir: always downcast enums, even if univariant. 2017-11-18 20:52:38 +02:00
Niko Matsakis
83f5a9605f fix compile-fail tests 2017-11-18 13:09:19 -05:00
bors
b1409af73d Auto merge of #46032 - KiChjang:ignore-borrowck-statics, r=nikomatsakis
Ignore borrowck for static lvalues and allow assignment to static muts

Fixes #45129.
Fixes #45641.
2017-11-18 17:30:26 +00:00
Eduardo Pinho
1bfc6c1296 impl From<T> for Mutex<T> 2017-11-18 16:52:46 +00:00
Niko Matsakis
22c0cbfa86 remove generator_interiors map 2017-11-18 11:26:46 -05:00
Niko Matsakis
413f07438e remove generator_sigs from TypeckTables 2017-11-18 11:16:25 -05:00
bors
1f491e07c9 Auto merge of #46009 - kennytm:fix-38878-again, r=alexcrichton
Fix #38878 again — restart linker when seeing SIGBUS in additional to SIGSEGV.

In https://github.com/rust-lang/rust/pull/45985#issuecomment-344586645 we see a linker crashed due to Bus Error (signal 10) on macOS. The error was not caught by #40422 since the PR only handles Segmentation Fault (signal 11). The crash log indicates the problem is the same as #38878, so we just amend #40422 to include SIGBUS as well.

(Additionally, modified how the crash logs are printed so that irrelevant logs are truly filtered out.)
2017-11-18 15:00:13 +00:00
Guillaume Gomez
6047a03659 Add tooltip for important traits display 2017-11-18 14:37:10 +01:00
Niko Matsakis
d8969815cf comment wf more 2017-11-18 07:49:52 -05:00
Niko Matsakis
27bedfa36b give better error messages when a cycle arises 2017-11-18 07:49:52 -05:00
Niko Matsakis
5e0e8ae291 rename issue-21410.rs to ui/unboxed-closure-no-cyclic-sig.rs 2017-11-18 07:47:39 -05:00
Niko Matsakis
1e9de11e62 add a compile-fail test for cyclic generators being forbidden 2017-11-18 07:47:39 -05:00
Niko Matsakis
5e04c66885 remove the generator_sigs map, query, and plumbing 2017-11-18 07:47:38 -05:00
Niko Matsakis
7010d8cf51 add Yield and Return type into generator 2017-11-18 07:47:38 -05:00
Niko Matsakis
7c609eb090 TyClosure no longer needs to use freshen_closure_like
All the data is now part of its type.
2017-11-18 07:47:38 -05:00
Niko Matsakis
e6fca1d565 remove the closure_tys map from TypeckTables
The information we need is now part of the closure type.
2017-11-18 07:47:38 -05:00
Niko Matsakis
d0bda669ea move the signature into the closure type 2017-11-18 07:47:37 -05:00
Niko Matsakis
54f4f396d9 convert the closure_kinds map to just store the origin information
The closure kinds themselves are now completely found in the `ClosureSubsts`.
2017-11-18 07:47:37 -05:00
Niko Matsakis
eb26e30b91 kill the closure_kind query 2017-11-18 07:47:37 -05:00
Niko Matsakis
2dff9a49e5 stop using the closure_kinds query / table for anything
Closure Kind is now extracted from the closure substs exclusively.
2017-11-18 07:47:37 -05:00
Niko Matsakis
716f75b1b8 traits: prefer ClosureSubsts to InferCtxt::closure_kind 2017-11-18 07:47:36 -05:00
Niko Matsakis
decf3d33d0 make ty::Predicate carry a ClosureSubsts 2017-11-18 07:47:36 -05:00
Niko Matsakis
0ac8542abc make mk_closure take a ClosureSubsts 2017-11-18 07:47:36 -05:00
Niko Matsakis
3349e7bb45 thread the closure-kind through in the closure substs
Similar to how freshen handled things, but "always happening"; we can
thus remove the corresponding code from `freshen`.
2017-11-18 07:47:36 -05:00
Niko Matsakis
1d96819dc0 upvar.rs: rustfmt 2017-11-18 07:47:36 -05:00
Niko Matsakis
eab5b263e8 flatten the arguments to analyze_closure
They were oddly tupled.
2017-11-18 07:47:35 -05:00
Scott McMurray
cef45b3baf Undo the Sized specialization from Iterator::nth 2017-11-18 03:45:51 -08:00
bors
18250b0349 Auto merge of #46073 - GuillaumeGomez:rollup, r=GuillaumeGomez
Rollup of 4 pull requests

- Successful merges: #45767, #46044, #46066, #46071
- Failed merges:
2017-11-18 11:38:06 +00:00
Guillaume Gomez
5f1c37a0fa Rollup merge of #46071 - LooMaclin:fix-46001, r=estebank
Remove return_ty from Mir

https://github.com/rust-lang/rust/issues/46001
2017-11-18 12:15:24 +01:00
Guillaume Gomez
1389b6203e Rollup merge of #46066 - GuillaumeGomez:primitive-search, r=QuietMisdreavus
Fix primitive types not showing up

Fixes #46017.

r? @QuietMisdreavus
2017-11-18 12:15:23 +01:00
Guillaume Gomez
c36228f696 Rollup merge of #46044 - collinanderson:py3, r=kennytm
fix some python3 incompatibilities
2017-11-18 12:15:22 +01:00
Guillaume Gomez
cdadb6c725 Rollup merge of #45767 - QuietMisdreavus:who-docs-the-doc-tool, r=frewsxcv
rustdoc book: talk about #![doc(test(no_crate_inject))] and #![doc(test(attr(...)))]

While investigating https://github.com/rust-lang/rust/issues/45750 i noticed that `#![doc(test(attr(...)))]` wasn't documented at all. Since this is useful for making your examples follow the same coding guidelines as your code, i wanted to add it to the Rustdoc Book. I also added `#![doc(test(no_crate_inject))]` since it's used in the same place and might be useful for macro-heavy crates. I added mentions for these to "The `doc` attribute" as well as "Documentation tests" since it's useful information in both places.

Technically the step reordering in the second commit is gated on https://github.com/rust-lang/rust/pull/45764, since before that lands attributes from the doctest come before the ones from `#![doc(test(attr(...)))]`.
2017-11-18 12:15:21 +01:00
bors
130eaaeaba Auto merge of #46000 - kennytm:fix-45640-extern-type-ice-in-rustdoc, r=QuietMisdreavus
Support `extern type` in rustdoc.

Fixes #45640.

(cc #43467)
2017-11-18 09:18:13 +00:00
loomaclin
0b508846ec Remove return_ty from Mir
https://github.com/rust-lang/rust/issues/46001
2017-11-18 10:27:24 +03:00
bors
859c716fbb Auto merge of #45999 - jseyfried:def_site_span, r=nrc
Rename `Span::default` -> `Span::def_site`

I think the explicitness here is warranted.
c.f. #45934
r? @nrc
2017-11-18 05:36:37 +00:00
bors
79a138594f Auto merge of #45989 - davidtwco:issue-45360, r=nikomatsakis
MIR-borrowck: emit "`foo` does not live long enough" instead of borrow errors

Fixes #45360. As of writing, contains deduplication of existing errors.

r? @nikomatsakis
2017-11-18 03:11:18 +00:00
bors
8752aeed3a Auto merge of #45899 - eddyb:meta-race, r=alexcrichton
rustc_trans: atomically write .rmeta outputs to avoid races.

Fixes #45841 in a similar vein to how LLVM writes archives: write a temporary file and then rename it.

r? @alexcrichton
2017-11-18 00:44:58 +00:00
Wesley Wiser
f726634198 [incremental] Collect stats about duplicated edge reads from queries
Part of #45873
2017-11-17 18:03:29 -05:00
Keith Yeung
f8ba371b1e Add run-pass test for assignment to static mut 2017-11-17 14:22:04 -08:00
Keith Yeung
c9d1db7bc5 Do not registor borrows for unsafe lvalues 2017-11-17 14:16:37 -08:00
bors
18d8acf41d Auto merge of #45853 - nikomatsakis:chalk-simplify-hr-lub-glb, r=arielb1
Simplify higher-ranked LUB/GLB

This is a better version of https://github.com/rust-lang/rust/pull/44211. It still makes higher-ranked LUB/GLB into a hard equality test, however, it does try to identify that something changed and issue a notice to the user. I wroteup https://github.com/rust-lang/rust/issues/45852 as a tracking issue for this change.

Currently, this moves straight to a hard-error, on the basis that the crater run in #44211 saw no impact. It might be good to retest -- or perhaps to try for a warning period. Trying to do the latter in a precise way would be somewhat painful, but an imprecise way might suffice -- that is, we could issue warning *whenever* a LUB/GLB operation succeeds that will later fail, even if it doesn't ultimately impact the type check. I could experiment with this.

~~I am *mildly* wary about landing this independently of other code that moves to a universe-based system. In particular, I was nervous that this change would make coherence accepts new pairs of impls that will later be errors. I have the code for the universe-based approach available, I hope to open an PR and run some tests on its impact very shortly.~~ @arielb1 points out that I was being silly.

r? @arielb1
2017-11-17 22:16:11 +00:00
Guillaume Gomez
d86621f69e Add trait methods as well 2017-11-17 22:50:15 +01:00
Guillaume Gomez
85dcf2ecb6 Improve modal display and add JS events 2017-11-17 22:50:15 +01:00