Commit Graph

124849 Commits

Author SHA1 Message Date
Ivan Tham
a2d7c33aa8
Split fix into another section for E0749 2020-08-10 22:33:17 +08:00
Ivan Tham
ec23f4ed3f
Add sample fix for E0749
Even though the description is clear but the solution may not be as straightforward.
Adding a suggested fix.
2020-08-10 18:51:14 +08:00
bors
13290e83a6 Auto merge of #75204 - cuviper:freebsd11, r=Mark-Simulacrum
Upgrade the FreeBSD toolchain to version 11.4

FreeBSD 10 reached its end-of-life in October 2018, and that toolchain
caused issues in the LLVM 11 upgrade (#73526) that are resolved with the
toolchain from FreeBSD 11.

Closes #72390.
2020-08-10 05:34:53 +00:00
bors
568f6195bb Auto merge of #74410 - mati865:mingw-no-self-contained-when-cross-compiling, r=petrochenkov
MinGW: disable self-contained mode when cross compiling

When cross compiling users have to provide own linker and libraries anyway.
Using rust provided MinGW crt objects is harmful here and has no benefits.

cc https://github.com/rust-lang/rust/issues/68887
2020-08-10 02:08:35 +00:00
bors
cee62c17aa Auto merge of #75351 - JohnTitor:rollup-q9udsyx, r=JohnTitor
Rollup of 8 pull requests

Successful merges:

 - #74200 (Std panicking unsafe block in unsafe fn)
 - #75286 (Add additional case for Path starts with)
 - #75318 (Resolve `char` as a primitive even if there is a module in scope)
 - #75320 (Detect likely `for foo of bar` JS syntax)
 - #75328 (Cleanup E0749)
 - #75344 (Rename "Important traits" to "Notable traits")
 - #75348 (Move to intra-doc links in library/core/src/time.rs)
 - #75350 (Do not ICE when lowering invalid extern fn with bodies)

Failed merges:

r? @ghost
2020-08-10 00:09:45 +00:00
Yuki Okushi
5369619693
Rollup merge of #75350 - estebank:foreign-fn-with-body-ice, r=davidtwco
Do not ICE when lowering invalid extern fn with bodies

Fix #75283.
2020-08-10 09:08:03 +09:00
Yuki Okushi
64d71095c3
Rollup merge of #75348 - denisvasilik:intra-doc-links-core-time, r=jyn514
Move to intra-doc links in library/core/src/time.rs

Helps with #75080.
2020-08-10 09:08:01 +09:00
Yuki Okushi
8176240788
Rollup merge of #75344 - camelid:rename-important-to-notable-traits, r=Manishearth
Rename "Important traits" to "Notable traits"

Fixes #75245.

---

* Rename it in the UI
* Rename the CSS classes
2020-08-10 09:07:59 +09:00
Yuki Okushi
f6c41fbed7
Rollup merge of #75328 - GuillaumeGomez:cleanup-e0749, r=Dylan-DPC
Cleanup E0749

r? @pickfire
2020-08-10 09:07:57 +09:00
Yuki Okushi
d8ac403fd1
Rollup merge of #75320 - estebank:js-for-i-of-x, r=davidtwco
Detect likely `for foo of bar` JS syntax

Fix #75311.
2020-08-10 09:07:56 +09:00
Yuki Okushi
968740a3a3
Rollup merge of #75318 - jyn514:primitive, r=manishearth
Resolve `char` as a primitive even if there is a module in scope

Closes https://github.com/rust-lang/rust/issues/58699.
r? @Manishearth
2020-08-10 09:07:54 +09:00
Yuki Okushi
df2da4637f
Rollup merge of #75286 - pickfire:patch-9, r=jyn514
Add additional case for Path starts with

Show what happens if there is an extra extension
2020-08-10 09:07:52 +09:00
Yuki Okushi
62e5488198
Rollup merge of #74200 - poliorcetics:std-panicking-unsafe-block-in-unsafe-fn, r=Mark-Simulacrum
Std panicking unsafe block in unsafe fn

Partial fix of #73904.

This encloses `unsafe` operations in `unsafe fn` in `libstd/ffi/panicking.rs`.

I also made a two lines change to `libstd/thread/local.rs` to add the necessary `unsafe` block without breaking everything else.

@rustbot modify labels: F-unsafe-block-in-unsafe-fn
2020-08-10 09:07:46 +09:00
Esteban Küber
bdf426afe7 Do not ICE when lowering invalid extern fn with bodies
Fix #75283.
2020-08-09 15:14:54 -07:00
bors
f5fef3c715 Auto merge of #75345 - Aaron1011:fix/no-std-hygiene, r=petrochenkov
Remove normalization of `Span` debug output in proc-macro tests

Fixes #74800

The definition of `is_x86_feature_detected!` (and similar macros)
depends on the platform - it is produced by a `cfg_if!` invocation on
x86, and a plain `#[cfg]` on other platforms. Since it is part of the
prelude, we will end up importing different hygiene information
depending on the platform. This previously required us to avoid printing raw
`SyntaxContext` ids in any tests that uses the standard library, since
the captured output will be platform-dependent.

Previously, we replaced all `SyntaxContext` ids with "#CTXT", and the
raw `Span` lo/hi bytes with "LO..HI".

This commit adds `#![no_std]` and `extern crate std` to all proc-macro
tests that print spans. This suppresses the prelude import, while
still using lang items from `std` (which gives us a buildable binary).
With this apporach, we will only load hygiene information for things
which we explicitly import. This lets us re-add
`-Z unpretty=expanded,hygiene`, since its output can now be made stable
across all platforms.

Additionally, we use `-Z span-debug` in more places, which lets us avoid
the "LO..HI" normalization hack.
2020-08-09 22:08:02 +00:00
Denis Vasilik
9e71c13f28
Add link for Duration
Co-authored-by: Joshua Nelson <joshua@yottadb.com>
2020-08-09 23:26:42 +02:00
Denis Vasilik
ce244210b1 Remove liNone as it is in the prelude 2020-08-09 23:12:30 +02:00
bors
18f3be7704 Auto merge of #75278 - cuviper:indexmap, r=Mark-Simulacrum
Upgrade indexmap and use it more

First this upgrades `indexmap` to 1.5.1, which is now based on `hashbrown::raw::RawTable`. This means it shares a lot of the same performance characteristics for insert, lookup, etc., while keeping items in insertion order.

Then across various rustc crates, this replaces a lot of `Vec`+`HashMap` pairs with a single `IndexMap` or `IndexSet`.

Closes #60608.
r? @eddyb
2020-08-09 20:08:50 +00:00
Josh Stone
ca0b89aa04 rustc_span: note the perf loss seen from IndexSet in symbol::Interner 2020-08-09 12:41:09 -07:00
Josh Stone
1d03ffe0bc rustc_typeck: use IndexSet in InteriorVisitor 2020-08-09 12:25:22 -07:00
Josh Stone
b258817115 rustc_typeck: use IndexSet in UniquePredicates 2020-08-09 12:25:22 -07:00
Josh Stone
7d1547d300 rustc_span: use IndexSet in SpanInterner 2020-08-09 12:25:22 -07:00
Josh Stone
4efc7e92fa rustc_mir_build: use IndexMap in TestKind::SwitchInt 2020-08-09 12:25:22 -07:00
Josh Stone
c61f1c8bfa rustc_mir: use IndexSet in PlaceholderIndices 2020-08-09 12:25:22 -07:00
Josh Stone
42e7a0cb3a rustc_mir: use IndexMap in BorrowSet 2020-08-09 12:25:22 -07:00
Josh Stone
952daa20b4 rustc_middle: use IndexSet in OnDiskCache 2020-08-09 12:25:22 -07:00
Josh Stone
2fa6e44c8d rustc_metadata: use IndexSet in EncodeContext 2020-08-09 12:25:22 -07:00
Josh Stone
d3c70b8af5 rustc_data_structures: use IndexSet in TransitiveRelation 2020-08-09 12:25:21 -07:00
Josh Stone
1f71f0f2b5 rustc_codegen_llvm: use IndexSet in CoverageMapGenerator 2020-08-09 12:25:21 -07:00
Josh Stone
997a766b32 Upgrade indexmap to 1.5.1, now using hashbrown! 2020-08-09 12:25:21 -07:00
Denis Vasilik
e9e319c460 Use intra-doc links 2020-08-09 21:20:57 +02:00
Camelid
f3cc957f2e Rename "Important traits" to "Notable traits"
* Rename it in the UI
* Rename the CSS classes
2020-08-09 12:09:05 -07:00
Aaron Hill
db6b3c1ce4
Remove normalization of Span debug output in proc-macro tests
Fixes #74800

The definition of `is_x86_feature_detected!` (and similar macros)
depends on the platform - it is produced by a `cfg_if!` invocation on
x86, and a plain `#[cfg]` on other platforms. Since it is part of the
prelude, we will end up importing different hygiene information
depending on the platform. This previously required us to avoid printing raw
`SyntaxContext` ids in any tests that uses the standard library, since
the captured output will be platform-dependent.

Previously, we replaced all `SyntaxContext` ids with "#CTXT", and the
raw `Span` lo/hi bytes with "LO..HI".

This commit adds `#![no_std]` and `extern crate std` to all proc-macro
tests that print spans. This suppresses the prelude import, while
still using lang items from `std` (which gives us a buildable binary).
With this apporach, we will only load hygiene information for things
which we explicitly import. This lets us re-add
`-Z unpretty=expanded,hygiene`, since its output can now be made stable
across all platforms.

Additionally, we use `-Z span-debug` in more places, which lets us avoid
the "LO..HI" normalization hack.
2020-08-09 14:41:51 -04:00
bors
39e593ab14 Auto merge of #75137 - Aaron1011:fix/hygiene-skip-expndata, r=petrochenkov
Don't serialize ExpnData for foreign crates

When we encode an ExpnId into the crate metadata, we write out the
CrateNum of the crate that 'owns' the corresponding `ExpnData`, which
is later used to decode the `ExpnData` from its owning crate.

However, we current serialize the `ExpnData` for all `ExpnIds` that we
serialize, even if the `ExpnData` was already serialized into a foreign
crate. This commit skips encoding this kind of `ExpnData`, which should
hopefully speed up metadata encoding and reduce the total metadata size.
2020-08-09 18:19:34 +00:00
Josh Stone
29f5e5c574 Upgrade the FreeBSD toolchain to version 11.4
FreeBSD 10 reached its end-of-life in October 2018, and that toolchain
caused issues in the LLVM 11 upgrade (#73526) that are resolved with the
toolchain from FreeBSD 11.
2020-08-09 10:38:52 -07:00
Ivan Tham
4b549fa043
show multiple slashes starts_with Path example
Co-authored-by: Joshua Nelson <joshua@yottadb.com>
2020-08-10 00:43:45 +08:00
bors
543f03d241 Auto merge of #75134 - Aaron1011:feature/expn-data-parent-hash, r=petrochenkov
Hash parent ExpnData

cc https://github.com/rust-lang/rust/pull/72121#discussion_r460528326
2020-08-09 14:29:42 +00:00
Aaron Hill
ef49032297
Add comment about the lack of ExpnData serialization for proc-macro crates 2020-08-09 08:43:11 -04:00
Joshua Nelson
b11e2f2341 Give precedence to primitives over modules
This has less surprising behavior when there is a module with the same
name as a primitive in scope.
2020-08-09 08:34:21 -04:00
bors
8bc801b050 Auto merge of #75293 - poliorcetics:intra-doc-links-std-path, r=jyn514
Move to intra-doc links in library/std/src/path.rs

Helps with #75080.

@rustbot modify labels: T-doc, A-intra-doc-links, T-rustdoc

Known issue: The following links are broken (they are inside trait impls, undocumented in this file, inheriting from the original doc):

- [`Hasher`]
- [`Self`] (referencing `../primitive.slice.html`)
- [`Ordering`]
2020-08-09 12:31:03 +00:00
Guillaume Gomez
4e78760137 Remove E0749 from untested error codes 2020-08-09 13:53:27 +02:00
Guillaume Gomez
cc54a1f930 Clean up E0749 explanation 2020-08-09 13:53:27 +02:00
bors
8e738539be Auto merge of #75310 - petrochenkov:needwasm, r=Mark-Simulacrum
tests: Mark `ui/asm/bad-arch.rs` as requiring wasm llvm backend

So it doesn't fail when not all LLVM backends are built.
2020-08-09 08:52:53 +00:00
Vadim Petrochenkov
bef1ee3857 tests: Mark ui/asm/bad-arch.rs as requiring wasm llvm backend 2020-08-09 11:40:48 +03:00
Esteban Küber
4dbe0ac928 Detect likely for foo of bar JS syntax
Fix #75311.
2020-08-08 20:53:40 -07:00
bors
f50f1c8e17 Auto merge of #75280 - overdrivenpotato:psp-unwind, r=dtolnay
Add back unwinding support for Sony PSP

This PR adds back unwinding support for the Sony PSP. The `mipsel-sony-psp` target works well with unwinding. In [rust-psp], we use the `panic_unwind` crate along with LLVM's libunwind to catch panics, run destructors, and print them to the debug screen without aborting all threads.

[rust-psp]: https://github.com/overdrivenpotato/rust-psp
2020-08-09 03:07:00 +00:00
bors
aced185592 Auto merge of #75306 - Amanieu:hashbrown8, r=Mark-Simulacrum
Update hashbrown to 0.8.2

Includes:
- Avoid closures to improve compile times (https://github.com/rust-lang/hashbrown/pull/183)
- Do not iterate to drop if empty (https://github.com/rust-lang/hashbrown/pull/182)

r? @Mark-Simulacrum
2020-08-09 01:05:56 +00:00
bors
dcf107728c Auto merge of #75308 - JohnTitor:rollup-vnnny43, r=JohnTitor
Rollup of 15 pull requests

Successful merges:

 - #74712 (Update E0271 explanation)
 - #74842 (adjust remaining targets)
 - #75151 (Consistent variable name alloc for raw_vec)
 - #75162 (Fix the documentation for move about Fn traits implementations)
 - #75248 (Add `as_mut_ptr` to `NonNull<[T]>`)
 - #75262 (Show multi extension example for Path in doctests)
 - #75266 (Add safety section to `NonNull::as_*` method docs)
 - #75284 (Show relative example for Path ancestors)
 - #75285 (Separate example for Path strip_prefix)
 - #75287 (Show Path extension example change multi extension)
 - #75288 (Use assert! for Path exists example to check bool)
 - #75289 (Remove ambiguity from PathBuf pop example)
 - #75290 (fix `min_const_generics` version)
 - #75291 (Clean up E0750)
 - #75292 (Clean up E0502)

Failed merges:

r? @ghost
2020-08-08 23:05:49 +00:00
Yuki Okushi
e6dfd308d3
Rollup merge of #75292 - slanterns:cleanup-E0502, r=GuillaumeGomez
Clean up E0502

`ref` on an entire `let` pattern is discouraged, take a reference with `&` instead.
2020-08-09 06:41:39 +09:00
Yuki Okushi
bc3ee48fd2
Rollup merge of #75291 - GuillaumeGomez:cleanup-e0750, r=pickfire
Clean up E0750

r? @Dylan-DPC
2020-08-09 06:41:37 +09:00