Commit graph

120657 commits

Author SHA1 Message Date
Guillaume Gomez
55f9bc09a6 Remove GUI tests for rust beta CI 2021-07-26 15:24:33 +02:00
bors
22bbbe80b2 Rustdoc accessibility: use real headers for doc items
Part of #87059

Partially reverts #84703

Heavily modified for beta backport needs.
2021-07-26 15:24:33 +02:00
Guillaume Gomez
963e820023 Update browser-ui-test package version 2021-07-26 14:05:56 +02:00
Michael Howell
1e01a14b0b
Fix test cases for header titles in sidebar 2021-07-26 13:14:54 +02:00
Michael Howell
e64f994099
Remove redundant CSS 2021-07-26 13:13:54 +02:00
Michael Howell
0a297ac47d
Rustdoc accessibility: make the sidebar headers actual headers
Part of #87059

Preview it at: https://notriddle.com/notriddle-rustdoc-test/rustdoc-sidebar-header/std/index.html
2021-07-26 13:13:42 +02:00
Guillaume Gomez
2818e74c38
Add test for sidebar display value on mobile 2021-07-26 12:46:04 +02:00
Guillaume Gomez
e722a08eb8
Do not hide the sidebar on mobile, move it outside of the viewport instead 2021-07-26 12:45:58 +02:00
Pietro Albini
49bcee8997
switch to the stable channel 2021-07-26 12:41:43 +02:00
Michael Woerister
99e5a3fe7e Add regression test for #85955. 2021-07-23 05:16:21 +02:00
bors
b95932895b Auto merge of #87369 - pnkfelix:beta-targetted-revert-81473-warn-write-only-fields, r=Mark-Simulacrum
Beta targetted revert 81473 warn write only fields

beta backport of PR #86212
2021-07-23 00:03:20 +00:00
Eric Huss
c8b3431be1 Provide a better error when x.py install src/doc doesn't work. 2021-07-22 11:16:29 -04:00
Eric Huss
cc9284d21d Add comments why install steps should never fail. 2021-07-22 11:16:28 -04:00
Eric Huss
ef7502b878 Fix rust-analyzer install when not available. 2021-07-22 11:16:28 -04:00
Jane Lusby
96941c7c12 fix ui tests 2021-07-22 11:14:43 -04:00
Mara Bos
5dd09b0790 Move [debug_]assert_matches to mod {core, std}::assert. 2021-07-22 11:14:40 -04:00
Felix S. Klock II
eb3eb22f5e Revert PR 81473 to resolve (on mainline) issues 81626 and 81658.
Revert "Add missing brace"

This reverts commit 85ad773049.

Revert "Simplify base_expr"

This reverts commit 899aae465e.

Revert "Warn write-only fields"

This reverts commit d3c69a4c0d.
2021-07-22 09:46:32 -04:00
Guillaume Gomez
d78e83ac50 Revert "Don't load all extern crates unconditionally"
(cherry picked from commit 5f0c54db4e)
2021-07-02 12:31:46 -07:00
Jacob Hoffman-Andrews
e6837ebf03 Revert "List trait impls before methods from deref in the sidebar of Rustdoc's output"
This reverts commit 8a058926ec.

