Commit Graph

120181 Commits

Author SHA1 Message Date
bors
23ffeea307 Auto merge of #72058 - RalfJung:no-dist-lldb, r=Mark-Simulacrum
bootstrap: remove lldb dist packaging

The lldb-preview rustup package is missing on every single target, and has never been shipped beyond x86_64-apple-darwin. It was removed in #62592 which landed around a year ago, and there's not been demand that we re-enable it since, so we're now removing support entirely to cleanup the code a bit.

The hope is that this will also kill the useless "lldb-preview" row on https://rust-lang.github.io/rustup-components-history/.
2020-05-14 02:50:34 +00:00
Tomasz Miąsko
dab3a5813e Fix Arc::decr_strong_count doc test 2020-05-14 00:56:49 +02:00
CAD97
90b196129b Improve Step::forward/backward for optimization
The previous definition did not optimize down to a single add operation,
but this version does appear to.
2020-05-13 17:57:06 -04:00
bors
94c0ab936b Auto merge of #72118 - flip1995:clippyup, r=oli-obk
Update Clippy to 43a1777

Updates Clippy to 43a1777b89

We should establish a process on how often and when to update Clippy. (After X feature PRs? Once per week? Only on bug fixes and in the release week? ...?)

r? @oli-obk
2020-05-13 21:15:09 +00:00
Tshepang Lekhonkhobe
e44f87fca3 docs: fix link
source https://github.com/rust-lang/rust/pull/72163#issuecomment-628234966
2020-05-13 23:02:56 +02:00
Bastian Kauschke
9001a64299 add spans to require_lang_items 2020-05-13 21:38:58 +02:00
CAD97
cef616b1dc Improve comments in iter::Step 2020-05-13 15:00:18 -04:00
Tymoteusz Jankowski
617c7cd9fa Make intra links work inside trait impl block 2020-05-13 20:24:14 +02:00
Mark Rousskov
2b42a2b541 Forbid stage arguments to check
Users generally expect that check builds are fast, and that's only true in stage
0 (stages beyond that need us to build a compiler, which is slow).
2020-05-13 11:32:43 -04:00
bors
75e1463c52 Auto merge of #72013 - nnethercote:make-RawVec-grow-mostly-non-generic, r=Amanieu
Make `RawVec::grow` mostly non-generic.

`cargo-llvm-lines` shows that, in various benchmarks, `RawVec::grow` is
instantiated 10s or 100s of times and accounts for 1-8% of lines of
generated LLVM IR.

This commit moves most of `RawVec::grow` into a separate function that
isn't parameterized by `T`, which means it doesn't need to be
instantiated many times. This reduces compile time significantly.

r? @ghost
2020-05-13 14:29:56 +00:00
Faris Sufyan
6c3856f3ec
Update src/libcore/option.rs
Co-authored-by: Steve Klabnik <steve@steveklabnik.com>
2020-05-13 21:13:35 +08:00
Faris Sufyan
ef1688db8e
Update src/libcore/option.rs
Co-authored-by: Steve Klabnik <steve@steveklabnik.com>
2020-05-13 21:13:27 +08:00
Faris Sufyan
f445a8286e
Update src/libcore/option.rs
Co-authored-by: Steve Klabnik <steve@steveklabnik.com>
2020-05-13 21:13:17 +08:00
Faris Sufyan
adc2bf0cfe
Update src/libcore/option.rs
Co-authored-by: Steve Klabnik <steve@steveklabnik.com>
2020-05-13 21:13:08 +08:00
Faris Sufyan
644bb24e33
Update src/libcore/option.rs
Co-authored-by: Steve Klabnik <steve@steveklabnik.com>
2020-05-13 21:12:50 +08:00
Faris Sufyan
a9e7d57238
Update src/libcore/option.rs
Co-authored-by: Steve Klabnik <steve@steveklabnik.com>
2020-05-13 21:12:35 +08:00
Faris Sufyan
4588c26e53
Update src/libcore/option.rs
Co-authored-by: Steve Klabnik <steve@steveklabnik.com>
2020-05-13 21:05:53 +08:00
Faris Sufyan
46e9cbea3a
Update src/libcore/option.rs
Co-authored-by: Steve Klabnik <steve@steveklabnik.com>
2020-05-13 21:04:52 +08:00
Bastian Kauschke
5f93bc774b use require_lang_item over unwrap. 2020-05-13 14:47:17 +02:00
Guillaume Gomez
bb2ff593a6 Clean up E0582 explanation 2020-05-13 13:40:55 +02:00
Julian Wollersberger
43ae785454 Replace some usages of the old unescape_ functions in AST, clippy and tests. 2020-05-13 10:05:04 +02:00
Julian Wollersberger
18cc63d693 Unified validate_{byte,str,raw_str,raw_byte_str}_escape methods into one method validate_literal_escape with a mode argument.
This enables simplifying the `match` in `cook_lexer_literal()`
and it eliminates 90 lines of repetition :)
2020-05-13 09:52:01 +02:00
Julian Wollersberger
1be5d1eabb Unified unescape_{char,byte,str,byte_str,raw_str,raw_byte_str} methods into one method unescape_literal with a mode argument. 2020-05-13 09:42:30 +02:00
bors
750db09fa8 Auto merge of #71451 - estebank:suggest-super-trait-constraint, r=nikomatsakis
Suggest adding super trait constraints
2020-05-13 06:54:15 +00:00
Nicholas Nethercote
3b108588d1 Change Iterator::nth to use self.next() in a while loop.
Currently it uses `for x in self`, which seems dubious within an
iterator method. Furthermore, `self.next()` is used in all the other
iterator methods.
2020-05-13 15:48:08 +10:00
Nicholas Nethercote
5a0ac0552e Use simpler impls for some Iterator methods for slices.
The default implementations of several `Iterator` methods use `fold` or
`try_fold`, which works, but is overkill for slices and bloats the
amount of LLVM IR generated and consequently hurts compile times.

