]> git.lizzy.rs Git - rust.git/log
rust.git
20 months agoRollup merge of #103868 - compiler-errors:trait-engine-less, r=jackh726
Matthias Krüger [Fri, 4 Nov 2022 23:02:04 +0000 (00:02 +0100)]
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.

20 months agorustdoc: clean up `.logo-container` layout CSS
Michael Howell [Fri, 4 Nov 2022 22:13:13 +0000 (15:13 -0700)]
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

20 months agoAuto merge of #103298 - ferrocene:pa-compile-flags-last, r=jyn514
bors [Fri, 4 Nov 2022 22:24:46 +0000 (22:24 +0000)]
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).

20 months agoDon't silently eat label before block in block-like expr
Michael Goulet [Fri, 4 Nov 2022 21:16:20 +0000 (21:16 +0000)]
Don't silently eat label before block in block-like expr

20 months agoRefactor tcx mk_const parameters.
Mateusz [Fri, 4 Nov 2022 20:33:32 +0000 (20:33 +0000)]
Refactor tcx mk_const parameters.

20 months agorustdoc: get rid of CSS/DOM `div.desc span`, which isn't really needed
Michael Howell [Fri, 4 Nov 2022 20:19:33 +0000 (13:19 -0700)]
rustdoc: get rid of CSS/DOM `div.desc span`, which isn't really needed

20 months agoAuto merge of #103978 - matthiaskrgr:rollup-iym9kmg, r=matthiaskrgr
bors [Fri, 4 Nov 2022 19:43:36 +0000 (19:43 +0000)]
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

20 months agorustdoc: simplify search results CSS and DOM
Michael Howell [Fri, 4 Nov 2022 19:34:24 +0000 (12:34 -0700)]
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.

20 months agorustdoc: create helper `GenericParamDef::lifetime`
León Orell Valerian Liehr [Wed, 2 Nov 2022 14:56:28 +0000 (15:56 +0100)]
rustdoc: create helper `GenericParamDef::lifetime`

20 months agorustdoc: add test for cross-crate trait-object types
León Orell Valerian Liehr [Wed, 2 Nov 2022 14:25:04 +0000 (15:25 +0100)]
rustdoc: add test for cross-crate trait-object types

as well as some FIXMEs

20 months agorustdoc: render the return type of cross-crate `Fn`-family trait bounds in trait...
León Orell Valerian Liehr [Wed, 2 Nov 2022 14:23:25 +0000 (15:23 +0100)]
rustdoc: render the return type of cross-crate `Fn`-family trait bounds in trait-object types

20 months agorustdoc: render `for<>` param lists of cross-crate trait-object types
León Orell Valerian Liehr [Wed, 2 Nov 2022 14:20:44 +0000 (15:20 +0100)]
rustdoc: render `for<>` param lists of cross-crate trait-object types

20 months agorustdoc: move cross-crate lifetime/outlives bounds on GAT params from where-clause...
León Orell Valerian Liehr [Wed, 2 Nov 2022 14:17:34 +0000 (15:17 +0100)]
rustdoc: move cross-crate lifetime/outlives bounds on GAT params from where-clause to param declaration site

I've overlooked this in #103190.

20 months agorustdoc: render unnamed arguments as underscores in cross-crate functions & function...
León Orell Valerian Liehr [Wed, 2 Nov 2022 14:13:54 +0000 (15:13 +0100)]
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).

20 months agorustdoc: render late-bound lifetimes in generic parameter list of cross-crate functio...
León Orell Valerian Liehr [Wed, 2 Nov 2022 14:10:36 +0000 (15:10 +0100)]
rustdoc: render late-bound lifetimes in generic parameter list of cross-crate functions and methods

20 months agoLLVM 16: Switch to using MemoryEffects
Tim Neumann [Fri, 4 Nov 2022 16:20:42 +0000 (16:20 +0000)]
LLVM 16: Switch to using MemoryEffects

20 months agoRollup merge of #103964 - clubby789:lint-enclosing-unsafe, r=compiler-errors
Matthias Krüger [Fri, 4 Nov 2022 17:52:29 +0000 (18:52 +0100)]
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

