Commit Graph

86574 Commits

Author SHA1 Message Date
Simon Sapin
8a5bbd9a4e Add tracking issue for unfold and successors 2018-11-20 18:22:40 +01:00
Simon Sapin
641c4909e4 Add std::iter::successors 2018-11-20 18:22:40 +01:00
Simon Sapin
22228186c0 Copy is best avoided on iterators 2018-11-20 18:22:40 +01:00
Simon Sapin
544ad37753 Unfold<St, F>: Debug without F: Debug 2018-11-20 18:22:40 +01:00
Simon Sapin
48aae09e9f Add std::iter::unfold 2018-11-20 18:22:40 +01:00
bjorn3
9ce7b11e7c
Remove incorrect doc comment in rustc_mir::monomorphize::item 2018-11-20 17:32:46 +01:00
bjorn3
8a0909df79
Remove incorrect doc comment 2018-11-20 17:30:29 +01:00
Ralf Jung
6befe6784f treat generator fields like unions 2018-11-20 16:19:43 +01:00
bors
3991bfbbc2 Auto merge of #55663 - varkor:must_use-traits, r=estebank
Allow #[must_use] on traits

Addresses https://github.com/rust-lang/rust/issues/55506, but we'll probably want to add it to some library traits like `Iterator` before the issue is considered fixed. Fixes https://github.com/rust-lang/rust/issues/51560.

`#[must_use]` is already permitted on traits, with no effect, so this seems like a bug fix, but I might be overlooking something. This currently warns for `impl Trait` or `dyn Trait` when the `Trait` is `#[must_use]` (although I don't think the latter is currently possible, so it's simply future-proofed).
2018-11-20 15:15:53 +00:00
Ralf Jung
7f1077700c fix comment 2018-11-20 15:55:23 +01:00
Corey Farwell
033cbfec4d Incorporate dyn into more comments and docs. 2018-11-20 09:35:03 -05:00
Ralf Jung
6eeedbcd70 generator fields are not necessarily initialized 2018-11-20 15:22:43 +01:00
Axary
88d60941da improve error note 2018-11-20 14:43:16 +01:00
Olivier Goffart
4c21f66c1d Add comments and rename a local variable 2018-11-20 13:24:41 +01:00
bors
15e6613281 Auto merge of #55678 - Aaronepower:master, r=Mark-Simulacrum
Updated RELEASES.md for 1.31.0

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

r? @Mark-Simulacrum

cc @rust-lang/release
2018-11-20 12:09:36 +00:00
Oliver Scherer
37fcd5cad5 Grammar nit 2018-11-20 12:29:05 +01:00
Oliver Scherer
3e081c7e82 Trailing newline 2018-11-20 12:28:24 +01:00
Oliver Scherer
7d96f2c481 Document qualify_consts more 2018-11-20 12:25:44 +01:00
Olivier Goffart
86d41350c7 Fix invalid bitcast taking bool out of a union represented as a scalar
As reported in https://github.com/rust-lang/rust/pull/54668#issuecomment-440186476
2018-11-20 12:20:05 +01:00
Oliver Scherer
f70abe8d07 Add sanity test for promotion and const_let 2018-11-20 11:33:46 +01:00
Oliver Scherer
6bcb0d6152 Explain missing error in test 2018-11-20 11:33:27 +01:00
Oliver Scherer
f98235ed9d Document runtime static mutation checks 2018-11-20 11:11:09 +01:00
Aaron Power
9240ad4571
Update releases to add rename dependencies feature 2018-11-20 10:47:28 +01:00
bors
7a0cef74a8 Auto merge of #56081 - alexcrichton:update-manifest, r=nrc
Add temporary renames to manifests for rustfmt/clippy

This will be part of our strategy for shipping renamed versions of these
components for the Rust 2018 edition.

Closes #55967
2018-11-20 09:08:24 +00:00
Wesley Wiser
c7dc868ed7 Fix json output in the self-profiler
Fix missing ',' array element separators and convert NaN's to 0.
2018-11-19 23:26:00 -05:00
bors
046e054a99 Auto merge of #55983 - oli-obk:static_, r=Mark-Simulacrum
Fix stability hole with `static _`

The `underscore_const_names` only gated const items with `_` as the name.

`static _: () = ();` works on beta without feature gates right now, this PR fixes that.
2018-11-20 03:05:11 +00:00
bors
31fa30145e Auto merge of #56049 - newpavlov:revert_51601, r=sfackler
Revert #51601

Closes: #55985

Specialization of `StepBy<Range(Inclusive)>` results in an incorrectly behaving code when `step_by` is combined with `skip` or `nth`.

If this will get merged we probably should reopen issues previously closed by #51601 (if there was any).
2018-11-20 00:02:33 +00:00
Alex Crichton
3c67ed4500 Add temporary renames to manifests for rustfmt/clippy
This will be part of our strategy for shipping renamed versions of these
components for the Rust 2018 edition.

Closes #55967
2018-11-19 14:22:41 -08:00
Ralf Jung
612febcc4b explain why we can use raw 2018-11-19 23:02:28 +01:00
Ralf Jung
c462e44c13 we now do proper validation on scalars 2018-11-19 23:02:28 +01:00
Ralf Jung
ba82f54b04 use RawConst in miri 2018-11-19 22:42:46 +01:00
Ralf Jung
b50c1b243e Make const_eval_raw query return just an AllocId 2018-11-19 22:42:46 +01:00
Eric Huss
b8da719024 Fix error message for -C panic=xxx. 2018-11-19 13:29:35 -08:00
Alex Crichton
089a50411f Encode a custom "producers" section in wasm files
This commit implements WebAssembly/tool-conventions#65 for wasm files
produced by the Rust compiler. This adds a bit of metadata to wasm
modules to indicate that the file's language includes Rust and the
file's "processed-by" tools includes rustc.

