Commit Graph

99512 Commits

Author SHA1 Message Date
Josh Stone
c3f72d1c09 Fix the span used to suggest avoiding for-loop moves
It was using the snippet from the "use" span, which often renders the
same, but with closures that snippet is on the start of the closure
where the value is captured. We should be using the snippet from the
span where it was moved into the `for` loop, which is `move_span`.
2019-09-20 16:06:32 -07:00
Baoshan Pang
b956ae38e1 rust stat should call libc stat 2019-09-20 15:47:13 -07:00
Josh Stone
9f374da467 Exempt extern "Rust" from improper_ctypes
It should be fine for Rust ABIs to involve any Rust type.
2019-09-20 15:39:34 -07:00
n-salim
fbf9fa412d
Merge pull request #24 from Wind-River/home_directory
No home directory on vxWorks
2019-09-20 14:32:11 -07:00
Baoshan Pang
491a0c6902 No home directory on vxWorks 2019-09-20 13:25:57 -07:00
gnzlbg
9cf9030e1c Allow using fn pointers in const fn behind const_fn_ptr gate 2019-09-20 18:39:13 +02:00
Josh Stone
633ad73ef1 Update to LLVM 9.0.0 2019-09-20 09:36:03 -07:00
guanqun
c3140bae63
remove the extra comma after the match arm
This would follow the same coding style as all the other match arms in this file.
2019-09-21 00:22:43 +08:00
n-salim
66b16496e6
Merge pull request #23 from rust-lang/master
Sync to rust-lang/rust branch master
2019-09-20 08:47:32 -07:00
bors
97e58c0d32 Auto merge of #64584 - nikomatsakis:issue-64477-generator-capture-types, r=eddyb
record fewer adjustment types in generator witnesses, avoid spurious drops in MIR construction

Don't record all intermediate adjustment types -- That's way more than is needed, and winds up recording types that will never appear in MIR.

Note: I'm like 90% sure that this logic is correct, but this stuff is subtle and can be hard to keep straight.  However, the risk of this PR is fairly low -- if we miss types here, I believe the most common outcome is an ICE.

This fixes the original issue cited by #64477, but I'm leaving the issue open for now since there may be other cases we can detect and improve in a targeted way.

r? @Zoxc
2019-09-20 15:35:51 +00:00
bors
9ad1e7c46c Auto merge of #64553 - alexcrichton:windows-bash-install-scripts, r=Mark-Simulacrum
azure: Convert Windows installations scripts to `bash`

Looks like `script`, which uses `cmd.exe`, doesn't have fail-fast
behavior and if a leading command fails the script doesn't actually fail
so long as the last command succeeds. We instead want the opposite
behavior where if any step fails the whole script fails.

I don't really know `cmd.exe` that well, nor powershell, so I've opted
to move everything to `bash` which should be a good common denominator
amongst all platforms to work with. Additionally I know that `set -e`
works to cause scripts to fail fast.

Closes #64551
2019-09-20 11:38:56 +00:00
bors
72252646a8 Auto merge of #64498 - estebank:point-at-arg, r=Centril
When possible point at argument causing item obligation failure

Fix https://github.com/rust-lang/rust/issues/41781, fix https://github.com/rust-lang/rust/issues/42855, fix https://github.com/rust-lang/rust/issues/46658, fix https://github.com/rust-lang/rust/issues/48099, fix https://github.com/rust-lang/rust/issues/63143.
2019-09-20 07:53:23 +00:00
Nicholas Nethercote
aa10abb211 Rename a variable.
Because the meaning of this `index` variable is quite different to all
the other `index` variables in this file.
2019-09-20 12:53:22 +10:00
bors
ea3ba36f3f Auto merge of #64576 - pietroalbini:split-aws-tokens, r=alexcrichton
ci: split aws credentials in two separate users with scoped perms

This commit changes our CI to use two separate IAM users to authenticate with AWS:

* `ci--rust-lang--rust--sccache`: has access to the `rust-lang-ci-sccache2` S3 bucket and its credentials are available during the whole build.
* `ci--rust-lang--rust--upload`: has access to the `rust-lang-ci2` S3 bucket and its credentials are available just during the upload step.

The new tokens are available in the `prod-credentials` library.

r? @alexcrichton
2019-09-20 02:43:06 +00:00
Nicholas Nethercote
27c7c23840 Rename waiting_cache.
The name `waiting_cache` sounds like it is related to the states
`NodeState::Waiting`, but it's not; the cache holds nodes of various
states.

