Commit Graph

93572 Commits

Author SHA1 Message Date
Jethro Beekman
33fb1c501c Add FAQ for NLL migration 2019-05-21 09:52:05 -07:00
John Kåre Alsaker
0b37900b40 Specify the edition for the rustdoc thread-pool 2019-05-21 18:17:06 +02:00
John Kåre Alsaker
a1f2dceaeb Move edition outside the hygiene lock and avoid accessing it 2019-05-21 18:17:05 +02:00
Ralf Jung
a2168b0259 update doc comment 2019-05-21 17:14:09 +02:00
topecongiro
1f1a9176e7 Fix tidy: remove a trailing whitespace 2019-05-21 23:17:59 +09:00
topecongiro
b07dbe1d44 Add doc comment 2019-05-21 22:57:34 +09:00
Michael Woerister
46e3d04b2b debuginfo: Revert to old/more verbose behavior for -Cdebuginfo=1.
https://github.com/rust-lang/rust/commit/cff075009 made LLVM emit
less debuginfo when compiling with "line-tables-only". The change
was essentially correct but the reduced amount of debuginfo broke
a number of tools.

This commit reverts the change so we get back the old behavior,
until we figure out how to do this properly and give external
tools to adapt to the new format.

See https://github.com/rust-lang/rust/issues/60020 for more info.
2019-05-21 13:48:29 +02:00
Ralf Jung
61735abc06 adjust deprecation date of mem::uninitialized 2019-05-21 13:10:28 +02:00
Nicholas Nethercote
b557567c35 Remove impls for InternedString/string equality.
`Symbol` received the same treatment in #60630.

Also, we can derive `PartialEq` for `InternedString`.
2019-05-21 20:08:33 +10:00
Ralf Jung
5ea5fe3072 static_assert: make use of anonymous constants 2019-05-21 09:10:24 +02:00
bors
50a0defd5a Auto merge of #60903 - nnethercote:mv-gensyms-from-Symbol-to-Ident, r=petrochenkov
Move gensym operations from `Symbol` to `Ident`

Gensyms are always at the `Ident` level, and long-term we probably want to record gensym-ness in hygiene data.

r? @petrochenkov
2019-05-21 06:37:03 +00:00
topecongiro
e186d3f3e0 Add stream_to_parser_with_base_dir 2019-05-21 13:18:20 +09:00
bors
46ad3e1882 Auto merge of #60950 - taiki-e:arbitrary_self_types-tests, r=Centril
Move arbitrary self types's tests into ui/self

https://github.com/rust-lang/rust/pull/60944#discussion_r285362006

r? @Centril
2019-05-21 03:44:09 +00:00
Brent Kerby
4e37785c7d Create and reference Memory Layout section of boxed docs 2019-05-20 21:03:40 -06:00
bors
b7f6b8a56b Auto merge of #60985 - cr1901:msp430-fix, r=alexcrichton
Bump LLVM submodule to fix MSP430 AsmPrinter and assembler syntax mismatch.

