Commit graph

98487 commits

Author SHA1 Message Date
topecongiro
8e10725317
Update rustfmt to 1.4.6 2019-08-28 22:37:41 +09:00
flip1995
bc91706a84
Update Clippy 2019-08-28 13:55:01 +02:00
flip1995
8cf392114d
Notify me (flip1995) when Clippy toolstate changes 2019-08-28 13:25:45 +02:00
Wesley Wiser
009cce88eb Extract Decoder::entry_unless_proc_macro() 2019-08-28 07:00:27 -04:00
Wesley Wiser
30b29ab0f7 Simplify maybe_get_optimized_mir and maybe_get_promoted_mir
Since both functions are always unwrapped, don't wrap the return value
in an `Option`.
2019-08-28 07:00:27 -04:00
Wesley Wiser
cca64e7339 Add some comments to mir::Static and mir::StaticKind 2019-08-28 07:00:26 -04:00
Guillaume Gomez
06228d33ca Save crate filtering on rustdoc 2019-08-28 11:56:21 +02:00
Eduard-Mihai Burtescu
0006216c9d rustc_apfloat: make the crate #![no_std] explicitly. 2019-08-28 11:24:04 +03:00
bors
ac21131f78 Auto merge of #63820 - oli-obk:eager_const_eval, r=nikomatsakis
Simplify eager normalization of constants

r? @nikomatsakis
2019-08-28 07:29:07 +00:00
bors
bbd48e6f16 Auto merge of #63127 - kper:pr, r=nikomatsakis
Cleanup: Consistently use `Param` instead of `Arg` #62426

Fixes #62426
2019-08-28 03:42:00 +00:00
Andreas Molzer
85d6b7b9d3 Address naming and comments from reviews 2019-08-28 03:58:42 +02:00
Logan Wendholt
42bd6fa22b Prevent syntax error in ld linker version script 2019-08-27 20:37:26 -04:00
Tshepang Lekhonkhobe
6f67bbc445 or-pattern: fix typo in error message 2019-08-28 02:23:58 +02:00
bors
b7178cbc0c Auto merge of #63960 - ehuss:update-cargo, r=alexcrichton
Update cargo

Update cargo