This commit adds the simple, obvious implementations for `for_each`,
`all`, `any`, `find`, `find_map`, and simplifies the existing
implementations for `position` and `rposition`. These changes reduce
compile times significantly on some benchmarks.
2020-05-13 15:47:19 +10:00
bors
a2e0b48e6e Auto merge of #70416 - mzohreva:mz/sgx-test, r=nikomatsakis
Process termination test for SGX

The issue is described in https://github.com/fortanix/rust-sgx/issues/109

cc @jethrogb
2020-05-13 03:29:00 +00:00
Nicholas Nethercote
40d4868b39 Be less aggressive with DroplessArena/TypedArena growth.
`DroplessArena` and `TypedArena` use an aggressive growth strategy: the
first chunk is 4 KiB, the second is 8 KiB, and it keeps on doubling
indefinitely. DHAT profiles show that sometimes this results in large
chunks (e.g. 16-128 MiB) that are barely filled. Although these don't
contribute to RSS, they clog up the DHAT profiles.

This commit changes things so that the doubling stops at 2 MiB. This is
large enough that chunk allocations are still rare (you might get 100s
instead of 10s of them) but avoids lots of unused space in the worst
case. It gives a slight speed-up to cycle counts in some cases.
2020-05-13 11:35:32 +10:00
Nicholas Nethercote
9111d8b66e Fix the new capacity measurement in arenas.
For the given code paths, the amount of space used in the previous chunk
is irrelevant.

(This will almost never make a difference to behaviour, but it makes the
code clearer.)
2020-05-13 11:29:16 +10:00
Jade McGough
5320bd986b add long error explanation for E0228 2020-05-12 17:09:09 -07:00
Esteban Küber
58797b01f1 review comments 2020-05-12 11:56:11 -07:00
Eric Huss
722b3df454 Update books 2020-05-12 11:27:03 -07:00
Esteban Küber
4556130e7d fix test output after rebase 2020-05-12 11:19:07 -07:00
Esteban Küber
45738e8cd1 Increase verbosity of bound restriction suggestions
- Make the bound restriction suggestion `span_suggestion_verbose`.
- Fix whitespace typo.
2020-05-12 11:19:07 -07:00
Esteban Küber
545320a22f Suggest adding super trait constraints 2020-05-12 11:19:07 -07:00
Mark Rousskov
6c415450fd Provide separate option for std debug asserts 2020-05-12 13:24:07 -04:00
Laurence Tratt
003ed802c4 Map to -> return. 2020-05-12 16:54:29 +01:00
Kornel
2d39f5abcd Warn against thread::sleep in async fn 2020-05-12 16:38:02 +01:00
Joshua Cotton
34b2072599 Fix bootstrap failing on win32 2020-05-12 10:51:44 -04:00
bors
769d12eec1 Auto merge of #72091 - RalfJung:miri, r=RalfJung
update miri

Fixes https://github.com/rust-lang/rust/issues/72037
Cc @rust-lang/miri r? @ghost
2020-05-12 13:59:16 +00:00
Wesley Wiser
5063297c79 Add doc comment for rustc_middle::mir::mono::Linkage 2020-05-12 08:12:38 -04:00
Guillaume Gomez
61fbe57f4a Clean up E0581 explanation 2020-05-12 13:36:57 +02:00
Ralf Jung
3fccdb3ded Pointer printing: do not print 0 offset 2020-05-12 13:30:50 +02:00
Oliver Scherer
0a785cdf34 Add some more sanity tests and add a debug log message for it 2020-05-12 13:23:01 +02:00
Oliver Scherer
de434d8e44 Propagate locals, even if they have unpropagatable assignments somewhere. 2020-05-12 13:14:47 +02:00
Oliver Scherer
c849a0d087 Add a repro example for not propagating constants of partially const initialized variables 2020-05-12 12:55:55 +02:00
bors
d903a9def4 Auto merge of #72134 - Dylan-DPC:rollup-h3shfz5, r=Dylan-DPC
Rollup of 5 pull requests

Successful merges:

 - #71737 (Miri: run liballoc tests with threads)
 - #71928 (Add strikethrough support to rustdoc)
 - #72048 (Visit move out of `_0` when visiting `return`)
 - #72096 (Make MIR typeck use `LocalDefId` and fix docs)
 - #72128 (strings do not have to be valid UTF-8 any more)

Failed merges:

r? @ghost
2020-05-12 10:28:08 +00:00
Dylan DPC
ceeb9bdee6
Rollup merge of #72128 - RalfJung:str-validity, r=oli-obk
strings do not have to be valid UTF-8 any more

Cc https://github.com/rust-lang/reference/pull/792
r? @oli-obk
2020-05-12 11:41:15 +02:00
Dylan DPC
31e5be027e
Rollup merge of #72096 - jonas-schievink:mirck-docs, r=matthewjasper
Make MIR typeck use `LocalDefId` and fix docs

The docs on `fn type_check` were not in sync with the arguments it takes.

r? @matthewjasper
2020-05-12 11:41:13 +02:00
Dylan DPC
0f9563091f
Rollup merge of #72048 - jonas-schievink:visit-return, r=oli-obk
Visit move out of `_0` when visiting `return`

Closes https://github.com/rust-lang/rust/issues/72032
2020-05-12 11:41:12 +02:00