]> git.lizzy.rs Git - rust.git/log
rust.git
2 years agoAuto merge of #94541 - Dylan-DPC:rollup-564wbq3, r=Dylan-DPC
bors [Thu, 3 Mar 2022 04:28:08 +0000 (04:28 +0000)]
Auto merge of #94541 - Dylan-DPC:rollup-564wbq3, r=Dylan-DPC

Rollup of 9 pull requests

Successful merges:

 - #92061 (update char signess for openbsd)
 - #93072 (Compatible variants suggestion with desugaring)
 - #93354 (Add documentation about `BorrowedFd::to_owned`.)
 - #93663 (Rename `BorrowedFd::borrow_raw_fd` to `BorrowedFd::borrow_raw`.)
 - #94375 (Adt copy suggestions)
 - #94433 (Improve allowness of the unexpected_cfgs lint)
 - #94499 (Documentation was missed when demoting Windows XP to no_std only)
 - #94505 (Restore the local filter on mono item sorting)
 - #94529 (Unused doc comments blocks)

Failed merges:

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

2 years agoRollup merge of #94529 - GuillaumeGomez:unused-doc-comments-blocks, r=estebank
Dylan DPC [Thu, 3 Mar 2022 00:09:15 +0000 (01:09 +0100)]
Rollup merge of #94529 - GuillaumeGomez:unused-doc-comments-blocks, r=estebank

Unused doc comments blocks

Fixes #77030.

2 years agoRollup merge of #94505 - cuviper:mono-item-sort-local, r=michaelwoerister,davidtwco
Dylan DPC [Thu, 3 Mar 2022 00:09:14 +0000 (01:09 +0100)]
Rollup merge of #94505 - cuviper:mono-item-sort-local, r=michaelwoerister,davidtwco

Restore the local filter on mono item sorting

In `CodegenUnit::items_in_deterministic_order`, there's a comment that
only local HirIds should be taken into account, but #90408 removed the
`as_local` call that sets others to None. Restoring that check fixes the
s390x hangs seen in [RHBZ 2058803].

[RHBZ 2058803]: https://bugzilla.redhat.com/show_bug.cgi?id=2058803

2 years agoRollup merge of #94499 - RandomInsano:patch-1, r=Dylan-DPC
Dylan DPC [Thu, 3 Mar 2022 00:09:13 +0000 (01:09 +0100)]
Rollup merge of #94499 - RandomInsano:patch-1, r=Dylan-DPC

Documentation was missed when demoting Windows XP to no_std only

After a quick discussion on #81250 which removed special casing for mutexes added [here](https://github.com/rust-lang/rust/commit/10b103af48368c5df644fa61dc417a36083922c8) to support Windows XP, we can't say that the standard library can build for it.

This change modifies the tier 3 non-ARM targets to show the standard library will no longer build for these and there is no work being done to change that.

2 years agoRollup merge of #94433 - Urgau:check-cfg-allowness, r=petrochenkov
Dylan DPC [Thu, 3 Mar 2022 00:09:12 +0000 (01:09 +0100)]
Rollup merge of #94433 - Urgau:check-cfg-allowness, r=petrochenkov

Improve allowness of the unexpected_cfgs lint

This pull-request improve the allowness (`#[allow(...)]`) of the `unexpected_cfgs` lint.