This commit changes it to `active_state`.
2019-09-20 11:31:50 +10:00
Nicholas Nethercote
75fd4f754e Rename a loop variable.
We normally use `index` for indices to `ObligationForest::nodes`, but
this is a `Nodes::dependents` index.
2019-09-20 11:26:07 +10:00
Nicholas Nethercote
8d73faf9ab Remove some unnecessary backtrace intermediate variables. 2019-09-20 11:25:16 +10:00
Nicholas Nethercote
3eae7f6291 Upgrade to ena-0.13.1 and use the new inlined_probe_value function.
This is a big speed win for `keccak` and `inflate`.
2019-09-20 11:24:30 +10:00
Nicholas Nethercote
acf7d4dcdb Specialize the stalled_on handling in process_obligation().
Optimizing for the common numbers of entries in `stalled_on` wins about
4% on `keccak` and `inflate`.
2019-09-20 09:51:52 +10:00
bors
53b352edb6 Auto merge of #64616 - Centril:rollup-du6728f, r=Centril
Rollup of 6 pull requests

Successful merges:

 - #63448 (fix Miri discriminant handling)
 - #64592 (Point at original span when emitting unreachable lint)
 - #64601 (Fix backticks in documentation)
 - #64606 (Remove unnecessary `mut` in doc example)
 - #64611 (rustbuild: Don't package libstd twice)
 - #64613 (rustbuild: Copy crate doc files fewer times)

Failed merges:

r? @ghost
2019-09-19 22:41:46 +00:00
Esteban Küber
c34d9e6a92 add comments 2019-09-19 14:52:38 -07:00
Nicholas Nethercote
aaff05bd1c Reorder the state handling in process_cycles().
This gives a slight speed-up.
2019-09-20 07:22:10 +10:00
Erin Power
3db2c13d89
Add Compatibility Notes to RELEASES.md for 1.38.0 2019-09-19 22:15:25 +02:00
Niko Matsakis
77fd0a7649 add a mir-opt test that we don't add the spurious drop 2019-09-19 16:12:48 -04:00
Esteban Küber
d64c90d40b remove duplicated code 2019-09-19 12:10:23 -07:00
Esteban Küber
09f05d2c41 review comments 2019-09-19 12:10:23 -07:00
Esteban Küber
c1ed4399eb review comments 2019-09-19 12:10:23 -07:00
Esteban Küber
2fbd6927a5 When possible, suggest fn call 2019-09-19 12:10:23 -07:00
Esteban Küber
5976e0eecf Review comment: move to its own method 2019-09-19 12:10:23 -07:00
Esteban Küber
fa496c9ded Ignore obligations coming from desugared call spans 2019-09-19 12:10:23 -07:00
Esteban Küber
02e3fb89a7 When possible point at argument causing item obligation failure 2019-09-19 12:10:23 -07:00
csmoe
9ffb1ce28c append asyncness info to functions 2019-09-19 18:38:55 +00:00
Niko Matsakis
1962d75c10 fix mir-opt tests 2019-09-19 14:30:05 -04:00
Alex Crichton
255dd3ff42 rustbuild: Improve output of dist step
* Pass `/Q` to `iscc` on Windows to supress the thousands of lines of
  output about compressing documentation.
* Print out what's happening before long steps
* Use `timeit` to print out timing information for long-running
  installer assemblies.
2019-09-19 11:29:12 -07:00
Niko Matsakis
c78a00991b whoops, only trigger this path for avoiding DROP, not StorageDead 2019-09-19 13:42:46 -04:00
Niko Matsakis
2655663345 fix tests for 2018 2019-09-19 13:15:54 -04:00
Alex Crichton
fde8cfe130 rustbuild: Turn down compression on msi installers
This is the same as #64615 except applied to our MSI installers. The
same fix is applied effectively bringing these installers in line with
the gz tarball installers, which are about 3x faster to produce locally
and likely much faster to produce on CI.
2019-09-19 10:13:15 -07:00
Mazdak Farrokhzad
99cbffb15f
Rollup merge of #64613 - alexcrichton:less-doc-copies, r=Mark-Simulacrum
rustbuild: Copy crate doc files fewer times

Previously when building documentation for the standard library we'd
copy all the files 5 times, and these files include libcore/libstd docs
which are huge! This commit instead only copies the files after rustdoc
has been run for each crate, reducing the number of redundant copies
we're making.
2019-09-19 18:31:44 +02:00
Mazdak Farrokhzad
ff7a9cf276
Rollup merge of #64611 - alexcrichton:no-libstd-twice, r=Mark-Simulacrum
rustbuild: Don't package libstd twice