20 months agoRollup merge of #103958 - chenyukang:yukang/fix-103951-count-limit, r=jyn514
Matthias Krüger [Fri, 4 Nov 2022 17:52:28 +0000 (18:52 +0100)]
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`

20 months agoRollup merge of #103937 - BoxyUwU:misc_cleanups, r=compiler-errors
Matthias Krüger [Fri, 4 Nov 2022 17:52:28 +0000 (18:52 +0100)]
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`

20 months agoRollup merge of #103897 - Amanieu:llvm-58384, r=davidtwco
Matthias Krüger [Fri, 4 Nov 2022 17:52:27 +0000 (18:52 +0100)]
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.

20 months agoRollup merge of #103792 - JhonnyBillM:migrate-codegen-ssa-to-diagnostics-structs...
Matthias Krüger [Fri, 4 Nov 2022 17:52:27 +0000 (18:52 +0100)]
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`

20 months agoRollup merge of #103681 - RalfJung:libtest-thread, r=thomcc
Matthias Krüger [Fri, 4 Nov 2022 17:52:26 +0000 (18:52 +0100)]
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

20 months agoRollup merge of #103397 - crlf0710:port_dead_code_lint, r=davidtwco
Matthias Krüger [Fri, 4 Nov 2022 17:52:26 +0000 (18:52 +0100)]
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`

20 months agoRollup merge of #103367 - chbaker0:update-std-getrandom, r=thomcc
Matthias Krüger [Fri, 4 Nov 2022 17:52:25 +0000 (18:52 +0100)]
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

20 months agoSome tracing and comment cleanups
Oli Scherer [Thu, 20 Oct 2022 09:39:09 +0000 (09:39 +0000)]
Some tracing and comment cleanups

20 months agoAuto merge of #101703 - nicholasbishop:bishop-add-uefi-ci-2, r=jyn514
bors [Fri, 4 Nov 2022 17:00:24 +0000 (17:00 +0000)]
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`

20 months agoRemove an option and choose a behaviour-preserving default instead.
Oli Scherer [Fri, 4 Nov 2022 16:28:01 +0000 (16:28 +0000)]
Remove an option and choose a behaviour-preserving default instead.

20 months agoimprove `filesearch::get_or_default_sysroot` r=ozkanonur
Onur Özkan [Fri, 28 Oct 2022 07:20:51 +0000 (10:20 +0300)]
improve `filesearch::get_or_default_sysroot` r=ozkanonur

Signed-off-by: Onur Özkan <work@onurozkan.dev>
20 months agotest tidy should not count untracked paths towards entries limit
yukang [Fri, 4 Nov 2022 08:56:48 +0000 (16:56 +0800)]
test tidy should not count untracked paths towards entries limit

20 months agoAuto merge of #103962 - matthiaskrgr:rollup-9av8i6k, r=matthiaskrgr
bors [Fri, 4 Nov 2022 13:47:37 +0000 (13:47 +0000)]
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

20 months agoFormatting changes + add UI test
clubby789 [Fri, 4 Nov 2022 12:57:42 +0000 (12:57 +0000)]
Formatting changes + add UI test

20 months agoGive a specific lint for unsafety not being inherited
clubby789 [Fri, 4 Nov 2022 12:25:40 +0000 (12:25 +0000)]
Give a specific lint for unsafety not being inherited

20 months agofake a base to suppress later extra error message
yukang [Thu, 13 Oct 2022 22:52:23 +0000 (06:52 +0800)]
fake a base to suppress later extra error message

20 months agoRollup merge of #103953 - TaKO8Ki:remove-unused-arg-from-throw_unresolved_import_erro...
Matthias Krüger [Fri, 4 Nov 2022 11:18:03 +0000 (12:18 +0100)]
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.

20 months agoRollup merge of #103950 - nbdd0121:master, r=tmiasko
Matthias Krüger [Fri, 4 Nov 2022 11:18:03 +0000 (12:18 +0100)]
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`.

20 months agoRollup merge of #103941 - douweschulte:patch-1, r=jyn514
Matthias Krüger [Fri, 4 Nov 2022 11:18:02 +0000 (12:18 +0100)]
Rollup merge of #103941 - douweschulte:patch-1, r=jyn514

Fixed typos

Fixed a typo that has been found on two locations in comments.