Before this PR only crate level `#![allow(unexpected_cfgs)]` worked, now with this PR it also work when put around `cfg!` or if it is in a upper level. Making it work ~for the attributes `cfg`, `cfg_attr`, ...~ for the same level is awkward as the current code is design to give "Some parent node that is close to this macro call" (cf. https://doc.rust-lang.org/nightly/nightly-rustc/rustc_expand/base/struct.ExpansionData.html) meaning that allow on the same line as an attribute won't work. I'm note even sure if this would be possible.

Found while working on https://github.com/rust-lang/rust/pull/94298.
r? ````````@petrochenkov````````

2 years agoRollup merge of #94375 - WaffleLapkin:copy-suggestion, r=estebank
Dylan DPC [Thu, 3 Mar 2022 00:09:11 +0000 (01:09 +0100)]
Rollup merge of #94375 - WaffleLapkin:copy-suggestion, r=estebank

Adt copy suggestions

Previously we've only suggested adding `Copy` bounds when the type being moved/copied is a type parameter (generic). With this PR we also suggest adding bounds when a type
- Can be copy
- All predicates that need to be satisfied for that are based on type params

i.e. we will suggest `T: Copy` for `Option<T>`, but won't suggest anything for `Option<String>`.

An example:
```rust
fn duplicate<T>(t: Option<T>) -> (Option<T>, Option<T>) {
    (t, t)
}
```
New error (current compiler doesn't provide `help`:):
```text
error[E0382]: use of moved value: `t`
 --> t.rs:2:9
  |
1 | fn duplicate<T>(t: Option<T>) -> (Option<T>, Option<T>) {
  |                 - move occurs because `t` has type `Option<T>`, which does not implement the `Copy` trait
2 |     (t, t)
  |      -  ^ value used here after move
  |      |
  |      value moved here
  |
help: consider restricting type parameter `T`
  |
1 | fn duplicate<T: Copy>(t: Option<T>) -> (Option<T>, Option<T>) {
  |               ++++++
```

Fixes #93623
r? ``````````@estebank``````````
``````````@rustbot`````````` label +A-diagnostics +A-suggestion-diagnostics +C-enhancement

----

I'm not at all sure if this is the right implementation for this kind of suggestion, but it seems to work :')

2 years agoRollup merge of #93663 - sunfishcode:sunfishcode/as-raw-name, r=joshtriplett
Dylan DPC [Thu, 3 Mar 2022 00:09:10 +0000 (01:09 +0100)]
Rollup merge of #93663 - sunfishcode:sunfishcode/as-raw-name, r=joshtriplett

Rename `BorrowedFd::borrow_raw_fd` to `BorrowedFd::borrow_raw`.

Also, rename `BorrowedHandle::borrow_raw_handle` and
`BorrowedSocket::borrow_raw_socket` to `BorrowedHandle::borrow_raw` and
`BorrowedSocket::borrow_raw`.

This is just a minor rename to reduce redundancy in the user code calling
these functions, and to eliminate an inessential difference between
`BorrowedFd` code and `BorrowedHandle`/`BorrowedSocket` code.

While here, add a simple test exercising `BorrowedFd::borrow_raw_fd`.

r? ``````@joshtriplett``````

2 years agoRollup merge of #93354 - sunfishcode:sunfishcode/document-borrowedfd-toowned, r=josht...
Dylan DPC [Thu, 3 Mar 2022 00:09:09 +0000 (01:09 +0100)]
Rollup merge of #93354 - sunfishcode:sunfishcode/document-borrowedfd-toowned, r=joshtriplett

Add documentation about `BorrowedFd::to_owned`.

Following up on #88564, this adds documentation explaining why
`BorrowedFd::to_owned` returns another `BorrowedFd` rather than an
`OwnedFd`. And similar for `BorrowedHandle` and `BorrowedSocket`.

r? `````@joshtriplett`````

2 years agoRollup merge of #93072 - m-ou-se:compatible-variants-suggestion-with-desugaring,...
Dylan DPC [Thu, 3 Mar 2022 00:09:08 +0000 (01:09 +0100)]
Rollup merge of #93072 - m-ou-se:compatible-variants-suggestion-with-desugaring, r=estebank

Compatible variants suggestion with desugaring

This fixes #90553 for `for` loops and other desugarings.

r? ```@estebank```

2 years agoRollup merge of #92061 - semarie:openbsd-archs, r=joshtriplett
Dylan DPC [Thu, 3 Mar 2022 00:09:07 +0000 (01:09 +0100)]
Rollup merge of #92061 - semarie:openbsd-archs, r=joshtriplett

update char signess for openbsd

it adds more archs support for openbsd: arm, mips64, powerpc, powerpc64, and riscv64.

2 years agoAuto merge of #92214 - ehuss:submodule-bg-exit, r=Mark-Simulacrum
bors [Wed, 2 Mar 2022 19:50:55 +0000 (19:50 +0000)]
Auto merge of #92214 - ehuss:submodule-bg-exit, r=Mark-Simulacrum

Error if submodule fetch fails.

In CI, if fetching a submodule fails, the script would exit successfully. Later parts of the build will fail due to the missing files, but it is a bit confusing, and I think it would be better to error out earlier.

The reason is that in bash, `wait` without arguments will exit 0 even if a background job exits with an error. The solution here is to wait on each individual job, which will return the exit code of the job.

This was encountered in #92177.

2 years agoUpdate stdarch submodule
Guillaume Gomez [Wed, 2 Mar 2022 18:50:08 +0000 (19:50 +0100)]
Update stdarch submodule

2 years agoUpdate unused_doc_comments ui test
Guillaume Gomez [Wed, 2 Mar 2022 16:58:49 +0000 (17:58 +0100)]
Update unused_doc_comments ui test

2 years agoFix unused_doc_comments lint errors
Guillaume Gomez [Wed, 2 Mar 2022 16:58:33 +0000 (17:58 +0100)]
Fix unused_doc_comments lint errors

2 years agoUpdate test output.
Mara Bos [Wed, 2 Mar 2022 18:30:25 +0000 (19:30 +0100)]
Update test output.

2 years agoAdd more tests for mismatched Option/Result return types.
Mara Bos [Wed, 19 Jan 2022 12:11:48 +0000 (13:11 +0100)]
Add more tests for mismatched Option/Result return types.

2 years agoFix Ok(()) suggestion when desugaring is involved.
Mara Bos [Wed, 19 Jan 2022 12:11:26 +0000 (13:11 +0100)]
Fix Ok(()) suggestion when desugaring is involved.

2 years agoExtend unused_doc_comments lint to check on blocks
Guillaume Gomez [Wed, 2 Mar 2022 16:58:10 +0000 (17:58 +0100)]
Extend unused_doc_comments lint to check on blocks

2 years agoAuto merge of #93244 - mark-i-m:doomed, r=oli-obk
bors [Wed, 2 Mar 2022 16:13:38 +0000 (16:13 +0000)]
Auto merge of #93244 - mark-i-m:doomed, r=oli-obk

Rename `ErrorReported` -> `ErrorGuaranteed`

r? `@eddyb`

cc https://github.com/rust-lang/rust/pull/93222 https://github.com/rust-lang/rust/issues/69426

The idea is that we would like to use it for both errors and `delay_span_bug`. Its semantics indicate a _guarantee_ that compilation will fail.

2 years agorename ErrorReported -> ErrorGuaranteed
mark [Sun, 23 Jan 2022 18:34:26 +0000 (12:34 -0600)]
rename ErrorReported -> ErrorGuaranteed

2 years agomerge the char signess list of archs with freebsd as it is the same
Sébastien Marie [Wed, 2 Mar 2022 12:12:28 +0000 (12:12 +0000)]
merge the char signess list of archs with freebsd as it is the same

2 years agoupdate char signess for openbsd
Sébastien Marie [Wed, 2 Mar 2022 10:33:50 +0000 (10:33 +0000)]
update char signess for openbsd

adds more archs for openbsd: arm, mips64, powerpc, powerpc64, and riscv64.

2 years agoAuto merge of #94229 - erikdesjardins:rem2, r=nikic
bors [Wed, 2 Mar 2022 08:48:33 +0000 (08:48 +0000)]
Auto merge of #94229 - erikdesjardins:rem2, r=nikic

Remove LLVM attribute removal

This was necessary before, because `declare_raw_fn` would always apply
the default optimization attributes to every declared function.
Then `attributes::from_fn_attrs` would have to remove the default
attributes in the case of, e.g. `#[optimize(speed)]` in a `-Os` build.
(see [`src/test/codegen/optimize-attr-1.rs`](https://github.com/rust-lang/rust/blob/03a8cc7df1d65554a4d40825b0490c93ac0f0236/src/test/codegen/optimize-attr-1.rs#L33))

However, every relevant callsite of `declare_raw_fn` (i.e. where we
actually generate code for the function, and not e.g. a call to an
intrinsic, where optimization attributes don't [?] matter)
calls `from_fn_attrs`, so we can remove the attribute setting
from `declare_raw_fn`, and rely on `from_fn_attrs` to apply the correct
attributes all at once.

r? `@ghost` (blocked on #94221)
`@rustbot` label S-blocked

2 years agoAuto merge of #94514 - matthiaskrgr:rollup-pdzn82h, r=matthiaskrgr
bors [Wed, 2 Mar 2022 05:32:00 +0000 (05:32 +0000)]
Auto merge of #94514 - matthiaskrgr:rollup-pdzn82h, r=matthiaskrgr

Rollup of 9 pull requests

Successful merges:

 - #94464 (Suggest adding a new lifetime parameter when two elided lifetimes should match up for traits and impls.)
 - #94476 (7 - Make more use of `let_chains`)
 - #94478 (Fix panic when handling intra doc links generated from macro)
 - #94482 (compiler: fix some typos)
 - #94490 (Update books)
 - #94496 (tests: accept llvm intrinsic in align-checking test)
 - #94498 (9 - Make more use of `let_chains`)
 - #94503 (Provide C FFI types via core::ffi, not just in std)
 - #94513 (update Miri)

Failed merges:

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

2 years agoRollup merge of #94513 - RalfJung:miri, r=RalfJung
Matthias Krüger [Wed, 2 Mar 2022 03:30:13 +0000 (04:30 +0100)]
Rollup merge of #94513 - RalfJung:miri, r=RalfJung

update Miri

Fixes https://github.com/rust-lang/rust/issues/94474
r? `@ghost`

2 years agoRollup merge of #94503 - joshtriplett:core-ffi-c, r=Amanieu
Matthias Krüger [Wed, 2 Mar 2022 03:30:12 +0000 (04:30 +0100)]
Rollup merge of #94503 - joshtriplett:core-ffi-c, r=Amanieu

Provide C FFI types via core::ffi, not just in std

Tracking issue: https://github.com/rust-lang/rust/issues/94501

The ability to interoperate with C code via FFI is not limited to crates
using std; this allows using these types without std.

The existing types in `std::os::raw` become type aliases for the ones in
`core::ffi`. This uses type aliases rather than re-exports, to allow the
std types to remain stable while the core types are unstable.

This also moves the currently unstable `NonZero_` variants and
`c_size_t`/`c_ssize_t`/`c_ptrdiff_t` types to `core::ffi`, while leaving
them unstable.

Historically, we didn't do this because these types are target-dependent.
However, `core` itself is also target-dependent. `core` should not call
any OS services, but it knows the target and the target's ABI.

2 years agoRollup merge of #94498 - c410-f3r:chega-ja-deu, r=Dylan-DPC
Matthias Krüger [Wed, 2 Mar 2022 03:30:11 +0000 (04:30 +0100)]
Rollup merge of #94498 - c410-f3r:chega-ja-deu, r=Dylan-DPC

9 - Make more use of `let_chains`

Continuation of #94376.

cc #53667

2 years agoRollup merge of #94496 - durin42:llvm-15-moar-intrinsic, r=nikic
Matthias Krüger [Wed, 2 Mar 2022 03:30:10 +0000 (04:30 +0100)]
Rollup merge of #94496 - durin42:llvm-15-moar-intrinsic, r=nikic

tests: accept llvm intrinsic in align-checking test

This changed in upstream change https://reviews.llvm.org/D98152 (aka
https://github.com/llvm/llvm-project/commit/a266af721153fab6452094207b09ed265ab0be7b)
wherein LLVM got smarter about using intrinsics. As best I can tell the
change I've made here preserves the intent of the test on LLVM 14 and
before while also passing on LLVM 15 and later.

2 years agoRollup merge of #94490 - ehuss:update-books, r=ehuss
Matthias Krüger [Wed, 2 Mar 2022 03:30:10 +0000 (04:30 +0100)]
Rollup merge of #94490 - ehuss:update-books, r=ehuss

Update books

## nomicon

1 commits in 90993eeac93dbf9388992de92965f99cf6f29a03..f6d6126fc96ecf4a7f7d22da330df9506293b0d0
2022-02-13 12:44:12 +0900 to 2022-02-26 02:21:21 +0900
- ffi: explicitly declare hello_from_rust for C99 (rust-lang/nomicon#343)

## reference

20 commits in 70fc73a6b908e08e66aa0306856c5211312f6c05..9d289c05fce7254b99c6a0d354d84abb7fd7a032
2022-02-14 19:33:01 -0800 to 2022-02-23 08:58:20 -0800
- Fix typo in `functions.md` (rust-lang/reference#1173)
- Fix CI
- Unify global_asm/asm directive list
- Update src/inline-assembly.md
- Update src/inline-assembly.md
- Fix changes unintentional reverted in d5d3d80
- Add note about operand interpolations
- Sort lists, add syntax control directives
- Add another missed batch suggestion
- Add missed batch suggestion
- Apply suggestions from code review
- Add .type, .size, and .p2align
- Reformat directive lists
- Add `.inst` directive
- Add missing directives
- Add additional directives in use
- Add `.fill` directive
- Style fixes
- Fix code block
- Add supported Directives list

## book

13 commits in 67b768c0b660a069a45f0e5d8ae2f679df1022ab..3f255ed40b8c82a0434088568fbed270dc31bf00
2022-02-09 21:52:41 -0500 to 2022-02-27 21:26:12 -0500
- Add a back reference about enum variant initializer fns. Fixes rust-lang/book#800.
- Update ch01-03-hello-cargo.md
- ch03-05: Add definite article for the block of code
- Change variable names from "slice" to "values"
- Remove reference to advanced lifetime section that no longer exists
- Fix link to go to the right newtype section
- Remove confusing and redundant part of a sentence about newtypes
- Make transition less repetitive
- Correct wording about associated functions.
- Remove unnecessary extern crate proc_macro
- Clarify that this code is defining, not using a procedural macro
- Add manual regeneration steps for cargo new test
- Update Listing 11-1 to reflect current contents

## rust-by-example

11 commits in 18c0055b8aea49391e8f758a4400097999c9cf1e..2a928483a20bb306a7399c0468234db90d89afb5
2022-01-19 08:51:55 -0300 to 2022-02-28 11:36:59 -0300
- Update destructure_slice.md (rust-lang/rust-by-example#1513)
- Update iter_find.md (rust-lang/rust-by-example#1512)
- Add an example of collecting errors while iterating successes (rust-lang/rust-by-example#1509)
- Fix broken link on asm (rust-lang/rust-by-example#1508)
- Update abort_unwind.md (rust-lang/rust-by-example#1505)
- Remove duplicate text in asm.md (rust-lang/rust-by-example#1506)
- Improve asm clobber example (rust-lang/rust-by-example#1504)
- Add +1 to next_age (rust-lang/rust-by-example#1503)
- fix comment on into_iter() for arrays (rust-lang/rust-by-example#1502)
- Added new Rust 1.58 direct format args (rust-lang/rust-by-example#1501)
- documentation for cfg_panic (rust-lang/rust-by-example#1500)

## rustc-dev-guide

13 commits in 62f58394ba7b203f55ac35ddcc4c0b79578f5706..32f2a5b4e7545318846185198542230170dd8a42
2022-02-11 08:42:50 -0500 to 2022-03-01 10:45:24 -0600
- Add architecture suggestion for Apple silicon (rust-lang/rustc-dev-guide#1320)
- cargo timings has been stabilized (rust-lang/rustc-dev-guide#1319)
- Add known-bug header. (rust-lang/rustc-dev-guide#1311)
- Fix typo (rust-lang/rustc-dev-guide#1315)
- Typo (rust-lang/rustc-dev-guide#1313)
- instrument-coverage has been stabilized.
- symbol-mangling-version has been stabilized
- Fix `Ty` link (rust-lang/rustc-dev-guide#1308)
- Edit glossary (rust-lang/rustc-dev-guide#1302)
- Fix heading levels in the query chapter (rust-lang/rustc-dev-guide#1305)
- Fix link
- Edit "Queries" chapter (rust-lang/rustc-dev-guide#1301)
- Link to The Rust Performance Book (rust-lang/rustc-dev-guide#1300)

## edition-guide

1 commits in beea0a3cdc3885375342fd010f9ad658e6a5e09a..c55611dd6c58bdeb52423b5c52fd0f3c93615ba8
2021-12-05 07:06:45 -0800 to 2022-02-21 14:21:39 +0100
- Remove `+nightly` for `cargo new` (rust-lang/edition-guide#276)

2 years agoRollup merge of #94482 - cuishuang:master, r=Dylan-DPC
Matthias Krüger [Wed, 2 Mar 2022 03:30:09 +0000 (04:30 +0100)]
Rollup merge of #94482 - cuishuang:master, r=Dylan-DPC

compiler: fix some typos

2 years agoRollup merge of #94478 - GuillaumeGomez:macro-generated-intra-doc-link, r=notriddle
Matthias Krüger [Wed, 2 Mar 2022 03:30:08 +0000 (04:30 +0100)]
Rollup merge of #94478 - GuillaumeGomez:macro-generated-intra-doc-link, r=notriddle

Fix panic when handling intra doc links generated from macro

Fixes #78591.
Fixes #92789.

r? ``@notriddle``

2 years agoRollup merge of #94476 - c410-f3r:yet-more-let-chains, r=Dylan-DPC
Matthias Krüger [Wed, 2 Mar 2022 03:30:06 +0000 (04:30 +0100)]
Rollup merge of #94476 - c410-f3r:yet-more-let-chains, r=Dylan-DPC

7 - Make more use of `let_chains`

Continuation of #94376.

cc #53667

2 years agoRollup merge of #94464 - kckeiks:lifetime-elision-mismatch-hint-for-traits, r=estebank
Matthias Krüger [Wed, 2 Mar 2022 03:30:04 +0000 (04:30 +0100)]
Rollup merge of #94464 - kckeiks:lifetime-elision-mismatch-hint-for-traits, r=estebank

Suggest adding a new lifetime parameter when two elided lifetimes should match up for traits and impls.

Suggest adding a new lifetime parameter when two elided lifetimes should match up for functions in traits and impls.

Issue #94462

2 years agoAuto merge of #87402 - nagisa:nagisa/request-feature-requests-for-features, r=estebank
bors [Wed, 2 Mar 2022 03:03:22 +0000 (03:03 +0000)]
Auto merge of #87402 - nagisa:nagisa/request-feature-requests-for-features, r=estebank

Direct users towards using Rust target feature names in CLI

This PR consists of a couple of changes on how we handle target features.

In particular there is a bug-fix wherein we avoid passing through features that aren't prefixed by `+` or `-` to LLVM. These appear to be causing LLVM to assert, which is pretty poor a behaviour (and also makes it pretty clear we expect feature names to be prefixed).

The other commit, I anticipate to be somewhat more controversial is outputting a warning when users specify a LLVM-specific, or otherwise unknown, feature name on the CLI. In those situations we request users to either replace it with a known Rust feature name (e.g. `bmi` -> `bmi1`) or file a feature request. I've a couple motivations for this: first of all, if users are specifying these features on the command line, I'm pretty confident there is also a need for these features to be usable via `#[cfg(target_feature)]` machinery.  And second, we're growing a fair number of backends recently and having ability to provide some sort of unified-ish interface in this place seems pretty useful to me.

Sponsored by: standard.ai

2 years agoupdate Miri
Ralf Jung [Wed, 2 Mar 2022 02:58:38 +0000 (21:58 -0500)]
update Miri

2 years agoTemporarily make `CStr` not a link in the `c_char` docs
Josh Triplett [Wed, 2 Mar 2022 01:36:40 +0000 (17:36 -0800)]
Temporarily make `CStr` not a link in the `c_char` docs

When CStr moves to core with an alias in std, this can link to
`crate::ffi::CStr`. However, linking in the reverse direction (from core
to std) requires a relative path, and that path can't work from both
core::ffi and std::os::raw (different number of `../` traversals
required).

2 years agoProvide C FFI types via core::ffi, not just in std
Josh Triplett [Tue, 1 Mar 2022 22:46:41 +0000 (14:46 -0800)]
Provide C FFI types via core::ffi, not just in std

The ability to interoperate with C code via FFI is not limited to crates
using std; this allows using these types without std.

The existing types in `std::os::raw` become type aliases for the ones in
`core::ffi`. This uses type aliases rather than re-exports, to allow the
std types to remain stable while the core types are unstable.

This also moves the currently unstable `NonZero_` variants and
`c_size_t`/`c_ssize_t`/`c_ptrdiff_t` types to `core::ffi`, while leaving
them unstable.

2 years agoAdd a copy of cfg_if to core's internal_macros.rs
Josh Triplett [Wed, 2 Mar 2022 00:06:06 +0000 (16:06 -0800)]
Add a copy of cfg_if to core's internal_macros.rs

core can't depend on external crates the way std can. Rather than revert
usage of cfg_if, add a copy of it to core. This does not export our
copy, even unstably; such a change could occur in a later commit.

2 years agoUse CHECK-DAG in codegen/debuginfo-generic-closure-env-names.rs
Josh Stone [Tue, 1 Mar 2022 23:53:22 +0000 (15:53 -0800)]
Use CHECK-DAG in codegen/debuginfo-generic-closure-env-names.rs

2 years agoDemote Windows XP to no_std only
Edwin Amsler [Tue, 1 Mar 2022 21:47:11 +0000 (15:47 -0600)]
Demote Windows XP to no_std only

Modify the tier 3 non-ARM targets to show the standard library will no longer build for these and there is no work being done to change that.

2 years ago9 - Make more use of `let_chains`
Caio [Tue, 1 Mar 2022 21:34:35 +0000 (18:34 -0300)]
9 - Make more use of `let_chains`

Continuation of #94376.

cc #53667

2 years agotests: avoid problems on 32 bit machines
Augie Fackler [Tue, 1 Mar 2022 21:07:46 +0000 (16:07 -0500)]
tests: avoid problems on 32 bit machines

2 years agotests: accept llvm intrinsic in align-checking test
Augie Fackler [Tue, 1 Mar 2022 20:28:50 +0000 (15:28 -0500)]
tests: accept llvm intrinsic in align-checking test

This changed in upstream change https://reviews.llvm.org/D98152 (aka
https://github.com/llvm/llvm-project/commit/a266af721153fab6452094207b09ed265ab0be7b)
wherein LLVM got smarter about using intrinsics. As best I can tell the
change I've made here preserves the intent of the test on LLVM 14 and
before while also passing on LLVM 15 and later.

2 years agoRestore the local filter on mono item sorting
Josh Stone [Tue, 1 Mar 2022 19:42:10 +0000 (11:42 -0800)]
Restore the local filter on mono item sorting

In `CodegenUnit::items_in_deterministic_order`, there's a comment that
only local HirIds should be taken into account, but #90408 removed the
`as_local` call that sets others to None. Restoring that check fixes the
s390x hangs seen in [RHBZ 2058803].

[RHBZ 2058803]: https://bugzilla.redhat.com/show_bug.cgi?id=2058803

2 years agoMove submodule checkout before msys2 installation.
Eric Huss [Tue, 1 Mar 2022 18:16:47 +0000 (10:16 -0800)]
Move submodule checkout before msys2 installation.

For some reason, `tar` behaves differently in such a way that it does
not create symlinks on Windows correctly, resulting in
`Cannot create symlink to 'ld.gold': No such file or directory`
errors.

2 years agoupdate (bless) test results
Fausto [Tue, 1 Mar 2022 18:07:53 +0000 (13:07 -0500)]
update (bless) test results

2 years agoadd suggestion to update trait if error is in impl
Fausto [Tue, 1 Mar 2022 18:00:02 +0000 (13:00 -0500)]
add suggestion to update trait if error is in impl

2 years agoUpdate books
Eric Huss [Tue, 1 Mar 2022 17:10:58 +0000 (09:10 -0800)]
Update books

2 years agoUse rustfix in copy suggestion test
Maybe Waffle [Tue, 1 Mar 2022 11:11:42 +0000 (14:11 +0300)]
Use rustfix in copy suggestion test

2 years agoAdd a test for Adt copy suggestions
Maybe Waffle [Fri, 25 Feb 2022 20:38:00 +0000 (23:38 +0300)]
Add a test for Adt copy suggestions

2 years agoSuggest adding `Copy` bound when Adt is moved out
Maybe Waffle [Fri, 25 Feb 2022 20:34:25 +0000 (23:34 +0300)]
Suggest adding `Copy` bound when Adt is moved out

Previously we've only suggested adding `Copy` bounds when the type being
moved/copied is a type parameter (generic). With this commit we also
suggest adding bounds when a type
- Can be copy
- All predicates that need to be satisfied for that are based on type
  params

i.e. we will suggest `T: Copy` for `Option<T>`, but won't suggest
anything for `Option<String>`.

Future work: it would be nice to also suggest adding `.clone()` calls

2 years agoImprove allowness of the unexpected_cfgs lint
Loïc BRANSTETT [Sun, 27 Feb 2022 21:26:24 +0000 (22:26 +0100)]
Improve allowness of the unexpected_cfgs lint

2 years agocompiler: fix some typos
cuishuang [Tue, 1 Mar 2022 12:02:47 +0000 (20:02 +0800)]
compiler: fix some typos

2 years agoAuto merge of #94477 - matthiaskrgr:rollup-8h29qek, r=matthiaskrgr
bors [Tue, 1 Mar 2022 11:24:10 +0000 (11:24 +0000)]
Auto merge of #94477 - matthiaskrgr:rollup-8h29qek, r=matthiaskrgr

Rollup of 3 pull requests

Successful merges:

 - #94359 (Fix inconsistent symbol mangling of integers constants with -Zverbose)
 - #94465 (6 - Make more use of `let_chains`)
 - #94470 (:arrow_up: rust-analyzer)

Failed merges:

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

2 years agoAdd test to ensure it does not panic when an intra-doc link is generated from a macro
Guillaume Gomez [Tue, 1 Mar 2022 11:07:17 +0000 (12:07 +0100)]
Add test to ensure it does not panic when an intra-doc link is generated from a macro

2 years agoFix panic when intra-doc link comes from a generated doc comment
Guillaume Gomez [Tue, 1 Mar 2022 11:06:52 +0000 (12:06 +0100)]
Fix panic when intra-doc link comes from a generated doc comment

2 years agoRollup merge of #94470 - lnicola:rust-analyzer-2022-03-01, r=lnicola
Matthias Krüger [Tue, 1 Mar 2022 11:00:45 +0000 (12:00 +0100)]
Rollup merge of #94470 - lnicola:rust-analyzer-2022-03-01, r=lnicola

:arrow_up: rust-analyzer

r? ``@ghost``

2 years agoRollup merge of #94465 - c410-f3r:more-let-chains, r=Dylan-DPC
Matthias Krüger [Tue, 1 Mar 2022 11:00:44 +0000 (12:00 +0100)]
Rollup merge of #94465 - c410-f3r:more-let-chains, r=Dylan-DPC

6 - Make more use of `let_chains`

Continuation of #94376.

cc #53667

2 years agoRollup merge of #94359 - tmiasko:legacy-verbose-const, r=petrochenkov
Matthias Krüger [Tue, 1 Mar 2022 11:00:43 +0000 (12:00 +0100)]
Rollup merge of #94359 - tmiasko:legacy-verbose-const, r=petrochenkov

Fix inconsistent symbol mangling of integers constants with -Zverbose

The `PrettyPrinter` changes formatting of array size and integer
constants based on `-Zverbose`, so its implementation cannot be used in
legacy symbol mangling.

Example symbol demangling before changes:

```console
$ cat a.rs
pub struct A<T>(T);
impl A<[u8; 128]> { pub fn f() {} }
$ rustc --crate-type=lib a.rs -Zverbose=n && nm -C ./liba.rlib
00000000 T a::A<[u8; 128]>::f
$ rustc --crate-type=lib a.rs -Zverbose=y && nm -C ./liba.rlib
00000000 T a::A<[u8; Const { ty. usize, val. Value(Scalar(0x0000000000000080)) }]>::f
```

2 years ago7 - Make more use of `let_chains`
Caio [Tue, 1 Mar 2022 10:43:12 +0000 (07:43 -0300)]
7 - Make more use of `let_chains`

Continuation of #94376.

cc #53667

2 years agoAdd helper function to suggest multiple constraints
Maybe Waffle [Fri, 25 Feb 2022 16:01:44 +0000 (19:01 +0300)]
Add helper function to suggest multiple constraints

Add `rustc_middle::ty::suggest_constraining_type_params` that suggests
adding multiple constraints.

`suggest_constraining_type_param` now just forwards params to this new
function.

2 years agoAuto merge of #94402 - erikdesjardins:revert-coldland, r=nagisa
bors [Tue, 1 Mar 2022 08:57:46 +0000 (08:57 +0000)]
Auto merge of #94402 - erikdesjardins:revert-coldland, r=nagisa

Revert "Auto merge of #92419 - erikdesjardins:coldland, r=nagisa"

Should fix (untested) #94390

Reopens #46515, #87055

r? `@ehuss`

2 years agoAuto merge of #94471 - matthiaskrgr:rollup-ffz65qt, r=matthiaskrgr
bors [Tue, 1 Mar 2022 06:15:54 +0000 (06:15 +0000)]
Auto merge of #94471 - matthiaskrgr:rollup-ffz65qt, r=matthiaskrgr

Rollup of 3 pull requests

Successful merges:

 - #94438 (Check method input expressions once)
 - #94459 (Update cargo)
 - #94470 (:arrow_up: rust-analyzer)

Failed merges:

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

2 years agoRollup merge of #94459 - jonhoo:bump-cargo, r=Dylan-DPC
Matthias Krüger [Tue, 1 Mar 2022 05:22:32 +0000 (06:22 +0100)]
Rollup merge of #94459 - jonhoo:bump-cargo, r=Dylan-DPC

Update cargo

11 changes in
d6cdde584a1f15ea086bae922e20fd27f7165431..3d6970d50e30e797b8e26b2b9b1bdf92dc381f34
2022-02-22 19:55:51 +0000 to 2022-02-28 19:29:07 +0000:

 - https://github.com/rust-lang/cargo/pull/10395
 - https://github.com/rust-lang/cargo/pull/10425
 - https://github.com/rust-lang/cargo/pull/10428
 - https://github.com/rust-lang/cargo/pull/10388
 - https://github.com/rust-lang/cargo/pull/10167
 - https://github.com/rust-lang/cargo/pull/10429
 - https://github.com/rust-lang/cargo/pull/10426
 - https://github.com/rust-lang/cargo/pull/10372
 - https://github.com/rust-lang/cargo/pull/10420
 - https://github.com/rust-lang/cargo/pull/10416
 - https://github.com/rust-lang/cargo/pull/10417

2 years agoRollup merge of #94438 - compiler-errors:check-method-inputs-once, r=davidtwco
Matthias Krüger [Tue, 1 Mar 2022 05:22:32 +0000 (06:22 +0100)]
Rollup merge of #94438 - compiler-errors:check-method-inputs-once, r=davidtwco

Check method input expressions once

If the user mistakenly forgets to wrap their method args in a tuple, then the compiler tries to check that  types within the tuple match the expression args. This means we call `check_expr` once within this diagnostic code, so when we check the expr once again in `demand_compatible`, we attempt to apply expr adjustments twice, leading to ICEs.

This PR attempts to fix this by skipping the expression type check in `demand_compatible` if we have detected an method arg mismatch at all.

This does lead to a single UI test regressing slightly, due to a diagnostic disappearing, though I don't know if it is generally meaningful to even raise an type error after noting that the argument count is incorrect in a function call, since the user might be providing (in-context) meaningless expressions to the wrong method.

I can adjust this to be a bit more targeted (to just skip checking exprs in `demand_compatible` in the tuple case) if this UI test regression is a problem.

fixes #94334
cc #94291

Also drive-by fixup of `.node_type(expr.hir_id)` to `.expr_ty(expr)`, since that method exists.

2 years ago:arrow_up: rust-analyzer
Laurențiu Nicola [Tue, 1 Mar 2022 05:20:26 +0000 (07:20 +0200)]
:arrow_up: rust-analyzer

2 years agoAuto merge of #94469 - Dylan-DPC:rollup-2tcq6s5, r=Dylan-DPC
bors [Tue, 1 Mar 2022 03:26:11 +0000 (03:26 +0000)]
Auto merge of #94469 - Dylan-DPC:rollup-2tcq6s5, r=Dylan-DPC

Rollup of 7 pull requests

Successful merges:

 - #91545 (Generalize "remove `&`"  and "add `*`" suggestions to more than one deref)
 - #93385 (Rustdoc ty consistency fixes)
 - #93926 (Lint against more useless `#[must_use]` attributes)
 - #94094 (use BOOL for TCP_NODELAY setsockopt value on Windows)
 - #94384 (Add Atomic*::from_mut_slice)
 - #94448 (5 - Make more use of `let_chains`)
 - #94452 (Sync portable-simd for bitmasks &c.)

Failed merges:

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

2 years agoRollup merge of #94452 - workingjubilee:sync-simd-bitmasks, r=workingjubilee
Dylan DPC [Tue, 1 Mar 2022 02:41:53 +0000 (03:41 +0100)]
Rollup merge of #94452 - workingjubilee:sync-simd-bitmasks, r=workingjubilee

Sync portable-simd for bitmasks &c.

In the ideal case, where everything works easily and nothing has to be rearranged, it is as simple as:
- `git subtree pull -P library/portable-simd https://github.com/rust-lang/portable-simd - ${branch}`
- write the commit message
- `python x.py test --stage 1` to make sure it runs
- `git push` to your PR-to-rustc branch

If anything borks up this flow, you can fix it with sufficient git wizardry but you are usually better off going back to the source, fixing it, and starting over, before you open the PR.

r? `@calebzulawski`

2 years agoRollup merge of #94448 - c410-f3r:yet-more-let-chains, r=estebank
Dylan DPC [Tue, 1 Mar 2022 02:41:52 +0000 (03:41 +0100)]
Rollup merge of #94448 - c410-f3r:yet-more-let-chains, r=estebank

5 - Make more use of `let_chains`

Continuation of #94376.

cc #53667

2 years agoRollup merge of #94384 - cuviper:atomic-slice, r=dtolnay
Dylan DPC [Tue, 1 Mar 2022 02:41:51 +0000 (03:41 +0100)]
Rollup merge of #94384 - cuviper:atomic-slice, r=dtolnay

Add Atomic*::from_mut_slice

Tracking issue #76314 for `from_mut` has a question about the possibility of `from_mut_slice`, and I found a real case for it. A user in the forum had a parallelism problem that could be solved by open-indexing updates to a vector of atomics, but they didn't want to affect the other code using that vector. Using `from_mut_slice`, they could borrow that data as atomics just long enough for their parallel loop.

ref: https://users.rust-lang.org/t/sharing-vector-with-rayon-par-iter-correctly/72022

2 years agoRollup merge of #94094 - chrisnc:tcp-nodelay-windows-bool, r=dtolnay
Dylan DPC [Tue, 1 Mar 2022 02:41:50 +0000 (03:41 +0100)]
Rollup merge of #94094 - chrisnc:tcp-nodelay-windows-bool, r=dtolnay

use BOOL for TCP_NODELAY setsockopt value on Windows

This issue was found by the Wine project and mitigated there [^1].

Windows' setsockopt expects a BOOL (a typedef for int) for TCP_NODELAY
[^2]. Windows itself is forgiving and will accept any positive optlen and
interpret the first byte of *optval as the value, so this bug does not
affect Windows itself, but does affect systems implementing Windows'
interface more strictly, such as Wine. Wine was previously passing this
through to the host's setsockopt, where, e.g., Linux requires that
optlen be correct for the chosen option, and TCP_NODELAY expects an int.

[^1]: https://source.winehq.org/git/wine.git/commit/d6ea38f32dfd3edbe107a255c37e9f7f3da06ae7
[^2]: https://docs.microsoft.com/en-us/windows/win32/api/winsock/nf-winsock-setsockopt

2 years agoRollup merge of #93926 - PatchMixolydic:bugfix/must_use-on-exprs, r=cjgillot
Dylan DPC [Tue, 1 Mar 2022 02:41:49 +0000 (03:41 +0100)]
Rollup merge of #93926 - PatchMixolydic:bugfix/must_use-on-exprs, r=cjgillot

Lint against more useless `#[must_use]` attributes

This expands the existing `#[must_use]` check in `unused_attributes` to lint against pretty much everything `#[must_use]` doesn't support.
Fixes #93906.

2 years agoRollup merge of #93385 - CraftSpider:rustdoc-ty-fixes, r=camelid
Dylan DPC [Tue, 1 Mar 2022 02:41:47 +0000 (03:41 +0100)]
Rollup merge of #93385 - CraftSpider:rustdoc-ty-fixes, r=camelid

Rustdoc ty consistency fixes

Changes to make rustdoc cleaning of ty more consistent with hir, and hopefully use it in more places.

r? `@camelid`

2 years agoRollup merge of #91545 - compiler-errors:deref-suggestion-improvements, r=estebank
Dylan DPC [Tue, 1 Mar 2022 02:41:46 +0000 (03:41 +0100)]
Rollup merge of #91545 - compiler-errors:deref-suggestion-improvements, r=estebank

Generalize "remove `&`"  and "add `*`" suggestions to more than one deref

Suggest removing more than one `&` and `&mut`, along with suggesting adding more than one `*` (or a combination of the two).

r? `@estebank`
(since you're experienced with these types of suggestions, feel free to reassign)

2 years ago6 - Make more use of `let_chains`
Caio [Tue, 1 Mar 2022 00:12:52 +0000 (21:12 -0300)]
6 - Make more use of `let_chains`

Continuation of #94376.

cc #53667

2 years agoQuerify `global_backend_features`
Simonas Kazlauskas [Fri, 24 Sep 2021 15:02:02 +0000 (18:02 +0300)]
Querify `global_backend_features`

At the very least this serves to deduplicate the diagnostics that are
output about unknown target features provided via CLI.

2 years agoDirect users towards using Rust feature names in CLI
Simonas Kazlauskas [Fri, 23 Jul 2021 13:19:22 +0000 (16:19 +0300)]
Direct users towards using Rust feature names in CLI

If they are trying to use features rustc doesn't yet know about,
request a feature request.

Additionally, also warn against using feature names without leading `+`
or `-` signs.

2 years agoAuto merge of #94299 - oli-obk:stable_hash_ty, r=michaelwoerister
bors [Mon, 28 Feb 2022 23:38:05 +0000 (23:38 +0000)]
Auto merge of #94299 - oli-obk:stable_hash_ty, r=michaelwoerister

Caching the stable hash of Ty within itself

Instead of computing stable hashes on types as needed, we compute it during interning.

This way we can, when a hash is requested, just hash that hash, which is significantly faster than traversing the type itself.

We only do this for incremental for now, as incremental is the only frequent user of stable hashing.

As a next step we can try out

* moving the hash and TypeFlags to Interner, so projections and regions get the same benefit (tho regions are not nested, so maybe that's not a good idea? Would be nice for dedup tho)
* start comparing types via their stable hash instead of their address?

2 years agoSuggest adding a new lifetime parameter when two elided lifetimes should match up...
Fausto [Mon, 28 Feb 2022 23:16:19 +0000 (18:16 -0500)]
Suggest adding a new lifetime parameter when two elided lifetimes should match up for traits and impls.

Issue #94462

2 years agoAuto merge of #94453 - matthiaskrgr:rollup-xv9y98j, r=matthiaskrgr
bors [Mon, 28 Feb 2022 21:17:11 +0000 (21:17 +0000)]
Auto merge of #94453 - matthiaskrgr:rollup-xv9y98j, r=matthiaskrgr

Rollup of 6 pull requests

Successful merges:

 - #92399 (fix typo in btree/vec doc: Self -> self)
 - #92823 (Tweak diagnostics)
 - #94248 (Fix ICE when passing block to while-loop condition)
 - #94414 (Fix ICE when using Box<T, A> with large A)
 - #94445 (4 - Make more use of `let_chains`)
 - #94449 (Add long explanation for E0726)

Failed merges:

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

2 years agoFix inconsistent symbol mangling of integers constants with -Zverbose
Tomasz Miąsko [Fri, 25 Feb 2022 00:00:00 +0000 (00:00 +0000)]
Fix inconsistent symbol mangling of integers constants with -Zverbose

The `PrettyPrinter` changes formatting of array size and integer
constants based on `-Zverbose`, so its implementation cannot be used in
legacy symbol mangling.

2 years agoUpdate cargo
Jon Gjengset [Mon, 28 Feb 2022 20:41:51 +0000 (12:41 -0800)]
Update cargo

11 changes in
d6cdde584a1f15ea086bae922e20fd27f7165431..3d6970d50e30e797b8e26b2b9b1bdf92dc381f34
2022-02-22 19:55:51 +0000 to 2022-02-28 19:29:07 +0000:

 - https://github.com/rust-lang/cargo/pull/10395
 - https://github.com/rust-lang/cargo/pull/10425
 - https://github.com/rust-lang/cargo/pull/10428
 - https://github.com/rust-lang/cargo/pull/10388
 - https://github.com/rust-lang/cargo/pull/10167
 - https://github.com/rust-lang/cargo/pull/10429
 - https://github.com/rust-lang/cargo/pull/10426
 - https://github.com/rust-lang/cargo/pull/10372
 - https://github.com/rust-lang/cargo/pull/10420
 - https://github.com/rust-lang/cargo/pull/10416
 - https://github.com/rust-lang/cargo/pull/10417

2 years agoRollup merge of #94449 - GuillaumeGomez:explanation-e0726, r=Urgau
Matthias Krüger [Mon, 28 Feb 2022 19:05:18 +0000 (20:05 +0100)]
Rollup merge of #94449 - GuillaumeGomez:explanation-e0726, r=Urgau

Add long explanation for E0726

This is the cleaned up version of #87655 with the missing fixes.

Part of https://github.com/rust-lang/rust/issues/61137.

r? `@Urgau`

2 years agoRollup merge of #94445 - c410-f3r:more-let-chains, r=cjgillot
Matthias Krüger [Mon, 28 Feb 2022 19:05:17 +0000 (20:05 +0100)]
Rollup merge of #94445 - c410-f3r:more-let-chains, r=cjgillot

4 - Make more use of `let_chains`

Continuation of #94376.

cc #53667

2 years agoRollup merge of #94414 - DrMeepster:box_alloc_ice2, r=tmiasko
Matthias Krüger [Mon, 28 Feb 2022 19:05:15 +0000 (20:05 +0100)]
Rollup merge of #94414 - DrMeepster:box_alloc_ice2, r=tmiasko

Fix ICE when using Box<T, A> with large A

A sequel to #94043 that fixes #81270 and #92054 (duplicate).

2 years agoRollup merge of #94248 - compiler-errors:fix-while-loop-bad-delay, r=petrochenkov
Matthias Krüger [Mon, 28 Feb 2022 19:05:14 +0000 (20:05 +0100)]
Rollup merge of #94248 - compiler-errors:fix-while-loop-bad-delay, r=petrochenkov

Fix ICE when passing block to while-loop condition

We were incorrectly delaying a bug when we passed _any_ block (that evaluated to `()`) to a while loop. This PR makes the check a bit more sophisticated.

We should only suppress the error here in cases that are equivalent to those we find in #93574 (i.e. only while loop conditions that have destructuring assignment expressions in them).

Fixes #93997
cc `@estebank` who added this code

I would not be opposed to removing the delay-bug altogether, and just emitting this error always. I much prefer duplicate errors over no errors.

2 years agoRollup merge of #92823 - estebank:tweak-diag, r=jackh726
Matthias Krüger [Mon, 28 Feb 2022 19:05:13 +0000 (20:05 +0100)]
Rollup merge of #92823 - estebank:tweak-diag, r=jackh726

Tweak diagnostics

* Recover from invalid `'label: ` before block.
* Make suggestion to enclose statements in a block multipart.
* Point at `match`, `while`, `loop` and `unsafe` keywords when failing
  to parse their expression. (Fix #92705.)
* Do not suggest `{ ; }`.
* Do not suggest `|` when very unlikely to be what was wanted (in `let`
  statements).

2 years agoRollup merge of #92399 - Veeupup:fix_vec_typo, r=Dylan-DPC
Matthias Krüger [Mon, 28 Feb 2022 19:05:13 +0000 (20:05 +0100)]
Rollup merge of #92399 - Veeupup:fix_vec_typo, r=Dylan-DPC

fix typo in btree/vec doc: Self -> self

this pr fixes #92345
the documentation refers to the object the method is called for, not the type, so it should be using the lower case self.

2 years ago5 - Make more use of let_chains
Caio [Mon, 28 Feb 2022 18:52:36 +0000 (15:52 -0300)]
5 - Make more use of let_chains

2 years agoTweak diagnostics
Esteban Kuber [Wed, 12 Jan 2022 20:43:24 +0000 (20:43 +0000)]
Tweak diagnostics

* Recover from invalid `'label: ` before block.
* Make suggestion to enclose statements in a block multipart.
* Point at `match`, `while`, `loop` and `unsafe` keywords when failing
  to parse their expression.
* Do not suggest `{ ; }`.
* Do not suggest `|` when very unlikely to be what was wanted (in `let`
  statements).

2 years agoSync rust-lang/portable-simd@5f49d4c8435a25d804b2f375e949cb25479f5be9
Jubilee Young [Mon, 28 Feb 2022 18:17:40 +0000 (10:17 -0800)]
Sync rust-lang/portable-simd@5f49d4c8435a25d804b2f375e949cb25479f5be9

2 years agoUpdate ui test with the add of E0726 explanation
Guillaume Gomez [Mon, 28 Feb 2022 13:37:27 +0000 (14:37 +0100)]
Update ui test with the add of E0726 explanation

2 years agoAdd explanation for E0726
Guillaume Gomez [Mon, 28 Feb 2022 13:23:11 +0000 (14:23 +0100)]
Add explanation for E0726

2 years agoFix extracting submodules on windows.
Eric Huss [Mon, 28 Feb 2022 14:31:50 +0000 (06:31 -0800)]
Fix extracting submodules on windows.

2 years agoError if submodule fetch fails.
Eric Huss [Wed, 22 Dec 2021 22:05:47 +0000 (14:05 -0800)]
Error if submodule fetch fails.

2 years agoAuto merge of #94447 - matthiaskrgr:rollup-d8rj2xv, r=matthiaskrgr
bors [Mon, 28 Feb 2022 14:20:13 +0000 (14:20 +0000)]
Auto merge of #94447 - matthiaskrgr:rollup-d8rj2xv, r=matthiaskrgr

Rollup of 5 pull requests

Successful merges:

 - #89793 (Add `slice::{from_ptr_range, from_mut_ptr_range} `)
 - #92642 (Update search location from a relative path to absolute)
 - #93389 (regression for issue 90847)
 - #93413 (Fix broken link from rustdoc docs to ayu theme)
 - #94365 (Fix MinGW target detection in raw-dylib)

Failed merges:

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

2 years agoRollup merge of #94365 - mati865:fix-mingw-detection-for-rawdylib, r=michaelwoerister
Matthias Krüger [Mon, 28 Feb 2022 11:57:48 +0000 (12:57 +0100)]
Rollup merge of #94365 - mati865:fix-mingw-detection-for-rawdylib, r=michaelwoerister

Fix MinGW target detection in raw-dylib

LLVM target doesn't have to be the same as Rust target so relying on it is wrong.

It was one of concerns in https://github.com/rust-lang/rust/pull/88801 that was not fixed in https://github.com/rust-lang/rust/pull/90782.

2 years agoRollup merge of #93413 - lsimons:patch-1, r=Dylan-DPC
Matthias Krüger [Mon, 28 Feb 2022 11:57:47 +0000 (12:57 +0100)]
Rollup merge of #93413 - lsimons:patch-1, r=Dylan-DPC

Fix broken link from rustdoc docs to ayu theme

2 years agoRollup merge of #93389 - cameron1024:issue-90847-regression, r=Mark-Simulacrum
Matthias Krüger [Mon, 28 Feb 2022 11:57:46 +0000 (12:57 +0100)]
Rollup merge of #93389 - cameron1024:issue-90847-regression, r=Mark-Simulacrum

regression for issue 90847

Adds a regression test for issue #90847

2 years agoRollup merge of #92642 - avborhanian:master, r=Dylan-DPC
Matthias Krüger [Mon, 28 Feb 2022 11:57:45 +0000 (12:57 +0100)]
Rollup merge of #92642 - avborhanian:master, r=Dylan-DPC

Update search location from a relative path to absolute

This should address issue #90311.