Looks like the packaging step for the standard library was happening
twice on CI, but it only needs to happen once! The `Analysis` packaging
step accidentally packaged `Std` instead of relying on compiling `Std`,
which meant that we ended up packaging it twice erroneously.
2019-09-19 18:31:43 +02:00
Mazdak Farrokhzad
ea58ed9421
Rollup merge of #64606 - adrianheine:patch-1, r=sfackler
Remove unnecessary `mut` in doc example
2019-09-19 18:31:41 +02:00
Mazdak Farrokhzad
908636f510
Rollup merge of #64601 - grovesNL:two-backticks, r=jonas-schievink
Fix backticks in documentation

Fix a few typos in comments/documentation where backticks were doubled-up on one side.
2019-09-19 18:31:40 +02:00
Mazdak Farrokhzad
3c286826aa
Rollup merge of #64592 - Aaron1011:feature/unreachable-span, r=Centril
Point at original span when emitting unreachable lint

Fixes #64590

When we emit an 'unreachable' lint, we now add a note pointing at the
expression that actually causes the code to be unreachable (e.g.
`return`, `break`, `panic`).

This is especially useful when macros are involved, since a diverging
expression might be hidden inside of a macro invocation.
2019-09-19 18:31:39 +02:00
Mazdak Farrokhzad
bda52e558e
Rollup merge of #63448 - RalfJung:miri-discriminant, r=eddyb
fix Miri discriminant handling

This can be reviewed commit-by-commit fairly well.

The Miri side is at https://github.com/rust-lang/miri/pull/903.

Fixes https://github.com/rust-lang/rust/issues/62138

r? @eddyb @oli-obk
2019-09-19 18:31:37 +02:00
gaolei
1ab5593f95 factor out pluralisation remains after #64280 2019-09-20 00:25:27 +08:00
Alex Crichton
8112f71fc9 rustbuild: Turn down compression on exe installers
The Windows dist builders are the slowest builders right now, and the
distribution phase of them is enormously slow clocking in at around 20
minutes to build all the related installers. This commit starts to
optimize these by turning down the compression level in the `exe`
installers. These aren't super heavily used so there's no great need for
them to be so ultra-compressed, so let's dial back the compression
parameters to get closer to the rest of our xz archives. This brings the
installer in line with the gz tarball installer locally, and also brings
the compression settings on par with the rest of our xz installers.
2019-09-19 09:24:42 -07:00
Niko Matsakis
b2c51c24c9 avoid generating drops for moved operands of calls
Currently, after a CALL terminator is created in MIR, we insert DROP
statements for all of its operands -- even though they were just moved
shortly before! These spurious drops are later removed, but not before
causing borrow check errors.

This PR series modifies the drop code to track operands that were
moved and avoid creating drops for them.

Right now, I'm only using this mechanism for calls, but it seems
likely it could be used in more places.
2019-09-19 11:50:00 -04:00
Alex Crichton
d7f64749c0 rustbuild: Copy crate doc files fewer times
Previously when building documentation for the standard library we'd
copy all the files 5 times, and these files include libcore/libstd docs
which are huge! This commit instead only copies the files after rustdoc
has been run for each crate, reducing the number of redundant copies
we're making.
2019-09-19 08:37:53 -07:00
Alex Crichton
2fff78038c rustbuild: Don't package libstd twice
Looks like the packaging step for the standard library was happening
twice on CI, but it only needs to happen once! The `Analysis` packaging
step accidentally packaged `Std` instead of relying on compiling `Std`,
which meant that we ended up packaging it twice erroneously.
2019-09-19 07:46:24 -07:00
Niko Matsakis
e35698371d make clear that invalidate just replaces with default 2019-09-19 10:31:01 -04:00
Alex Crichton
72ea960056 azure: Convert Windows installations scripts to bash
Looks like `script`, which uses `cmd.exe`, doesn't have fail-fast
behavior and if a leading command fails the script doesn't actually fail
so long as the last command succeeds. We instead want the opposite
behavior where if any step fails the whole script fails.

I don't really know `cmd.exe` that well, nor powershell, so I've opted
to move everything to `bash` which should be a good common denominator
amongst all platforms to work with. Additionally I know that `set -e`
works to cause scripts to fail fast.

Note that some scripts remain as `script` since they don't appear to
work in` bash`. I'm not really sure why but I reorganized them slightly
to have the "meaty command" run at the end.
2019-09-19 07:29:45 -07:00