Commit graph

126384 commits

Author SHA1 Message Date
Josh Triplett
8b501e33e5 Disable ninja on the dry-run builder 2020-08-28 07:20:50 -07:00
bors
3d0b0e66af Auto merge of #5774 - ThibsG:FixNewRetNoSelf, r=ebroto
Fix FP in `new_ret_no_self`: trigger in trait def instead of impl block

Lint in trait def instead of impl block.

Fixes: #5435

changelog: none
2020-08-28 11:54:07 +00:00
Ivan Tham
2d6ab122b7
Liballoc extend use intra doc link 2020-08-28 19:33:53 +08:00
Guillaume Gomez
4b8ebbcc5a Clean up rustdoc front-end source code 2020-08-28 13:30:21 +02:00
bors
3e3c552605 Auto merge of #76019 - pietroalbini:rollup-1tkgdnd, r=pietroalbini
Rollup of 12 pull requests

Successful merges:

 - #75330 (Improve rendering of crate features via doc(cfg))
 - #75927 (Use intra-doc links in `core::macros`)
 - #75941 (Clean up E0761 explanation)
 - #75943 (Fix potential UB in align_offset doc examples)
 - #75946 (Error use explicit intra-doc link and fix text)
 - #75955 (Use intra-doc links in `core::future::future` and `core::num::dec2flt`)
 - #75967 (Fix typo in `std::hint::black_box` docs)
 - #75972 (Fix ICE due to carriage return w/ multibyte char)
 - #75989 (Rename rustdoc/test -> rustdoc/doctest)
 - #75996 (fix wording in release notes)
 - #75998 (Add InstrProfilingPlatformFuchsia.c to profiler_builtins)
 - #76000 (Adds --bless support to test/run-make-fulldeps)

Failed merges:

r? @ghost
2020-08-28 10:16:03 +00:00
Ryan Levick
8bcc4d6178 Switch to asm! macro and use brk instruction on ARM 2020-08-28 11:22:21 +02:00
Pietro Albini
0106ad4e27
Rollup merge of #76000 - richkadel:llvm-coverage-map-gen-6b.2, r=wesleywiser
Adds --bless support to test/run-make-fulldeps

The ability to "bless" output for some of these tests is critical to
making it practical to adapt tests to unrelated changes.

This is needed for new coverage tests, as shown in PR #76004 .

r? @tmandry
FYI: @wesleywiser
2020-08-28 10:24:12 +02:00
Pietro Albini
35496c2667
Rollup merge of #75998 - richkadel:llvm-coverage-map-gen-6b.1, r=wesleywiser
Add InstrProfilingPlatformFuchsia.c to profiler_builtins

All other Platform files included in `llvm-project/compiler-rt` were
present, except Fuchsia.

Now that there is a functional end-to-end version of
`-Zinstrument-coverage`, I need to start building and testing
coverage-enabled Rust programs on Fuchsia, and this file is required.

r? @tmandry
FYI, @wesleywiser
2020-08-28 10:24:11 +02:00
Pietro Albini
730c68ead5
Rollup merge of #75996 - tinaun:patch-2, r=jonas-schievink
fix wording in release notes

C-like enums are still allowed to impl drop, you just can't cast them to numbers
2020-08-28 10:24:09 +02:00
Pietro Albini
efd81b435b
Rollup merge of #75989 - matklad:renamerustdoctest, r=GuillaumeGomez
Rename rustdoc/test -> rustdoc/doctest

This modules contains the implementation of doctests, and not the
tests of rustdoc itself. This name is confusing, so let's rename it to
doctest for clarity.
2020-08-28 10:24:07 +02:00
Pietro Albini
cd77b62174
Rollup merge of #75972 - JulianKnodt:i70381, r=rollup
Fix ICE due to carriage return w/ multibyte char

Based off of this [commit](972560b83f)

Fixes #70381

