Commit Graph

82973 Commits

Author SHA1 Message Date
Manish Goregaokar
daa43643b0 deprcated -> deprecated 2018-09-01 21:45:44 +05:30
flip1995
6a317be5c8
Add tests for cmdline tool lints 2018-09-01 18:06:36 +02:00
flip1995
798a20740e
Fix of bug introduced by #53762 2018-09-01 17:43:14 +02:00
bors
fea32f1b77 Auto merge of #53604 - oli-obk:min_const_fn, r=Centril,varkor
Implement the `min_const_fn` feature gate

cc @RalfJung @eddyb

r? @Centril

implements the feature gate for #53555

I added a hack so the `const_fn` feature gate also enables the `min_const_fn` feature gate. This ensures that nightly users of `const_fn` don't have to touch their code at all.

The `min_const_fn` checks are run first, and if they succeeded, the `const_fn` checks are run additionally to ensure we didn't miss anything.
2018-09-01 11:26:24 +00:00
bors
e6381a7f37 Auto merge of #53822 - dvc94ch:riscv, r=japaric
[RISCV] Use lld as the default linker; Enable C extension; Add riscv32imc-unknown-none-elf target

The riscv32imc-unknown-none-elf target is intended for soft cores.

The riscv32imc target is supported by the following popular soft cores:

picorv32: https://github.com/cliffordwolf/picorv32
vexriscv: https://github.com/SpinalHDL/VexRiscv
pulp riscy: https://github.com/pulp-platform/riscv
pulp zero-riscy: https://github.com/pulp-platform/zero-riscy
2018-09-01 06:58:16 +00:00
bors
b7e44027a5 Auto merge of #53762 - flip1995:tool_lints, r=Manishearth
Backwards compatibility for tool/clippy lints

cc #44690
cc https://github.com/rust-lang-nursery/rust-clippy/pull/2977#issuecomment-409706557

This is the next step towards `tool_lints`.

This makes Clippy lints still work without scoping, but will warn and suggest the new scoped name. This warning will only appear if the code is checked with Clippy itself.

There is still an issue with using the old lint name in inner attributes. For inner attributes the warning gets emitted twice. I'm currently not really sure why this happens, but will try to fix this ASAP.

r? @Manishearth
2018-09-01 03:27:42 +00:00
bors
06a59da5af Auto merge of #53611 - alexcrichton:update-llvm, r=nikomatsakis
Update LLVM submodule

This commit updates the LLVM submodule to the current trunk of LLVM itself. This
brings a few notable improvements for the wasm target:

* Support for wasm atomic instructions is greatly improved
* Renamed memory wasm intrinsics are fully supported
* LLD has fixed a quadratic execution bug with large numbers of relocations in
  wasm files.

The compiler-rt submodule has been updated in tandem as well.
2018-09-01 01:07:31 +00:00
Alex Crichton
6c10142251 Update LLVM submodule
This commit updates the LLVM submodule to the current trunk of LLVM itself. This
brings a few notable improvements for the wasm target:

* Support for wasm atomic instructions is greatly improved
* Renamed memory wasm intrinsics are fully supported
* LLD has fixed a quadratic execution bug with large numbers of relocations in
  wasm files.

The compiler-rt submodule has been updated in tandem as well.
2018-08-31 16:00:41 -07:00
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
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
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
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
Oliver Schneider
2839f4f0e8 Get rid of token passing 2018-08-31 11:49:29 +02: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
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
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
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
David Craven
173c67948b
[RISCV] Disable atomics for riscv32imc-unknown-none-elf. 2018-08-30 20:35:36 +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
Pietro Albini
07fcb0168e
Rollup merge of #53785 - tbu-:pr_comment, r=Mark-Simulacrum
Fix a comment in src/libcore/slice/mod.rs
2018-08-30 20:15:46 +02:00
Pietro Albini
c9862e2cb7
Rollup merge of #53768 - RalfJung:gitignore, r=nikomatsakis
move file-extension based .gitignore down to src/

Currently, it for example ignores `*.rlib` files in the repository root -- which I think is wrong; I sometimes get these files when I call rustc directly and I do want them cleaned up, not ignored. No such files are created during the normal build process.
2018-08-30 20:15:44 +02:00
Pietro Albini
11fab7db1d
Rollup merge of #53756 - dmerejkowsky:fix-comment, r=KodrAus
Fix typo in comment
2018-08-30 20:15:43 +02:00
Pietro Albini
ad9a0016a4
Rollup merge of #53753 - RalfJung:keep-stage, r=nikomatsakis
expand keep-stage --help text
2018-08-30 20:15:42 +02:00
Pietro Albini
2e2980b722
Rollup merge of #53747 - GuillaumeGomez:rustdoc-fixes, r=QuietMisdreavus
Rustdoc fixes

