123408 Commits

Author SHA1 Message Date
bors
fa4a737fba Auto merge of #5790 - flip1995:rustup, r=flip1995
Rustup

r? @ghost

changelog: none
2020-07-13 13:53:11 +00:00
wangtheo
8df79fcc76
Remove trailing whitespace 2020-07-13 09:44:48 -04:00
Martin Sirringhaus
92e010e4a1 Move all code-snippets to /tmp/ as basedir 2020-07-13 15:42:59 +02:00
Martin Sirringhaus
e1106ca61b Fix typo 2020-07-13 15:36:39 +02:00
Martin Sirringhaus
304f00816d Update cross-compilation README 2020-07-13 15:30:48 +02:00
Pankaj Chaudhary
bc2b37aad7 Merge branch 'master' into E0688 2020-07-13 14:57:22 +05:30
PankajChaudhary5
e3ae4c7345 Added proper explanation of ErrorCode-E0688 2020-07-13 14:05:48 +05:30
Teddy_Wang
eac809244e Removed trailing whitespace 2020-07-13 01:52:10 -04:00
Teddy_Wang
5ff7e1ad2c Added ui tests for volatile and nearby intrinsics 2020-07-13 00:47:09 -04:00
Teddy_Wang
9a3a31a153 Added tests for volatile and nearbyint intrinsics 2020-07-12 22:38:37 -04:00
Adrian Cruceru
ed587f83cf Update llvm-project to latest origin/rustc/10.0-2020-05-05 commit which includes LVI segfault fix 2020-07-12 18:49:14 +00:00
Jarek Samic
8c45cf8e60 Add Ayu theme to rustdoc 2020-07-12 14:48:13 -04:00
Jarek Samic
0e89f50f6e Clean up handling of style files in rustdoc
Disable all themes other than `light.css` to prevent rule conflicts
2020-07-12 14:37:22 -04:00
Jake Goulding
9741fbd202 Don't allow DESTDIR to influence LLVM builds
When running a command like `DESTDIR=foo x.py install` in a completely
clean build directory, this will cause LLVM to be installed into
`DESTDIR`, which then causes the build to fail later when it attempts
to *use* those LLVM files.
2020-07-12 14:34:33 -04:00
Erin Power
ffac887908 Update RELEASES.md for 1.45.0 2020-07-12 14:06:53 -04:00
Esteban Küber
5daedea3db Detect tuple struct incorrectly used as struct pat 2020-07-12 10:34:48 -07:00
David Wood
083c2f6ceb
pprust: support multiline comments within lines
This commit adds support to rustc_ast_pretty for multiline comments that
start and end within a line of source code.

Signed-off-by: David Wood <david@davidtw.co>
2020-07-12 18:22:09 +01:00
Lzu Tao
879afd5116 process_unix: prefer i32::*_be_bytes over manually shifting bytes 2020-07-12 16:47:15 +00:00
David Wood
5afbc5201c
typeck: report placeholder type error w/out span
This commit fixes a regression introduced in rust-lang/rust#70369 which
meant that an error was not being emitted for invalid placeholder types
when there wasn't a span available.

Signed-off-by: David Wood <david@davidtw.co>
2020-07-12 16:40:22 +01:00
Lzu Tao
e31898b024 Reduce unsafe scope 2020-07-12 14:51:04 +00:00
Lzu Tao
0281a05f66 Prefer empty OsStr over unsafe cast from [u8] 2020-07-12 14:51:04 +00:00
Lzu Tao
b1d6798899 Rewrite parse_two_comps 2020-07-12 14:51:04 +00:00
Lzu Tao
27a966a149 Make use of slice::strip_prefix and slice pattern 2020-07-12 14:51:04 +00:00
Lzu Tao
90a7d2470a Make is_valid_drive_letter function 2020-07-12 14:51:04 +00:00
Lzu Tao
0ff820cb62 Move constants to top file 2020-07-12 14:51:04 +00:00
Lzu Tao
1e05e09fe9 Remove the useless indentation 2020-07-12 14:51:04 +00:00
Ralf Jung
ff5e1078fc assign tracking issue 2020-07-12 12:48:43 +02:00
Ralf Jung
7dc388654d adjust remaining targets 2020-07-12 11:46:42 +02:00
Ralf Jung
8082fb988a rename fast_thread_local -> thread_local_dtor; thread_local -> thread_local_key 2020-07-12 11:46:42 +02:00
Lzu Tao
9a8b516de0 Sorting feature attributes in std 2020-07-12 09:40:12 +00:00
bors
9d09331e00 Auto merge of #74245 - Manishearth:rollup-r0xq9dn, r=Manishearth
Rollup of 10 pull requests