20 months agoRollup merge of #103935 - GuillaumeGomez:remove-rustdoc-visibility-ty, r=notriddle
Matthias Krüger [Fri, 4 Nov 2022 11:18:02 +0000 (12:18 +0100)]
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`

20 months agoRollup merge of #103845 - camsteffen:data-structures-track-caller, r=compiler-errors
Matthias Krüger [Fri, 4 Nov 2022 11:18:01 +0000 (12:18 +0100)]
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.

20 months agoRollup merge of #103780 - compiler-errors:bound-closure-lifetimes, r=jackh726
Matthias Krüger [Fri, 4 Nov 2022 11:18:01 +0000 (12:18 +0100)]
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

20 months agoRollup merge of #103680 - RalfJung:cstr-links, r=JohnTitor
Matthias Krüger [Fri, 4 Nov 2022 11:18:00 +0000 (12:18 +0100)]
Rollup merge of #103680 - RalfJung:cstr-links, r=JohnTitor

CStr: add some doc links

20 months agoAuto merge of #103098 - Amanieu:asm-tied-fixed, r=bjorn3
bors [Fri, 4 Nov 2022 10:39:04 +0000 (10:39 +0000)]
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.

20 months agoAuto merge of #103954 - matthiaskrgr:rollup-tskpxnj, r=matthiaskrgr
bors [Fri, 4 Nov 2022 07:26:56 +0000 (07:26 +0000)]
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

20 months agoMake mir opt unused file check blessable
Jakob Degen [Fri, 4 Nov 2022 06:19:59 +0000 (23:19 -0700)]
Make mir opt unused file check blessable

20 months agoRollup merge of #103940 - notriddle:notriddle/main-content-item-info-margin-top,...
Matthias Krüger [Fri, 4 Nov 2022 05:40:34 +0000 (06:40 +0100)]
Rollup merge of #103940 - notriddle:notriddle/main-content-item-info-margin-top, r=GuillaumeGomez

rustdoc: remove no-op CSS `#main-content > .item-info { margin-top: 0 }`

When this line was added in 04b4c40682c01cad8f9bc8d5b3907be91d6f81d4, it overrode a negative `margin-top` that was set on it by default.

https://github.com/rust-lang/rust/blob/04b4c40682c01cad8f9bc8d5b3907be91d6f81d4/src/librustdoc/html/static/rustdoc.css#L500-L516

That negative top margin was removed in 593d6d1cb15c55c88319470dabb40126c7b7f1e2.

20 months agoRollup merge of #103938 - notriddle:notriddle/search-results-border-bottom, r=Guillau...
Matthias Krüger [Fri, 4 Nov 2022 05:40:34 +0000 (06:40 +0100)]
Rollup merge of #103938 - notriddle:notriddle/search-results-border-bottom, r=GuillaumeGomez

rustdoc: clean up hardcoded CSS border color on search results

Hardcoded colors in rustdoc.css should usually be avoided.

Preview: http://notriddle.com/notriddle-rustdoc-demos/border-bottom-search/test_dingus/?search=test

20 months agoRollup merge of #103931 - pnkfelix:note-eh-personality-limit-atop-lld, r=Mark-Simulacrum
Matthias Krüger [Fri, 4 Nov 2022 05:40:33 +0000 (06:40 +0100)]
Rollup merge of #103931 - pnkfelix:note-eh-personality-limit-atop-lld, r=Mark-Simulacrum

Add note to RELEASES.md regarding issue 102754.

