Commit Graph

150368 Commits

Author SHA1 Message Date
bors
481971978f Auto merge of #86586 - Smittyvb:https-everywhere, r=petrochenkov
Use HTTPS links where possible

While looking at #86583, I wondered how many other (insecure) HTTP links were in `rustc`. This changes most other `http` links to `https`. While most of the links are in comments or documentation, there are a few other HTTP links that are used by CI that are changed to HTTPS.

Notes:
- I didn't change any to or in licences
- Some links don't support HTTPS :(
- Some `http` links were dead, in those cases I upgraded them to their new places (all of which used HTTPS)
2021-06-26 08:24:31 +00:00
bors
6830052c7b Auto merge of #86637 - ehuss:spellings, r=dtolnay
Fix a few misspellings.
2021-06-26 05:09:27 +00:00
bors
bca6d9baa9 Auto merge of #86622 - FabianWolff:issue-83475, r=jonas-schievink
Check that `#[cmse_nonsecure_entry]` is applied to a function definition

This PR fixes #83475. The compiler currently neglects to check whether `#[cmse_nonsecure_entry]` is applied to a function (and not, say, a struct) definition, leading to an ICE later on when the type checker attempts to retrieve the function signature. I have fixed this problem by adding an appropriate check to the `check_attr` pass, so that an error is reported instead of an ICE.
2021-06-26 02:28:45 +00:00
bors
dd1525a021 Auto merge of #86015 - jyn514:revert-revert, r=Mark-Simulacrum
Move LLVM submodule updates back to native.rs

Time to find more bugs!

