]> git.lizzy.rs Git - rust.git/log
rust.git
2 years agoAuto merge of #90836 - matthiaskrgr:rollup-ou6yrlw, r=matthiaskrgr
bors [Fri, 12 Nov 2021 19:28:04 +0000 (19:28 +0000)]
Auto merge of #90836 - matthiaskrgr:rollup-ou6yrlw, r=matthiaskrgr

Rollup of 7 pull requests

Successful merges:

 - #90589 (rustc_llvm: update PassWrapper for recent LLVM)
 - #90644 (Extend the const swap feature)
 - #90704 (Unix ExitStatus comments and a tiny docs fix)
 - #90761 (Shorten Span of unused macro lints)
 - #90795 (Add more comments to explain the code to generate the search index)
 - #90798 (Document `unreachable!` custom panic message)
 - #90826 (rustc_feature: Convert `BuiltinAttribute` from tuple to a struct)

Failed merges:

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

2 years agoRollup merge of #90826 - petrochenkov:binattr, r=cjgillot
Matthias Krüger [Fri, 12 Nov 2021 18:17:34 +0000 (19:17 +0100)]
Rollup merge of #90826 - petrochenkov:binattr, r=cjgillot

rustc_feature: Convert `BuiltinAttribute` from tuple to a struct

The tuple starts having too many fields.
Noticed while reviewing https://github.com/rust-lang/rust/pull/88681.

2 years agoRollup merge of #90798 - edmorley:doc-unreachable-custom-message, r=dtolnay
Matthias Krüger [Fri, 12 Nov 2021 18:17:33 +0000 (19:17 +0100)]
Rollup merge of #90798 - edmorley:doc-unreachable-custom-message, r=dtolnay

Document `unreachable!` custom panic message

The `unreachable!` docs previously did not mention that there was a second form, `unreachable!("message")` that could be used to specify a custom panic message,

The docs now mention this feature in the same wording as currently used for `unimplemented!`:
https://doc.rust-lang.org/core/macro.unimplemented.html#panics

2 years agoRollup merge of #90795 - GuillaumeGomez:more-search-index-comments, r=notriddle
Matthias Krüger [Fri, 12 Nov 2021 18:17:32 +0000 (19:17 +0100)]
Rollup merge of #90795 - GuillaumeGomez:more-search-index-comments, r=notriddle

Add more comments to explain the code to generate the search index

Fixes #90766.

I tried to put comments when the code wasn't easy to understand at first sight and added more documentation on the recursive function. Please tell me if I misused the terminology or if comments can be improved or added into other places.

r? `@notriddle`

2 years agoRollup merge of #90761 - hellow554:macro_span, r=estebank
Matthias Krüger [Fri, 12 Nov 2021 18:17:31 +0000 (19:17 +0100)]
Rollup merge of #90761 - hellow554:macro_span, r=estebank

Shorten Span of unused macro lints

The span has been reduced to the actual ident of the macro, instead of linting the
*whole* macro.

Closes #90745

r? ``@estebank``

2 years agoRollup merge of #90704 - ijackson:exitstatus-comments, r=joshtriplett
Matthias Krüger [Fri, 12 Nov 2021 18:17:31 +0000 (19:17 +0100)]
Rollup merge of #90704 - ijackson:exitstatus-comments, r=joshtriplett

Unix ExitStatus comments and a tiny docs fix

Some nits left over from #88300

2 years agoRollup merge of #90644 - est31:const_swap, r=Mark-Simulacrum
Matthias Krüger [Fri, 12 Nov 2021 18:17:30 +0000 (19:17 +0100)]
Rollup merge of #90644 - est31:const_swap, r=Mark-Simulacrum

Extend the const swap feature

Adds the `const_swap` feature gate to three more swap functions. cc tracking issue #83163

