Commit Graph

209581 Commits

Author SHA1 Message Date
Matthias Krüger
7b518af5d9
Rollup merge of #103946 - camsteffen:cleanup-bind-pattern, r=cjgillot
Cleanup bind_pattern args

Fixes #101896
2022-11-05 00:02:05 +01:00
Matthias Krüger
68c8d6d1c1
Rollup merge of #103878 - Mark-Simulacrum:fix-stable-ci-download, r=jyn514
Fix artifact version/channel detection for stable

On stable, our artifacts are uploaded with the raw version number (e.g., 1.65.0), not the channel. This adjusts our detection logic to use the version number from src/version when we detect the stable channel.

This is really only important for stable channel re-builds, I think, but those do happen from time to time. I'm backporting a similar commit in https://github.com/rust-lang/rust/pull/103859 to make that PR pass CI.
2022-11-05 00:02:04 +01:00
Matthias Krüger
ad01a37ca9
Rollup merge of #103868 - compiler-errors:trait-engine-less, r=jackh726
Use `TraitEngine` (by itself) less

Replace `TraitEngine` in favor of `ObligationCtxt` or `fully_solve_*`, improving code readability.
2022-11-05 00:02:04 +01:00
Michael Howell
cb184bb023 rustdoc: clean up .logo-container layout CSS
This commit should result in no appearance changes.

To make the logo container exactly the desired height, you want to get rid
of the part of the box used for typographic descenders (you know, the part
of g, y, and j that descends below the baseline). After all, it contains no
text, but the space is still left open in the layout by default, because
`<img>` is `display:inline`. The CSS used to employ three different tricks
to accomplish this:

* By making `.sidebar .logo-container` a flex container, the image becomes
  a flex item and is [blockified], without synthesizing any inline boxes.
  No inline boxes means no descenders.
* By giving `.mobile-topbar .logo-container` a max-height exactly the same
  as the height of the image plus the padding, the descender area gets
  cut off.
* By setting `.sub-logo-container { line-height: 0 }`, we ensure that the
  only box that contributes to the height of the line box is the image
  itself, and not any zero-content text boxes that neighbor it. See the
  [logical height algorithm].

This commit gets rid of the first two hacks, leaving only the third,
since it requires only one line of code to accomplish and doesn't require
setting the value based on math.

[blockified]: https://drafts.csswg.org/css-flexbox-1/#flex-items
[logical height algorithm]: https://www.w3.org/TR/css-inline-3/#inline-height
2022-11-04 16:00:57 -07:00
bors
81ff7e7385 Auto merge of #103298 - ferrocene:pa-compile-flags-last, r=jyn514
Ensure that compile-flags arguments are the last in UI tests

Before this PR, compiletest would add `-L path/to/aux` at the end of the rustc flags, even after the custom ones set with the compile-flags header comment. This made it impossible to check how rustc would behave when a flag requiring an argument was passed without the argument, because the argument would become `-L`.

This PR fixes that by adding the `-L path/to/aux` before the arguments defined in compile-flags, at least for UI tests. Other test suites might either be fixed as well by this change, or still present the old behavior (`-L` is now always passed before, but other tests suites might add additional flags after the custom ones).
2022-11-04 22:24:46 +00:00
Michael Goulet
4e7fc663cc Don't silently eat label before block in block-like expr 2022-11-04 21:35:58 +00:00
Michael Goulet
a0cdc85b32 Remove in_tail_expr from FnCtxt 2022-11-04 21:17:39 +00:00
Mateusz
c97fd8183a
Refactor tcx mk_const parameters. 2022-11-04 20:33:32 +00:00
bors
cd2603299c Auto merge of #13546 - Veykril:unsafe-fn-ptr, r=Veykril
Lower unsafety of fn pointer and fn item types
2022-11-04 20:29:16 +00:00
Michael Howell
4bd6748bb9 rustdoc: get rid of CSS/DOM div.desc span, which isn't really needed 2022-11-04 13:19:33 -07:00
Lukas Wirth
6f09c72b1b Lower unsafety of fn pointer and fn item types 2022-11-04 21:07:15 +01:00
bors
09508489ef Auto merge of #103978 - matthiaskrgr:rollup-iym9kmg, r=matthiaskrgr
Rollup of 8 pull requests

