Commit Graph

83484 Commits

Author SHA1 Message Date
bors
571a624aa9 Auto merge of #53755 - llogiq:fix-unsound-16bit-range, r=nagisa
fix u32 steps_between for 16-bit systems

This fixes #48006.
2018-08-31 22:44:17 +00:00
Charlie Andrews
1c3dc9aca2
Fix tests for json formatting 2018-08-31 16:30:05 -05:00
Charlie Andrews
b9de64a0e6
Make json test output formatter represent "filtered_out" as num 2018-08-31 14:57:19 -05:00
Charlie Andrews
347c6b76a0
Make json test output formatter represent "test_count" as num 2018-08-31 14:42:01 -05:00
QuietMisdreavus
ad2169c095 use cfg(rustdoc) instead of cfg(dox) in std and friends 2018-08-31 13:29:10 -05:00
QuietMisdreavus
d7e496f442 feature(doc_cfg): add docs for cfg(rustdoc) 2018-08-31 13:29:10 -05:00
QuietMisdreavus
1a3bb2795b feature(doc_cfg): set cfg(rustdoc) when rustdoc is running 2018-08-31 13:29:10 -05:00
bors
aaa170bebe Auto merge of #51384 - QuietMisdreavus:extern-version, r=GuillaumeGomez
rustdoc: add flag to control the html_root_url of dependencies

The `--extern-html-root-url` flag in this PR allows one to override links to crates whose docs are not already available locally in the doc bundle. Docs.rs currently uses a version of this to make sure links to other crates go into that crate's docs.rs page. See the included test for intended use, but the idea is as follows:

Calling rustdoc with `--extern-html-root-url crate=https://some-url.com` will cause rustdoc to override links that point to that crate to instead be replaced with a link rooted at `https://some-url.com/`. (e.g. for docs.rs this would be `https://docs.rs/crate/0.1.0` or the like.) Cheekily, rustup could use these options to redirect links to std/core/etc to instead point to locally-downloaded docs, if it so desired.

Fixes https://github.com/rust-lang/rust/issues/19603
2018-08-31 17:39:28 +00:00
Vadim Petrochenkov
c56adf6413 cleanup: Add main functions to some UI tests 2018-08-31 18:56:15 +03:00
thedarkula
de0cd23e48 Added pointer checking to sanity checks 2018-08-31 16:25:01 +01:00
David Wood
2ce56c5ebf
Added warning/error for if-let-chain ambiguity.
With eRFC 2497, previously accepted ambigious syntax regarding use of
`&&` and `||` in if-let and while-let statements should now warn
or error depending on the edition.

This commit takes a naive approach to detecting ambigious use of `&&`
or `||` and will probably need fine tuned to handle all cases.
2018-08-31 16:13:42 +02:00
bors
163adf2860 Auto merge of #53699 - oli-obk:promotion_stability_hole, r=nikomatsakis
Fix promotion stability hole in old borrowck

r? @nikomatsakis