```Rust
impl<T> [T] {
    pub const fn swap(&mut self, a: usize, b: usize);
    pub const unsafe fn swap_unchecked(&mut self, a: usize, b: usize);
}
impl<T: ?Sized> *mut T {
    pub const unsafe fn swap(self, with: *mut T);
}

2 years agoRollup merge of #90589 - durin42:llvm-14-ASO-now-struct, r=nikic
Matthias Krüger [Fri, 12 Nov 2021 18:17:28 +0000 (19:17 +0100)]
Rollup merge of #90589 - durin42:llvm-14-ASO-now-struct, r=nikic

rustc_llvm: update PassWrapper for recent LLVM

Now AddressSanitizerOptions is a struct, but at least the change was
tiny.

r? `@nikic`

2 years agoAuto merge of #89316 - asquared31415:multiple-clobber-abi, r=Amanieu
bors [Fri, 12 Nov 2021 16:29:25 +0000 (16:29 +0000)]
Auto merge of #89316 - asquared31415:multiple-clobber-abi, r=Amanieu

Add support for specifying multiple clobber_abi in `asm!`

r? `@Amanieu`
cc #72016
`@rustbot` label: +A-inline-assembly +F-asm

2 years agofix aarch test error annotations
asquared31415 [Fri, 12 Nov 2021 15:30:20 +0000 (10:30 -0500)]
fix aarch test error annotations

2 years agoAdd more comments to explain the code to generate the search index
Guillaume Gomez [Thu, 11 Nov 2021 11:43:54 +0000 (12:43 +0100)]
Add more comments to explain the code to generate the search index

2 years agorustc_feature: Convert `BuiltinAttribute` from tuple to a struct
Vadim Petrochenkov [Fri, 12 Nov 2021 12:15:14 +0000 (20:15 +0800)]
rustc_feature: Convert `BuiltinAttribute` from tuple to a struct

2 years agoAuto merge of #90813 - notriddle:notriddle/vec-extend, r=GuillaumeGomez
bors [Fri, 12 Nov 2021 12:13:32 +0000 (12:13 +0000)]
Auto merge of #90813 - notriddle:notriddle/vec-extend, r=GuillaumeGomez

Use Vec extend and collect instead of repeatedly calling push

2 years agoAuto merge of #90731 - pierwill:fix-90658, r=michaelwoerister
bors [Fri, 12 Nov 2021 04:26:28 +0000 (04:26 +0000)]
Auto merge of #90731 - pierwill:fix-90658, r=michaelwoerister

Remove `rustc_incremental::persist::fs::dep_graph_path_from`

Closes https://github.com/rust-lang/rust/issues/90658.

r? `@michaelwoerister`

2 years agoUse `Iterator::collect` instead of calling `Vec::push` in a loop
Michael Howell [Thu, 11 Nov 2021 20:57:00 +0000 (13:57 -0700)]
Use `Iterator::collect` instead of calling `Vec::push` in a loop

2 years agoAuto merge of #90489 - jyn514:load-all-extern-crates, r=petrochenkov
bors [Thu, 11 Nov 2021 22:00:53 +0000 (22:00 +0000)]
Auto merge of #90489 - jyn514:load-all-extern-crates, r=petrochenkov

rustdoc: Go back to loading all external crates unconditionally

This *continues* to cause regressions. This code will be unnecessary
once access to the resolver happens fully before creating the tyctxt
(#83761), so load all crates unconditionally for now. To minimize churn, this leaves in the code for loading crates selectively.

"Fixes" https://github.com/rust-lang/rust/issues/84738. Previously: https://github.com/rust-lang/rust/pull/83738, https://github.com/rust-lang/rust/pull/85749, https://github.com/rust-lang/rust/pull/88215

r? `@petrochenkov` cc `@camelid` (this should fix the "index out of bounds" error you had while looking up `crate_name`).

2 years agoUse `Vec::extend`, instead of calling `Vec::push` in a loop
Michael Howell [Thu, 11 Nov 2021 20:56:32 +0000 (13:56 -0700)]
Use `Vec::extend`, instead of calling `Vec::push` in a loop

2 years agoAuto merge of #90746 - nnethercote:opt-pattern-matching, r=Nadrieril
bors [Thu, 11 Nov 2021 18:26:49 +0000 (18:26 +0000)]
Auto merge of #90746 - nnethercote:opt-pattern-matching, r=Nadrieril

Optimize pattern matching

These commits speed up the `match-stress-enum` benchmark, which is very artificial, but the changes are simple enough that it's probably worth doing.

r? `@Nadrieril`

2 years agoprocess::ExitStatus: Discuss `exit` vs `_exit` in a comment.
Ian Jackson [Mon, 8 Nov 2021 17:38:53 +0000 (17:38 +0000)]
process::ExitStatus: Discuss `exit` vs `_exit` in a comment.

As discussed here
 https://github.com/rust-lang/rust/pull/88300#issuecomment-936097710

I felt this was the best place to put this (rather than next to
ExitStatusExt).  After all, it's a property of the ExitStatus type on
Unix.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agounix::ExitStatus: Add comment saying that it's a wait status
Ian Jackson [Mon, 8 Nov 2021 17:38:01 +0000 (17:38 +0000)]
unix::ExitStatus: Add comment saying that it's a wait status

With cross-reference.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agounix::ExitStatusExt: Correct reference to _exit system call
Ian Jackson [Mon, 8 Nov 2021 17:28:02 +0000 (17:28 +0000)]
unix::ExitStatusExt: Correct reference to _exit system call

As discussed here
 https://github.com/rust-lang/rust/pull/88300#issuecomment-936085371

exit is (conventionally) a library function, with _exit being the
actual system call.

I have checked the other references and they say "if the process
terminated by calling `exti`".  I think despite the slight
imprecision (strictly, it should read iff ... `_exit`), this is
clearer.  Anyone who knows about the distinction between `exit` and
`_exit` will not be confused.

`_exit` is the correct traditional name for the system call, despite
Linux calling it `exit_group` or `exit`:
  https://www.freebsd.org/cgi/man.cgi?query=_exit&sektion=2&n=1

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoAuto merge of #90648 - matthewjasper:assoc-item-cleanup, r=cjgillot
bors [Thu, 11 Nov 2021 15:15:15 +0000 (15:15 +0000)]
Auto merge of #90648 - matthewjasper:assoc-item-cleanup, r=cjgillot

Assoc item cleanup

This removes some fields from ObligationCauseCode

Split out of #90639

2 years agoPassWrapper: additional sanitizer update to match clang
Krasimir Georgiev [Thu, 11 Nov 2021 14:03:23 +0000 (09:03 -0500)]
PassWrapper: additional sanitizer update to match clang

This happened later in the stream than the other changes, but the fix is
overlapping. Fix taken from a55c4ec1cee7683d9095327d9d33e7137ec25292 in
LLVM.

2 years agoDocument `unreachable!()` custom panic message
Ed Morley [Thu, 11 Nov 2021 13:41:21 +0000 (13:41 +0000)]
Document `unreachable!()` custom panic message

The `unreachable!` docs previously did not mention that there was a second
form, `unreachable!("message")` that could be used to specify a custom panic
message,

The docs now mention this in the same style as currently used for `unimplemented!`:
https://doc.rust-lang.org/core/macro.unimplemented.html#panics

2 years agoAuto merge of #88798 - sunfishcode:sunfishcode/windows-null-handles, r=joshtriplett
bors [Thu, 11 Nov 2021 12:07:53 +0000 (12:07 +0000)]
Auto merge of #88798 - sunfishcode:sunfishcode/windows-null-handles, r=joshtriplett

Fix assertion failures in `OwnedHandle` with `windows_subsystem`.

As discussed in #88576, raw handle values in Windows can be null, such
as in `windows_subsystem` mode, or when consoles are detached from a
process. So, don't use `NonNull` to hold them, don't assert that they're
not null, and remove `OwnedHandle`'s `repr(transparent)`. Introduce a
new `HandleOrNull` type, similar to `HandleOrInvalid`, to cover the FFI
use case.

r? `@joshtriplett`

2 years agoAuto merge of #90755 - scottmcm:spec-array-clone, r=jackh726
bors [Thu, 11 Nov 2021 09:13:22 +0000 (09:13 +0000)]
Auto merge of #90755 - scottmcm:spec-array-clone, r=jackh726

Specialize array cloning for Copy types

Because after PR 86041, the optimizer no longer load-merges at the LLVM IR level, which might be part of the perf loss.  (I'll run perf and see if this makes a difference.)

Also I added a codegen test so this hopefully won't regress in future -- it passes on stable and with my change here, but not on the 2021-11-09 nightly.

Example on current nightly: <https://play.rust-lang.org/?version=nightly&mode=release&edition=2021&gist=1f52d46fb8fc3ca3ac9f097390085ffa>
```rust
type T = u8;
const N: usize = 3;

pub fn demo_clone(x: &[T; N]) -> [T; N] {
    x.clone()
}