Successful merges:

 - #103367 (Remove std's transitive dependency on cfg-if 0.1)
 - #103397 (Port `dead_code` lints to be translatable.)
 - #103681 (libtest: run all tests in their own thread, if supported by the host)
 - #103792 (Migrate `codegen_ssa` to diagnostics structs - [Part 2])
 - #103897 (asm: Work around LLVM bug on AArch64)
 - #103937 (minor changes to make method lookup diagnostic code easier to read)
 - #103958 (Test tidy should not count untracked paths towards entries limit)
 - #103964 (Give a specific lint for unsafety not being inherited)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2022-11-04 19:43:36 +00:00
Michael Howell
b30c4d1932 rustdoc: simplify search results CSS and DOM
There is a layout change caused by this commit, but it's subtle. You won't
notice it unless you're looking for it.
2022-11-04 12:40:50 -07:00
León Orell Valerian Liehr
5ccaed212e rustdoc: create helper GenericParamDef::lifetime 2022-11-04 20:10:53 +01:00
León Orell Valerian Liehr
7ec50b629c rustdoc: add test for cross-crate trait-object types
as well as some FIXMEs
2022-11-04 20:10:53 +01:00
León Orell Valerian Liehr
71561f82c3 rustdoc: render the return type of cross-crate Fn-family trait bounds in trait-object types 2022-11-04 20:10:51 +01:00
León Orell Valerian Liehr
1ac7034481 rustdoc: render for<> param lists of cross-crate trait-object types 2022-11-04 19:34:37 +01:00
León Orell Valerian Liehr
2d9755fa21 rustdoc: move cross-crate lifetime/outlives bounds on GAT params from where-clause to param declaration site
I've overlooked this in #103190.
2022-11-04 19:34:37 +01:00
León Orell Valerian Liehr
9cdab67f6e rustdoc: render unnamed arguments as underscores in cross-crate functions & function pointers
for consistency with the way we display local definitions (cleaned from HIR, not from rustc_middle).
2022-11-04 19:34:37 +01:00
León Orell Valerian Liehr
5965af7010 rustdoc: render late-bound lifetimes in generic parameter list of cross-crate functions and methods 2022-11-04 19:34:36 +01:00
Tim Neumann
c15cfc91c4 LLVM 16: Switch to using MemoryEffects 2022-11-04 17:58:16 +00:00
Matthias Krüger
347c478d88
Rollup merge of #103964 - clubby789:lint-enclosing-unsafe, r=compiler-errors
Give a specific lint for unsafety not being inherited

In cases like
```rs
static mut FOO: u64 = 0;
fn main() {
    unsafe {static BAR: u64 = FOO;}
}
```
and
```rs
fn foo() {
  unsafe {
    fn bar() {
      unsafe_call();
    }
  }
}
```
Specifically inform the user that the unsafety is not inherited for the seperate enclosing items
Fixes #94077
r? compiler-errors
`@rustbot` label +A-diagnostics
2022-11-04 18:52:29 +01:00
Matthias Krüger
82d7de837c
Rollup merge of #103958 - chenyukang:yukang/fix-103951-count-limit, r=jyn514
Test tidy should not count untracked paths towards entries limit

Fixes #103951
r? `@jyn514`
2022-11-04 18:52:28 +01:00
Matthias Krüger
f7ed72de40
Rollup merge of #103937 - BoxyUwU:misc_cleanups, r=compiler-errors
minor changes to make method lookup diagnostic code easier to read

The end result of around 4 days of trying to understand this 1000+ line long function- a bunch of tiny nitpicks

r? `@compiler-errors`
2022-11-04 18:52:28 +01:00
Matthias Krüger
2aa8ad6d39
Rollup merge of #103897 - Amanieu:llvm-58384, r=davidtwco
asm: Work around LLVM bug on AArch64

Upstream issue: https://github.com/llvm/llvm-project/issues/58384

LLVM gets confused if we assign a 32-bit value to a 64-bit register, so pass the 32-bit register name to LLVM in that case.
2022-11-04 18:52:27 +01:00
Matthias Krüger
1cb8684dde
Rollup merge of #103792 - JhonnyBillM:migrate-codegen-ssa-to-diagnostics-structs-pt2, r=davidtwco
Migrate `codegen_ssa` to diagnostics structs - [Part 2]