I screwed up the promotion stability checks. Big time. They were basically nonexistant. We had tests for it. I also screwed up said tests. This is in stable already :(

Basically stability checks of promotion only worked if you tried to use a const fn defined in the same crate.

cc @eddyb
2018-08-31 14:06:14 +00:00
Michael Woerister
abd5cc3364 Always add all modules to the global ThinLTO module analysis when compiling incrementally. 2018-08-31 15:22:52 +02:00
Michael Woerister
64a738d8ce Support local ThinLTO with incremental compilation. 2018-08-31 15:22:52 +02:00
Michael Woerister
72c1993b8e Make codegen not be a query (since it's not a real query anyway). 2018-08-31 15:22:52 +02:00
Michael Woerister
d97d1e192b Persist ThinLTO import data in incr. comp. session directory. 2018-08-31 15:22:52 +02:00
Michael Woerister
2e587df6e2 Provide a way of accessing the ThinLTO module import map in rustc. 2018-08-31 15:22:52 +02:00
bors
c2afca3667 Auto merge of #53403 - spastorino:move-out-lazily, r=nikomatsakis
Do not used Move data flow analysis, make it lazy instead

Close #53394
2018-08-31 11:25:53 +00:00
csmoe
72ba683457 extract allocation info from byref 2018-08-31 18:31:15 +08:00
csmoe
66d7216469 trip const_to_alloc query 2018-08-31 18:30:38 +08:00
Oliver Schneider
2839f4f0e8 Get rid of token passing 2018-08-31 11:49:29 +02:00
Otto Rask
bf7e324e4e Add clearer wording to Arc clone example code 2018-08-31 11:21:01 +03:00
flip1995
9cbe518216 Fix typo and small mistake 2018-08-31 00:47:09 -07:00
flip1995
b776579728 Update tests 2018-08-31 00:47:09 -07:00
flip1995
a59da03f8d Add hint for cfg_attr and fix test 2018-08-31 00:47:09 -07:00
flip1995
3720557361 Implement backwards compatibility for tool_lints 2018-08-31 00:46:57 -07:00
flip1995
ce173c12e6 Add deprecated_name argument to the register lint group functions 2018-08-31 00:46:55 -07:00
flip1995
9521deecc4 Add tests for backward compat 2018-08-31 00:46:30 -07:00
Oliver Schneider
b68bb636c7 Make Condvar::new and RWLock::new min const fn for cloudabi 2018-08-31 08:40:00 +02:00
Oliver Schneider
f3e1b968e3 Add test that min const fns can't call unstable min const fns even with the feature gate active 2018-08-31 08:40:00 +02:00
Oliver Schneider
d125e904b5 Restrict most uses of const_fn to min_const_fn 2018-08-31 08:40:00 +02:00
Oliver Schneider
7b3d930ca6 Libstd only has min_const_fn const fns 2018-08-31 08:39:59 +02:00
Oliver Schneider
472ca71598 Implement the min_const_fn feature gate 2018-08-31 08:39:59 +02:00
Eduard-Mihai Burtescu
6b8fba5a42 rustc_typeck: turn where Type:, into a WF(Type) predicate, instead of ignoring it. 2018-08-31 09:02:35 +03:00
bors
1114ab684f Auto merge of #53832 - pietroalbini:rollup, r=pietroalbini
Rollup of 20 pull requests

Successful merges:

 - #51760 (Add another PartialEq example)
 - #53113 (Add example for Cow)
 - #53129 (remove `let x = baz` which was obscuring the real error)
 - #53389 (document effect of join on memory ordering)
 - #53472 (Use FxHash{Map,Set} instead of the default Hash{Map,Set} everywhere in rustc.)
 - #53476 (Add partialeq implementation for TryFromIntError type)
 - #53513 (Force-inline `shallow_resolve` at its hottest call site.)
 - #53655 (set applicability)
 - #53702 (Fix stabilisation version for macro_vis_matcher.)
 - #53727 (Do not suggest dereferencing in macro)
 - #53732 (save-analysis: Differentiate foreign functions and statics.)
 - #53740 (add llvm-readobj to llvm-tools-preview)
 - #53743 (fix a typo: taget_env -> target_env)
 - #53747 (Rustdoc fixes)
 - #53753 (expand keep-stage --help text)
 - #53756 (Fix typo in comment)
 - #53768 (move file-extension based .gitignore down to src/)
 - #53785 (Fix a comment in src/libcore/slice/mod.rs)
 - #53786 (Replace usages of 'bad_style' with 'nonstandard_style'.)
 - #53806 (Fix UI issues on Implementations on Foreign types)

Failed merges:

r? @ghost
2018-08-31 03:35:33 +00:00
bors
8adc69a5a8 Auto merge of #53779 - RalfJung:miri-refactor, r=oli-obk
Miri refactor: Final round

Tying up some loose ends that I noticed in the previous PRs -- and finally getting argument passing into a shape where @eddyb says it is "okay", which is a big improvement over the previous verdict that I cannot quote in public. ;)

Also move a bunch of useful helpers to construct `Scalar` from miri to here.

Cc @eddyb
r? @oli-obk
2018-08-31 01:18:42 +00:00
Esteban Küber
013710e8e8 Use suggestion for dereference help 2018-08-30 16:01:42 -07:00
Esteban Küber
da9ba98fad Format code 2018-08-30 16:01:08 -07:00
Esteban Küber
70ed4f972e Point at def span on incorrect panic or alloc error handler 2018-08-30 16:00:09 -07:00
bors
c6047ea192 Auto merge of #53828 - alexcrichton:dist-llvm-shared, r=japaric
rustbuild: Distribute libLLVM.so with rustc

A recent change (#53245) started to build LLVM with ThinLTO enabled and to
ensure that compile times are kept down it builds LLVM dynamically by default to
ensure that all the various LLVM tools aren't redoing all that optimization
work. This means, however, that all LLVM tools depend on LLVM's dynamic library
by default.

While the LLVM tools and LLDB components were updated to include the shared
library we accidentally forgot about LLD, included with the main rustc
component. LLD also links dynamically to LLVM and ships a non-working binary
right now because of this!

This commit updates our distribution to ship the LLVM dynamic library with the
compiler libraries.  While not technically needed for rustc itself to operate
(right now) it may be needed for LLD, and otherwise it serves as a good basis
for the other LLVM tools components to work with as well.

This should...

Closes #53813
2018-08-30 22:54:34 +00:00
David Wood
08a4a37678
Omit 'missing IndexMut impl' suggestion when IndexMut is implemented. 2018-08-31 00:54:04 +02:00
Santiago Pastorino
a6aa5ddf56
Run rustfmt 2018-08-30 19:14:35 -03:00
Santiago Pastorino
373fc932aa
Make move out computation lazy 2018-08-30 19:14:31 -03:00
Nick Cameron
6aafd7adc6 save-analysis: record info for the types in where clauses
cc https://github.com/rust-lang-nursery/rls/issues/987
2018-08-31 10:10:57 +12:00
David Wood
1ad2f5cec4
Added help message for missing IndexMut impl. 2018-08-30 21:44:19 +02:00
Philip Daniels
47aa475866 Fix direction of slashes in the help text example. 2018-08-30 20:23:41 +01:00
David Craven
173c67948b
[RISCV] Disable atomics for riscv32imc-unknown-none-elf. 2018-08-30 20:35:36 +02:00
David Wood
ef6851cdb2
Added InitLocation to encode Location or Local depending on source of Init 2018-08-30 20:21:42 +02:00
Pietro Albini
6b1fffae20
Rollup merge of #53806 - GuillaumeGomez:fix-ui-issues-foreign-type-impls, r=QuietMisdreavus
Fix UI issues on Implementations on Foreign types

Fixes #53800.

<img width="1440" alt="screen shot 2018-08-29 at 22 06 35" src="https://user-images.githubusercontent.com/3050060/44814733-e9986180-abdd-11e8-97e0-0e3c1816ca04.png">

r? @QuietMisdreavus
2018-08-30 20:15:48 +02:00
Pietro Albini
78d5509625
Rollup merge of #53786 - frewsxcv:frewsxcv-bad-style, r=Manishearth
Replace usages of 'bad_style' with 'nonstandard_style'.

`bad_style` is being deprecated in favor of `nonstandard_style`:

- https://github.com/rust-lang/rust/issues/41646
2018-08-30 20:15:47 +02:00