Commit Graph

106964 Commits

Author SHA1 Message Date
jumbatm
0634a50073 Also check for "use fully-qualified syntax". 2020-02-11 19:47:40 +10:00
jumbatm
0df1ca3033 Box decorate to avoid code bloat. 2020-02-11 19:47:40 +10:00
jumbatm
7c58ffe874 Invert control in struct_lint_level.
Caller now passes in a `decorate` function, which is only run if the
lint is allowed.
2020-02-11 19:47:40 +10:00
Andrea Canciani
4e7aeaf1b5 Improve char::is_ascii_* code
These methods explicitly check if a char is in a specific ASCII range,
therefore the `is_ascii()` check is not needed, but LLVM seems to be
unable to remove it.

WARNING: this change improves the performance on ASCII `char`s, but
complex checks such as `is_ascii_punctuation` become slower on
non-ASCII `char`s.
2020-02-11 10:22:47 +01:00
Victor Ding
a47fdb99c0 Support linking from a .rlink file
Flag `-Z no-link` was previously introduced, which allows creating
an `.rlink` file to perform compilation without linking.
This change enables linking from an `.rlink` file.
2020-02-11 20:19:28 +11:00
Mazdak Farrokhzad
ebbaf4611a simplify_try: address some of eddyb's comments 2020-02-11 10:14:50 +01:00
Marc-Antoine Perennou
1bba9cfb90 rustbuild: include channel in sanitizers installed name
Allows parallel install of different rust channels

Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
2020-02-11 09:40:58 +01:00
Nicholas Nethercote
ad7802f9d4 Micro-optimize the heck out of LEB128 reading and writing.
This commit makes the following writing improvements:
- Removes the unnecessary `write_to_vec` function.
- Reduces the number of conditions per loop from 2 to 1.
- Avoids a mask and a shift on the final byte.

And the following reading improvements:
- Removes an unnecessary type annotation.
- Fixes a dangerous unchecked slice access. Imagine a slice `[0x80]` --
  the current code will read past the end of the slice some number of
  bytes. The bounds check at the end will subsequently trigger, unless
  something bad (like a crash) happens first. The cost of doing bounds
  check in the loop body is negligible.
- Avoids a mask on the final byte.

And the following improvements for both reading and writing:
- Changes `for` to `loop` for the loops, avoiding an unnecessary
  condition on each iteration. This also removes the need for
  `leb128_size`.

All of these changes give significant perf wins, up to 5%.
2020-02-11 19:07:43 +11:00
bors
b6690a8c35 Auto merge of #68961 - eddyb:dbg-stack-dunk, r=nagisa
rustc_codegen_ssa: only "spill" SSA-like values to the stack for debuginfo.

This is an implementation of the idea described in https://github.com/rust-lang/rust/issues/68817#issuecomment-583719182.

In short, instead of debuginfo forcing otherwise-SSA-like MIR locals into `alloca`s, and requiring a `load` for each use (or two, for scalar pairs), the `alloca` is now *only* used for attaching debuginfo with `llvm.dbg.declare`: the `OperandRef` is stored to the `alloca`, but *never loaded* from it.

Outside of `debug_introduce_local`, nothing cares about the debuginfo-only `alloca`, and instead works with `OperandRef` the same as MIR locals without debuginfo before this PR.

This should have some of the benefits of `llvm.dbg.value`, while working today.

cc @nagisa @nikomatsakis
2020-02-11 07:36:59 +00:00
Jane Lusby
c8817aa521 backwards again, god damnit 2020-02-10 21:54:27 -08:00
Jane Lusby
6797bfd203 rule over the code in libstd with an iron fist 2020-02-10 21:38:59 -08:00
Jane Lusby
7064a0ec59 maximum alternative consistency! 2020-02-10 21:07:36 -08:00
Aaron Hill
34cf0b3267
Only use the parent if it's an opaque type 2020-02-10 23:41:16 -05:00
Eric Huss
6575abcb36 Don't rustfmt the vendor directory. 2020-02-10 19:08:24 -08:00
ImgBotApp
c18476e231
[ImgBot] Optimize images
*Total -- 10.65kb -> 8.44kb (20.82%)

/src/etc/installer/gfx/rust-logo.png -- 5.71kb -> 3.82kb (33.11%)
/src/librustdoc/html/static/down-arrow.svg -- 0.63kb -> 0.50kb (20.44%)
/src/librustdoc/html/static/wheel.svg -- 3.86kb -> 3.68kb (4.66%)
/src/librustdoc/html/static/brush.svg -- 0.47kb -> 0.44kb (4.61%)

Signed-off-by: ImgBotApp <ImgBotHelp@gmail.com>
2020-02-11 03:01:20 +00:00
bors
dc4242d905 Auto merge of #68929 - matprec:consistent-issue-references, r=Dylan-DPC
Make issue references consistent

Fixes https://github.com/rust-lang/rust/issues/62976

cc https://github.com/rust-lang/rust/pull/63008

r? @varkor because you reviewed the original pr
2020-02-11 02:00:27 +00:00
Jane Lusby
192b103917 make symbol printing consistent with backtrace_rs 2020-02-10 17:45:58 -08:00
Jane Lusby
de25048a23 add nice alt fmt for debug 2020-02-10 17:42:04 -08:00
Jane Lusby
230ed3ea75 use debug_map and skip empty frames 2020-02-10 17:28:04 -08:00
Jane Lusby
70c9133014 remove Some from fn name 2020-02-10 15:48:09 -08:00
Jane Lusby
87117783fb final format cleanups 2020-02-10 15:39:32 -08:00
Jane Lusby
583dd2c3ee make it compile 2020-02-10 15:18:29 -08:00
Jonas Schievink
f66793757f Don't run coherence twice for future-compat lints 2020-02-11 00:17:47 +01:00
Jane Lusby
76e6d6fe11 remove unnecessary Debug impl for BacktraceFrame 2020-02-10 15:17:40 -08:00
Jane Lusby
0d5444ffa6 remove unnecessary derives 2020-02-10 15:16:24 -08:00
Jane Lusby
c0ba79eefd less noisy format 2020-02-10 15:15:13 -08:00
bors
0f0cdf6acd Auto merge of #69030 - Dylan-DPC:rollup-t9uk7vc, r=Dylan-DPC
Rollup of 6 pull requests