Completes migrating `link.rs` in `codegen_ssa` module.

_Part 1 - https://github.com/rust-lang/rust/pull/102612_

r? `@davidtwco`
2022-11-04 18:52:27 +01:00
Matthias Krüger
c38ee06b62
Rollup merge of #103681 - RalfJung:libtest-thread, r=thomcc
libtest: run all tests in their own thread, if supported by the host

This reverts the threading changes of https://github.com/rust-lang/rust/pull/56243, which made it so that with `-j1`, the test harness does not spawn any threads. Those changes were done to enable Miri to run the test harness, but Miri supports threads nowadays, so this is no longer needed. Using a thread for each test is useful because the thread's name can be set to the test's name which makes panic messages consistent between `-j1` and `-j2` runs and also a bit more readable.

I did not revert the HashMap changes of https://github.com/rust-lang/rust/pull/56243; using a deterministic map seems fine for the test harness and the more deterministic testing is the better.

Fixes https://github.com/rust-lang/rust/issues/59122
Fixes https://github.com/rust-lang/rust/issues/70492
2022-11-04 18:52:26 +01:00
Matthias Krüger
612bb7890c
Rollup merge of #103397 - crlf0710:port_dead_code_lint, r=davidtwco
Port `dead_code` lints to be translatable.

This adds an additional comma to lists with three or more items, to be consistent with list formatters like `icu4x`.

r? `@davidtwco`
2022-11-04 18:52:26 +01:00
Matthias Krüger
dabb6c6bd7
Rollup merge of #103367 - chbaker0:update-std-getrandom, r=thomcc
Remove std's transitive dependency on cfg-if 0.1

After https://github.com/rust-lang/rust/pull/101946 this completes the move to cfg-if 1.0 by:
* Updating getrandom 0.1.14->0.1.16
* Updating panic_abort's and unwind's dep to cfg-if 1.0

Fixes https://github.com/rust-lang/rust/issues/103365
2022-11-04 18:52:25 +01:00
Oli Scherer
44d1936d00 Some tracing and comment cleanups 2022-11-04 17:10:07 +00:00
bors
c2a5c3a50f Auto merge of #101703 - nicholasbishop:bishop-add-uefi-ci-2, r=jyn514
Add QEMU test for x86_64-unknown-uefi

The UEFI targets don't have std support yet, so the normal tests don't work. However, we can compile a simple no-std program and run it under QEMU to at least check that the target compiles, links, and runs.

Tested locally with: `src/ci/docker/run.sh x86_64-uefi`
2022-11-04 17:00:24 +00:00
Oli Scherer
a2325fe3a9 Remove an option and choose a behaviour-preserving default instead. 2022-11-04 16:28:01 +00:00
bors
ad633db493 Auto merge of #13544 - HKalbasi:patch-2, r=Veykril
Add rustbot features related to PR state labels

It makes rustbot add `S-waiting-on-review` to every new PR, and ``@rustbot` author` and ``@rustbot` review` commands working.
2022-11-04 16:12:21 +00:00
Onur Özkan
71a3a48ee5 improve filesearch::get_or_default_sysroot r=ozkanonur
Signed-off-by: Onur Özkan <work@onurozkan.dev>
2022-11-04 17:06:47 +03:00
yukang
18511ba1cb test tidy should not count untracked paths towards entries limit 2022-11-04 21:48:56 +08:00
bors
6330c27ae2 Auto merge of #103962 - matthiaskrgr:rollup-9av8i6k, r=matthiaskrgr
Rollup of 7 pull requests

Successful merges:

 - #103680 (CStr: add some doc links)
 - #103780 (Fix late-bound lifetime closure ICEs in HIR typeck and MIR borrowck)
 - #103845 (Add track_caller to some Lock methods)
 - #103935 (Remove rustdoc clean::Visibility type)
 - #103941 (Fixed typos)
 - #103950 (Fix ICE when negative impl is collected during eager mono)
 - #103953 (Remove unused argument from `throw_unresolved_import_error`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2022-11-04 13:47:37 +00:00