CC: @Dylan-DPC
2020-08-28 10:24:06 +02:00
Pietro Albini
0f1ffa85d1
Rollup merge of #75967 - aticu:blackbox_typo, r=Dylan-DPC
Fix typo in `std::hint::black_box` docs
2020-08-28 10:24:04 +02:00
Pietro Albini
e027b57e40
Rollup merge of #75955 - camelid:intra-doc-links-for-future-and-dec2flt, r=jyn514
Use intra-doc links in `core::future::future` and `core::num::dec2flt`

Part of #75080.

@rustbot modify labels: A-intra-doc-links T-doc
2020-08-28 10:24:02 +02:00
Pietro Albini
cbe3aef559
Rollup merge of #75946 - pickfire:patch-8, r=jyn514
Error use explicit intra-doc link and fix text

Follow up of https://github.com/rust-lang/rust/pull/75629

r? @jyn514
2020-08-28 10:24:00 +02:00
Pietro Albini
be1b304ea4
Rollup merge of #75943 - elichai:2020-align_offset-docs, r=RalfJung
Fix potential UB in align_offset doc examples

Currently it takes a pointer only to the first element in the array, this changes the code to take a pointer to the whole array.
miri can't catch this right now because it later calls `x.len()` which re-tags the pointer for the whole array.

https://github.com/rust-lang/miri/issues/1526#issuecomment-680897144
2020-08-28 10:23:59 +02:00
Pietro Albini
bc553136c7
Rollup merge of #75941 - GuillaumeGomez:cleanup-e0761, r=Dylan-DPC
Clean up E0761 explanation

r? @Dylan-DPC
2020-08-28 10:23:57 +02:00
Pietro Albini
521b2054b6
Rollup merge of #75927 - camelid:intra-doc-links-for-core-macros, r=jyn514
Use intra-doc links in `core::macros`

Part of #75080.

Also cleaned up some things.

@rustbot modify labels: A-intra-doc-links T-doc T-rustdoc
2020-08-28 10:23:55 +02:00
Pietro Albini
8730c2beb7
Rollup merge of #75330 - Nemo157:improve-doc-cfg-features, r=GuillaumeGomez
Improve rendering of crate features via doc(cfg)

The current rendering of crate features with `doc(cfg(feature = ".."))` is verbose and unwieldy for users, `doc(cfg(target_feature = ".."))` is special-cased to make it render nicely, and a similar rendering can be applied to `doc(cfg(feature))` to make it easier for users to read.

I also added special casing of `all`/`any` cfgs consisting of just `feature`/`target-feature` to remove the repetitive "target/crate feature" prefix.

The downside of this current rendering is that there is no distinction between `feature` and `target_feature` in the shorthand display. IMO this is ok, or if anything `target_feature` should have a more verbose shorthand, because `doc(cfg(feature = ".."))` usage is going to vastly outstrip `doc(cfg(target_feature = ".."))` usage in non-stdlib crates when it eventually stabilizes (or even before that given the number of crates using `cfg_attr(docsrs)` like constructs).

## Previously

<img width="259" alt="Screenshot 2020-08-09 at 13 32 42" src="https://user-images.githubusercontent.com/81079/89731110-d090c000-da44-11ea-96fa-56adc6339123.png">
<img width="438" alt="image" src="https://user-images.githubusercontent.com/81079/89731116-d7b7ce00-da44-11ea-87c6-022d192d6eca.png">
<img width="765" alt="image" src="https://user-images.githubusercontent.com/81079/89731152-24030e00-da45-11ea-9552-1c270bff2729.png">
<img width="671" alt="image" src="https://user-images.githubusercontent.com/81079/89731158-28c7c200-da45-11ea-8acb-97d8a4ce00eb.png">

## Now