The first commit is a straight revert of https://github.com/rust-lang/rust/pull/85647, the second is a fix for https://rust-lang.zulipchat.com/#narrow/stream/182449-t-compiler.2Fhelp/topic/x.2Epy.20always.20updates.20LLVM.20submodule/near/240113320 and https://github.com/rust-lang/rust/pull/82653#issuecomment-846755631. I haven't been able to replicate https://github.com/rust-lang/rust/pull/82653#issuecomment-849013698.
2021-06-25 23:47:56 +00:00
Smitty
3da037f829 Download the GCC sources insecurely
This is needed as they are built on a long-outdated Debian version. :(
2021-06-25 17:15:36 -04:00
bors
e6b4c252ea Auto merge of #86599 - Amanieu:asm_raw, r=nagisa
Add a "raw" option for asm! which ignores format string specifiers

This is useful when including raw assembly snippets using `include_str!`.
2021-06-25 20:44:28 +00:00
Eric Huss
6235e6f93f Fix a few misspellings. 2021-06-25 13:18:56 -07:00
bors
0d7f236b8a Auto merge of #86627 - JohnTitor:rollup-ey29pc1, r=JohnTitor
Rollup of 5 pull requests

Successful merges:

 - #86330 (Change how edition based future compatibility warnings are handled)
 - #86513 (Rustdoc: Do not list impl when trait has doc(hidden))
 - #86592 (Use `#[non_exhaustive]` where appropriate)
 - #86608 (chore(rustdoc): remove unused members of RenderType)
 - #86624 (Update compiler-builtins)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2021-06-25 18:16:37 +00:00
Fabian Wolff
499afcdfcf Check that #[cmse_nonsecure_entry] is applied to a function definition 2021-06-25 17:49:41 +02:00
Yuki Okushi
b238e6fcab
Rollup merge of #86624 - jethrogb:update-compiler_builtins, r=Amanieu
Update compiler-builtins

r? ``@Amanieu``
2021-06-26 00:42:14 +09:00
Yuki Okushi
daa87adc4e
Rollup merge of #86608 - notriddle:notriddle/cleanup-rustdoc, r=jyn514
chore(rustdoc): remove unused members of RenderType

PR #86561 removes the only place the `generics` member is read. This PR does even more cleanup.
2021-06-26 00:42:13 +09:00
Yuki Okushi
9e4649995f
Rollup merge of #86592 - jhpratt:non_exhaustive, r=JohnTitor
Use `#[non_exhaustive]` where appropriate

Due to the std/alloc split, it is not possible to make `alloc::collections::TryReserveError::AllocError` non-exhaustive without having an unstable, doc-hidden method to construct (which negates the benefits from `#[non_exhaustive]`).

`@rustbot` label +C-cleanup +T-libs +S-waiting-on-review
2021-06-26 00:42:12 +09:00
Yuki Okushi
6be1732e69
Rollup merge of #86513 - fee1-dead:cross-crate-doc-hidden, r=danielhenrymantilla
Rustdoc: Do not list impl when trait has doc(hidden)

Fixes #86448.
2021-06-26 00:42:10 +09:00
Yuki Okushi
e01a720f85
Rollup merge of #86330 - rylev:update-fcw-handling, r=nikomatsakis
Change how edition based future compatibility warnings are handled

This fixes https://github.com/rust-lang/rust/issues/85894 by updating how future compatibility lints work. This makes it more apparent that future compatibility warnings can happen for several different reasons.

For now `FutureCompatibilityReasons` are limited to three reasons, but we can easily add more.

This also updates the generated warning for FCW's that signal code that will error in a future edition. This makes the diagnostics between FCWs at edition boundaries more distinct from those not happening at an edition boundary.

r? ``@m-ou-se``
2021-06-26 00:42:06 +09:00
bors
f726dbe934 Auto merge of #85603 - ogoffart:fix-uninhabited-enum-branching-pass, r=wesleywiser
Fix uninhabited enum branching pass

when the discriminant is taken with some projection.
2021-06-25 15:35:47 +00:00
Jethro Beekman
98ae57d2f3 Update compiler-builtins 2021-06-25 16:00:57 +02:00
Ryan Levick
51f223e958 Fix clippy test 2021-06-25 15:29:14 +02:00
Ryan Levick
ef08c6bc4d Fix new broken tests 2021-06-25 15:07:25 +02:00
Ryan Levick
15eae851de Fix new lints 2021-06-25 14:51:56 +02:00
Ryan Levick
5ef071ee42 Add back missing doc 2021-06-25 14:51:56 +02:00
Ryan Levick
7b3940f44b Address PR feedback 2021-06-25 14:51:56 +02:00
Ryan Levick
23176f60e7 Change how edition based future compatibility warnings are handled 2021-06-25 14:51:56 +02:00
bors
4733f32dbb Auto merge of #86583 - dns2utf8:use_https, r=pietroalbini
Use https for sourceforge during CI

I saw that we use http during CI opening up the CI process to on the wire tampering.

based on #86573

r? `@pietroalbini`
2021-06-25 12:20:17 +00:00
bors
117799b73c Auto merge of #86505 - JohnTitor:fix-86483, r=jackh726
Do not panic in `return_type_impl_trait`

Fixes #86483
2021-06-25 09:28:17 +00:00
Stefan Schindler
10b83cd88a Fetch expat from github because the project switched 2021-06-25 10:34:29 +02:00
Stefan Schindler
fcf1848e36 Use https for sourceforge during CI 2021-06-25 10:34:29 +02:00
bors
50e0cc59ff Auto merge of #86151 - scottmcm:simple-hash-of, r=joshtriplett
Add `BuildHasher::hash_one` as unstable

Inspired by https://github.com/rust-lang/rust/pull/86140/files#diff-246941135168fbc44fce120385ee9c3156e08a1c3e2697985b56dcb8d728eedeR2416, where I wanted to write a quick test for a `Hash` implementation and it took more of a dance than I'd hoped.

It looks like this would be handy in hashtable implementations, too -- a quick look at hashbrown found two places where it needs to do the same dance:
6302512a8a/src/map.rs (L247-L270)

I wanted to get a "seems plausible" from a libs member before making a tracking issue, so random-sampling the intersection of highfive and governance gave me...
r? `@joshtriplett`

(As always, bikeshed away!  And let me know if I missed something obvious again that I should have used instead.)
2021-06-25 06:47:30 +00:00
Deadbeef
9a6343478c
Renamed test and added test for same crate 2021-06-25 14:08:06 +08:00
bors
50a9081216 Auto merge of #85640 - bjorn3:custom_ice_hook, r=jackh726
Allow changing the bug report url for the ice hook

cc https://github.com/bjorn3/rustc_codegen_cranelift/issues/1174
2021-06-25 04:06:32 +00:00
bors
079aa837d2 Auto merge of #86574 - m-ou-se:or-pattern-lint-fix, r=petrochenkov
Don't lint :pat when re-parsing a macro from another crate.

`compile_macro` is used both when compiling the original definition in the crate that defines it, and to compile the macro when loading it when compiling a crate that uses it. We should only emit lints in the first case.

This adds a `is_definition: bool` to pass this information in, so we don't warn about things that only concern the definition site.

Fixes #86567
2021-06-25 01:23:16 +00:00
Michael Howell
14ca89446c chore(rustdoc): remove unused members of RenderType
Commit e629381653 removes the only place
these members variables are actually read.
2021-06-24 16:37:03 -07:00
bors
d4e7cb3254 Auto merge of #86272 - nagisa:nagisa/tidy-llvm-components, r=Mark-Simulacrum
tidy: verify that test revisions with --target have associated needs-llvm-components directives

This ensures that people who tend to write `--target` `#[no_core]` tests don't miss specifying the `needs-llvm-components` directive. This is necessary for the test suite to pass when LLVM is compiled with a subset of components enabled.

While here I also took the opportunity to implement a more fine-grained handling of the ignore directives, so that they are evaluated for each revision, rather than for the entire test. With this even if people have `arm` component disabled, only the revision that depends on the arm component will not run.

Fixes https://github.com/rust-lang/rust/issues/82405
2021-06-24 22:42:26 +00:00
Amanieu d'Antras
d0443bb7c2 Add a "raw" option for asm! which ignores format string specifiers 2021-06-24 23:42:15 +01:00
Mara Bos
06db210459 Don't lint :pat when re-parsing a macro from another crate. 2021-06-24 22:04:55 +00:00
Simonas Kazlauskas
cfcb2b664d compiletest: ignore tests on a per-revision basis
Otherwise something that ought to seemingly work like `//[x86]
needs-llvm-components: x86` or `//[nll_beyond]should-fail` do not get
evaluated properly.
2021-06-24 23:13:08 +03:00
Simonas Kazlauskas
493fe8008b Re-Annotate the tests with needs-llvm-components
Doesn't work though, because compiletest doesn't process ignores on a
per-revision manner.
2021-06-24 23:13:08 +03:00
Simonas Kazlauskas
a8e6a2cd9e tidy: tests with --target need llvm components
Herein we verify that all of the tests that specify a `--target`
compile-flag, are also annotated with the minimal set of required llvm
components necessary to run that test.
2021-06-24 23:13:08 +03:00
bors
7c3872e6bf Auto merge of #85651 - dns2utf8:rustdoc_flexbox, r=GuillaumeGomez
rustdoc: staggered layout for module contents on mobile

This PR adds the container `<item-table>` with its two children `<item-left>` and `<item-right>`.
It uses grid-layout on desktop and flexbox on mobile to make better use of the available space.

Additionally it allows to share parts of the CSS with the search function.

* Demo: https://data.estada.ch/rustdoc-nightly_126561cb3_2021-05-25/generic_array/index.html
* Related: #85540

## Desktop
![grafik](https://user-images.githubusercontent.com/739070/119416896-2be62300-bce4-11eb-9555-792b859ab611.png)

## Mobile
![grafik](https://user-images.githubusercontent.com/739070/119416934-44563d80-bce4-11eb-9e77-70a72edcc487.png)

r? `@GuillaumeGomez` `@jsha`
2021-06-24 20:01:39 +00:00
bors
cbeda5cbeb Auto merge of #86467 - ChrisDenton:win-env-clear, r=JohnTitor
Windows: Fix `Command::env_clear` so it works if no variables are set

Previously, it would error unless at least one new environment variable was added. The missing null presumably meant that Windows was reading random memory in that case.

See: [CreateProcessW](https://docs.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-createprocessw) (scroll down to `lpEnvironment`). Essentially the environment block is a null terminated list of null terminated strings and an empty list is `\0\0` and not `\0`.

EDIT: Oh, [CreateEnvironmentBlock](https://docs.microsoft.com/en-gb/windows/win32/api/userenv/nf-userenv-createenvironmentblock) states this much more explicitly.

Fixes #31259
2021-06-24 17:37:29 +00:00
bors
d95745e5fa Auto merge of #85427 - ehuss:fix-use-placement, r=jackh726
Fix use placement for suggestions near main.

This fixes an edge case for the suggestion to add a `use`. When running with `--test`, the `main` function will be annotated with an `#[allow(dead_code)]` attribute. The `UsePlacementFinder` would end up using the dummy span of that synthetic attribute. If there are top-level inner attributes, this would place the `use` in the wrong position. The solution here is to ignore attributes with dummy spans.

In the process of working on this, I discovered that the `use_suggestion_placement` test was broken. `UsePlacementFinder` is unaware of active attributes. Attributes like `#[derive]` don't exist in the AST since they are removed. Fixing that is difficult, since the AST does not retain enough information. I considered trying to place the `use` towards the top of the module after any `extern crate` items, but I couldn't find a way to get a span for the start of a module block (the `mod` span starts at the `mod` keyword, and it seems tricky to find the spot just after the opening bracket and past inner attributes). For now, I just put some comments about the issue. This appears to have been a known issue in #44215 where the test for it was introduced, and the fix seemed to be deferred to later.
2021-06-24 14:56:28 +00:00
Stefan Schindler
94c84bd72a Migrate from custom elements to divs with classes to be compatible with safari 2021-06-24 16:46:15 +02:00
Stefan Schindler
cc9ef7d8a8 Hide Crate Version on narrow Screens 2021-06-24 16:46:15 +02:00
Stefan Schindler
e2efcf10de Fixing the test rustdoc by ignoring *[@id="module-item"]//following-sibling::item-right relationship and rustdoc-gui 2021-06-24 16:46:15 +02:00
Stefan Schindler
6020c79dde Implement Desktop and Mobile version with gridlayout
* implement sans-serif #85621
2021-06-24 16:46:14 +02:00
Chris Denton
16145a9952
Test that env_clear works on Windows 2021-06-24 09:32:24 +01:00
Scott McMurray
579d19bc6a Use hash_one to simplify some other doctests 2021-06-24 01:30:48 -07:00
Scott McMurray
63d28192da Add tracking issue and rename to hash_one 2021-06-24 01:30:48 -07:00
Scott McMurray
a3eb9e3db2 Add BuildHasher::hash_of as unstable 2021-06-24 01:30:48 -07:00
Jacob Pratt
3f14f4b3ce
Use #[non_exhaustive] where appropriate
Due to the std/alloc split, it is not possible to make
`alloc::collections::TryReserveError::AllocError` non-exhaustive without
having an unstable, doc-hidden method to construct (which negates the
benefits from `#[non_exhaustive]`.
2021-06-24 04:16:11 -04:00
bors
456a03227e Auto merge of #86279 - JohnTitor:transparent-zero-size-fields, r=nikomatsakis
Permit zero non-zero-field on transparent types

Fixes #77841

This makes the transparent fields meet the below:
> * A `repr(transparent)` type `T` must meet the following rules:
>   * It may have any number of 1-ZST fields
>   * In addition, it may have at most one other field of type U

r? `@nikomatsakis`
2021-06-24 07:29:59 +00:00