Commit graph

99276 commits

Author SHA1 Message Date
Tyler Mandry
0fd7a2db3d
Rollup merge of #64578 - max-sixty:22656-lldb-8, r=alexcrichton
Fix issue22656 with LLDB 8

Closes https://github.com/rust-lang/rust/issues/64074
2019-09-18 10:58:07 -07:00
Tyler Mandry
68096ccb3f
Rollup merge of #64532 - ecstatic-morse:dataflow-cursor-get, r=tmandry
Replace `state_for_location` with `DataflowResultsCursor`

These are two different ways of getting the same data from the result of a dataflow analysis. However, `state_for_location` goes quadratic if you try to call it for every statement in the body.
2019-09-18 10:58:06 -07:00
Tyler Mandry
05d93a7d06
Rollup merge of #64348 - arnohaase:pr_documentation_spin_loop_hint, r=alexcrichton
PR: documentation spin loop hint

The documentation for 'spin loop hint' explains that yield is better if the lock holder is running on the same CPU. I suggest that 'CPU or core' would be clearer.
2019-09-18 10:58:05 -07:00
Tyler Mandry
e8ded849ef
Rollup merge of #64207 - sinkuu:pub_dataflow, r=tmandry
Make rustc_mir::dataflow module pub (for clippy)

I'm working on fixing false-positives of a MIR-based clippy lint (https://github.com/rust-lang/rust-clippy/pull/4509), and in need of the dataflow infrastructure.
2019-09-18 10:58:03 -07:00
Dylan MacKenzie
b4e94d9a3a Fix bug where is_call_return_effect_applied was never set 2019-09-18 09:22:02 -07:00
Eric Huss
003fcda6a9 Update books 2019-09-18 08:54:06 -07:00
Dylan MacKenzie
a7f52520d5 Add summary of the current state and future plans 2019-09-18 08:41:38 -07:00
Maximilian Roos
445af68c23
fix debuginfo/issue22656 with LLDB 8 2019-09-18 10:42:55 -04:00
Dylan MacKenzie
08aff1afe5 Publish rustc_mir::dataflow and remove #[allow(unused)] 2019-09-18 07:35:44 -07:00
Dylan MacKenzie
19bf0f4c90 Fix typo 2019-09-18 07:32:57 -07:00
Dylan MacKenzie
a526e4faa6 Use an associated const for name 2019-09-18 07:32:42 -07:00
Dylan MacKenzie
cbaaf05b94 Fix Analysis example 2019-09-18 07:32:15 -07:00
bors
dece57302a Auto merge of #64575 - lzutao:fmt-primitives-doc, r=jonas-schievink
doc: Format some primitives examples

r? @jonas-schievink
2019-09-18 12:31:00 +00:00
Arno Haase
eb48b5d983 broken hyperlinks in documentation 2019-09-18 12:31:34 +02:00
Lzu Tao
bec0a76727 doc: Format some primitives examples 2019-09-18 08:24:24 +00:00
bors
64c09694a6 Auto merge of #64570 - tmandry:rollup-3pg02lj, r=tmandry
Rollup of 4 pull requests

Successful merges:

 - #64486 (Print out more information for `-Zunpretty=expanded,hygiene`)
 - #64503 (rename Allocation::retag -> with_tags_and_extra)
 - #64516 (update Nomicon and Reference)
 - #64528 (Load proc macro metadata in the correct order.)

Failed merges:

r? @ghost
2019-09-18 04:29:01 +00:00
Tyler Mandry
76d34f3435
Rollup merge of #64528 - Aaron1011:fix/proc-macro-type, r=alexcrichton
Load proc macro metadata in the correct order.

Serialized proc macro metadata is assumed to have a one-to-one
correspondence with the entries in static array generated by proc_macro_harness.
However, we were previously serializing proc macro metadata in a
different order than proc macros were laied out in the static array.
This lead to us associating the wrong data with a proc macro when
generating documentation, causing Rustdoc to generate incorrect docs for
proc macros.

This commit keeps track of the order in which we insert proc macros into
the generated static array. We use this same order when serializing proc
macro metadata, ensuring that we can later associate the metadata for a
proc macro with its entry in the static array.

Fixes #64251
2019-09-17 21:27:26 -07:00
Tyler Mandry
b2501a1269
Rollup merge of #64516 - RalfJung:nomicon, r=Centril
update Nomicon and Reference

Cc @Centril
2019-09-17 21:27:25 -07:00
Tyler Mandry
dbce655eda
Rollup merge of #64503 - RalfJung:miri-retag, r=oli-obk
rename Allocation::retag -> with_tags_and_extra

