Commit Graph

124866 Commits

Author SHA1 Message Date
Mark Rousskov
7a0b195188 Remove CodeGenOptLevel::Other
Also introduced in #35174, and immediately unused.
2020-08-12 12:01:31 -04:00
Mark Rousskov
fc163ed4ee Remove AsmDialect::Other
Added in #35174, this was already unused (and new uses have not been introduced
since then).
2020-08-12 11:59:17 -04:00
Mark Rousskov
f043c8fa48 Remove FileType::Other
Added in #35174, this was already unused (and new uses have not been introduced
since then).
2020-08-12 11:55:45 -04:00
Mark Rousskov
a3c73ca88c Remove SynchronizationScope::Other
Added in b761538997, it started out already
unused.
2020-08-11 16:16:28 -04:00
bors
1275cc15d6 Auto merge of #74936 - GuillaumeGomez:const-rustc_const_unstable, r=jyn514
Don't print "const" keyword on non-nightly build if rustc_const_unstable is used on the item

Fixes #74579.
2020-08-10 17:12:42 +00:00
bors
08324fe6f7 Auto merge of #74953 - JulianKnodt:master, r=lcnr
Remove restriction on type parameters preceding consts w/ feature const-generics

Removed the restriction on type parameters preceding const parameters when the feature const-generics is enabled.

Builds on #74676, which deals with unsorted generic parameters. This just lifts the check in lowering the AST to HIR that permits consts and types to be reordered with respect to each other. Lifetimes still must precede both

This change is not intended for min-const-generics, and is gated behind the `#![feature(const_generics)]`.

One thing is that it also permits type parameters without a default to come after consts, which I expected to not work, and was hoping to get more guidance on whether that should be permitted or how to prevent it otherwise.

I did not go through the RFC process for this pull request because there was prior work to get this feature added. In the previous PR that was cited, work was done to enable this change.

r? @lcnr
2020-08-10 15:19:46 +00:00
Guillaume Gomez
2a281e0a76 Add test for rustc_const_unstable on methods 2020-08-10 16:57:25 +02:00
bors
4c336d4626 Auto merge of #75357 - RalfJung:miri, r=RalfJung
update Miri

Fixes https://github.com/rust-lang/rust/issues/75274
Cc @rust-lang/miri r? @ghost
2020-08-10 13:01:44 +00:00
Ralf Jung
26ec7e9dd9 update Miri 2020-08-10 10:06:23 +02:00
kadmin
64f6437822 Convert Eq impl to check Ord::Equal 2020-08-10 05:54:55 +00: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