The thinking with this section is to eventually have telemetry in
browsers tracking all this.
2018-11-19 12:09:19 -08:00
bors
5aff30734b Auto merge of #55971 - SergioBenitez:skip-non-semantic, r=alexcrichton
Ignore non-semantic tokens for 'probably_eq' streams.

Improves the situation in #43081 by skipping typically non-semantic tokens when checking for 'probably_eq'.

r? @alexcrichton
2018-11-19 19:57:02 +00:00
varkor
737dec0ec1 Fix change to predicates 2018-11-19 18:54:52 +00:00
Oliver Scherer
7d5b5ff24d Update nll stderr files 2018-11-19 19:03:03 +01:00
Jethro Beekman
a44e446551 Add override_export_symbols option to Rust target specification 2018-11-19 23:24:43 +05:30
varkor
0ab70fab19 Fix typo in #[must_use] message 2018-11-19 17:41:10 +00:00
varkor
9178eb41d3 Handle trait objects 2018-11-19 17:41:10 +00:00
varkor
122886842e Test for #[must_use] on traits 2018-11-19 17:41:10 +00:00
varkor
cb5520bc48 Recognise #[must_use] on traits, affecting impl Trait 2018-11-19 17:41:10 +00:00
varkor
b55717f9b0 Use general uninhabitedness checking 2018-11-19 17:41:10 +00:00
bors
39852cae2b Auto merge of #56060 - nrc:save-path-fallback, r=zackmdavis
save-analysis: fallback to using path id

r? @eddyb
2018-11-19 16:59:12 +00:00
Oliver Scherer
59eff14120 Also catch static mutation at evaluation time 2018-11-19 16:46:03 +01:00
Tom Tromey
30178b422a Disable some pretty-printers when gdb is rust-enabled
A rust-enabled gdb already knows how to display string slices,
structs, tuples, and enums (and after #54004, the pretty-printers
can't handle enums at all).  This patch disables these pretty-printers
when gdb is rust-enabled.

The "gdb-pretty-struct-and-enums-pre-gdb-7-7.rs" test is renamed,
because it does not seem to depend on any behavior of that version of
gdb, and because gdb 7.7 is 4 years old now.
2018-11-19 08:08:46 -07:00
bors
9e8a982a23 Auto merge of #56051 - pietroalbini:rollup, r=pietroalbini
Rollup of 25 pull requests

Successful merges:

 - #55562 (Add powerpc- and powerpc64-unknown-linux-musl targets)
 - #55564 (test/linkage-visibility: Ignore on musl targets)
 - #55827 (A few tweaks to iterations/collecting)
 - #55834 (Forward the ABI of the non-zero sized fields of an union if they have the same ABI)
 - #55857 (remove unused dependency)
 - #55862 (in which the E0618 "expected function" diagnostic gets a makeover)
 - #55867 (do not panic just because cargo failed)
 - #55894 (miri enum discriminant handling: Fix treatment of pointers, better error when it is undef)
 - #55916 (Make miri value visitor useful for mutation)
 - #55919 (core/tests/num: Simplify `test_int_from_str_overflow()` test code)
 - #55923 (reword #[test] attribute error on fn items)
 - #55949 (ty: return impl Iterator from Predicate::walk_tys)
 - #55952 (Update to Clang 7 on CI.)
 - #55953 (#53488 Refactoring UpvarId)
 - #55962 (rustdoc: properly calculate spans for intra-doc link resolution errors)
 - #55963 (Stress test for MPSC)
 - #55968 (Clean up some non-mod-rs stuff.)
 - #55970 (Miri backtrace improvements)
 - #56007 (CTFE: dynamically make sure we do not call non-const-fn)
 - #56011 (Replace data.clone() by Arc::clone(&data) in mutex doc.)
 - #56012 (avoid shared ref in UnsafeCell::get)
 - #56016 (Add VecDeque::resize_with)
 - #56027 (docs: Add missing backtick in object_safety.rs docs)
 - #56043 (remove "approx env bounds" if we already know from trait)
 - #56059 (Increase `Duration` approximate equal threshold to 1us)
2018-11-19 14:07:45 +00:00
kennytm
8cea658b90
Rollup merge of #56059 - alexcrichton:fix-tests, r=sfackler
Increase `Duration` approximate equal threshold to 1us

Previously this threshold when testing was 100ns, but the Windows
documentation states:

> which is a high resolution (<1us) time stamp

which presumably means that we could have up to 1us resolution, which
means that 100ns doesn't capture "equivalent" time intervals due to
various bits of rounding here and there.

It's hoped that this..

Closes #56034
2018-11-19 22:06:45 +08:00
Pietro Albini
10565c45ac
Rollup merge of #56043 - nikomatsakis:issue-55756-via-outlives, r=eddyb
remove "approx env bounds" if we already know from trait

Alternative to https://github.com/rust-lang/rust/pull/55988 that fixes #55756 -- smaller fix that I cannot see having (correctness) repercussions beyond the test at hand, and hence better for backporting. (Famous last words, I know.)

r? @eddyb
2018-11-19 22:06:43 +08:00
Pietro Albini
27519c175a
Rollup merge of #56027 - Xanewok:docs-backtick, r=QuietMisdreavus
docs: Add missing backtick in object_safety.rs docs

Closes #56019.

r? @bjorn3
2018-11-19 22:06:41 +08:00