clubby789
28819cbb7e Formatting changes + add UI test 2022-11-04 12:58:20 +00:00
clubby789
b7360fa23f Give a specific lint for unsafety not being inherited 2022-11-04 12:26:21 +00:00
HKalbasi
3508820a14
Add rustbot features related to PR state labels 2022-11-04 15:27:50 +03:30
yukang
4b77e730b5 fake a base to suppress later extra error message 2022-11-04 19:32:32 +08:00
Matthias Krüger
1edd63f1e7
Rollup merge of #103953 - TaKO8Ki:remove-unused-arg-from-throw_unresolved_import_error, r=oli-obk
Remove unused argument from `throw_unresolved_import_error`

`throw_unresolved_import_error` does not need the second argument.
2022-11-04 12:18:03 +01:00
Matthias Krüger
ee3c9f7051
Rollup merge of #103950 - nbdd0121:master, r=tmiasko
Fix ICE when negative impl is collected during eager mono

```rust
trait Foo {
    fn foo() {}
}

impl !Foo for () {}
```

This code will currently cause an ICE when mono collection mode is "eager" (with `-C link-dead-code=y` or `-Z print-mono-items=eager`.
2022-11-04 12:18:03 +01:00
Matthias Krüger
9398676635
Rollup merge of #103941 - douweschulte:patch-1, r=jyn514
Fixed typos

Fixed a typo that has been found on two locations in comments.
2022-11-04 12:18:02 +01:00
Matthias Krüger
c6e5150441
Rollup merge of #103935 - GuillaumeGomez:remove-rustdoc-visibility-ty, r=notriddle
Remove rustdoc clean::Visibility type

Fixes #90852.

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

This PR completely removes the rustdoc `clean::Visibility` type to use the `rustc_middle` one instead. I don't think there will be any impact on perf.

r? `@notriddle`
2022-11-04 12:18:02 +01:00
Matthias Krüger
d976a29c30
Rollup merge of #103845 - camsteffen:data-structures-track-caller, r=compiler-errors
Add track_caller to some Lock methods

Would have helped to diagnose #103844.
2022-11-04 12:18:01 +01:00
Matthias Krüger
d10187f040
Rollup merge of #103780 - compiler-errors:bound-closure-lifetimes, r=jackh726
Fix late-bound lifetime closure ICEs in HIR typeck and MIR borrowck

During HIR typeck, we need to teach astconv to treat late-bound regions within a closure body as free, fixing escaping bound vars ICEs in both of the issues below.

However, this then gets us to MIR borrowck, which itself needs to be taught how to instantiate free region vids for late-bound regions that come from items that _aren't_ the typeck root (for now, just closures).

Fixes #103771
Fixes #103736
2022-11-04 12:18:01 +01:00
Matthias Krüger
428dd011ca
Rollup merge of #103680 - RalfJung:cstr-links, r=JohnTitor
CStr: add some doc links
2022-11-04 12:18:00 +01:00
bors
47c008e440 Auto merge of #103098 - Amanieu:asm-tied-fixed, r=bjorn3
asm: Match clang behavior for inlateout fixed register operands

We have 2 options for representing LLVM constraints for `inlateout` operands on a fixed register (e.g. `r0`): `={r0},0` or `={r0},{r0}`.

This PR changes the behavior to the latter, which matches the behavior of Clang since https://reviews.llvm.org/D87279.
2022-11-04 10:39:04 +00:00
bors
2efb0cd4b2 Auto merge of #103954 - matthiaskrgr:rollup-tskpxnj, r=matthiaskrgr
Rollup of 10 pull requests

Successful merges:

 - #103825 (Remove let_underscore_must_use from list of uplifted lints)
 - #103884 (Add visit_fn_ret_ty to hir intravisit)
 - #103892 (Properly render asyncness for trait fns without default body)
 - #103905 (rustdoc: remove redundant mobile CSS `.sidebar-elems { background }`)
 - #103912 (Add howto for adding new targets)
 - #103915 (Improve use of ErrorGuaranteed and code cleanup)
 - #103930 (Move some tests from `src/test/ui` to more reasonable places)
 - #103931 (Add note to RELEASES.md regarding issue 102754.)
 - #103938 (rustdoc: clean up hardcoded CSS border color on search results)
 - #103940 (rustdoc: remove no-op CSS `#main-content > .item-info { margin-top: 0 }`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2022-11-04 07:26:56 +00:00
Jakob Degen
d98cce19b2 Make mir opt unused file check blessable 2022-11-03 23:19:59 -07:00