(cherry picked from commit 093e246445)
2021-07-02 12:19:39 -07:00
Felix S. Klock II
5b3a26655f Updates to tests.
(cherry picked from commit 8ce761d75e)
2021-07-02 12:19:38 -07:00
Caleb Cartwright
075fd9324e fix(rustfmt): load nested out-of-line mods correctly
(cherry picked from commit d2f2237d31)
2021-07-02 11:50:48 -07:00
Mark Rousskov
c4aeccdf45 Ignore failures of RLS on aarch64 Windows 2021-06-23 11:46:02 -04:00
Mark Rousskov
680c6cea45 Bump expat to 2.4.1 2021-06-23 10:37:52 -04:00
Eric Huss
b36bc9e7e5 Comment and include rust-analyzer. 2021-06-23 10:18:58 -04:00
Eric Huss
c064a31206 Don't dist miri on stable or beta. 2021-06-23 10:18:57 -04:00
Eric Huss
84d831ef25 [beta] Update cargo 2021-06-22 20:49:34 -04:00
Mark Rousskov
793b0055d2 Disable pgo-branch-weights test on aarch64
This will let us produce a beta and investigate a proper fix on a longer
timescale.
2021-06-22 16:04:27 -04:00
Mark Rousskov
6affded132 Fix CI to fetch master on beta channel 2021-06-20 16:19:48 -04:00
Felix S. Klock II
86b2323629 regression test for issue 82465. 2021-06-19 10:27:44 -04:00
Felix S. Klock II
93d9ec726f manually crafted revert of PR #80653, to address issue #82465.
(update: placated tidy)
(update: rebased post PR #84707 )

merge me
2021-06-19 10:27:44 -04:00
Mark Rousskov
f07bf3a428 Revert "Allow specifying alignment for functions"
This reverts commit 448d07683a.
2021-06-19 10:27:44 -04:00
Mark Rousskov
0f197bc918 Bootstrap from stable 2021-06-17 15:00:41 -04:00
Yuki Okushi
2b3884f6e6
Rollup merge of #86205 - JohnTitor:full-test-for-72293, r=oli-obk
Run full const-generics test for issue-72293

Closes #72293
r? ```@oli-obk```
2021-06-12 01:16:02 +09:00
Yuki Okushi
91faabb424
Rollup merge of #86174 - lqd:const-ub-align, r=RalfJung
Detect incorrect vtable alignment during const eval

This PR fixes #86132 by detecting invalid alignment values for trait objects in the interpreter, and emitting an error about this conversion failure, to avoid the ICE.

I've noticed that the error emitted at a50d72158e/compiler/rustc_mir/src/interpret/traits.rs (L163-L166) doesn't seem to be present in the const-ub tests, so I've tried adding a test that triggers both of these cases: one for the invalid size, and another for the invalid alignment that #86132 tracks (I have found different magic values triggering different `Align::from_bytes` errors than the "power of 2" one, if need be).

However, when doing that, I *cannot* for the life of me figure out the correct incantation to make these 2 errors trigger with the "it is undefined behavior to use this value" message rather than the "any use of this value will cause an error" lint.

I've tried Oli's suggestions of different values, tuples and arrays, using the transparent wrapper trick from the other tests and I was only able to trigger the regular const-ub errors about the size of the vtable, or that the drop pointer was invalid. Maybe these "type validation failed" errors happen before this part of the interpreter is reached and there just needs some magic incorrect values to bypass them, I don't know.

Since this fixes an ICE, and if the constants are indeed used, these 2 tests will turn into a hard error, I thought I'd open the PR anyways. And if ```@RalfJung``` you know of a way I could manage that (if you think that these tests are worth checking that the `throw_ub_format!` does indeed create const-ub errors as we expect) I'd be grateful.

For that reason, r? ```@RalfJung``` and cc ```@oli-obk.```
2021-06-12 01:16:00 +09:00
Yuki Okushi
79c0559ce1
Rollup merge of #86153 - tmiasko:dummy-span, r=estebank
Print dummy spans as `no-location`

Fixes #58808.
2021-06-12 01:15:59 +09:00
Yuki Okushi
883e1a5fd4
Rollup merge of #85823 - fee1-dead:borrowck-0, r=jackh726
Do not suggest ampmut if rhs is already mutable

Removes invalid suggestion in #85765, although it should highlight the user type instead of the local variable.

Looking at the comments of this line:
84b1005bfd/compiler/rustc_mir_build/src/build/matches/mod.rs (L2107)

It was intentionally set to `None`, causing it to highlight the local variable instead. I am not sure if I will be able to fix it.

Fixes #85765
2021-06-12 01:15:57 +09:00
Yuki Okushi
3b47d337e0
Rollup merge of #85800 - BoxyUwU:const-param-default-diagnostics, r=oli-obk
Fix some diagnostic issues with const_generics_defaults feature gate

This PR makes a few changes:
- print out const param defaults in "lifetime ordering" errors rather than discarding them
- update `is_simple_text` to account for const params when checking if a type has no generics, this was causing a note to be failed to add to an error message
- fixes some diagnostic wording that incorrectly said there was ordering restrictions between type/const params despite the `const_generics_defaults` feature gate is active
2021-06-12 01:15:56 +09:00
bors
dddebf94bc Auto merge of #86116 - FabianWolff:issue-86100, r=varkor
Suggest a trailing comma if a 1-tuple is expected and a parenthesized expression is found

This pull request fixes #86100. The following code:
```rust
fn main() {
    let t: (i32,) = (1);
}
```
currently produces:
```
warning: unnecessary parentheses around assigned value
 --> test.rs:2:21
  |
2 |     let t: (i32,) = (1);
  |                     ^^^ help: remove these parentheses
  |
  = note: `#[warn(unused_parens)]` on by default

error[E0308]: mismatched types
 --> test.rs:2:21
  |
2 |     let t: (i32,) = (1);
  |            ------   ^^^ expected tuple, found integer
  |            |
  |            expected due to this
  |
  = note: expected tuple `(i32,)`
              found type `{integer}`

error: aborting due to previous error; 1 warning emitted
```
With my changes, I get the same warning and the following error:
```
error[E0308]: mismatched types
 --> test.rs:2:21
  |
2 |     let t: (i32,) = (1);
  |            ------   ^^^ expected tuple, found integer
  |            |
  |            expected due to this
  |
  = note: expected tuple `(i32,)`
              found type `{integer}`
help: use a trailing comma to create a tuple with one element
  |
2 |     let t: (i32,) = (1,);
  |                     ^^^^
```
i.e. I have added a suggestion to add a trailing comma to create a 1-tuple. This suggestion is only issued if a 1-tuple is expected and the expression (`(1)` in the example above) is surrounded by parentheses and does not already have a tuple type. In this situation, I'd say that it is pretty likely that the user meant to create a tuple.
2021-06-11 10:25:53 +00:00
bors
66ba81059e Auto merge of #85994 - tmiasko:monomorphic-needs-drop, r=RalfJung
Disallow non-monomorphic calls to `needs_drop` in interpreter

otherwise evaluation could change after further substitutions.
2021-06-11 07:44:58 +00:00
bors
68aa6b2d83 Auto merge of #86204 - alexcrichton:wasm-simd-stable, r=Amanieu
std: Stabilize wasm simd intrinsics

This commit performs two changes to stabilize Rust support for
WebAssembly simd intrinsics:

* The stdarch submodule is updated to pull in rust-lang/stdarch#1179.
* The `wasm_target_feature` feature gate requirement for the `simd128`
  feature has been removed, stabilizing the name `simd128`.

This should conclude the FCP started on #74372 and...

Closes #74372
2021-06-11 05:02:41 +00:00
Alex Crichton
e05bb26d9f std: Stabilize wasm simd intrinsics
This commit performs two changes to stabilize Rust support for
WebAssembly simd intrinsics:

* The stdarch submodule is updated to pull in rust-lang/stdarch#1179.
* The `wasm_target_feature` feature gate requirement for the `simd128`
  feature has been removed, stabilizing the name `simd128`.

This should conclude the FCP started on #74372 and...

Closes #74372
2021-06-10 19:42:05 -07:00
bors
72868e017b Auto merge of #85961 - 1000teslas:issue-71519-fix, r=petrochenkov
MVP for using rust-lld as part of cc

Will fix #71519. I need to figure out how to write a test showing that lld is used instead of whatever linker cc normally uses. When I manually run rustc using `echo 'fn main() {}' | RUSTC_LOG=rustc_codegen_ssa:🔙:link=debug ./rustc -Clinker-flavor=gcc-lld --crate-type bin -Clink-arg=-Wl,-v` (thanks to bjorn3 on Zulip), I can see that lld is used, but I'm not sure how to inspect that output in a test.
2021-06-11 02:21:52 +00:00
Yuki Okushi
d7e0f431de Run full const-generics test for issue-72293 2021-06-11 06:48:34 +09:00
bors
16e18395ce Auto merge of #80080 - rylev:qpath-on-struct, r=petrochenkov
Allow qualified paths in struct construction (both expressions and patterns)

Fixes #79658
2021-06-10 20:32:43 +00:00
bors
c622840b90 Auto merge of #86098 - pietroalbini:test-stable, r=Mark-Simulacrum
Add the x86_64-gnu-stable builder

During the 1.52 release process we had to deal with some commits that passed the test suite on the nightly branch but failed on the beta or stable branch. In that case it was due to some UI tests including the channel name in the output, but other changes might also be dependent on the channel.

This commit adds a new CI job that runs the Linux x86_64 test suite with the stable branch, ensuring nightly changes also work as stable. To ensure the new job works the following other changes are present:

* The `ui-fulldeps/session-derive-errors.rs` test has been disabled on beta and stable, which required adding support for `// ignore-{channel}` and `// only-{channel}`.
* The `rustdoc/intra-doc/field.rs` has been fixed.

r? `@Mark-Simulacrum`
fixes https://github.com/rust-lang/release-team/issues/11
2021-06-10 17:51:48 +00:00
bors
40c1623b16 Auto merge of #82639 - jyn514:stable-options, r=Mark-Simulacrum
Don't pass -Z unstable-options by default for UI tests

Unconditionally passing -Z unstable-options makes it impossible to test whether an option requires unstable-options or not.

This uncovered quite a lot of bugs, I'll open issues for each. These don't strictly need to be fixed before this is merged, it just makes the diff much larger because of the changes to diagnostics.

- https://github.com/rust-lang/rust/issues/82636
- https://github.com/rust-lang/rust/issues/82637
- https://github.com/rust-lang/rust/issues/82638
2021-06-10 12:47:54 +00:00
Ryan Levick
6936349233 Add support for using qualified paths with structs in expression and pattern
position.
2021-06-10 13:18:41 +02:00
1000teslas
2a76762695 gcc-lld mvp
ignore test if rust-lld not found

create ld -> rust-lld symlink at build time instead of run time

for testing in ci

copy instead of symlinking

remove linux check

test for linker, suggestions from bjorn3

fix overly restrictive lld matcher

use -Zgcc-ld flag instead of -Clinker-flavor

refactor code adding lld to gcc path

revert ci changes

suggestions from petrochenkov

rename gcc_ld to gcc-ld in dirs
2021-06-10 17:10:40 +10:00
Yuki Okushi
a6b7e1c121
Rollup merge of #86175 - RalfJung:miri, r=RalfJung
update Miri

We had some nice PRs land today, let's ship those. :)
Cc `@rust-lang/miri` r? `@ghost`
2021-06-10 11:02:16 +09:00
Yuki Okushi
f7aea23bd2
Rollup merge of #86113 - the8472:doctest-lld, r=Mark-Simulacrum
build doctests with lld if use-lld = true

results when running `./x.py test library/core --doc --stage 0`:

```
# OLD
test result: FAILED. 2844 passed; 6 failed; 28 ignored; 0 measured; 0 filtered out; finished in 21.13s

# NEW
test result: FAILED. 2844 passed; 6 failed; 28 ignored; 0 measured; 0 filtered out; finished in 11.92s
```
2021-06-10 11:02:15 +09:00