As discussed in [compiler triage meeting today](https://rust-lang.zulipchat.com/#narrow/stream/238009-t-compiler.2Fmeetings/topic/.5Bweekly.5D.202022-11-03/near/307746618); it would have been nice to get this in time for the stable notes, but having it only in nightly only is better than nothing...

r? `@Mark-Simulacrum`

20 months agoRollup merge of #103930 - fee1-dead-contrib:mv-from-root, r=jyn514
Matthias Krüger [Fri, 4 Nov 2022 05:40:33 +0000 (06:40 +0100)]
Rollup merge of #103930 - fee1-dead-contrib:mv-from-root, r=jyn514

Move some tests from `src/test/ui` to more reasonable places

20 months agoRollup merge of #103915 - chenyukang:yukang/fix-103874, r=lcnr
Matthias Krüger [Fri, 4 Nov 2022 05:40:32 +0000 (06:40 +0100)]
Rollup merge of #103915 - chenyukang:yukang/fix-103874, r=lcnr

Improve use of ErrorGuaranteed and code cleanup

Part of #103874

20 months agoRollup merge of #103912 - flba-eb:doc_adding_tier3_target, r=davidtwco
Matthias Krüger [Fri, 4 Nov 2022 05:40:32 +0000 (06:40 +0100)]
Rollup merge of #103912 - flba-eb:doc_adding_tier3_target, r=davidtwco

Add howto for adding new targets

When new targets are added, often a reviewer finds out that e.g. the target-3-tier-policy is not filled out (missing), there is no description etc.
This change adds a description of what I've learned while working on #102701. It should make reviews easier in the future with less rework.

r? compiler-team

20 months agoRollup merge of #103905 - notriddle:notriddle/sidebar-elems-background, r=GuillaumeGomez
Matthias Krüger [Fri, 4 Nov 2022 05:40:31 +0000 (06:40 +0100)]
Rollup merge of #103905 - notriddle:notriddle/sidebar-elems-background, r=GuillaumeGomez

rustdoc: remove redundant mobile CSS `.sidebar-elems { background }`

The exact same background is already set for its parent, the `nav.sidebar`.

20 months agoRollup merge of #103892 - compiler-errors:afit-rustdoc, r=GuillaumeGomez
Matthias Krüger [Fri, 4 Nov 2022 05:40:31 +0000 (06:40 +0100)]
Rollup merge of #103892 - compiler-errors:afit-rustdoc, r=GuillaumeGomez

Properly render asyncness for trait fns without default body

We weren't properly desugaring async fns in traits unless they had default bodies (in which case rustdoc treats them much like they came from an impl).

cc ```@yoshuawuyts``` should help with https://rust-lang.zulipchat.com/#narrow/stream/330606-wg-async.2Fasync-fn-in-trait-impl/topic/type.20inside.20.60async.20fn.60.20body.20must.20be.20known.20in.20this.20context/near/306894869

20 months agoRollup merge of #103884 - spastorino:visit-fn-ret-ty-intravisit, r=compiler-errors
Matthias Krüger [Fri, 4 Nov 2022 05:40:31 +0000 (06:40 +0100)]
Rollup merge of #103884 - spastorino:visit-fn-ret-ty-intravisit, r=compiler-errors

Add visit_fn_ret_ty to hir intravisit

I'm working on some RPITIT changes and I need to specialize `visit_fn_ret_ty` in my visitor impl. So I guess it's better to land it separately.

r? `@compiler-errors`

20 months agoRollup merge of #103825 - Mark-Simulacrum:fix-relnotes, r=pietroalbini
Matthias Krüger [Fri, 4 Nov 2022 05:40:30 +0000 (06:40 +0100)]
Rollup merge of #103825 - Mark-Simulacrum:fix-relnotes, r=pietroalbini

Remove let_underscore_must_use from list of uplifted lints

Per https://internals.rust-lang.org/t/rust-1-65-0-pre-release-testing/17660/2

We probably won't backport this (not worth rebuilding stable artifacts over it) but still should be fixed.

20 months agoUPDATE - accept dyn error and make Box<dyn error> conform to IntoDiagnosticArg
Jhonny Bill Mena [Fri, 4 Nov 2022 05:16:16 +0000 (01:16 -0400)]
UPDATE - accept dyn error and make Box<dyn error> conform to IntoDiagnosticArg

20 months agoUPDATE - address PR Comments
Jhonny Bill Mena [Thu, 3 Nov 2022 05:53:06 +0000 (01:53 -0400)]
UPDATE - address PR Comments

FIX - StrippingDebugInfoFailed typo

DELETE - unneeded FIXME comment

UPDATE - only declare the error with ExtractBundledLibsError as an enum and use the Diagnostic derive macro

20 months agoFIX - Migrate missing errors in link.rs
Jhonny Bill Mena [Mon, 31 Oct 2022 05:51:58 +0000 (01:51 -0400)]
FIX - Migrate missing errors in link.rs

20 months agoADD - ExtractBundledLibsError. Migrated extract_bundled_libs to translatable diagnostics
Jhonny Bill Mena [Mon, 31 Oct 2022 05:36:32 +0000 (01:36 -0400)]
ADD - ExtractBundledLibsError. Migrated extract_bundled_libs to translatable diagnostics

20 months agoUPDATE - Complete link.rs migration to new diagnostics infraestructure
Jhonny Bill Mena [Sun, 30 Oct 2022 19:38:37 +0000 (15:38 -0400)]
UPDATE - Complete link.rs migration to new diagnostics infraestructure

20 months agoremove unused argument from `throw_unresolved_import_error`
Takayuki Maeda [Fri, 4 Nov 2022 04:59:04 +0000 (13:59 +0900)]
remove unused argument from `throw_unresolved_import_error`

20 months agoAuto merge of #102928 - notriddle:notriddle/rustdoc-thin-vec, r=GuillaumeGomez
bors [Fri, 4 Nov 2022 03:32:18 +0000 (03:32 +0000)]
Auto merge of #102928 - notriddle:notriddle/rustdoc-thin-vec, r=GuillaumeGomez

rustdoc: use ThinVec for cleaned generics

Depends on https://github.com/Gankra/thin-vec/pull/38

20 months agoFix ICE when negative impl is collected during eager mono
Gary Guo [Fri, 4 Nov 2022 03:08:28 +0000 (03:08 +0000)]
Fix ICE when negative impl is collected during eager mono

20 months agofix #102806, suggest use .. to fill in the rest of the fields of Struct
yukang [Thu, 13 Oct 2022 15:27:17 +0000 (23:27 +0800)]
fix #102806, suggest use .. to fill in the rest of the fields of Struct

20 months agoAuto merge of #101834 - compiler-errors:super-deduce-closure-sig, r=lcnr
bors [Fri, 4 Nov 2022 00:51:37 +0000 (00:51 +0000)]
Auto merge of #101834 - compiler-errors:super-deduce-closure-sig, r=lcnr

Elaborate supertrait obligations when deducing closure signatures

We elaborate the supertrait obligations of any registered predicates for a closure to see if we can infer a closure signature.

This is not as general of a fix as it *could* be, since we just elaborate supertrait bounds instead of doing a theoretical walk of _all_ registered predicates that might cause us to deduce `Fn` trait information for a closure infer var. I don't even know how to come up with an example that fails here but would work with a more general system.

Fixes #23012
Also fixes the existing compile failure in #57611

r? `@ghost` for now until I do a perf run
cc `@nikomatsakis` since you commented on https://github.com/rust-lang/rust/issues/23012#issuecomment-1152397290

20 months agoCleanup bind_pattern args
Cameron Steffen [Wed, 2 Nov 2022 17:18:00 +0000 (12:18 -0500)]
Cleanup bind_pattern args

20 months agoAuto merge of #103922 - Mark-Simulacrum:revert-cargo, r=Mark-Simulacrum
bors [Thu, 3 Nov 2022 21:37:05 +0000 (21:37 +0000)]
Auto merge of #103922 - Mark-Simulacrum:revert-cargo, r=Mark-Simulacrum

Revert "Update cargo"

This reverts commit 331aa4509315f670803b7e232486be84d84ea686.

This Cargo upgrade introduced a regression into dependency resolution, so reverting the upgrade until we can fix that.

cc https://github.com/rust-lang/rust/pull/103860,
https://rust-lang.zulipchat.com/#narrow/stream/247081-t-compiler.2Fperformance/topic/cargo.20and.20rustc.20benchmarks.20broken

20 months agoFixed typos
Douwe Schulte [Thu, 3 Nov 2022 21:19:02 +0000 (21:19 +0000)]
Fixed typos

Fixed a typo that has been found on two locations in comments.

20 months agorustdoc: remove no-op CSS `#main-content > .item-info { margin-top: 0 }`
Michael Howell [Thu, 3 Nov 2022 20:22:54 +0000 (13:22 -0700)]
rustdoc: remove no-op CSS `#main-content > .item-info { margin-top: 0 }`

When this line was added in 04b4c40682c01cad8f9bc8d5b3907be91d6f81d4, it
overrode a negative `margin-top` that was set on it by default.

https://github.com/rust-lang/rust/blob/04b4c40682c01cad8f9bc8d5b3907be91d6f81d4/src/librustdoc/html/static/rustdoc.css#L500-L516

That negative top margin was removed in
593d6d1cb15c55c88319470dabb40126c7b7f1e2.

20 months agorustdoc: clean up hardcoded CSS border color on search results
Michael Howell [Thu, 3 Nov 2022 19:29:17 +0000 (12:29 -0700)]
rustdoc: clean up hardcoded CSS border color on search results

Hardcoded colors in rustdoc.css should usually be avoided.

20 months agoUse `derive(Subdiagnostic)` for `ChangeFieldsToBeOfUnitType`.
Charles Lew [Thu, 3 Nov 2022 19:02:09 +0000 (03:02 +0800)]
Use `derive(Subdiagnostic)` for `ChangeFieldsToBeOfUnitType`.

20 months agoCleanups
Boxy [Thu, 3 Nov 2022 18:52:08 +0000 (18:52 +0000)]
Cleanups

20 months agoRemove rustdoc clean::Visibility type
Guillaume Gomez [Thu, 3 Nov 2022 17:15:24 +0000 (18:15 +0100)]
Remove rustdoc clean::Visibility type

20 months agostd: sync "Dependencies of the `backtrace` crate" with `backtrace`
Michael Howell [Thu, 3 Nov 2022 17:10:15 +0000 (10:10 -0700)]
std: sync "Dependencies of the `backtrace` crate" with `backtrace`

Compare:

https://github.com/rust-lang/backtrace-rs/blob/07872f28cd8a65c3c7428811548dc85f1f2fb05b/Cargo.toml#L43

https://github.com/rust-lang/rust/blob/160b19429523ea44c4c3b7cad4233b2a35f58b8f/library/std/Cargo.toml#L26

20 months agoMove some tests from `src/test/ui` to more reasonable places
Deadbeef [Thu, 3 Nov 2022 15:41:01 +0000 (15:41 +0000)]
Move some tests from `src/test/ui` to more reasonable places

20 months agoreverse obligations for better diagnostics on multiple conflicting fn bounds
Michael Goulet [Sat, 15 Oct 2022 18:48:13 +0000 (18:48 +0000)]
reverse obligations for better diagnostics on multiple conflicting fn bounds

20 months agoElaborate supertrait obligations when deducing closure signature
Michael Goulet [Thu, 15 Sep 2022 00:35:23 +0000 (00:35 +0000)]
Elaborate supertrait obligations when deducing closure signature

20 months agoMake obligations_for_self_ty only return an obligation
Michael Goulet [Thu, 15 Sep 2022 00:18:35 +0000 (00:18 +0000)]
Make obligations_for_self_ty only return an obligation

20 months agoAdd note to RELEASES.md regarding issue 102754.
Felix S. Klock II [Thu, 3 Nov 2022 15:44:50 +0000 (11:44 -0400)]
Add note to RELEASES.md regarding issue 102754.

20 months agoaddress review comment
Pietro Albini [Thu, 3 Nov 2022 15:42:28 +0000 (16:42 +0100)]
address review comment

20 months agoroll another resolution logic in rustdoc
Deadbeef [Thu, 27 Oct 2022 17:33:41 +0000 (17:33 +0000)]
roll another resolution logic in rustdoc

20 months agoCorrectly resolve Inherent Associated Types
Deadbeef [Thu, 27 Oct 2022 07:11:15 +0000 (07:11 +0000)]
Correctly resolve Inherent Associated Types

20 months agoAdd visit_fn_ret_ty to hir intravisit
Santiago Pastorino [Wed, 26 Oct 2022 17:40:34 +0000 (14:40 -0300)]
Add visit_fn_ret_ty to hir intravisit

20 months agoRevert "Update cargo"
Mark Rousskov [Thu, 3 Nov 2022 12:37:45 +0000 (08:37 -0400)]
Revert "Update cargo"

This reverts commit 331aa4509315f670803b7e232486be84d84ea686.

This Cargo upgrade introduced a regression into dependency resolution,
so reverting the upgrade until we can fix that.

20 months agoFix artifact version/channel detection for stable
Mark Rousskov [Wed, 2 Nov 2022 12:21:21 +0000 (08:21 -0400)]
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.

20 months agoAdd howto for adding new targets
Florian Bartels [Thu, 3 Nov 2022 08:19:47 +0000 (09:19 +0100)]
Add howto for adding new targets

20 months agoput custom flags as last in codegen and asm tests
Pietro Albini [Thu, 3 Nov 2022 11:00:17 +0000 (12:00 +0100)]
put custom flags as last in codegen and asm tests

20 months agomove compiletest's own ui tests into a subdirectory
Pietro Albini [Thu, 3 Nov 2022 10:48:33 +0000 (11:48 +0100)]
move compiletest's own ui tests into a subdirectory

20 months agocheck for pattern in compiletest-compile-flags-last
Pietro Albini [Thu, 3 Nov 2022 10:47:05 +0000 (11:47 +0100)]
check for pattern in compiletest-compile-flags-last

20 months agomove browser opening logic in Builder
Pietro Albini [Thu, 3 Nov 2022 10:42:51 +0000 (11:42 +0100)]
move browser opening logic in Builder

This allows open() to be called from other places in bootstrap (I need
this for Ferrocene), and it simplifies the callers by moving the
"was_invoked_explicitly" check into the function.

20 months agoAuto merge of #103904 - JakobDegen:mir-opt-dash, r=oli-obk
bors [Thu, 3 Nov 2022 09:24:28 +0000 (09:24 +0000)]
Auto merge of #103904 - JakobDegen:mir-opt-dash, r=oli-obk

Ban dashes in miropt test file names

Dashes in miropt test file names are annoying - specifically, they cause the test files to not be sorted next to their outputs, which makes it very difficult to tell what goes with what. This PR changes all files to use underscores and adds a blessable tidy check that enforces this.

r? `@jyn514`

This PR is obviously going to bitrot very quickly. Because of this, I'm going to wait at least 48 hours and until review comes back to allow people from `@rust-lang/wg-mir-opt` or elsewhere to lodge complaints if there are any. If not, I'll rebase the branch on Friday afternoon PST and ask that it be `r+`'d with `p=1` at that time.

20 months agoAuto merge of #103860 - weihanglo:update-cargo, r=ehuss
bors [Thu, 3 Nov 2022 06:11:58 +0000 (06:11 +0000)]
Auto merge of #103860 - weihanglo:update-cargo, r=ehuss

Update cargo

14 commits in 7e484fc1a766f56dbc95380f45719698e0c82749..810cbad9a123ad4ee0a55a96171b8f8478ff1c03
2022-10-27 15:20:57 +0000 to 2022-11-02 21:04:31 +0000
- Update curl-sys (rust-lang/cargo#11326)
- Mention fix on build script deadlock (rust-lang/cargo#11325)
- Make cargo forward pre-existing CARGO if set (rust-lang/cargo#11285)
- Clean up workspace dependencies after cargo remove (rust-lang/cargo#11242)
- Update the outdated link for rust-semverver (rust-lang/cargo#11322)
- Fix broken link to compilation entry point (rust-lang/cargo#11317)
- Only remove fingerprints and build script artifacts of the requested package (rust-lang/cargo#10621)
- Newer anyhow features are required (rust-lang/cargo#11316)
- Clean stale git temp files (rust-lang/cargo#11308)
- Report crate size on package and publish (rust-lang/cargo#11270)
- add a note that some warnings (and/or errors) can be auto-fixed (rust-lang/cargo#10989)
- Update libcurl (rust-lang/cargo#11307)
- artifact deps shoud works when target field specified coexists with `optional = true` (rust-lang/cargo#11183)
- Fix singular verb in tests page (rust-lang/cargo#11300)

r? `@ghost`

20 months agoAuto merge of #103455 - BlackHoleFox:apple-sim-abi-consistency, r=davidtwco
bors [Thu, 3 Nov 2022 03:07:31 +0000 (03:07 +0000)]
Auto merge of #103455 - BlackHoleFox:apple-sim-abi-consistency, r=davidtwco

Fixed consistency of Apple simulator target's ABI

Currently there's a few Apple device simulator targets that are inconsistent since some set `target_abi = "sim"` (the correct thing to do) while a bunch of others don't set anything (`""`). Due to this its very hard to reliability check if some Rust code is running inside a simulator. This changes all of them to do the same thing and set `sim` as their `target_abi`.

The new way to identity a simulator during compilation is as simple as `cfg(all(target_vendor="apple", target_abi = "sim"))` or even `cfg(target_abi = "sim")` being less pedantic about it.

The issues with the current form (and inspiration for this) are also summarized in `@thomcc's` [Tweet](https://twitter.com/at_tcsc/status/1576685244702691328).

20 months agocode cleanup
yukang [Thu, 3 Nov 2022 01:42:34 +0000 (09:42 +0800)]
code cleanup

20 months agoremove 'delay_span_bug' following 'references_error'
yukang [Thu, 3 Nov 2022 01:22:08 +0000 (09:22 +0800)]
remove 'delay_span_bug' following 'references_error'

20 months agoAuto merge of #103903 - matthiaskrgr:rollup-r5xcvrp, r=matthiaskrgr
bors [Thu, 3 Nov 2022 00:20:08 +0000 (00:20 +0000)]
Auto merge of #103903 - matthiaskrgr:rollup-r5xcvrp, r=matthiaskrgr

Rollup of 6 pull requests

Successful merges:

 - #99801 (fix(generic_const_exprs): Fix predicate inheritance for children of opaque types)
 - #103610 (Allow use of `-Clto=thin` with `-Ccodegen-units=1` in general)
 - #103870 (Fix `inferred_kind` ICE)
 - #103875 (Simplify astconv item def id handling)
 - #103886 (rustdoc: Fix merge of attributes for reexports of local items)
 - #103890 (rustdoc: remove unused mobile CSS `.rustdoc { padding-top: 0 }`)

Failed merges:

 - #103884 (Add visit_fn_ret_ty to hir intravisit)

r? `@ghost`
`@rustbot` modify labels: rollup

20 months agorustdoc: add size tracking for `Generics`
Michael Howell [Wed, 12 Oct 2022 21:29:32 +0000 (14:29 -0700)]
rustdoc: add size tracking for `Generics`

20 months agorustdoc: remove unneeded Box from ItemKind
Michael Howell [Wed, 12 Oct 2022 17:51:10 +0000 (10:51 -0700)]
rustdoc: remove unneeded Box from ItemKind

20 months agorustdoc: use ThinVec for cleaned generics
Michael Howell [Tue, 11 Oct 2022 17:00:01 +0000 (10:00 -0700)]
rustdoc: use ThinVec for cleaned generics

20 months agoUpdate cargo
Weihang Lo [Wed, 2 Nov 2022 23:17:12 +0000 (23:17 +0000)]
Update cargo

14 commits in 7e484fc1a766f56dbc95380f45719698e0c82749..810cbad9a123ad4ee0a55a96171b8f8478ff1c03
2022-10-27 15:20:57 +0000 to 2022-11-02 21:04:31 +0000
- Update curl-sys (rust-lang/cargo#11326)
- Mention fix on build script deadlock (rust-lang/cargo#11325)
- Make cargo forward pre-existing CARGO if set (rust-lang/cargo#11285)
- Clean up workspace dependencies after cargo remove (rust-lang/cargo#11242)
- Update the outdated link for rust-semverver (rust-lang/cargo#11322)
- Fix broken link to compilation entry point (rust-lang/cargo#11317)
- Only remove fingerprints and build script artifacts of the requested package (rust-lang/cargo#10621)
- Newer anyhow features are required (rust-lang/cargo#11316)
- Clean stale git temp files (rust-lang/cargo#11308)
- Report crate size on package and publish (rust-lang/cargo#11270)
- add a note that some warnings (and/or errors) can be auto-fixed (rust-lang/cargo#10989)
- Update libcurl (rust-lang/cargo#11307)
- artifact deps shoud works when target field specified coexists with `optional = true` (rust-lang/cargo#11183)
- Fix singular verb in tests page (rust-lang/cargo#11300)

20 months agoBan dashes in miropt test file names
Jakob Degen [Wed, 2 Nov 2022 21:54:49 +0000 (14:54 -0700)]
Ban dashes in miropt test file names

20 months agorustdoc: remove redundant mobile CSS `.sidebar-elems { background }`
Michael Howell [Wed, 2 Nov 2022 22:33:36 +0000 (15:33 -0700)]
rustdoc: remove redundant mobile CSS `.sidebar-elems { background }`

The exact same background is already set for its parent, the `nav.sidebar`.