Successful merges:

 - #72920 (Stabilize `transmute` in constants and statics but not const fn)
 - #73715 (debuginfo:  Mangle tuples to be natvis friendly, typedef basic types)
 - #74066 (Optimize is_ascii for str and [u8].)
 - #74116 (Fix cross compilation of LLVM to aarch64 Windows targets)
 - #74167 (linker: illumos ld does not support --eh-frame-hdr)
 - #74168 (Add a help to use `in_band_lifetimes` in nightly)
 - #74197 (Reword incorrect `self` token suggestion)
 - #74213 (Minor refactor for rustc_resolve diagnostics match)
 - #74240 (Fix #74081 and add the test case from #74236)
 - #74241 (update miri)

Failed merges:

r? @ghost
2020-07-12 08:57:10 +00:00
Matthias Krüger
2c5f8ab582 fix phrase in new_lint issue template 2020-07-11 23:42:56 +02:00
Alex Gaynor
905b5ad80a
don't mark linux kernel module targets as a unix environment 2020-07-11 17:20:33 -04:00
Manish Goregaokar
c8c4fd7cb1 Correctly sort const_fn_transmute 2020-07-11 08:55:05 -07:00
Manish Goregaokar
95c5fb850e
Rollup merge of #74241 - RalfJung:miri, r=RalfJung
update miri

This incorporates https://github.com/rust-lang/miri/pull/1474. [Last time](https://github.com/rust-lang/rust/pull/74146) that change caused trouble but I fixed xargo since then and [now it should work](https://github.com/rust-lang/rust/pull/74146#issuecomment-657051446).

Cc @rust-lang/miri r? @ghost
2020-07-11 08:53:29 -07:00
Manish Goregaokar
aa04ffb61a
Rollup merge of #74240 - da-x:fix-74081, r=Manishearth
Fix #74081 and add the test case from #74236
2020-07-11 08:53:27 -07:00
Manish Goregaokar
6204a73efa
Rollup merge of #74213 - pickfire:patch-1, r=jonas-schievink
Minor refactor for rustc_resolve diagnostics match

Use `matches!` instead of old `if let`
2020-07-11 08:53:25 -07:00
Manish Goregaokar
e15fa4537c
Rollup merge of #74197 - estebank:self-sugg, r=petrochenkov
Reword incorrect `self` token suggestion
2020-07-11 08:53:23 -07:00
Manish Goregaokar
9f7b64eecb
Rollup merge of #74168 - JohnTitor:help-for-in-band-lifetimes, r=petrochenkov
Add a help to use `in_band_lifetimes` in nightly

Fixes #73775
2020-07-11 08:53:21 -07:00
Manish Goregaokar
8f8ff1505f
Rollup merge of #74167 - jclulow:illumos-linker-eh-frame-hdr-fix, r=petrochenkov
linker: illumos ld does not support --eh-frame-hdr

As of rust-lang/rust#73564, the --eh-frame-hdr flag is unconditionally
passed to linkers on many platforms.  The illumos link editor does not
currently support this flag.

The linker machinery in the Rust toolchain currently seems to use the
(potentially cross-compiled) target to choose linker flags, rather than
looking at what might be running on the build system.  Disabling the
flag for all illumos/Solaris targets seems like the best we can do for
now without more serious surgery.
2020-07-11 08:53:19 -07:00
Manish Goregaokar
9614238314
Rollup merge of #74116 - arlosi:aarch64build, r=pietroalbini
Fix cross compilation of LLVM to aarch64 Windows targets

When cross-compiling, the LLVM build system recurses to build tools that need to run on the host system. However, since we pass cmake defines to set the compiler and target, LLVM still compiles these tools for the target system, rather than the host. The tools then fail to execute during the LLVM build.

This change sets defines for the tools that need to run on the host (llvm-nm, llvm-tablegen, and llvm-config), so that the LLVM build does not attempt to build them, and instead relies on the tools already built.