pub fn demo_copy(x: &[T; N]) -> [T; N] {
    *x
}
```
```llvm-ir
; playground::demo_clone
; Function Attrs: mustprogress nofree nosync nounwind nonlazybind uwtable willreturn
define i24 `@_ZN10playground10demo_clone17h98a4f11453d1a753E([3` x i8]* noalias nocapture readonly align 1 dereferenceable(3) %x) unnamed_addr #0 personality i32 (i32, i32, i64, %"unwind::libunwind::_Unwind_Exception"*, %"unwind::libunwind::_Unwind_Context"*)* `@rust_eh_personality` {
start:
  %0 = getelementptr [3 x i8], [3 x i8]* %x, i64 0, i64 0
  %1 = getelementptr inbounds [3 x i8], [3 x i8]* %x, i64 0, i64 1
  %.val.i.i.i.i.i.i.i.i.i = load i8, i8* %0, align 1, !alias.scope !2, !noalias !9
  %2 = getelementptr inbounds [3 x i8], [3 x i8]* %x, i64 0, i64 2
  %.val.i.i.i.i.i.1.i.i.i.i = load i8, i8* %1, align 1, !alias.scope !2, !noalias !20
  %.val.i.i.i.i.i.2.i.i.i.i = load i8, i8* %2, align 1, !alias.scope !2, !noalias !23
  %array.sroa.6.0.insert.ext.i.i.i.i = zext i8 %.val.i.i.i.i.i.2.i.i.i.i to i32
  %array.sroa.6.0.insert.shift.i.i.i.i = shl nuw nsw i32 %array.sroa.6.0.insert.ext.i.i.i.i, 16
  %array.sroa.5.0.insert.ext.i.i.i.i = zext i8 %.val.i.i.i.i.i.1.i.i.i.i to i32
  %array.sroa.5.0.insert.shift.i.i.i.i = shl nuw nsw i32 %array.sroa.5.0.insert.ext.i.i.i.i, 8
  %array.sroa.0.0.insert.ext.i.i.i.i = zext i8 %.val.i.i.i.i.i.i.i.i.i to i32
  %array.sroa.5.0.insert.insert.i.i.i.i = or i32 %array.sroa.5.0.insert.shift.i.i.i.i, %array.sroa.0.0.insert.ext.i.i.i.i
  %array.sroa.0.0.insert.insert.i.i.i.i = or i32 %array.sroa.5.0.insert.insert.i.i.i.i, %array.sroa.6.0.insert.shift.i.i.i.i
  %.sroa.4.0.extract.trunc.i.i.i.i = trunc i32 %array.sroa.0.0.insert.insert.i.i.i.i to i24
  ret i24 %.sroa.4.0.extract.trunc.i.i.i.i
}