Fixes rustdoc not scrolling to given lines and invalid unstable display:

<img width="1440" alt="screen shot 2018-08-27 at 23 28 47" src="https://user-images.githubusercontent.com/3050060/44687252-06535e80-aa51-11e8-8512-d7d34d1cb963.png">

r? @QuietMisdreavus
2018-08-30 20:15:40 +02:00
Pietro Albini
eaca5f8649
Rollup merge of #53743 - oconnor663:target_env, r=kennytm
fix a typo: taget_env -> target_env

This typo was introduced in https://github.com/rust-lang/rust/pull/47334. A couple tests bitrotted as a result, so we fix those too, and move them to a more sensible place.

Is there some lint we could turn on that would've caught this? It's a drag that cfg typos can silently pass through the compiler.
2018-08-30 20:15:39 +02:00
Pietro Albini
d52fea8796
Rollup merge of #53740 - japaric:readobj, r=alexcrichton
add llvm-readobj to llvm-tools-preview

Similar to readelf but supports more object formats (it seems). Particularly useful to inspect in detail sections (e.g. their flags) and symbols (e.g. their types).

r? @alexcrichton
cc @dvc94ch
2018-08-30 20:15:38 +02:00
Pietro Albini
ed07680028
Rollup merge of #53732 - emilio:foreign-fn, r=nrc
save-analysis: Differentiate foreign functions and statics.
2018-08-30 20:15:37 +02:00
Pietro Albini
0334ce4488
Rollup merge of #53727 - estebank:incorrect-deref-suggestion, r=nikomatsakis
Do not suggest dereferencing in macro

Fix #52783.
2018-08-30 20:15:35 +02:00
Pietro Albini
3ee762870f
Rollup merge of #53702 - jkozlowski:correct_version_for_macro_vis_matcher, r=cramertj
Fix stabilisation version for macro_vis_matcher.

r? @cramertj
2018-08-30 20:15:34 +02:00
Pietro Albini
1535075b58
Rollup merge of #53655 - jcpst:with_applicability, r=estebank
set applicability

Update a few more calls as described in #50723

r? @estebank
2018-08-30 20:15:33 +02:00
Pietro Albini
1c36e76751
Rollup merge of #53513 - nnethercote:inline-shallow_resolve, r=varkor
Force-inline `shallow_resolve` at its hottest call site.

It's a ~1% win on `keccak` and `inflate`.
2018-08-30 20:15:31 +02:00
Pietro Albini
a245d9bbca
Rollup merge of #53476 - GuillaumeGomez:try-from-int-error-partial-eq, r=KodrAus
Add partialeq implementation for TryFromIntError type

Fixes #53458.
2018-08-30 20:15:30 +02:00
Pietro Albini
ba832707cf
Rollup merge of #53472 - eddyb:fx-pls, r=pnkfelix
Use FxHash{Map,Set} instead of the default Hash{Map,Set} everywhere in rustc.

Most of the compiler uses the `Fx` hasher but some places ended up with the default one.
2018-08-30 20:15:29 +02:00
Pietro Albini
0c8b8e8b42
Rollup merge of #53389 - RalfJung:thread-join, r=sfackler
document effect of join on memory ordering

Fixes https://github.com/rust-lang/rust/issues/45467
2018-08-30 20:15:27 +02:00
Pietro Albini
8505270077
Rollup merge of #53129 - nikomatsakis:issue-51172-tweak-test, r=pnkfelix
remove `let x = baz` which was obscuring the real error

fixes #51172
2018-08-30 20:15:26 +02:00
Pietro Albini
2531d43f19
Rollup merge of #53113 - kpp:more_docs_for_cow, r=GuillaumeGomez
Add example for Cow

Add one more example that shows how to keep `Cow` in a struct.

Link to playground: https://play.rust-lang.org/?gist=a9256bdd034b44bc3cdd0044bbcdbb7c&version=stable&mode=debug&edition=2015

Users ask this question in [ruRust](https://gitter.im/ruRust/general) chat time to time and it is not obvious to add `ToOwned<Owned=Target>` to requirements of generic params.
2018-08-30 20:15:25 +02:00
Pietro Albini
b7e74a5614
Rollup merge of #51760 - GuillaumeGomez:add-another-partialeq-example, r=QuietMisdreavus
Add another PartialEq example

r? @steveklabnik
2018-08-30 20:15:23 +02:00