<img width="216" alt="image" src="https://user-images.githubusercontent.com/81079/89731123-e1d9cc80-da44-11ea-82a8-5900bd9448a5.png">
<img width="433" alt="image" src="https://user-images.githubusercontent.com/81079/89731127-e8684400-da44-11ea-9d18-572fd810f19f.png">
<img width="606" alt="image" src="https://user-images.githubusercontent.com/81079/89731162-2feed000-da45-11ea-98d2-8a88c364d903.png">
<img width="669" alt="image" src="https://user-images.githubusercontent.com/81079/89731991-ccb46c00-da4b-11ea-9416-cd20a3193826.png">

cc #43781
2020-08-28 10:23:53 +02:00
Pietro Albini
19d072f5d4
ci: run cancel-outdated-builds after fully setting up the env 2020-08-28 10:09:08 +02:00
Thibaud
73b1ee1a61
Update clippy_lints/src/methods/mod.rs
Co-authored-by: Eduardo Broto <ebroto@tutanota.com>
2020-08-28 09:33:05 +02:00
Thibaud
ffaadae8e4
Update clippy_lints/src/utils/mod.rs
Co-authored-by: Eduardo Broto <ebroto@tutanota.com>
2020-08-28 09:31:29 +02:00
Thibaud
e8be047c5b
Update clippy_lints/src/utils/mod.rs
Co-authored-by: Eduardo Broto <ebroto@tutanota.com>
2020-08-28 09:31:12 +02:00
Thomas Vigouroux
392478c29e Update compiler-builtins
Fixes #57820 and #46651
2020-08-28 09:02:39 +02:00
ortem
9cdcfe2288 Fix loading pretty-printers in rust-lldb script 2020-08-28 09:29:45 +03:00
Amjad Alsharafi
6aae4a2fe6 Used intra-doc links for ptr#safety occurrences 2020-08-28 11:52:04 +08:00
Amjad Alsharafi
a04e12002a Used intra-doc links for NonNull::dangling() occurrences 2020-08-28 11:52:04 +08:00
Amjad Alsharafi
8e33137159 Fixes intra-doc same scope links 2020-08-28 11:52:03 +08:00
Amjad Alsharafi
91e4aaa736 Use intra-doc links for core/src/slice.mod.rs
- most are using primitive types links, which cannot be used with intra
  links at the moment
- also `std` cannot be referenced in any link
2020-08-28 11:52:03 +08:00
Nathan West
c91e764d51 Once again, x.py tidy 2020-08-27 22:55:58 -04:00
Nathan West
d2d8bcb50e Typo fixes 2020-08-27 22:49:16 -04:00
Camelid
39cd184606
Remove unnecessary intra-doc link
Co-authored-by: Joshua Nelson <joshua@yottadb.com>
2020-08-27 19:42:23 -07:00
Nathan West
017ed5a579 Improvements to LineWriter::write_all
`LineWriter::write_all` now only emits a single write when writing a
newline when there's already buffered data.
2020-08-27 22:32:28 -04:00
bors
41aaa90c67 Auto merge of #70212 - Amanieu:catch_foreign, r=Mark-Simulacrum
Abort when foreign exceptions are caught by catch_unwind