; playground::demo_copy
; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind readonly uwtable willreturn
define i24 `@_ZN10playground9demo_copy17h7817453f9291d746E([3` x i8]* noalias nocapture readonly align 1 dereferenceable(3) %x) unnamed_addr #1 {
start:
  %.sroa.0.0..sroa_cast = bitcast [3 x i8]* %x to i24*
  %.sroa.0.0.copyload = load i24, i24* %.sroa.0.0..sroa_cast, align 1
  ret i24 %.sroa.0.0.copyload
}
```

2 years agoShorten Span of unused macro lints
Marcel Hellwig [Wed, 10 Nov 2021 11:00:46 +0000 (12:00 +0100)]
Shorten Span of unused macro lints

The span has been recuded to the actual ident, instead of linting the
*whole* macro.

2 years agoAuto merge of #89550 - lcnr:coherence-specialization, r=nikomatsakis
bors [Thu, 11 Nov 2021 05:47:37 +0000 (05:47 +0000)]
Auto merge of #89550 - lcnr:coherence-specialization, r=nikomatsakis

do not emit overlap errors for impls failing the orphan check

this should finally allow us to merge #86986, see https://github.com/rust-lang/rust/pull/86986#discussion_r716059345 for more details.

r? `@nikomatsakis` cc `@eddyb`

2 years agoAuto merge of #83846 - torhovland:issue-10971, r=davidtwco
bors [Thu, 11 Nov 2021 02:52:32 +0000 (02:52 +0000)]
Auto merge of #83846 - torhovland:issue-10971, r=davidtwco

Added the --temps-dir option

Fixes #10971.

The new `--temps-dir` option puts intermediate files in a user-specified directory. This provides a fix for the issue where parallel invocations of rustc would overwrite each other's intermediate files.

No files are kept in the intermediate directory unless `-C save-temps=yes`.

If additional files are specifically requested using `--emit asm,llvm-bc,llvm-ir,obj,metadata,link,dep-info,mir`, these will be put in the output directory rather than the intermediate directory.

This is a backward-compatible change, i.e. if `--temps-dir` is not specified, the behavior is the same as before.

2 years agoAuto merge of #90784 - matthiaskrgr:rollup-car8g12, r=matthiaskrgr
bors [Wed, 10 Nov 2021 23:13:06 +0000 (23:13 +0000)]
Auto merge of #90784 - matthiaskrgr:rollup-car8g12, r=matthiaskrgr

Rollup of 3 pull requests

Successful merges:

 - #89930 (Only use `clone3` when needed for pidfd)
 - #90736 (adjust documented inline-asm register constraints)
 - #90783 (Update Miri)

Failed merges:

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

2 years agoRollup merge of #90783 - camelid:update-miri, r=RalfJung
Matthias Krüger [Wed, 10 Nov 2021 22:04:27 +0000 (23:04 +0100)]
Rollup merge of #90783 - camelid:update-miri, r=RalfJung

Update Miri

Fixes #90763.

This is the last step in landing rust-lang/miri#1340!

r? `@RalfJung`

2 years agoRollup merge of #90736 - Lokathor:inline-asm-docs-updates, r=Amanieu
Matthias Krüger [Wed, 10 Nov 2021 22:04:26 +0000 (23:04 +0100)]
Rollup merge of #90736 - Lokathor:inline-asm-docs-updates, r=Amanieu

adjust documented inline-asm register constraints

This change more clearly specifies how `reg` and `reg_thumb` work with ARM, Thumb2, and Thumb1 code.

Based upon the [llvm documentation](https://llvm.org/docs/LangRef.html#supported-constraint-code-list) for register constraint codes.
To be clear, this just updates the docs to match what already happens with rustc/llvm.
No change in the compiler is required to make it match this new documentation.

2 years agoRollup merge of #89930 - cuviper:avoid-clone3, r=joshtriplett
Matthias Krüger [Wed, 10 Nov 2021 22:04:25 +0000 (23:04 +0100)]
Rollup merge of #89930 - cuviper:avoid-clone3, r=joshtriplett

Only use `clone3` when needed for pidfd

In #89522 we learned that `clone3` is interacting poorly with Gentoo's
`sandbox` tool. We only need that for the unstable pidfd extensions, so
otherwise avoid that and use a normal `fork`.

This is a re-application of beta #89924, now that we're aware that we need
more than just a temporary release fix. I also reverted 12fbabd27f700, as
that was just fallout from using `clone3` instead of `fork`.

r? `@Mark-Simulacrum`
cc `@joshtriplett`

2 years agoUpdate Miri
Noah Lev [Wed, 10 Nov 2021 20:42:51 +0000 (12:42 -0800)]
Update Miri

This is the last step in landing rust-lang/miri#1340!

2 years agoAuto merge of #90769 - matthiaskrgr:rollup-266apqm, r=matthiaskrgr
bors [Wed, 10 Nov 2021 20:12:14 +0000 (20:12 +0000)]
Auto merge of #90769 - matthiaskrgr:rollup-266apqm, r=matthiaskrgr

Rollup of 5 pull requests

Successful merges:

 - #88447 (Use computed visibility in rustdoc)
 - #88868 (Allow simd_bitmask to return byte arrays)
 - #90727 (Remove potential useless data for search index)
 - #90742 (Use AddAssign impl)
 - #90758 (Fix collections entry API documentation.)

Failed merges:

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

2 years agoMoar #[inline]
Scott McMurray [Wed, 10 Nov 2021 19:57:14 +0000 (11:57 -0800)]
Moar #[inline]

2 years agoRollup merge of #90758 - joseph-roitman:fix-entry-doc-key-ref, r=dtolnay
Matthias Krüger [Wed, 10 Nov 2021 17:52:30 +0000 (18:52 +0100)]
Rollup merge of #90758 - joseph-roitman:fix-entry-doc-key-ref, r=dtolnay

Fix collections entry API documentation.

I found some documentation that seems out of date.

2 years agoRollup merge of #90742 - est31:add_assign, r=davidtwco
Matthias Krüger [Wed, 10 Nov 2021 17:52:29 +0000 (18:52 +0100)]
Rollup merge of #90742 - est31:add_assign, r=davidtwco

Use AddAssign impl

2 years agoRollup merge of #90727 - GuillaumeGomez:remove-potential-useless-search-index-data...
Matthias Krüger [Wed, 10 Nov 2021 17:52:28 +0000 (18:52 +0100)]
Rollup merge of #90727 - GuillaumeGomez:remove-potential-useless-search-index-data, r=notriddle,camelid

Remove potential useless data for search index

I uncovered this case when working on https://github.com/rust-lang/rust/pull/90726 to debug https://github.com/rust-lang/rust/pull/90385.

Explanations: if we have a full generic, we check if it has generics then we do the following:
 * If it has only one generic, we remove one nested level in order to not keep the "parent" generic (since it has empty name, it's useless after all).
 * Otherwise we add it alongside its generics.

However, I didn't handle the case where a generic had no generics. Meaning that we were adding items with empty names in the search index. So basically useless data in the search index.

r? `@camelid`

2 years agoRollup merge of #88868 - calebzulawski:feature/simd_bitmask, r=workingjubilee
Matthias Krüger [Wed, 10 Nov 2021 17:52:27 +0000 (18:52 +0100)]
Rollup merge of #88868 - calebzulawski:feature/simd_bitmask, r=workingjubilee

Allow simd_bitmask to return byte arrays

cc `@rust-lang/project-portable-simd` `@workingjubilee`

2 years agoRollup merge of #88447 - inquisitivecrystal:rustdoc-vis, r=jyn514
Matthias Krüger [Wed, 10 Nov 2021 17:52:26 +0000 (18:52 +0100)]
Rollup merge of #88447 - inquisitivecrystal:rustdoc-vis, r=jyn514

Use computed visibility in rustdoc

This PR changes `librustdoc` to use computed visibility instead of syntactic visibility. It was initially part of #88019, but was separated due to concerns that it might cause a regression somewhere we couldn't predict.

r? `@jyn514`
cc `@cjgillot` `@petrochenkov`

2 years agodon't inline `report_overlap_conflict`
lcnr [Sat, 23 Oct 2021 19:05:03 +0000 (21:05 +0200)]
don't inline `report_overlap_conflict`

2 years agono overlap errors after failing the orphan check
lcnr [Thu, 21 Oct 2021 13:36:35 +0000 (15:36 +0200)]
no overlap errors after failing the orphan check

2 years agoAuto merge of #90759 - yanok:llvm-dbginfo-fix, r=nikic
bors [Wed, 10 Nov 2021 12:56:29 +0000 (12:56 +0000)]
Auto merge of #90759 - yanok:llvm-dbginfo-fix, r=nikic

Update llvm submodule

This includes debug info generation fix, that fixes #90301.

Also includes WASM backend related fix for https://bugs.llvm.org/show_bug.cgi?id=52352
(I haven't found a corresponding Rust bug).

2 years agoUpdate llvm submodule
Ilya Yanok [Wed, 10 Nov 2021 10:52:59 +0000 (10:52 +0000)]
Update llvm submodule

This includes debug info generation fix, that fixes #90301.

Also includes WASM backend related fix for https://bugs.llvm.org/show_bug.cgi?id=52352
(I haven't found a corresponding Rust bug).

2 years agoFix collection entry API documentation.
Joseph Roitman [Wed, 10 Nov 2021 10:37:18 +0000 (12:37 +0200)]
Fix collection entry API documentation.

2 years agoRemove potential useless data for search index
Guillaume Gomez [Tue, 9 Nov 2021 13:45:05 +0000 (14:45 +0100)]
Remove potential useless data for search index

2 years agoAuto merge of #88670 - camelid:miri-uninit-num, r=RalfJung
bors [Wed, 10 Nov 2021 09:36:03 +0000 (09:36 +0000)]
Auto merge of #88670 - camelid:miri-uninit-num, r=RalfJung

miri: Detect uninitialized integers and floats

Part of rust-lang/miri#1340.

Companion Miri PR: rust-lang/miri#1904

r? `@RalfJung`

2 years agoChanging cdylib to staticlib, as the former doesn't work with arm-none-eabi-gcc.
Tor Hovland [Wed, 10 Nov 2021 07:25:35 +0000 (08:25 +0100)]
Changing cdylib to staticlib, as the former doesn't work with arm-none-eabi-gcc.

2 years agoadd missing sym feature
asquared31415 [Wed, 10 Nov 2021 06:35:39 +0000 (01:35 -0500)]
add missing sym feature

2 years agoAuto merge of #90754 - matthiaskrgr:rollup-v0483m5, r=matthiaskrgr
bors [Wed, 10 Nov 2021 06:15:50 +0000 (06:15 +0000)]
Auto merge of #90754 - matthiaskrgr:rollup-v0483m5, r=matthiaskrgr

Rollup of 3 pull requests

Successful merges:

 - #90690 (kmc-solid: Avoid the use of `asm_const`)
 - #90748 (Add a real tracking issue for `CommandExt::groups`)
 - #90751 (Update books)

Failed merges:

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

2 years agoFix aarch tests
asquared31415 [Sun, 17 Oct 2021 07:30:24 +0000 (03:30 -0400)]
Fix aarch tests

2 years agoAdd support for specifying multiple clobber_abi in `asm!`
asquared31415 [Thu, 14 Oct 2021 07:23:09 +0000 (03:23 -0400)]
Add support for specifying multiple clobber_abi in `asm!`
Allow multiple clobber_abi in asm

Update docs
Fix aarch64 test
Combine abis
Emit duplicate ABI error, empty ABI list error
multiple clobber_abi

2 years agoSpecialize array cloning for Copy types
Scott McMurray [Wed, 10 Nov 2021 05:43:20 +0000 (21:43 -0800)]
Specialize array cloning for Copy types

Because after PR 86041, the optimizer no longer load-merges at the LLVM IR level, which might be part of the perf loss.  (I'll run perf and see if this makes a difference.)

Also I added a codegen test so this hopefully won't regress in future -- it passes on stable and with my change here, but not on the 2021-11-09 nightly.

2 years agoRollup merge of #90751 - ehuss:update-books, r=ehuss
Matthias Krüger [Wed, 10 Nov 2021 05:02:56 +0000 (06:02 +0100)]
Rollup merge of #90751 - ehuss:update-books, r=ehuss

Update books

## nomicon

1 commits in 358e6a61d5f4f0496d0a81e70cdcd25d05307342..c6b4bf831e9a40aec34f53067d20634839a6778b
2021-10-20 11:23:12 -0700 to 2021-11-09 02:30:56 +0900
- Replace some use of variant with covariant (rust-lang/nomicon#322)

## book

11 commits in fd9299792852c9a368cb236748781852f75cdac6..5c5dbc5b196c9564422b3193264f3288d2a051ce
2021-10-22 21:59:46 -0400 to 2021-11-09 19:30:43 -0500
- Fix constants link.
- Fix updated anchor
- Propagate edits to chapter 2 back
- Edits to nostarch's chapter 3 edits
- ch 3 from nostarch
- Fix Cargo.toml snippet about custom derive macros
- Snapshot of chapter 9 for nostarch
- Create tmp/src for converting quotes, not sure why this broke but ok
- Update question mark to better explain where it can be used
- Clarify sentence about Results in functions that don't return Result. Fixes rust-lang/book#2912.
- Merge pull request rust-lang/book#2913 from covariant/patch-1

## rust-by-example

2 commits in 27f1ff5e440ef78828b68ab882b98e1b10d9af32..e9d45342d7a6c1def4731f1782d87ea317ba30c3
2021-10-13 08:04:40 -0300 to 2021-11-02 13:33:03 -0500
- Enums: Linked-List Needs Re-Wording (rust-lang/rust-by-example#1469)
- fix: Use the point as top left corner for `square` (rust-lang/rust-by-example#1471)

## rustc-dev-guide

13 commits in b06008731af0f7d07cd0614e820c8276dfed1c18..196ef69aa68f2cef44f37566ee7db37daf00301b
2021-10-21 15:13:09 -0500 to 2021-11-07 07:48:47 -0600
- Fix typo: [upv.rs_mentioned] -&gt; [upvars_mentioned]
- Add note to emphasize replacing TARGET_TRIPLE (rust-lang/rustc-dev-guide#1250)
- Remove some legacy test suites.
- tiny capitalization fix
- Fix date
- Update some date-check comments
- Ensure date-check cron job is using latest stable Rust
- enhance subtree docs, link to clippy docs
- Edit introduction to bootstrapping
- Some minor adjustments to the diagnostic documentation
- Edit "About this guide" for semantic line feeds
- Fix `rustc_mir` related links (rust-lang/rustc-dev-guide#1228)
- Add documentation for LLVM CFI support

## edition-guide

3 commits in 7c0088ca744d293a5f4b1e2ac378e7c23d30fe55..27f4a84d3852e9416cae5861254fa53a825c56bd
2021-10-05 13:28:05 +0200 to 2021-11-08 10:13:20 -0500
- Add a missing period (rust-lang/edition-guide#271)
- Fix syntax error in code example (rust-lang/edition-guide#270)
- Fixed an example error of prelude.md (rust-lang/edition-guide#269)

2 years agoRollup merge of #90748 - cuviper:track-setgroups, r=dtolnay
Matthias Krüger [Wed, 10 Nov 2021 05:02:55 +0000 (06:02 +0100)]
Rollup merge of #90748 - cuviper:track-setgroups, r=dtolnay

Add a real tracking issue for `CommandExt::groups`

The `unstable` attribute referenced the closed RFE #38527, so I filed tracking issue #90747.

2 years agoRollup merge of #90690 - solid-rs:fix-kmc-solid-asm-const, r=Mark-Simulacrum
Matthias Krüger [Wed, 10 Nov 2021 05:02:54 +0000 (06:02 +0100)]
Rollup merge of #90690 - solid-rs:fix-kmc-solid-asm-const, r=Mark-Simulacrum

kmc-solid: Avoid the use of `asm_const`

This PR removes the use of [the now-separated-out `asm_const` compiler feature][1] in `std::sys::solid` to fix the [`*-kmc-solid_*`](https://doc.rust-lang.org/nightly/rustc/platform-support/kmc-solid.html) Tier 3 targets.

[1]: https://github.com/rust-lang/rust/pull/90348

2 years agoAuto merge of #90663 - ken-matsui:support-early-stopping-too-old-tidy-for-macos,...
bors [Wed, 10 Nov 2021 03:11:44 +0000 (03:11 +0000)]
Auto merge of #90663 - ken-matsui:support-early-stopping-too-old-tidy-for-macos, r=Mark-Simulacrum

Support early stopping too old pre-installed `tidy` command for macOS in the HTML checker

This PR brings early stopping the HTML checker before errors, which leave some macOS users confused, and suggesting installing a newer `tidy` command.

The pre-installed `tidy` command on macOS is too old, released on 31 October 2006. Additionally, I can see the same date at [StackOverflow](https://stackoverflow.com/questions/22283382/overwrite-osx-tidy
) seven years ago. The `tidy` does not support two indispensable options: `--mute-id` and `--mute`. So, the `./x.py test` command fails with a bunch of errors due not to muting them.

I could confirm the `./x.py test` command before installing a newer `tidy` failed and its command after the installation succeeded.

2 years agoUpdate books
Eric Huss [Wed, 10 Nov 2021 03:11:01 +0000 (19:11 -0800)]
Update books

2 years agoUse computed visibility in rustdoc
inquisitivecrystal [Mon, 8 Nov 2021 03:54:19 +0000 (19:54 -0800)]
Use computed visibility in rustdoc

2 years agoAdd `ty::Visibility::is_public()`
inquisitivecrystal [Mon, 8 Nov 2021 03:53:26 +0000 (19:53 -0800)]
Add `ty::Visibility::is_public()`

2 years agoAdd comment regarding bit order
Caleb Zulawski [Wed, 10 Nov 2021 01:54:28 +0000 (01:54 +0000)]
Add comment regarding bit order

2 years agoAdd a real tracking issue for `CommandExt::groups`
Josh Stone [Wed, 10 Nov 2021 01:28:56 +0000 (17:28 -0800)]
Add a real tracking issue for `CommandExt::groups`

2 years agomiri: Detect uninitialized integers and floats
Noah Lev [Sat, 4 Sep 2021 23:07:20 +0000 (16:07 -0700)]
miri: Detect uninitialized integers and floats

Change the Miri engine to allow configuring whether to check
initialization of integers and floats. This allows the Miri tool to
optionally check for initialization if requested by the user.

2 years agoUpdate src/doc/unstable-book/src/library-features/asm.md
Lokathor [Tue, 9 Nov 2021 22:52:55 +0000 (15:52 -0700)]
Update src/doc/unstable-book/src/library-features/asm.md

Co-authored-by: Josh Triplett <josh@joshtriplett.org>
2 years agoUpdate src/doc/unstable-book/src/library-features/asm.md
Lokathor [Tue, 9 Nov 2021 22:52:46 +0000 (15:52 -0700)]
Update src/doc/unstable-book/src/library-features/asm.md

Co-authored-by: Josh Triplett <josh@joshtriplett.org>
2 years agoUse AddAssign impl
est31 [Tue, 9 Nov 2021 22:45:17 +0000 (23:45 +0100)]
Use AddAssign impl

2 years agoadjust documented register constraints to match https://llvm.org/docs/LangRef.html...
Lokathor [Tue, 9 Nov 2021 20:30:30 +0000 (13:30 -0700)]
adjust documented register constraints to match https://llvm.org/docs/LangRef.html#supported-constraint-code-list

2 years agoAuto merge of #90734 - matthiaskrgr:rollup-e1euotp, r=matthiaskrgr
bors [Tue, 9 Nov 2021 20:09:53 +0000 (20:09 +0000)]
Auto merge of #90734 - matthiaskrgr:rollup-e1euotp, r=matthiaskrgr

Rollup of 7 pull requests

Successful merges:

 - #89561 (Type inference for inline consts)
 - #90035 (implement rfc-2528 type_changing-struct-update)
 - #90613 (Allow to run a specific rustdoc-js* test)
 - #90683 (Make `compiler-docs` only control the default instead of being a hard off-switch)
 - #90685 (x.py: remove fixme by deleting code)
 - #90701 (Record more artifact sizes during self-profiling.)
 - #90723 (Better document `Box` and `alloc::alloc::box_free` connection)

Failed merges:

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

2 years agoExtend the const_swap feature
est31 [Sat, 6 Nov 2021 04:56:09 +0000 (05:56 +0100)]
Extend the const_swap feature

This makes the inherent method ptr::swap unstably
const, as well as slice::swap{,_unchecked}.

2 years agoRollup merge of #90723 - asquared31415:box_docs, r=jyn514
Matthias Krüger [Tue, 9 Nov 2021 18:00:46 +0000 (19:00 +0100)]
Rollup merge of #90723 - asquared31415:box_docs, r=jyn514

Better document `Box` and `alloc::alloc::box_free` connection

The internal `alloc::alloc::box_free` function requires that its signature matches the `owned_box` struct's declaration, but previously that connection was only documented on the `box_free` function.

This PR makes the documentation two-way to help anyone making theoretical changes to `Box` to see the connection, since changes are more likely to originate from `Box`.

2 years agoRollup merge of #90701 - michaelwoerister:more-artifact-sizes, r=davidtwco
Matthias Krüger [Tue, 9 Nov 2021 18:00:45 +0000 (19:00 +0100)]
Rollup merge of #90701 - michaelwoerister:more-artifact-sizes, r=davidtwco

Record more artifact sizes during self-profiling.

This PR adds artifact size recording for

- "linked artifacts" (executables, RLIBs, dylibs, static libs)
- object files
- dwo files
- assembly files
- crate metadata
- LLVM bitcode files
- LLVM IR files
- codegen unit size estimates

Currently the identifiers emitted for these are hard-coded as string literals. Is it worth adding constants to https://github.com/rust-lang/measureme/blob/master/measureme/src/rustc.rs instead? We don't do that for query names and the like -- but artifact kinds might be more stable than query names.

2 years agoRollup merge of #90685 - jyn514:remove-dead-code, r=Mark-Simulacrum
Matthias Krüger [Tue, 9 Nov 2021 18:00:44 +0000 (19:00 +0100)]
Rollup merge of #90685 - jyn514:remove-dead-code, r=Mark-Simulacrum

x.py: remove fixme by deleting code

As far as I can tell, this parameter was never used, so just delete it
as unnecessary.

2 years agoRollup merge of #90683 - jyn514:compiler-docs, r=Mark-Simulacrum
Matthias Krüger [Tue, 9 Nov 2021 18:00:43 +0000 (19:00 +0100)]
Rollup merge of #90683 - jyn514:compiler-docs, r=Mark-Simulacrum

Make `compiler-docs` only control the default instead of being a hard off-switch

This also fixes `x doc src/tools/clippy` when compiler-docs is disabled.

See https://github.com/rust-lang/rust/pull/90354#issuecomment-955854508.

r? ``@Mark-Simulacrum``

2 years agoRollup merge of #90613 - GuillaumeGomez:specific-rustdoc-js-test, r=Mark-Simulacrum
Matthias Krüger [Tue, 9 Nov 2021 18:00:42 +0000 (19:00 +0100)]
Rollup merge of #90613 - GuillaumeGomez:specific-rustdoc-js-test, r=Mark-Simulacrum

Allow to run a specific rustdoc-js* test

r? ``@Mark-Simulacrum``

2 years agoRollup merge of #90035 - SparrowLii:rfc2528, r=jackh726
Matthias Krüger [Tue, 9 Nov 2021 18:00:41 +0000 (19:00 +0100)]
Rollup merge of #90035 - SparrowLii:rfc2528, r=jackh726

implement rfc-2528 type_changing-struct-update

This PR implement rfc2528-type_changing-struct-update.
The main change process is as follows:
1. Move the processing part of `base_expr` into `check_expr_struct_fields` to avoid returning `remaining_fields` (a relatively complex hash table)
2. Before performing the type consistency check(`check_expr_has_type_or_error`), if the `type_changing_struct_update` feature is set, enter a different processing flow, otherwise keep the original flow
3. In the case of the same structure definition, check each field in `remaining_fields`. If the field in `base_expr` is not the suptype of the field in `adt_ty`, an error(`FeildMisMatch`) will be reported.

The MIR part does not need to be changed, because only the items contained in `remaining_fields` will be extracted from `base_expr` when MIR is generated. This means that fields with different types in `base_expr` will not be used
Updates #86618
cc `@nikomatsakis`

2 years agoRollup merge of #89561 - nbdd0121:const_typeck, r=nikomatsakis
Matthias Krüger [Tue, 9 Nov 2021 18:00:40 +0000 (19:00 +0100)]
Rollup merge of #89561 - nbdd0121:const_typeck, r=nikomatsakis

Type inference for inline consts

Fixes #78132
Fixes #78174
Fixes #81857
Fixes #89964

Perform type checking/inference of inline consts in the same context as the outer def, similar to what is currently done to closure.

Doing so would require `closure_base_def_id` of the inline const to return the outer def, and since `closure_base_def_id` can be called on non-local crate (and thus have no HIR available), a new `DefKind` is created for inline consts.

The type of the generated anon const can capture lifetime of outer def, so we couldn't just use the typeck result as the type of the inline const's def. Closure has a similar issue, and it uses extra type params `CK, CS, U` to capture closure kind, input/output signature and upvars. I use a similar approach for inline consts, letting it have an extra type param `R`, and then `typeof(InlineConst<[paremt generics], R>)` would just be `R`. In borrowck region requirements are also propagated to the outer MIR body just like it's currently done for closure.

With this PR, inline consts in expression position are quitely usable now; however the usage in pattern position is still incomplete -- since those does not remain in the MIR borrowck couldn't verify the lifetime there. I have left an ignored test as a FIXME.

Some disucssions can be found on [this Zulip thread](https://rust-lang.zulipchat.com/#narrow/stream/260443-project-const-generics/topic/inline.20consts.20typeck).
cc `````@spastorino````` `````@lcnr`````
r? `````@nikomatsakis`````

`````@rustbot````` label A-inference F-inline_const T-compiler

2 years agoAuto merge of #86041 - bstrie:unmagic-array-copy, r=jackh726
bors [Tue, 9 Nov 2021 17:13:44 +0000 (17:13 +0000)]
Auto merge of #86041 - bstrie:unmagic-array-copy, r=jackh726

Replace Copy/Clone compiler magic on arrays with library impls

With const generics the compiler no longer needs to fake these impls.

2 years agoRemove `rustc_incremental::persist::fs::dep_graph_path_from`
pierwill [Tue, 9 Nov 2021 16:58:11 +0000 (10:58 -0600)]
Remove `rustc_incremental::persist::fs::dep_graph_path_from`

2 years agoAllow to run a specific rustdoc-js* test
Guillaume Gomez [Fri, 5 Nov 2021 14:58:14 +0000 (15:58 +0100)]
Allow to run a specific rustdoc-js* test

2 years agoDidn't mean to invert this boolean.
Augie Fackler [Thu, 4 Nov 2021 22:08:32 +0000 (18:08 -0400)]
Didn't mean to invert this boolean.

2 years agorustc_llvm: update PassWrapper for recent LLVM
Augie Fackler [Thu, 4 Nov 2021 21:16:16 +0000 (17:16 -0400)]
rustc_llvm: update PassWrapper for recent LLVM

Now AddressSanitizerOptions is a struct, but at least the change was
tiny.

r? nikic

2 years agoAuto merge of #90724 - JohnTitor:rollup-zg0kbm3, r=JohnTitor
bors [Tue, 9 Nov 2021 14:12:54 +0000 (14:12 +0000)]
Auto merge of #90724 - JohnTitor:rollup-zg0kbm3, r=JohnTitor

Rollup of 6 pull requests

Successful merges:

 - #87530 (Add comments regarding superfluous `!Sync` impls)
 - #90591 (treat illumos like solaris in failing ui tests which need it)
 - #90678 (Add some GATs-related regression tests)
 - #90688 (enable `dotprod` target feature in arm)
 - #90708 (Add a note about feature(explicit_generic_args_with_impl_trait) to the relevant error message)
 - #90720 (Update cargo)

Failed merges:

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

2 years agoRollup merge of #90720 - ehuss:update-cargo, r=ehuss
Yuki Okushi [Tue, 9 Nov 2021 13:02:26 +0000 (22:02 +0900)]
Rollup merge of #90720 - ehuss:update-cargo, r=ehuss

Update cargo

4 commits in 94ca096afbf25f670e76e07dca754fcfe27134be..2e2a16e983f597da62bc132eb191bc3276d4b1bb
2021-10-29 14:45:06 +0000 to 2021-11-08 15:13:38 +0000
- Fix debug panic on download with redirect body. (rust-lang/cargo#10048)
- no need to clone (rust-lang/cargo#10051)
- Update curl. (rust-lang/cargo#10040)
- Fix --scrape-examples-target-crate using package name (with dashes) instead of crate name (with underscores) (rust-lang/cargo#10037)

2 years agoRollup merge of #90708 - NieDzejkob:feature-note, r=jackh726
Yuki Okushi [Tue, 9 Nov 2021 13:02:25 +0000 (22:02 +0900)]
Rollup merge of #90708 - NieDzejkob:feature-note, r=jackh726

Add a note about feature(explicit_generic_args_with_impl_trait) to the relevant error message

Fixes #90615

2 years agoRollup merge of #90688 - SparrowLii:dotprod, r=Amanieu
Yuki Okushi [Tue, 9 Nov 2021 13:02:24 +0000 (22:02 +0900)]
Rollup merge of #90688 - SparrowLii:dotprod, r=Amanieu

enable `dotprod` target feature in arm

To implement `vdot` neon insturction in stdarch, we need to enable `dotprod` target feature in arm in rustc.
r? `@Amanieu`

2 years agoRollup merge of #90678 - JohnTitor:add-some-gats-tests, r=jackh726
Yuki Okushi [Tue, 9 Nov 2021 13:02:23 +0000 (22:02 +0900)]
Rollup merge of #90678 - JohnTitor:add-some-gats-tests, r=jackh726

Add some GATs-related regression tests

Closes #88595, closes #90014
r? `@jackh726`

2 years agoRollup merge of #90591 - richlowe:illumos-ui-target, r=Mark-Simulacrum
Yuki Okushi [Tue, 9 Nov 2021 13:02:22 +0000 (22:02 +0900)]
Rollup merge of #90591 - richlowe:illumos-ui-target, r=Mark-Simulacrum

treat illumos like solaris in failing ui tests which need it

Just adding the right cfg target for tests which fail because they don't know illumos is a thing.

(cc `````@jclulow)`````

2 years agoRollup merge of #87530 - bstrie:commentsync, r=bstrie
Yuki Okushi [Tue, 9 Nov 2021 13:02:21 +0000 (22:02 +0900)]
Rollup merge of #87530 - bstrie:commentsync, r=bstrie

Add comments regarding superfluous `!Sync` impls

2 years agodocument Box and box_free connection
asquared31415 [Tue, 9 Nov 2021 12:13:53 +0000 (07:13 -0500)]
document Box and box_free connection

2 years agoAuto merge of #90700 - fee1-dead:select-returns-vec, r=davidtwco
bors [Tue, 9 Nov 2021 11:16:38 +0000 (11:16 +0000)]
Auto merge of #90700 - fee1-dead:select-returns-vec, r=davidtwco

Make `select_*` methods return `Vec` for `TraitEngine`

This reduces some complexity as an empty vec means no errors and non-empty vec means errors occurred.

2 years agoUpdate cargo
Eric Huss [Tue, 9 Nov 2021 08:22:06 +0000 (00:22 -0800)]
Update cargo

2 years agoAuto merge of #87337 - jyn514:lint-error, r=oli-obk,flip1995
bors [Tue, 9 Nov 2021 08:21:10 +0000 (08:21 +0000)]
Auto merge of #87337 - jyn514:lint-error, r=oli-obk,flip1995

Don't abort compilation after giving a lint error

The only reason to use `abort_if_errors` is when the program is so broken that either:
1. later passes get confused and ICE
2. any diagnostics from later passes would be noise

This is never the case for lints, because the compiler has to be able to deal with `allow`-ed lints.
So it can continue to lint and compile even if there are lint errors.

Closes https://github.com/rust-lang/rust/issues/82761. This is a WIP because I have a feeling it will exit with 0 even if there were lint errors; I don't have a computer that can build rustc locally at the moment.

2 years agoAuto merge of #90485 - camsteffen:fmt-args-less-bind, r=m-ou-se
bors [Tue, 9 Nov 2021 05:33:16 +0000 (05:33 +0000)]
Auto merge of #90485 - camsteffen:fmt-args-less-bind, r=m-ou-se

Don't destructure args tuple in format_args!

This allows Clippy to parse the HIR more simply since `arg0` is changed to `_args.0`. (cc rust-lang/rust-clippy#7843). From rustc's perspective, I think this is something between a lateral move and a tiny improvement since there are fewer bindings.

r? `@m-ou-se`

2 years agoChange the `assert` in `is_useful` to a `debug_assert`.
Nicholas Nethercote [Tue, 9 Nov 2021 05:13:44 +0000 (16:13 +1100)]
Change the `assert` in `is_useful` to a `debug_assert`.

It's hot in the `match-stress-enum` benchmark.

2 years agoAuto merge of #90695 - GuillaumeGomez:rollup-kxvvw4o, r=GuillaumeGomez
bors [Tue, 9 Nov 2021 01:30:23 +0000 (01:30 +0000)]
Auto merge of #90695 - GuillaumeGomez:rollup-kxvvw4o, r=GuillaumeGomez

Rollup of 4 pull requests

Successful merges:

 - #90494 (ARMv6K Horizon OS panic change)
 - #90652 (use filter(|x| matches!(..)) instead of filter_map(|x| match x ... => Some(xy)))
 - #90657 (Fix bug with `#[doc]` string single-character last lines)
 - #90689 (:arrow_up: rust-analyzer)