Successful merges:

 - #68897 (clean up E0275 explanation)
 - #68908 (Add long error code explanation message for E0637 )
 - #68932 (self-profile: Support arguments for generic_activities.)
 - #68986 (Make ASCII ctype functions unstably const )
 - #69007 (Clean up E0283 explanation)
 - #69014 (change an instance of span_bug() to struct_span_err() to avoid ICE)

Failed merges:

r? @ghost
2020-02-10 22:46:29 +00:00
Jane Lusby
49204563e1 Get vaguely working with a test for checking output 2020-02-10 14:28:32 -08:00
Jane Lusby
b637c0e84a Add initial debug fmt for Backtrace 2020-02-10 14:28:31 -08:00
Jane Lusby
4cf0365b19 Bump version to backtrace without the header 2020-02-10 14:20:21 -08:00
Esteban Küber
9d91489526 review comment: wording 2020-02-10 13:58:36 -08:00
Ralf Jung
c561d23a61 remove outdated comment 2020-02-10 22:58:31 +01:00
Dylan MacKenzie
ce3f37b42b Use new dataflow interface for initialization/borrows analyses 2020-02-10 13:03:08 -08:00
Dylan MacKenzie
702096da17 Implement a find_descendant method for MovePath 2020-02-10 13:03:08 -08:00
Dylan MacKenzie
c64dfd76e8 Add a Visitor for dataflow results 2020-02-10 13:03:08 -08:00
Dylan MacKenzie
1ec99179c1 Add an into_engine method to Analysis
This makes it more ergonomic to create a dataflow engine and obviates
the need to pick between `new_gen_kill` and `new_generic`.
2020-02-10 13:03:08 -08:00
Dylan MacKenzie
e2b9d6ebd6 Add a contains method to ResultsCursor 2020-02-10 13:03:08 -08:00
Matthias Krüger
451d4925f7 submodules: update cargo from 9d32b7b01 to 3c53211c3
Changes:
````
Update jobserver.
Update tar.
Emit report on error with Ztimings.
Do not run `formats_source` if `rustfmt` is not available
Fix rebuild_sub_package_then_while_package on HFS.
Remove likely brittle test.
Install rustfmt for testing in CI
Fix build-std collisions.
Fix BuildScriptOutput when a build script is run multiple times.
Fix required-features using renamed dependencies.
Fix using global options before an alias.
Update changelog for 1.42.
Bump to 0.44.0.
Log rustfmt output if it fails; also do not check that rustfmt exists
Update pretty_env_logger requirement from 0.3 to 0.4
Swap std::sync::mpsc channel with crossbeam_channel
Fix tests on Linux/MacOS
Fix typo.
Add tests
Deduplicate warnings about missing rustfmt
Log entry 2: first implementation
Refactor code
Stabilize config-profile.
Log entry 1
Format code
Remove tempdir after install
Keep existing package with git install
Use non-ephemeral workspace
Test that git install reads virtual manifest
Fix failing test
Search for root manifest with ephemeral workspaces
Support out-dir in build section of Cargo configuration file
````
2020-02-10 21:12:16 +01:00
Jethro Beekman
71b9ed4a36 Avoid jumping to Rust code with user %rsp (reentry_panic) 2020-02-10 21:00:22 +01:00
Raoul Strackx
236ab6e6d6 sanitize MXCSR/FPU control registers 2020-02-10 20:57:30 +01:00
Raoul Strackx
aeedc9dea9 Corrected ac_mitigation patch. That patch used the untrusted stack to clear rflags during enclave (re-)entry 2020-02-10 20:57:25 +01:00
Jethro Beekman
1b12232b8f Fix SGX RWLock representation for UnsafeCell niche fix 2020-02-10 14:44:12 -05:00
Felix S. Klock II
3e047229ef Add repr(no_niche) to UnsafeCell. Fix #68303. 2020-02-10 14:44:12 -05:00
Felix S. Klock II
35e3b4d1d8 tests for #[repr(no_niche)]. 2020-02-10 14:44:12 -05:00
Felix S. Klock II
88747ffe63 Add #[repr(no_niche)].
This repr-hint makes a struct/enum hide any niche within from its
surrounding type-construction context.

It is meant (at least initially) as an implementation detail for
resolving issue 68303. We will not stabilize the repr-hint unless
someone finds motivation for doing so.

(So, declaration of `no_niche` feature lives in section of file
where other internal implementation details are grouped, and
deliberately leaves out the tracking issue number.)

incorporated review feedback, and fixed post-rebase.
2020-02-10 14:44:12 -05:00
Andrew Paverd
87df124ba7 Enable Control Flow Guard in rustbuild 2020-02-10 19:26:25 +00:00
Chris Simpkins
53b16fb5f2 add main function to issue-69017 test 2020-02-10 13:47:52 -05:00
Tim Diekmann
97d1f8d9bb Add missing _zeroed varants to AllocRef 2020-02-10 19:44:29 +01:00
Tim Diekmann
25de80ad23 Remove common usage pattern from AllocRef 2020-02-10 18:38:09 +01:00
Vadim Petrochenkov
8d799218ab parser: Remove Parser::prev_token_kind 2020-02-10 20:29:37 +03:00