Prior to this PR, foreign exceptions were not caught by catch_unwind, and instead passed through invisibly. This represented a painful soundness hole in some libraries ([take_mut](https://github.com/Sgeo/take_mut/blob/master/src/lib.rs#L37)), which relied on `catch_unwind` to handle all possible exit paths from a closure.

With this PR, foreign exceptions are now caught by `catch_unwind` and will trigger an abort since catching foreign exceptions is currently UB according to the latest proposals by the FFI unwind project group.

cc @rust-lang/wg-ffi-unwind
2020-08-28 01:20:17 +00:00
bors
07c5e9edb5 Auto merge of #5971 - giraffate:fix_fp_in_to_string_in_display, r=ebroto
Fix FP in `to_string_in_display`

Don't emit a lint when `.to_string()` on anything that is not `self`

Fix #5967

changelog: Fix FP in `to_string_in_display` when calling `.to_string()` on anything that is not `self`
2020-08-27 23:26:52 +00:00
bors
2aa741a9fa Auto merge of #75995 - pietroalbini:ci-let-fallible-finish, r=Mark-Simulacrum
Disable cancel-outdated-builds for auto-fallible

`cancel-outdated-builds` doesn't need to be enabled on fallible jobs, and it's actually making it harder for us to see if https://github.com/rust-lang/rust/issues/71988 is fixed. This adds some temporary code to avoid `auto-fallible` jobs from being cancelled by our tooling.

r? @Mark-Simulacrum
2020-08-27 23:22:34 +00:00
Dániel Buga
046556e94c Make sure the functions don't get merged 2020-08-28 01:16:20 +02:00
bors
397b390cc7 Auto merge of #75976 - GuillaumeGomez:help-popup, r=jyn514
Improve help popup

Fixes #75623.

The second commit is just a slight improvement: the help popup won't be created until someone presses "?" or ESC. Not a big improvement in itself but considering the low amount of code required, I think it was worth the shot.

r? @jyn514
2020-08-27 21:30:32 +00:00
Amanieu d'Antras
239f833ed1 Abort when catch_unwind catches a foreign exception 2020-08-27 21:08:30 +01:00
Rich Kadel
55cd2433dc Adds --bless support to test/run-make-fulldeps
The ability to "bless" output for some of these tests is critical to
making it practical to adapt tests to unrelated changes.

This is needed for new coverage tests, as shown in PR #75828 (or its
derivative).
2020-08-27 12:27:18 -07:00
Camelid
f0722c06a7 Switch to intra-doc links in core::hash 2020-08-27 12:09:50 -07:00
Rich Kadel
dd96996c70 Add InstrProfilingPlatformFuchsia.c to profiler_builtins
All other Platform files included in `llvm-project/compiler-rt` were
present, except Fuchsia.

Now that there is a functional end-to-end version of
`-Zinstrument-coverage`, I need to start building and testing
coverage-enabled Rust programs on Fuchsia, and this file is required.
2020-08-27 11:52:36 -07:00
tinaun
65b37ce090
fix wording in release notes
C-like enums are still allowed to impl drop, you just can't cast them to numbers
2020-08-27 14:41:18 -04:00
Camelid
707298d52c Use intra-doc links in core::num::dec2flt 2020-08-27 11:40:29 -07:00
Camelid
c933d697d8 Use intra-doc links in core::future::future 2020-08-27 11:40:28 -07:00
Pietro Albini
19e70bf822
ci: disable cancel-outdated-builds for auto-fallible 2020-08-27 20:07:06 +02:00
bors
132f5fc2e5 Auto merge of #75933 - Aaron1011:feature/closure-move-err, r=oli-obk
Point to a move-related span when pointing to closure upvars

Fixes #75904

When emitting move/borrow errors, we may point into a closure to
indicate why an upvar is used in the closure. However, we use the
'upvar span', which is just an arbitrary usage of the upvar. If the
upvar is used in multiple places (e.g. a borrow and a move), we may end
up pointing to the borrow. If the overall error is a move error, this
can be confusing.

This PR tracks the span that caused an upvar to become captured by-value
instead of by-ref (assuming that it's not a `move` closure). We use this
span instead of the 'upvar' span when we need to point to an upvar usage
during borrow checking.
2020-08-27 17:48:23 +00:00
Ryan Levick
970e7793bf Add __fastfail for Windows on arm/aarch64 2020-08-27 19:11:48 +02:00
Aleksey Kladov
b4f4db946e Add expect test for rustdoc html highlighting
It's a unit-test in a sense that it only checks syntax highlighting.
However, the resulting HTML is written to disk and can be easily
inspected in the browser.

To update the test, run with `--bless` argument or set
`UPDATE_EXPEC=1` env var
2020-08-27 18:48:06 +02:00
ThibsG
504612622f Merge logic of looking for Self type 2020-08-27 18:31:31 +02:00
ThibsG
3cb75c2e5c Remove expansion restriction + fix doc and tests naming 2020-08-27 18:25:38 +02:00