Failed merges:

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

2 years agoAdd some GATs-related regression tests
Yuki Okushi [Mon, 8 Nov 2021 00:45:15 +0000 (09:45 +0900)]
Add some GATs-related regression tests

2 years agoAuto merge of #90443 - camelid:rustdoc-subst, r=GuillaumeGomez
bors [Mon, 8 Nov 2021 21:37:59 +0000 (21:37 +0000)]
Auto merge of #90443 - camelid:rustdoc-subst, r=GuillaumeGomez

Merge `DocContext.{ty,lt,ct}_substs` into one map

It should be impossible to have more than one entry with a particular
key across the three maps, so they should be one map. In addition to
making it impossible for multiple entries to exist, this should improve
memory usage since now only one map is allocated on the stack and heap.

r? `@GuillaumeGomez`

2 years agoAttempt to address perf regressions with #[inline]
bstrie [Mon, 8 Nov 2021 20:51:56 +0000 (15:51 -0500)]
Attempt to address perf regressions with #[inline]

2 years agoAdd a note about feature(explicit_generic_args_with_impl_trait) to the relevant error...
Jakub Kądziołka [Mon, 8 Nov 2021 17:39:22 +0000 (18:39 +0100)]
Add a note about feature(explicit_generic_args_with_impl_trait) to the relevant error message