If compiling with clang-cl, adds the `--target` option to specify the target triple. MSVC compilers do not require this, since there is a separate compiler binary for each cross-compilation target.

Related issue: #72881
Requires LLVM change: rust-lang/llvm-project#67
2020-07-11 08:53:18 -07:00
Manish Goregaokar
1979fa86f9
Rollup merge of #74066 - thomcc:optimize-is-ascii, r=nagisa
Optimize is_ascii for str and [u8].

This optimizes the `is_ascii` function for `[u8]` and `str`. I've been surprised this wasn't done for a while, so I just did it.

Benchmarks comparing before/after look like:

```
test ascii::long_readonly::is_ascii_slice_iter_all              ... bench:         174 ns/iter (+/- 79) = 40172 MB/s
test ascii::long_readonly::is_ascii_slice_libcore               ... bench:          16 ns/iter (+/- 5) = 436875 MB/s
test ascii::medium_readonly::is_ascii_slice_iter_all            ... bench:          12 ns/iter (+/- 3) = 2666 MB/s
test ascii::medium_readonly::is_ascii_slice_libcore             ... bench:           2 ns/iter (+/- 0) = 16000 MB/s
test ascii::short_readonly::is_ascii_slice_iter_all             ... bench:           3 ns/iter (+/- 0) = 2333 MB/s
test ascii::short_readonly::is_ascii_slice_libcore              ... bench:           4 ns/iter (+/- 0) = 1750 MB/s
```

(Taken on a x86_64 macbook 2.9 GHz Intel Core i9 with 6 cores)

Where `is_ascii_slice_iter_all` is the old version, and `is_ascii_slice_libcore` is the new.

I tried to document the code well, so hopefully it's understandable. It has fairly exhaustive tests ensuring size/align doesn't get violated -- because `miri` doesn't really help a lot for this sort of code right now, I tried to `debug_assert` all the safety invariants I'm depending on. (Of course, none of them are required for correctness or soundness -- just allows us to test that this sort of pointer manipulation is sound and such).

Anyway, thanks. Let me know if you have questions/desired changes.
2020-07-11 08:53:16 -07:00
Manish Goregaokar
084ac77cf2
Rollup merge of #73715 - MaulingMonkey:pr-natvis-tuples, r=Amanieu
debuginfo:  Mangle tuples to be natvis friendly, typedef basic types

These changes are meant to unblock rust-lang/rust#70052 "Update hashbrown to 0.8.0" by allowing the use of `tuple<u64, u64>` as a .natvis expression in MSVC style debuggers (MSVC, WinDbg, CDB, etc.)

* f8eb81b does the actual mangling of `(u64, u64)` -> `tuple<u64, 64>`
* 24a728a allows `u64` to resolve (fixing `$T1` / `$T2` when used to visualize `HashMap<u64, u64, ...>`)
2020-07-11 08:53:13 -07:00
Manish Goregaokar
b57ceb45b0 Rollup merge of #72920 - oli-obk:const_transmute, r=RalfJung
Stabilize `transmute` in constants and statics but not const fn

cc #53605 (leaving issue open so we can add `transmute` to `const fn` later)

Previous attempt: #64011

r? @RalfJung

cc @rust-lang/wg-const-eval
2020-07-11 08:53:06 -07:00
Manish Goregaokar
90f1d724c8
Rollup merge of #72920 - oli-obk:const_transmute, r=RalfJung
Stabilize `transmute` in constants and statics but not const fn

cc #53605 (leaving issue open so we can add `transmute` to `const fn` later)

Previous attempt: #64011

r? @RalfJung

cc @rust-lang/wg-const-eval
2020-07-11 08:53:06 -07:00
Guillaume Gomez
4728438344
Improve wording 2020-07-11 17:34:11 +02:00
Andy Russell
0979545330
rustdoc: insert newlines between attributes 2020-07-11 11:33:37 -04:00
Dan Aloni
f5de23b5c1 Add the test case mentioned in #74236 2020-07-11 14:53:04 +03:00
Matthias Krüger
1b3bc16533 Fix out of bounds access by checking length equality BEFORE accessing by index.
Fixes #5780
2020-07-11 12:30:18 +02:00
msizanoen1
933ba82266 RISC-V GNU/Linux as host platform 2020-07-11 17:30:02 +07:00