This is more consistent with `Pointer::with_tag`. Also, "retag" is a [term from Stacked Borrows](https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md#retagging) with a [corresponding Machine hook](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_mir/interpret/machine/trait.Machine.html#method.retag), and this function has nothing to do with that other use of the term.

r? @oli-obk
2019-09-17 21:27:23 -07:00
Tyler Mandry
a8aa5114bf
Rollup merge of #64486 - matthewjasper:hygiene-debugging, r=petrochenkov
Print out more information for `-Zunpretty=expanded,hygiene`

I've found this helpful when trying to understand how hygiene works.

Closes #16420
2019-09-17 21:27:22 -07:00
Dylan MacKenzie
d583fefa59 Add ignore reason to placate tidy 2019-09-17 17:53:36 -07:00
Dylan MacKenzie
288603709e Temporarily add #[allow(unused)] for CI
This can be removed once dataflow-based const validation is merged.
2019-09-17 17:52:50 -07:00
Dylan MacKenzie
5496a1fbbe Document new dataflow analysis 2019-09-17 17:52:47 -07:00
Dylan MacKenzie
ceb72e4ad1 Add generic dataflow impl 2019-09-17 16:52:13 -07:00
Aaron Hill
3daa8bd2e4
Generate proc macro harness in AST order.
This ensures that we match the order used by proc macro metadata
serialization.

Fixes #64251
2019-09-17 19:10:10 -04:00
bors
528379121c Auto merge of #64562 - tmandry:rollup-kfk0nuo, r=tmandry
Rollup of 10 pull requests

Successful merges:

 - #61626 (Get rid of special const intrinsic query in favour of `const_eval`)
 - #64283 (Updated RELEASES.md for 1.38.0)
 - #64394 (Shrink `SubregionOrigin`.)
 - #64429 (Fix failure note `to_str` implementation)
 - #64436 (improve Vec example soundness in mem::transmute docs)
 - #64502 (avoid duplicate issues for Miri build failures)
 - #64505 (Fix inconsistent link formatting)
 - #64529 (Add an example to Pin::as_mut)
 - #64541 (document Miri error categories)
 - #64544 (build-manifest: re-add some comments)

Failed merges:

r? @ghost
2019-09-17 22:21:10 +00:00
Tyler Mandry
93d610821d
Rollup merge of #64544 - RalfJung:build-manifest, r=pietroalbini
build-manifest: re-add some comments

https://github.com/rust-lang/rust/pull/64543 also reverted the comments I added. This adds them back.
Includes https://github.com/rust-lang/rust/pull/64543.

r? @pietroalbini
2019-09-17 14:10:56 -07:00
Tyler Mandry
f8b6e26cfb
Rollup merge of #64541 - RalfJung:miri-errors, r=oli-obk
document Miri error categories

r? @oli-obk
2019-09-17 14:10:55 -07:00
Tyler Mandry
d782f09ae0
Rollup merge of #64529 - taiki-e:docs-pin-as-mut, r=RalfJung
Add an example to Pin::as_mut

https://github.com/taiki-e/pin-project/issues/89#issuecomment-531701172

r? @RalfJung
2019-09-17 14:10:54 -07:00
Tyler Mandry
b544284315
Rollup merge of #64505 - pickfire:patch-1, r=Mark-Simulacrum
Fix inconsistent link formatting
2019-09-17 14:10:52 -07:00
Tyler Mandry
3a1390cdca
Rollup merge of #64502 - RalfJung:miri-toolstate, r=pietroalbini
avoid duplicate issues for Miri build failures

Currently, when Miri regressed from test-pass to test-fail, we pen an issue -- and then when it regresses further from test-fail to build-fail, we open a *second* issue.

This changes the logic to avoid the redundant second issue for Miri.

r? @pietroalbini @kennytm
2019-09-17 14:10:51 -07:00
Tyler Mandry
d6f2205ed8
Rollup merge of #64436 - llogiq:transmute-docs, r=RalfJung
improve Vec example soundness in mem::transmute docs

The previous version of the `Vec` example had a case of questionable soundness, because at one point `v_orig` was aliased.

r? @RalfJung
2019-09-17 14:10:50 -07:00
Tyler Mandry
ffee7bbf9a
Rollup merge of #64429 - afnanenayet:afnan/fix-failure-note-json-level, r=Mark-Simulacrum
Fix failure note `to_str` implementation

Serialize the level to something a little more useful for a failure note struct. This fixes #60425.
2019-09-17 14:10:48 -07:00
Tyler Mandry
ec905cf9e5
Rollup merge of #64394 - nnethercote:shrink-SubregionOrigin, r=Mark-Simulacrum
Shrink `SubregionOrigin`.

It's currently 120 bytes on x86-64, due to one oversized variant
(`Subtype`). This commit boxes `Subtype`'s contents, reducing the size
of `SubregionOrigin` to 32 bytes.

The change speeds things up by avoiding lots of `memcpy` calls, mostly
relating to `RegionConstraintData::constraints`, which is a `BTreeMap`
with `SubregionOrigin` values.
2019-09-17 14:10:47 -07:00
Tyler Mandry
20d43d03dd
Rollup merge of #64283 - XAMPPRocky:master, r=Mark-Simulacrum
Updated RELEASES.md for 1.38.0

### [Rendered](https://github.com/XAMPPRocky/rust/blob/master/RELEASES.md)

r? @Mark-Simulacrum
cc @rust-lang/release
2019-09-17 14:10:45 -07:00
Tyler Mandry
6bbb935a61
Rollup merge of #61626 - oli-obk:const_eval_intrinsics, r=eddyb
Get rid of special const intrinsic query in favour of `const_eval`

r? @eddyb
2019-09-17 14:10:44 -07:00
Ralf Jung
ebd129b7ff update Nomicon and Reference 2019-09-17 22:28:49 +02:00
Matthew Jasper
3c2fd1a72d Print syntax contexts and marks when printing hygiene information 2019-09-17 21:23:33 +01:00
bors
7efe1c6e67 Auto merge of #64525 - nikomatsakis:issue-64512-drop-order-tail-temp, r=davidtwco
adjust desugaring for async fn to correct drop order

Old desugaring, given a user function body `{ $stmts; $expr }`

```
{
    let $param_pattern0 = $raw_param0;
    ...
    let $param_patternN = $raw_paramN;
    $stmts;
    $expr
}
```

New desugaring:

```
{
    let $param_pattern0 = $raw_param0;
    ...
    let $param_patternN = $raw_paramN;
    drop-temps {
        $stmts;
        $expr
    }
}
```

The drop-temps is an internal bit of HIR that drops temporaries from the resulting expression, but it should be equivalent to `return { $stmts; $expr }`.

Fixes #64512
Fixes #64391
2019-09-17 18:23:30 +00:00
lqd
f9c73293e2 Bless json output of test ui/json-options.rs for Polonius 2019-09-17 19:35:16 +02:00
lqd
34d3167368 Bless json output of test ui/json-multiple.rs for Polonius 2019-09-17 19:34:12 +02:00
lqd
3ef980aeaa Update expectations of test ui/dropck/dropck_trait_cycle_checked.rs for Polonius
as its output was changed by 2ff337a8e2 (diff-bd3f80b956148a5d1567aa8698b8a507)
2019-09-17 19:32:36 +02:00
lqd
222e920151 Bless output of test borrowck/return-local-binding-from-desugaring.rs for Polonius 2019-09-17 19:30:34 +02:00
lqd
9f4351d406 Bless output of test borrowck/return-local-binding-from-desugaring.rs for Polonius 2019-09-17 19:28:49 +02:00
Andre Bogus
ab6e108644 improve Vec example soundness in mem::transmute docs 2019-09-17 18:31:54 +02:00
Ralf Jung
a4dc33baf6 build-manifest: add some comments 2019-09-17 17:26:55 +02:00
bors
9150f844e2 Auto merge of #64517 - alexcrichton:less-assertions, r=pietroalbini
azure: Disable more LLVM/debug assertions in

This commit disables LLVM/debug assertions in our 5 slowest builders:

* i686-gnu
* i686-gnu-nopt
* i686-msvc-1
* i686-msvc-2
* x86_64-msvc-cargo

This is reducing the amount of test coverage for LLVM/debug assertions,
but we're just unfortunately running out of time on CI too many times.
Some test builds have shown that i686-gnu drops nearly an hour of CI
time by disabling these two assertions. Perhaps when we eventually get
4-core machines we can reenable these, but for now turn them off and
hook them up to the tracking issue at #59637 which will ideally be
repurposes to tracking all of these.
2019-09-17 14:43:44 +00:00
Oliver Scherer
0de9485038 Get rid of special const intrinsic query in favour of const_eval 2019-09-17 16:31:55 +02:00
Taiki Endo
a22e9ee8d0
Update src/libcore/pin.rs
Co-Authored-By: Ralf Jung <post@ralfj.de>
2019-09-17 20:02:48 +09:00
Taiki Endo
522f4e1f3e Add an example to Pin::as_mut 2019-09-17 19:41:12 +09:00