Moving on to steps 9 and 10 of the llvm bugfix [guide](https://rust-lang.github.io/rustc-guide/codegen/updating-llvm.html#bugfix-updates), now that Rust's copy of LLVM was [updated](https://github.com/rust-lang/llvm-project/pull/13).

This PR closes issue #59077. Nightlies following this PR should have working msp430 codegen again :D.

Thanks for the prompt response even though it took me a while to get this "simple" PR done!
2019-05-21 00:50:12 +00:00
Santiago Pastorino
419ca9d640
LocalDecl push returns Local len 2019-05-20 20:13:58 -03:00
bors
09189591c4 Auto merge of #60986 - Centril:rollup-nhpgrfb, r=Centril
Rollup of 11 pull requests

Successful merges:

 - #60383 (Fix position source code files toggle)
 - #60453 (Fall back to `/dev/urandom` on `EPERM` for `getrandom`)
 - #60487 (Fix search sidebar width when no crate select is present)
 - #60511 (Fix intra-doc link resolution failure on re-exporting libstd)
 - #60823 (Fix incremental compilation of cdylib emitting spurious unused_attributes lint)
 - #60915 (stable hashing: Remove unused field and add documentation.)
 - #60942 (Misc changes to rustc_metadata)
 - #60952 (Document BinaryHeap time complexity)
 - #60959 (rustc: Improve type size assertions)
 - #60972 (remove confusing remarks about mixed volatile and non-volatile accesses)
 - #60983 (Set -funwind-tables and -fno-exceptions unconditionally for LLVM's libunwind)

Failed merges:

r? @ghost
2019-05-20 21:38:19 +00:00
Mazdak Farrokhzad
0c97800f93
Rollup merge of #60983 - petrhosek:libunwind-no-exceptions, r=alexcrichton
Set -funwind-tables and -fno-exceptions unconditionally for LLVM's libunwind

These are required otherwise libunwind will end up with undefined
references to __gxx_personality_v0 which is provided by C++ ABI
library and that's undesirable.
2019-05-20 23:03:10 +02:00
Mazdak Farrokhzad
44b5d4deb6
Rollup merge of #60972 - RalfJung:volatile, r=alexcrichton
remove confusing remarks about mixed volatile and non-volatile accesses

These comments were originally added by @ecstatic-morse in 911d35f0bf and then later edited by me. The intention, I think, was to make sure people do both their reads and writes with these methods if the affected memory really is used for communication with external devices.

However, [people read this as saying that mixed volatile/non-volatile accesses are UB](https://github.com/rust-lang/rust/issues/58599#issuecomment-493791130), which -- to my knowledge -- they are not. So better remove this.

Cc @rkruppe @rust-lang/wg-unsafe-code-guidelines
2019-05-20 23:03:08 +02:00
Mazdak Farrokhzad
581cf70367
Rollup merge of #60959 - petrochenkov:sassert, r=estebank
rustc: Improve type size assertions

Now they
- Tell what the new size is, when it changes
- Do not require passing an identifier

```
   ::: src\libsyntax\parse\token.rs:223:1
    |
223 |    static_assert_size!(Token, 123);
    |    -------------------------------- in this macro invocation
    |
    = note: expected type `[(); 123]`
               found type `[(); 16]`
```
2019-05-20 23:03:07 +02:00
Mazdak Farrokhzad
864e7a9251
Rollup merge of #60952 - dtolnay:heap, r=Amanieu
Document BinaryHeap time complexity

I went into some detail on the time complexity of `push` because it is relevant for using BinaryHeap efficiently -- specifically that you should avoid pushing many elements in ascending order when possible.

r? @Amanieu
Closes #47976. Closes #59698.
2019-05-20 23:03:06 +02:00
Mazdak Farrokhzad
65cec43ce1
Rollup merge of #60942 - bjorn3:metadata_loader_refactor, r=michaelwoerister
Misc changes to rustc_metadata
2019-05-20 23:03:03 +02:00
Mazdak Farrokhzad
3f86faddaf
Rollup merge of #60915 - michaelwoerister:hashstablestuff, r=estebank
stable hashing: Remove unused field and add documentation.

This PR removes the `bytes_hashed` field from `StableHasher` which in the past has been used for collecting some statistics but has gone unused for quite a while (months at least) now.

The PR also tries to document some requirements for `HashStable` implementations that haven't been written down explicitly anywhere.
2019-05-20 23:03:02 +02:00
Mazdak Farrokhzad
36b5724e0d
Rollup merge of #60823 - oli-obk:used_unused_no_mangle, r=michaelwoerister
Fix incremental compilation of cdylib emitting spurious unused_attributes lint

fixes #60050
2019-05-20 23:03:00 +02:00
Mazdak Farrokhzad
a34dae3587
Rollup merge of #60511 - taiki-e:libstd-intra-doc, r=Dylan-DPC
Fix intra-doc link resolution failure on re-exporting libstd

Currently, re-exporting libstd items as below will [occur a lot of failures](https://gist.github.com/taiki-e/e33e0e8631ef47f65a74a3b69f456366).
```rust
pub use std::*;
```

Until the underlying issue (#56922) fixed, we can fix that so they don't propagate to downstream crates.

Related: https://github.com/rust-lang/rust/pull/56941 (That PR fixed failures that occur when re-exporting from libcore to libstd.)

r? @QuietMisdreavus
2019-05-20 23:02:59 +02:00
Mazdak Farrokhzad
bf54251f90
Rollup merge of #60487 - GuillaumeGomez:fix-search-sidebar-width-colors, r=Dylan-DPC
Fix search sidebar width when no crate select is present

Fixes #60480.

I also fixed the box-shadow that seemed to have been kind of removed?

r? @QuietMisdreavus
2019-05-20 23:02:57 +02:00
Mazdak Farrokhzad
5a08ca38de
Rollup merge of #60453 - tbu-:pr_getrandom_enoperm, r=sfackler
Fall back to `/dev/urandom` on `EPERM` for `getrandom`

This can happen because of seccomp or some VMs.

Fixes #52609.
2019-05-20 23:02:55 +02:00
Mazdak Farrokhzad
daf8aca0e3
Rollup merge of #60383 - GuillaumeGomez:fix-position-source-code-files-toggle, r=Manishearth
Fix position source code files toggle

Fixes #60381.

The second commit is a big cleanup of the media queries.

r? @rust-lang/rustdoc

cc @Manishearth

screenshot of the fix:

<img width="501" alt="Screenshot 2019-04-29 at 23 42 56" src="https://user-images.githubusercontent.com/3050060/56929111-112b2b00-6ad9-11e9-9a23-e0a8e3641395.png">
2019-05-20 23:02:52 +02:00
William D. Jones
a775d11fff Fix MSP430 AsmPrinter and assembler syntax mismatch. 2019-05-20 16:50:00 -04:00
Petr Hosek
d8f764bbbf Set -funwind-tables and -fno-exceptions unconditionally for LLVM's libunwind
These are required otherwise libunwind will end up with undefined
references to __gxx_personality_v0 which is provided by C++ ABI
library and that's undesirable.
2019-05-20 12:29:58 -07:00
Esteban Küber
d320c7ceab Do not fail on child without DefId 2019-05-20 11:46:44 -07:00
Alexander Regueiro
ce2ee305f9 Fixed nits raised in review. 2019-05-20 16:46:15 +01:00
Alexander Regueiro
ce75a23c0d Reinstated shallow disallowing of maybe bounds in trait objects. 2019-05-20 16:12:49 +01:00
Alexander Regueiro
a0a61904f4 Addressed more points raised in review. 2019-05-20 16:12:49 +01:00
Alexander Regueiro
783b713b5d Addressed more points raised in review. 2019-05-20 16:12:49 +01:00
Alexander Regueiro
20096628c6 Addressed points raised in review. 2019-05-20 16:12:49 +01:00
Alexander Regueiro
fd7c253acc Update tests. 2019-05-20 16:12:49 +01:00
Alexander Regueiro
aea954b74d Fixed detection of multiple non-auto traits. 2019-05-20 16:12:49 +01:00
Alexander Regueiro
5f6c2127d7 Factored out part of conv_object_ty_poly_trait_ref method. 2019-05-20 16:12:49 +01:00
Alexander Regueiro
16692f7b1a Addressed review points. 2019-05-20 16:12:49 +01:00
Alexander Regueiro
72e5e8bfa7 Update tests. 2019-05-20 16:12:49 +01:00
Alexander Regueiro
9f800457dd Ban multi-trait objects via trait aliases. 2019-05-20 16:12:49 +01:00
Alexander Regueiro
16ef295770 Accumulation of various drive-by cosmetic changes. 2019-05-20 16:12:48 +01:00
bors
d35181ad87 Auto merge of #60445 - RalfJung:maybe-uninit, r=Centril
stabilize core parts of MaybeUninit

and deprecate mem::uninitialized in the future (1.40.0). This is part of implementing https://github.com/rust-lang/rfcs/pull/1892.

Also expand the documentation a bit.

This type is currently primarily useful when dealing with partially initialized arrays. In libstd, it is used e.g. in `BTreeMap` (with some unstable APIs that however can all be replaced, less ergonomically, by stable ones). What we stabilize should also be enough for `SmallVec` (Cc @bluss).

Making this useful for structs requires https://github.com/rust-lang/rfcs/pull/2582 or a commitment that references to uninitialized data are not insta-UB.
2019-05-20 15:05:04 +00:00
Brent Kerby
178b753a4a Remove trailing whitespaces to satisfy tidy 2019-05-20 08:14:06 -06:00
Brent Kerby
a7e1431941 Update boxed::Box docs on memory layout 2019-05-20 08:14:06 -06:00
Nicholas Nethercote
c5d9401756 Avoid symbol interning in file_metadata.
This commit changes `created_files` so it uses strings directly as keys,
rather than symbols derived from the strings. This avoids the cost of
having to do the hash table lookups to produce the symbols from the
strings.

The commit also uses `entry` to avoid doing a repeated hash table lookup
(`get` + `insert`).

Note that PR #60467 improved this code somewhat; this is a further
improvement.
2019-05-20 18:56:53 +10:00
Ralf Jung
1916391ea8 update miri 2019-05-20 10:54:36 +02:00
Peter Todd
2a15dec5a2 Document layout guarantee of MaybeUninit 2019-05-20 10:44:02 +02:00
Ralf Jung
4bf500fea7 elliminate mem::uninitialize from docs in libcore 2019-05-20 10:44:02 +02:00