10 commits in 3f700ec43ce72305eb5315cfc710681f3469d4b4..22f7dd0495cd72ce2082d318d5a9b4dccb9c5b8c
2019-08-19 22:43:12 +0000 to 2019-08-27 16:10:51 +0000
- Update and improve zsh completion (rust-lang/cargo#7296)
- Document that `package` can be used in `[patch]` (rust-lang/cargo#7263)
- Fix `error:`/`warning:` coloring inconsistency with rustc (rust-lang/cargo#7294)
- Tests: Import rustc_plugin from its new location (rust-lang/cargo#7287)
- Update README azure badge. (rust-lang/cargo#7293)
- Update home dependencies to v0.5 (rust-lang/cargo#7277)
- Fix typo (rust-lang/cargo#7279)
- Update libgit2 dependencies (rust-lang/cargo#7275)
- Fix old lockfile encoding wrt newlines (rust-lang/cargo#7262)
- Fix dSYM uplifting when symlink is broken (rust-lang/cargo#7268)
2019-08-27 23:57:05 +00:00
Yuki Okushi
ede7a777c0 Remove sized spans 2019-08-28 07:32:25 +09:00
Yuki Okushi
8c921beebb Apply review comments 2019-08-28 07:11:12 +09:00
Yuki Okushi
82f2b37635 Add Option<Span> to require_lang_item 2019-08-28 07:11:12 +09:00
Baoshan
cce631a5a4
Merge pull request #9 from Wind-River/V7LIBC-948
remove the reference to __cxa_thread_atexit_impl
2019-08-27 15:06:16 -07:00
Matthew Jasper
3d718037dc Add default serialization for Idents
Add tests for -Zast-json and -Zast-json-noexpand, which need this impl.
2019-08-27 23:02:22 +01:00
Mazdak Farrokhzad
42e895d4d9 Improve 'mut ' diagnostic. 2019-08-27 23:44:44 +02:00
Eric Huss
85a4d6f522 Update cargo 2019-08-27 14:03:32 -07:00
Alex Crichton
1a4330d2a2 rustc: Handle modules in "fat" LTO more robustly
When performing a "fat" LTO the compiler has a whole mess of codegen
units that it links together. To do this it needs to select one module
as a "base" module and then link everything else into this module.
Previously LTO passes assume that there's at least one module in-memory
to link into, but nowadays that's not always true! With incremental
compilation modules may actually largely be cached and it may be
possible that there's no in-memory modules to work with.

This commit updates the logic of the LTO backend to handle modules a bit
more uniformly during a fat LTO. This commit immediately splits them
into two lists, one serialized and one in-memory. The in-memory list is
then searched for the largest module and failing that we simply
deserialize the first serialized module and link into that. This
refactoring avoids juggling three lists, two of which are serialized
modules and one of which is half serialized and half in-memory.

Closes #63349
2019-08-27 13:51:14 -07:00
Ralf Jung
7677d1f771 const_prop: only call error_to_const_error if we are actually showing something 2019-08-27 22:18:25 +02:00
Mazdak Farrokhzad
dbbe3363c9 Ensure 'let mut ;' where ':pat' is banned. 2019-08-27 19:51:21 +02:00
Baoshan Pang
3b2c14736d remove the reference to __cxa_thread_atexit_impl 2019-08-27 10:13:59 -07:00
Charles Lew
c9bf5c0bff bootstrap: allow specifying mirror for bootstrap compiler download. 2019-08-28 00:47:12 +08:00
bors
53df91a9b2 Auto merge of #63922 - RalfJung:miri, r=nikomatsakis
update miri

Cc @oli-obk

Fixes https://github.com/rust-lang/rust/issues/63843
2019-08-27 16:23:59 +00:00
Yuki Okushi
661141f808 Fix build src/libtest 2019-08-28 00:32:21 +09:00
Kevin Per
97319b2b95 Changing error messages and renaming tests #63127
`async-await/no-args-non-move-async-closure`
`generator/no-arguments-on-generators`
2019-08-27 17:31:57 +02:00
Marc-Antoine Perennou
935c1c8607 rustbuild: allow disabling deny(warnings) for bootstrap
When deny-warnings is not specified or set to true, the behaviour is the same as before.
When deny-warnings is set to false, warnings are now allowed

Fixes #63911

Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
2019-08-27 17:26:54 +02:00
Ralf Jung
98ad4ac250 update miri 2019-08-27 15:49:47 +02:00
bors
0396aace27 Auto merge of #63639 - Mark-Simulacrum:rustdoc-clean-3, r=GuillaumeGomez
rustdoc: general cleanup
2019-08-27 12:45:16 +00:00
Kevin Per
e0ce9f8c0a Cleanup: Consistently use Param instead of Arg #62426 2019-08-27 14:07:41 +02:00
Mazdak Farrokhzad
f908aa9e80 recover on 'mut ' and improve recovery for keywords. 2019-08-27 13:04:48 +02:00
Mazdak Farrokhzad
e49b9581ba Simplify with Symbol/Token::is_book_lit. 2019-08-27 10:21:41 +02:00
Mazdak Farrokhzad
5cc1559c60 token: refactor with is_non_raw_ident_where. 2019-08-27 10:14:07 +02:00
bors
7e0afdad28 Auto merge of #63940 - Centril:rollup-47qe9gn, r=Centril
Rollup of 4 pull requests

Successful merges:

 - #62600 (libtest: add --show-output flag to print stdout of successful tests)
 - #63698 (Fixed floating point issue with asinh function)
 - #63761 (Propagate spans and attributes from proc macro definitions)
 - #63917 (Error when generator trait is not found)

Failed merges:

r? @ghost
2019-08-27 06:18:24 +00:00
Mazdak Farrokhzad
23116baff0
Rollup merge of #63917 - lzutao:langitem_gen_63912, r=centril,cramert
Error when generator trait is not found

Closes #63912
2019-08-27 08:17:52 +02:00
Mazdak Farrokhzad
0da7098116
Rollup merge of #63761 - petrochenkov:procattrs, r=eddyb
Propagate spans and attributes from proc macro definitions

Thanks to https://github.com/rust-lang/rust/pull/63269 we now have spans and attributes from proc macro definitions available in metadata.

However, that PR didn't actually put them into use! This PR finishes that work.

Attributes `rustc_macro_transparency`, `allow_internal_unstable`, `allow_internal_unsafe`, `local_inner_macros`, `rustc_builtin_macro`, `stable`, `unstable`, `rustc_deprecated`, `deprecated` now have effect when applied to proc macro definition functions.
From those attributes only `deprecated` is both stable and supposed to be used in new code.
(`#![staged_api]` still cannot be used in proc macro crates for unrelated reasons though.)

`Span::def_site` from the proc macro API now returns the correct location of the proc macro definition.

Also, I made a mistake in https://github.com/rust-lang/rust/pull/63269#discussion_r312702919, loaded proc macros didn't actually use the resolver cache.
This PR fixes the caching issue, now proc macros go through the `Resolver::macro_map` cache as well.

(Also, the first commit turns `proc_macro::quote` into a regular built-in macro to reduce the number of places where `SyntaxExtension`s need to be manually created.)
2019-08-27 08:17:51 +02:00
Mazdak Farrokhzad
68597c7641
Rollup merge of #63698 - Phosphorus15:master, r=nagisa
Fixed floating point issue with asinh function

This should fixes #63271 , in which `asinh(-0.0)` returns `0.0` instead of `-0.0`.
according to @nagisa
>
>
> IEEE-754 (2008), section 9.2.1:
>
> > For the functions expm1, exp2m1, exp10m1, logp1, log2p1, log10p1, sin, tan, sinPi, atanPi, asin, atan, sinh, tanh, asinh, and atanh, f(+0) is +0 and f(−0) is −0 with no exception.
>
> and
>
> > sinh(±∞) and asinh(±∞) are ±∞ with no exception.

After ensuring that the function `asinh` is the only function affected (functions like `sin`, `sinh` are all based on `cmath` library or `llvm` intrinsics), and that `atanh` always gives the correct result. The only function to modify is `asinh`.
2019-08-27 08:17:49 +02:00
Mazdak Farrokhzad
6d20265a9e
Rollup merge of #62600 - emmericp:libtest-add-show-output, r=gnzlbg
libtest: add --show-output flag to print stdout of successful tests

This pull request adds a new flag `--show-output` for tests to show the output of successful tests. For most formatters this was already supported just not exposed via the CLI (apparently only used by `librustdoc`). I've also added support for this option in the JSON formatter.

This kind of fixes https://github.com/rust-lang/rust/issues/54669 which wants `--format json` to work with `--nocapture`, which is... well, impossible. What this issue really calls for is `--show-output` as implemented here.
2019-08-27 08:17:48 +02:00
Philip Craig
61ff27aa1c debuginfo: always include disambiguator in type names 2019-08-27 10:36:27 +10:00
Mark Rousskov
b0fab966fa Shorten line during rendering instead of in markdown 2019-08-26 20:30:10 -04:00
Mark Rousskov
b3f01753b0 Inline recurse into only callsite 2019-08-26 20:30:10 -04:00
Mark Rousskov
edfd5556f1 Transition a few fmt::Display impls to functions
This introduces a WithFormatter abstraction that permits one-time
fmt::Display on an arbitrary closure, created via `display_fn`. This
allows us to prevent allocation while still using functions instead of
structs, which are a bit unwieldy to thread arguments through as they
can't easily call each other (and are generally a bit opaque).

The eventual goal here is likely to move us off of the formatting
infrastructure entirely in favor of something more structured, but this
is a good step to move us in that direction as it makes, for example,
passing a context describing current state to the formatting impl much
easier.
2019-08-26 20:30:10 -04:00
bors
0444b9f66a Auto merge of #63926 - Centril:rollup-6kckn9n, r=Centril
Rollup of 6 pull requests

Successful merges:

 - #63317 (Do not complain about unused code when used in `impl` `Self` type)
 - #63693 (Fully implement or-pattern parsing)
 - #63836 (VxWorks does not provide a way to set the task name except at creation time)
 - #63845 (Removed a confusing FnOnce example)
 - #63855 (Refactor feature gates)
 - #63921 (add link to FileCheck docs)

Failed merges:

r? @ghost
2019-08-27 00:07:38 +00:00
Mark Rousskov
dafdfee33e Inline RawMutableSpace 2019-08-26 19:15:19 -04:00
Mark Rousskov
3307929a84 Store only the current depth
Previously we stored the entire current path which is a bit expensive
and only ever accessed its length. This stores the length directly.
2019-08-26 19:15:19 -04:00
Mark Rousskov
0e079c2c68 Remove support for printing HRef in alternate mode
The alternate mode merely prints out the passed in text which is largely
useless (as the text can simply be directly printed).
2019-08-26 18:52:36 -04:00
Mark Rousskov
95f5698c10 Remove dead tracking of external param names 2019-08-26 18:52:27 -04:00