]> git.lizzy.rs Git - rust.git/log
rust.git
3 years agoRollup merge of #80215 - visigoth:issue-80202-fix, r=estebank
Yuki Okushi [Fri, 29 Jan 2021 00:17:29 +0000 (09:17 +0900)]
Rollup merge of #80215 - visigoth:issue-80202-fix, r=estebank

Use -target when linking binaries for Mac Catalyst

When running `rustc` with `-target x86_64-apple-ios-macabi`, the linker
eventually gets run with `-arch x86_64`, because the linker back end splits the
LLVM target triple and uses the first token as the target architecture. However,
this does not work for the Mac Catalyst ABI, which is a separate target from
Darwin.

Specifying the full target triple with `-target` allows Mac Catalyst binaries to
link and run.

closes #80202

3 years agoRollup merge of #79991 - camelid:rustdoc-for-lifetime, r=GuillaumeGomez,jyn514
Yuki Okushi [Fri, 29 Jan 2021 00:17:27 +0000 (09:17 +0900)]
Rollup merge of #79991 - camelid:rustdoc-for-lifetime, r=GuillaumeGomez,jyn514

rustdoc: Render HRTB correctly for bare functions

The angle brackets were not rendered, so code like this:

    some_func: for<'a> fn(val: &'a i32) -> i32

would be rendered as:

    some_func: fn'a(val: &'a i32) -> i32

However, rendering with angle brackets is still invalid syntax:

    some_func: fn<'a>(val: &'a i32) -> i32

so now it renders correctly as:

    some_func: for<'a> fn(val: &'a i32) -> i32

-----

However, note that this code:

    some_trait: dyn for<'a> Trait<'a>

will still render as:

    some_trait: dyn Trait<'a>

which is not invalid syntax, but is still unclear. Unfortunately I think
it's hard to fix that case because there isn't enough information in the
`rustdoc::clean::Type` that this code operates on. Perhaps that case can
be fixed in a later PR.

r? ``@jyn514``

3 years agoRollup merge of #79819 - Aaron1011:feature/macro-trailing-semicolon, r=petrochenkov
Yuki Okushi [Fri, 29 Jan 2021 00:17:26 +0000 (09:17 +0900)]
Rollup merge of #79819 - Aaron1011:feature/macro-trailing-semicolon, r=petrochenkov

Add `SEMICOLON_IN_EXPRESSIONS_FROM_MACROS` lint

cc #79813

This PR adds an allow-by-default future-compatibility lint
`SEMICOLON_IN_EXPRESSIONS_FROM_MACROS`. It fires when a trailing semicolon in a
macro body is ignored due to the macro being used in expression
position:

```rust
macro_rules! foo {
    () => {
        true; // WARN
    }
}

fn main() {
    let val = match true {
        true => false,
        _ => foo!()
    };
}
```

The lint takes its level from the macro call site, and
can be allowed for a particular macro by adding
`#[allow(macro_trailing_semicolon)]`.

The lint is set to warn for all internal rustc crates (when being built
by a stage1 compiler). After the next beta bump, we can enable
the lint for the bootstrap compiler as well.

3 years agoRollup merge of #79570 - alexcrichton:split-debuginfo, r=bjorn3
Yuki Okushi [Fri, 29 Jan 2021 00:17:20 +0000 (09:17 +0900)]
Rollup merge of #79570 - alexcrichton:split-debuginfo, r=bjorn3

rustc: Stabilize `-Zrun-dsymutil` as `-Csplit-debuginfo`

This commit adds a new stable codegen option to rustc,
`-Csplit-debuginfo`. The old `-Zrun-dsymutil` flag is deleted and now
subsumed by this stable flag. Additionally `-Zsplit-dwarf` is also
subsumed by this flag but still requires `-Zunstable-options` to
actually activate. The `-Csplit-debuginfo` flag takes one of
three values:

* `off` - This indicates that split-debuginfo from the final artifact is
  not desired. This is not supported on Windows and is the default on
  Unix platforms except macOS. On macOS this means that `dsymutil` is
  not executed.

* `packed` - This means that debuginfo is desired in one location
  separate from the main executable. This is the default on Windows
  (`*.pdb`) and macOS (`*.dSYM`). On other Unix platforms this subsumes
  `-Zsplit-dwarf=single` and produces a `*.dwp` file.

* `unpacked` - This means that debuginfo will be roughly equivalent to
  object files, meaning that it's throughout the build directory
  rather than in one location (often the fastest for local development).
  This is not the default on any platform and is not supported on Windows.

Each target can indicate its own default preference for how debuginfo is
handled. Almost all platforms default to `off` except for Windows and
macOS which default to `packed` for historical reasons.

Some equivalencies for previous unstable flags with the new flags are:

* `-Zrun-dsymutil=yes` -> `-Csplit-debuginfo=packed`
* `-Zrun-dsymutil=no` -> `-Csplit-debuginfo=unpacked`
* `-Zsplit-dwarf=single` -> `-Csplit-debuginfo=packed`
* `-Zsplit-dwarf=split` -> `-Csplit-debuginfo=unpacked`

Note that `-Csplit-debuginfo` still requires `-Zunstable-options` for
non-macOS platforms since split-dwarf support was *just* implemented in
rustc.

There's some more rationale listed on #79361, but the main gist of the
motivation for this commit is that `dsymutil` can take quite a long time
to execute in debug builds and provides little benefit. This means that
incremental compile times appear that much worse on macOS because the
compiler is constantly running `dsymutil` over every single binary it
produces during `cargo build` (even build scripts!). Ideally rustc would
switch to not running `dsymutil` by default, but that's a problem left
to get tackled another day.

Closes #79361

3 years agoAuto merge of #81055 - matthewjasper:non-fatal-overflow, r=nikomatsakis
bors [Thu, 28 Jan 2021 18:57:10 +0000 (18:57 +0000)]
Auto merge of #81055 - matthewjasper:non-fatal-overflow, r=nikomatsakis

Make hitting the recursion limit in projection non-fatal

This change was originally made in #80246 to avoid future (effectively) infinite loop bugs in projections,
but wundergraph relies on rustc recovering here.

cc #80953

r? `@nikomatsakis`

3 years agorustc: Stabilize `-Zrun-dsymutil` as `-Csplit-debuginfo`
Alex Crichton [Mon, 30 Nov 2020 16:39:08 +0000 (08:39 -0800)]
rustc: Stabilize `-Zrun-dsymutil` as `-Csplit-debuginfo`

This commit adds a new stable codegen option to rustc,
`-Csplit-debuginfo`. The old `-Zrun-dsymutil` flag is deleted and now
subsumed by this stable flag. Additionally `-Zsplit-dwarf` is also
subsumed by this flag but still requires `-Zunstable-options` to
actually activate. The `-Csplit-debuginfo` flag takes one of
three values:

* `off` - This indicates that split-debuginfo from the final artifact is
  not desired. This is not supported on Windows and is the default on
  Unix platforms except macOS. On macOS this means that `dsymutil` is
  not executed.

* `packed` - This means that debuginfo is desired in one location
  separate from the main executable. This is the default on Windows
  (`*.pdb`) and macOS (`*.dSYM`). On other Unix platforms this subsumes
  `-Zsplit-dwarf=single` and produces a `*.dwp` file.

* `unpacked` - This means that debuginfo will be roughly equivalent to
  object files, meaning that it's throughout the build directory
  rather than in one location (often the fastest for local development).
  This is not the default on any platform and is not supported on Windows.

Each target can indicate its own default preference for how debuginfo is
handled. Almost all platforms default to `off` except for Windows and
macOS which default to `packed` for historical reasons.

Some equivalencies for previous unstable flags with the new flags are:

* `-Zrun-dsymutil=yes` -> `-Csplit-debuginfo=packed`
* `-Zrun-dsymutil=no` -> `-Csplit-debuginfo=unpacked`
* `-Zsplit-dwarf=single` -> `-Csplit-debuginfo=packed`
* `-Zsplit-dwarf=split` -> `-Csplit-debuginfo=unpacked`

Note that `-Csplit-debuginfo` still requires `-Zunstable-options` for
non-macOS platforms since split-dwarf support was *just* implemented in
rustc.

There's some more rationale listed on #79361, but the main gist of the
motivation for this commit is that `dsymutil` can take quite a long time
to execute in debug builds and provides little benefit. This means that
incremental compile times appear that much worse on macOS because the
compiler is constantly running `dsymutil` over every single binary it
produces during `cargo build` (even build scripts!). Ideally rustc would
switch to not running `dsymutil` by default, but that's a problem left
to get tackled another day.

Closes #79361

3 years agoAuto merge of #81441 - tmiasko:ctfe-inline, r=oli-obk
bors [Thu, 28 Jan 2021 15:19:16 +0000 (15:19 +0000)]
Auto merge of #81441 - tmiasko:ctfe-inline, r=oli-obk

Try inlining trivial functions used by CTFE

r? `@ghost`

3 years agoAdd `SEMICOLON_IN_EXPRESSIONS_FROM_MACROS` lint
Aaron Hill [Mon, 7 Dec 2020 23:55:00 +0000 (18:55 -0500)]
Add `SEMICOLON_IN_EXPRESSIONS_FROM_MACROS` lint

cc #79813

This PR adds an allow-by-default future-compatibility lint
`SEMICOLON_IN_EXPRESSIONS_FROM_MACROS`. It fires when a trailing semicolon in a
macro body is ignored due to the macro being used in expression
position:

```rust
macro_rules! foo {
    () => {
        true; // WARN
    }
}

fn main() {
    let val = match true {
        true => false,
        _ => foo!()
    };
}
```

The lint takes its level from the macro call site, and
can be allowed for a particular macro by adding
`#[allow(semicolon_in_expressions_from_macros)]`.

The lint is set to warn for all internal rustc crates (when being built
by a stage1 compiler). After the next beta bump, we can enable
the lint for the bootstrap compiler as well.

3 years agoAuto merge of #81149 - Aaron1011:feature/better-no-method-found-err, r=estebank
bors [Thu, 28 Jan 2021 12:09:50 +0000 (12:09 +0000)]
Auto merge of #81149 - Aaron1011:feature/better-no-method-found-err, r=estebank

Avoid describing a method as 'not found' when bounds are unsatisfied

Fixes #76267

When there is a single applicable method candidate, but its trait bounds
are not satisfied, we avoid saying that the method is "not found".
Insted, we update the error message to directly mention which bounds are
not satisfied, rather than mentioning them in a note.

3 years agoAuto merge of #81461 - JohnTitor:rollup-b0ij25f, r=JohnTitor
bors [Thu, 28 Jan 2021 09:01:33 +0000 (09:01 +0000)]
Auto merge of #81461 - JohnTitor:rollup-b0ij25f, r=JohnTitor

Rollup of 13 pull requests

Successful merges:

 - #70904 (Stabilize `Seek::stream_position` (feature `seek_convenience`))
 - #79951 (Refractor a few more types to `rustc_type_ir` )
 - #80868 (Print failure message on all tests that should panic, but don't)
 - #81062 (Improve diagnostics for Precise Capture)
 - #81277 (Make more traits of the From/Into family diagnostic items)
 - #81284 (Make `-Z time-passes` less noisy)
 - #81379 (Improve URLs handling)
 - #81416 (Tweak suggestion for missing field in patterns)
 - #81426 (const_evaluatable: expand abstract consts in try_unify)
 - #81428 (compiletest: Add two more unit tests)
 - #81430 (add const_evaluatable_checked test)
 - #81433 (const_evaluatable: stop looking into type aliases)
 - #81445 (Update cargo)

Failed merges:

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

3 years agoRollup merge of #81445 - ehuss:update-cargo, r=ehuss
Yuki Okushi [Thu, 28 Jan 2021 06:09:22 +0000 (15:09 +0900)]
Rollup merge of #81445 - ehuss:update-cargo, r=ehuss

Update cargo

7 commits in 783bc43c660bf39c1e562c8c429b32078ad3099b..c3abcfe8a75901c7c701557a728941e8fb19399e
2021-01-20 19:02:26 +0000 to 2021-01-25 16:16:43 +0000
- Minor update to tracking issue template. (rust-lang/cargo#9097)
- Add some extra help to `cargo new` and invalid package names. (rust-lang/cargo#9098)
- Fix compilation with serde 1.0.122 (rust-lang/cargo#9102)
- Add suggestion for bad package id. (rust-lang/cargo#9095)
- Remove Registry::new. (rust-lang/cargo#9093)
- Fix: set default git config search path for tests (rust-lang/cargo#9035)
- Unstable updates (rust-lang/cargo#9092)

3 years agoRollup merge of #81433 - lcnr:stop-looking-into-ty-alias, r=oli-obk
Yuki Okushi [Thu, 28 Jan 2021 06:09:20 +0000 (15:09 +0900)]
Rollup merge of #81433 - lcnr:stop-looking-into-ty-alias, r=oli-obk

const_evaluatable: stop looking into type aliases

see https://rust-lang.zulipchat.com/#narrow/stream/260443-project-const-generics/topic/const_evaluatable.3A.20type.20alias

r? ````@oli-obk````

3 years agoRollup merge of #81430 - lcnr:elaborate-const-eval, r=oli-obk
Yuki Okushi [Thu, 28 Jan 2021 06:09:18 +0000 (15:09 +0900)]
Rollup merge of #81430 - lcnr:elaborate-const-eval, r=oli-obk

add const_evaluatable_checked test

cc `````@oli-obk`````

3 years agoRollup merge of #81428 - phansch:compiletest-tests, r=Mark-Simulacrum
Yuki Okushi [Thu, 28 Jan 2021 06:09:17 +0000 (15:09 +0900)]
Rollup merge of #81428 - phansch:compiletest-tests, r=Mark-Simulacrum

compiletest: Add two more unit tests

This adds two more unit tests and fixes spelling in `compiletest`.

3 years agoRollup merge of #81426 - BoxyUwU:boxychangesv2, r=oli-obk
Yuki Okushi [Thu, 28 Jan 2021 06:09:15 +0000 (15:09 +0900)]
Rollup merge of #81426 - BoxyUwU:boxychangesv2, r=oli-obk

const_evaluatable: expand abstract consts in try_unify

See this [zulip topic](https://rust-lang.zulipchat.com/#narrow/stream/260443-project-const-generics/topic/combining.20const.20bounds) for more info

cc ```@lcnr```
r? ```@oli-obk```

3 years agoRollup merge of #81416 - estebank:suggestion-span-tweak, r=petrochenkov
Yuki Okushi [Thu, 28 Jan 2021 06:09:13 +0000 (15:09 +0900)]
Rollup merge of #81416 - estebank:suggestion-span-tweak, r=petrochenkov

Tweak suggestion for missing field in patterns

Account for parser recovered struct and tuple patterns to avoid invalid
suggestion.

Follow up to #81103.

3 years agoRollup merge of #81379 - GuillaumeGomez:improve-urls, r=Nemo157
Yuki Okushi [Thu, 28 Jan 2021 06:09:12 +0000 (15:09 +0900)]
Rollup merge of #81379 - GuillaumeGomez:improve-urls, r=Nemo157

Improve URLs handling

Fixes #81330.

Explanations: before this PR, when emptying the search input, we still had `?search=` in the URL, which wasn't very nice. Now, if the search is empty, we drop the `?search=` part.

Also, I realized while working on this PR that when we clicked on a menu link when we were on the search results, the search parameters would look like: `?search=#the-anchor`, which was super weird. Now, it looks like this: `?search=the-search#the-anchor`.

Also, I didn't use the `Url` very nice API because it's not available in any IE version (sadness...).

cc `````@lzutao`````
r? `````@Nemo157`````

3 years agoRollup merge of #81284 - jyn514:impl-times, r=wesleywiser
Yuki Okushi [Thu, 28 Jan 2021 06:09:10 +0000 (15:09 +0900)]
Rollup merge of #81284 - jyn514:impl-times, r=wesleywiser

Make `-Z time-passes` less noisy

- Add the module name to `pre_AST_expansion_passes` and don't make it a
  verbose event (since it normally doesn't take very long, and it's
  emitted many times)
- Don't make the following rustdoc events verbose; they're emitted many times.
  + build_extern_trait_impl
  + build_local_trait_impl
  + build_primitive_trait_impl
  + get_auto_trait_impls
  + get_blanket_trait_impls
- Remove the `get_auto_trait_and_blanket_synthetic_impls` rustdoc event; it's wholly
  covered by get_{auto,blanket}_trait_impls and not very useful.

I found this while working on https://github.com/rust-lang/rust/pull/81275 but it's independent of those changes.

3 years agoRollup merge of #81277 - flip1995:from_diag_items, r=matthewjasper
Yuki Okushi [Thu, 28 Jan 2021 06:09:08 +0000 (15:09 +0900)]
Rollup merge of #81277 - flip1995:from_diag_items, r=matthewjasper

Make more traits of the From/Into family diagnostic items

Following traits are now diagnostic items:
- `From` (unchanged)
- `Into`
- `TryFrom`
- `TryInto`

This also adds symbols for those items:
- `into_trait`
- `try_from_trait`
- `try_into_trait`

Related: https://github.com/rust-lang/rust-clippy/pull/6620#discussion_r562482587

3 years agoRollup merge of #81062 - sexxi-goose:precise_capture_diagnostics, r=nikomatsakis
Yuki Okushi [Thu, 28 Jan 2021 06:09:06 +0000 (15:09 +0900)]
Rollup merge of #81062 - sexxi-goose:precise_capture_diagnostics, r=nikomatsakis

Improve diagnostics for Precise Capture

This is just the capture analysis part and borrow checker logging will updated as part of rust-lang/project-rfc-2229#8

Closes rust-lang/project-rfc-2229#22

3 years agoRollup merge of #80868 - johanngan:should-panic-msg-with-expected, r=m-ou-se
Yuki Okushi [Thu, 28 Jan 2021 06:09:04 +0000 (15:09 +0900)]
Rollup merge of #80868 - johanngan:should-panic-msg-with-expected, r=m-ou-se

Print failure message on all tests that should panic, but don't

Fixes #80861. Tests with the `#[should_panic]` attribute should always print a failure message if no panic occurs, regardless of whether or not an `expected` panic message is specified.

3 years agoRollup merge of #79951 - LeSeulArtichaut:ty-ir, r=nikomatsakis
Yuki Okushi [Thu, 28 Jan 2021 06:09:02 +0000 (15:09 +0900)]
Rollup merge of #79951 - LeSeulArtichaut:ty-ir, r=nikomatsakis

Refractor a few more types to `rustc_type_ir`

In the continuation of #79169, ~~blocked on that PR~~.

This PR:
 - moves `IntVarValue`, `FloatVarValue`, `InferTy` (and friends) and `Variance`
 - creates the `IntTy`, `UintTy` and `FloatTy` enums in `rustc_type_ir`, based on their `ast` and `chalk_ir` equilavents, and uses them for types in the rest of the compiler.

~~I will split up that commit to make this easier to review and to have a better commit history.~~
EDIT: done, I split the PR in commits of 200-ish lines each

r? `````@nikomatsakis````` cc `````@jackh726`````

3 years agoRollup merge of #70904 - LukasKalbertodt:stabilize-seek-convenience, r=m-ou-se
Yuki Okushi [Thu, 28 Jan 2021 06:09:00 +0000 (15:09 +0900)]
Rollup merge of #70904 - LukasKalbertodt:stabilize-seek-convenience, r=m-ou-se

Stabilize `Seek::stream_position` (feature `seek_convenience`)

Tracking issue: #59359

Unresolved questions from tracking issue:
- "Override `stream_len` for `File`?" → we can do that in the future, this does not block stabilization.
- "Rename to `len` and `position`?" → as noted in the tracking issue, both of these shorter names have problems (`len` is usually a cheap getter, `position` clashes with `Cursor`). I do think the current names are perfectly fine.
- "Rename `stream_position` to `tell`?" → as mentioned in [the comment bringing this up](https://github.com/rust-lang/rust/issues/59359#issuecomment-559541545), `stream_position` is more descriptive. I don't think `tell` would be a good name.

What remains to decide, is whether or not adding these methods is worth it.

3 years agorustdoc: Render HRTB correctly for bare functions
Camelid [Sat, 12 Dec 2020 19:33:45 +0000 (11:33 -0800)]
rustdoc: Render HRTB correctly for bare functions

The angle brackets were not rendered, so code like this:

    some_func: for<'a> fn(val: &'a i32) -> i32

would be rendered as:

    some_func: fn'a(val: &'a i32) -> i32

However, rendering with angle brackets is still invalid syntax:

    some_func: fn<'a>(val: &'a i32) -> i32

so now it renders correctly as:

    some_func: for<'a> fn(val: &'a i32) -> i32

-----

However, note that this code:

    some_trait: dyn for<'a> Trait<'a>

will still render as:

    some_trait: dyn Trait<'a>

which is not invalid syntax, but is still unclear. Unfortunately I think
it's hard to fix that case because there isn't enough information in the
`rustdoc::clean::Type` that this code operates on. Perhaps that case can
be fixed in a later PR.

3 years agoAuto merge of #81414 - rylev:fetch-rmeta-crates, r=petrochenkov
bors [Thu, 28 Jan 2021 01:29:47 +0000 (01:29 +0000)]
Auto merge of #81414 - rylev:fetch-rmeta-crates, r=petrochenkov

Check for rmeta crates when getting existing crates from cache

This change makes sure to check for rmeta files when resolving crates instead of always going to disk in that case.

3 years agoAuto merge of #81335 - thomwiggers:no-panic-shrink-to, r=Mark-Simulacrum
bors [Wed, 27 Jan 2021 18:36:32 +0000 (18:36 +0000)]
Auto merge of #81335 - thomwiggers:no-panic-shrink-to, r=Mark-Simulacrum

Trying to shrink_to greater than capacity should be no-op

Per the discussion in https://github.com/rust-lang/rust/issues/56431, `shrink_to` shouldn't panic if you try to make a vector shrink to a capacity greater than its current capacity.

3 years agoUpdate cargo
Eric Huss [Wed, 27 Jan 2021 17:56:34 +0000 (09:56 -0800)]
Update cargo

3 years agoInline MemPlace::offset
Tomasz Miąsko [Wed, 27 Jan 2021 00:00:00 +0000 (00:00 +0000)]
Inline MemPlace::offset

3 years agoInline trivial implementation of rustc_target::abi::Align
Tomasz Miąsko [Wed, 27 Jan 2021 00:00:00 +0000 (00:00 +0000)]
Inline trivial implementation of rustc_target::abi::Align

3 years agofix tidy errors
Ellen [Wed, 27 Jan 2021 15:09:17 +0000 (15:09 +0000)]
fix tidy errors

3 years agocomments
Ellen [Wed, 27 Jan 2021 14:46:43 +0000 (14:46 +0000)]
comments

3 years agoconst_evaluatable: stop looking into type aliases
Bastian Kauschke [Wed, 27 Jan 2021 12:28:52 +0000 (13:28 +0100)]
const_evaluatable: stop looking into type aliases

3 years agoadd const_evaluatable_checked test
Bastian Kauschke [Wed, 27 Jan 2021 11:21:19 +0000 (12:21 +0100)]
add const_evaluatable_checked test

3 years agoAuto merge of #80987 - GuillaumeGomez:remove-cache-key, r=jyn514
bors [Wed, 27 Jan 2021 10:19:51 +0000 (10:19 +0000)]
Auto merge of #80987 - GuillaumeGomez:remove-cache-key, r=jyn514

Remove CACHE_KEY global

We realized in https://github.com/rust-lang/rust/pull/80914 that the cache handling (through a global) needed to be updated to make it much easier to handle.

r? `@jyn514`

3 years agoFix clean/types doc links
Guillaume Gomez [Tue, 26 Jan 2021 10:40:48 +0000 (11:40 +0100)]
Fix clean/types doc links

3 years agoAdd search index test for primitive types
Guillaume Gomez [Sun, 24 Jan 2021 16:41:41 +0000 (17:41 +0100)]
Add search index test for primitive types

3 years agoMore cleanup
Guillaume Gomez [Sun, 24 Jan 2021 16:41:21 +0000 (17:41 +0100)]
More cleanup

3 years agoUnify cache usage and improve naming
Guillaume Gomez [Sun, 24 Jan 2021 00:08:34 +0000 (01:08 +0100)]
Unify cache usage and improve naming

3 years agoImprove documentation on GetDefId trait's methods
Guillaume Gomez [Sat, 23 Jan 2021 22:45:54 +0000 (23:45 +0100)]
Improve documentation on GetDefId trait's methods

3 years agoUpdate to new rustdoc APIs
Guillaume Gomez [Fri, 22 Jan 2021 20:17:32 +0000 (21:17 +0100)]
Update to new rustdoc APIs

3 years agoApply review comments and improve code
Guillaume Gomez [Thu, 21 Jan 2021 20:54:14 +0000 (21:54 +0100)]
Apply review comments and improve code

3 years agoRemove cache usage wherever possible
Guillaume Gomez [Fri, 15 Jan 2021 14:36:15 +0000 (15:36 +0100)]
Remove cache usage wherever possible

3 years agoUse empty Cache for methods requiring it when filling Cache itself
Guillaume Gomez [Wed, 13 Jan 2021 21:06:41 +0000 (22:06 +0100)]
Use empty Cache for methods requiring it when filling Cache itself

3 years agoRemove CACHE_KEY global
Guillaume Gomez [Tue, 12 Jan 2021 22:36:04 +0000 (23:36 +0100)]
Remove CACHE_KEY global

3 years agocompiletest: Add two more unit tests
Philipp Hansch [Wed, 27 Jan 2021 07:10:35 +0000 (08:10 +0100)]
compiletest: Add two more unit tests

3 years agoAuto merge of #79591 - estebank:unexpected-generics, r=oli-obk
bors [Wed, 27 Jan 2021 07:15:33 +0000 (07:15 +0000)]
Auto merge of #79591 - estebank:unexpected-generics, r=oli-obk

Point only at generic arguments when they are unexpected

3 years agoAvoid describing a method as 'not found' when bounds are unsatisfied
Aaron Hill [Sat, 26 Sep 2020 21:20:14 +0000 (17:20 -0400)]
Avoid describing a method as 'not found' when bounds are unsatisfied

Fixes #76267

When there is a single applicable method candidate, but its trait bounds
are not satisfied, we avoid saying that the method is "not found".
Insted, we update the error message to directly mention which bounds are
not satisfied, rather than mentioning them in a note.

3 years agoboop, ur abstract consts are now expanded
Ellen [Wed, 27 Jan 2021 02:42:18 +0000 (02:42 +0000)]
boop, ur abstract consts are now expanded

3 years agoAuto merge of #81393 - pnkfelix:issue-81296-make-weak-item-traversal-deterministic...
bors [Wed, 27 Jan 2021 00:19:45 +0000 (00:19 +0000)]
Auto merge of #81393 - pnkfelix:issue-81296-make-weak-item-traversal-deterministic, r=estebank

Make weak item traversal deterministic

Fix #81296.

(No test added. The relevant test *is* ui/panic-handler/weak-lang-item.rs, and this change should make it less flaky.)

3 years agoPoint only at generic arguments when they are unexpected
Esteban Küber [Tue, 1 Dec 2020 08:40:28 +0000 (00:40 -0800)]
Point only at generic arguments when they are unexpected

3 years agoadd tests
Chris Pardy [Tue, 26 Jan 2021 22:39:30 +0000 (17:39 -0500)]
add tests

3 years agoAuto merge of #81417 - JohnTitor:rollup-yi3q05s, r=JohnTitor
bors [Tue, 26 Jan 2021 19:44:26 +0000 (19:44 +0000)]
Auto merge of #81417 - JohnTitor:rollup-yi3q05s, r=JohnTitor

Rollup of 14 pull requests

Successful merges:

 - #80812 (Update RELEASES.md for 1.50.0)
 - #80876 (Add `unwrap_unchecked()` methods for `Option` and `Result`)
 - #80900 (Fix ICE with `ReadPointerAsBytes` validation error)
 - #81191 (BTreeMap: test all borrowing interfaces and test more chaotic order behavior)
 - #81195 (Account for generics when suggesting bound)
 - #81299 (Fix some bugs reported by eslint)
 - #81325 (typeck: Don't suggest converting LHS exprs)
 - #81353 (Fix spelling in documentation for error E0207)
 - #81369 (rustc_codegen_ssa: use wall time for codegen_to_LLVM_IR time-passes entry)
 - #81389 (rustdoc: Document CommonMark extensions.)
 - #81399 (Update books)
 - #81401 (tidy: Some code cleanup.)
 - #81407 (Refine "remove semicolon" suggestion in trait selection)
 - #81412 (Fix assertion in `MaybeUninit::array_assume_init()` for zero-length arrays)

Failed merges:

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

3 years agoRollup merge of #81412 - hyd-dev:array-assume-init-wrong-assertion, r=m-ou-se
Yuki Okushi [Tue, 26 Jan 2021 19:43:37 +0000 (04:43 +0900)]
Rollup merge of #81412 - hyd-dev:array-assume-init-wrong-assertion, r=m-ou-se

Fix assertion in `MaybeUninit::array_assume_init()` for zero-length arrays

That assertion has a false positive ([playground](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=63922b8c897b04112adcdf346deb1d0e)):
```rust
#![feature(maybe_uninit_array_assume_init)]

use std::mem::MaybeUninit;

enum Uninhabited {}

fn main() {
    unsafe {
        // thread 'main' panicked at 'attempted to instantiate uninhabited type `Uninhabited`'
        MaybeUninit::<Uninhabited>::array_assume_init([]);
    }
}
```
*Previously reported in https://github.com/rust-lang/rust/pull/80600#discussion_r564496692.*

This PR makes it ignore zero-length arrays.

cc #80908

3 years agoRollup merge of #81407 - osa1:issue81098, r=estebank
Yuki Okushi [Tue, 26 Jan 2021 19:43:35 +0000 (04:43 +0900)]
Rollup merge of #81407 - osa1:issue81098, r=estebank

Refine "remove semicolon" suggestion in trait selection

Don't suggest it if the last statement doesn't have a semicolon

Fixes #81098

See also #54771 for why this suggestion was added

3 years agoRollup merge of #81401 - ehuss:tidy-cleanup, r=Mark-Simulacrum
Yuki Okushi [Tue, 26 Jan 2021 19:43:33 +0000 (04:43 +0900)]
Rollup merge of #81401 - ehuss:tidy-cleanup, r=Mark-Simulacrum

tidy: Some code cleanup.

This is just some cleanup that shouldn't have any change in behavior.  (See commit messages for more details.)

* Remove cargo check. This test wasn't working, and is no longer valid.
* Remove edition filter exceptions. They are no longer necessary.
* Remove unnecessary trailing semicolon.  Otherwise the warning will prevent tidy from building after the beta branch.

3 years agoRollup merge of #81399 - ehuss:update-books, r=ehuss
Yuki Okushi [Tue, 26 Jan 2021 19:43:32 +0000 (04:43 +0900)]
Rollup merge of #81399 - ehuss:update-books, r=ehuss

Update books

## nomicon

7 commits in a8584998eacdea7106a1dfafcbf6c1c06fcdf925..bbf06ad39d1f45654047e9596b750cc6e6d1b693
2021-01-06 12:49:49 -0500 to 2021-01-22 07:07:31 -0800
- Fix alloc link in exotic-sizes for local docs (rust-lang-nursery/nomicon#255)
- Remove TODO
- Fix small punctuation error
- Arc revisions (Clone atomic explanation) (pt2/3(+?))
- Fix Arc Clone
- Arc revisions (pt1/2(+?))
- Simple Arc implementation (without Weak refs)

## reference

5 commits in 50af691f838937c300b47812d0507c6d88c14f97..f02b09eb6e8af340ad1256a54adb7aae2ff3163e
2021-01-12 21:19:20 -0800 to 2021-01-22 01:53:02 -0800
- Fix missing space (rust-lang-nursery/reference#941)
- Start documenting name resolution. (rust-lang-nursery/reference#937)
- Fix plural and delete spurious words in comparison ops (rust-lang-nursery/reference#932)
- Document execution order (rust-lang-nursery/reference#888)
- Compound operator expressions (rust-lang-nursery/reference#915)

## book

3 commits in ac57a0ddd23d173b26731ccf939f3ba729753275..e724bd826580ff95df48a8533af7dec1080693d4
2021-01-09 14:18:45 -0500 to 2021-01-20 08:19:49 -0600
- Fixes rust-lang/book#2417. Get the index from user input instead of a const. (rust-lang/book#2566)
- Turn off the playground in a bunch more lib.rs inclusions (rust-lang/book#2569)
- Merge pull request rust-lang/book#2567 from rust-lang/rust-1.49

## rust-by-example

1 commits in 03e23af01f0b4f83a3a513da280e1ca92587f2ec..f633769acef68574427a6fae6c06f13bc2199573
2021-01-09 10:20:28 -0300 to 2021-01-13 20:58:25 -0300
- Fixed styling on closure example (rust-lang/rust-by-example#1405)

3 years agoRollup merge of #81389 - ehuss:rustdoc-cmark-extensions, r=GuillaumeGomez
Yuki Okushi [Tue, 26 Jan 2021 19:43:30 +0000 (04:43 +0900)]
Rollup merge of #81389 - ehuss:rustdoc-cmark-extensions, r=GuillaumeGomez

rustdoc: Document CommonMark extensions.

This updates the rustdoc book to include some documentation on the CommonMark extensions that rustdoc supports.

3 years agoRollup merge of #81369 - tgnottingham:codegen-to-llvm-ir-wall-time, r=lcnr
Yuki Okushi [Tue, 26 Jan 2021 19:43:28 +0000 (04:43 +0900)]
Rollup merge of #81369 - tgnottingham:codegen-to-llvm-ir-wall-time, r=lcnr

rustc_codegen_ssa: use wall time for codegen_to_LLVM_IR time-passes entry

Use elapsed wall time spent on codegen_to_LLVM_IR for all CGUs as a
whole, rather than the sum for each CGU (the distinction matters for
parallel builds, where some CGUs are processed in parallel).

3 years agoRollup merge of #81353 - jockbert:spelling_in_e0207, r=petrochenkov
Yuki Okushi [Tue, 26 Jan 2021 19:43:25 +0000 (04:43 +0900)]
Rollup merge of #81353 - jockbert:spelling_in_e0207, r=petrochenkov

Fix spelling in documentation for error E0207

I have trouble parsing the the wording "type parameter parameter".

3 years agoRollup merge of #81325 - osa1:issue81293, r=estebank
Yuki Okushi [Tue, 26 Jan 2021 19:43:24 +0000 (04:43 +0900)]
Rollup merge of #81325 - osa1:issue81293, r=estebank

typeck: Don't suggest converting LHS exprs

Converting LHS of an assignment does not work, so avoid suggesting that.

Fixes #81293

3 years agoRollup merge of #81299 - GuillaumeGomez:fix-eslint-detected-bugs, r=Nemo157
Yuki Okushi [Tue, 26 Jan 2021 19:43:22 +0000 (04:43 +0900)]
Rollup merge of #81299 - GuillaumeGomez:fix-eslint-detected-bugs, r=Nemo157

Fix some bugs reported by eslint

Simply went into `src/librustdoc/html/static/` and ran `eslint *.js` in case you want to reproduce. :)

r? ``````@Nemo157``````

3 years agoRollup merge of #81195 - estebank:suggest-bound-on-trait-with-params, r=oli-obk
Yuki Okushi [Tue, 26 Jan 2021 19:43:20 +0000 (04:43 +0900)]
Rollup merge of #81195 - estebank:suggest-bound-on-trait-with-params, r=oli-obk

Account for generics when suggesting bound

Fix #81175.

3 years agoRollup merge of #81191 - ssomers:btree_more_order_chaos, r=Mark-Simulacrum
Yuki Okushi [Tue, 26 Jan 2021 19:43:18 +0000 (04:43 +0900)]
Rollup merge of #81191 - ssomers:btree_more_order_chaos, r=Mark-Simulacrum

BTreeMap: test all borrowing interfaces and test more chaotic order behavior

Inspired by #81169, test what happens if you mess up order of the type with which you search (as opposed to the key type).

r? `@Mark-Simulacrum`

3 years agoRollup merge of #80900 - camelid:readpointerasbytes-ice, r=oli-obk
Yuki Okushi [Tue, 26 Jan 2021 19:43:16 +0000 (04:43 +0900)]
Rollup merge of #80900 - camelid:readpointerasbytes-ice, r=oli-obk

Fix ICE with `ReadPointerAsBytes` validation error

Fixes #79690.

r? ``````@oli-obk``````

3 years agoRollup merge of #80876 - ojeda:option-result-unwrap_unchecked, r=m-ou-se
Yuki Okushi [Tue, 26 Jan 2021 19:43:14 +0000 (04:43 +0900)]
Rollup merge of #80876 - ojeda:option-result-unwrap_unchecked, r=m-ou-se

Add `unwrap_unchecked()` methods for `Option` and `Result`

In particular:
  - `unwrap_unchecked()` for `Option`.
  - `unwrap_unchecked()` and `unwrap_err_unchecked()` for `Result`.

These complement other `*_unchecked()` methods in `core` etc.

Currently there are a couple of places it may be used inside rustc (`LinkedList`, `BTree`). It is also easy to find other repositories with similar functionality.

Fixes #48278.

3 years agoRollup merge of #80812 - rust-lang:relnotes-1.50.0, r=Mark-Simulacrum
Yuki Okushi [Tue, 26 Jan 2021 19:43:12 +0000 (04:43 +0900)]
Rollup merge of #80812 - rust-lang:relnotes-1.50.0, r=Mark-Simulacrum

Update RELEASES.md for 1.50.0

### [Rendered](https://github.com/rust-lang/rust/blob/relnotes-1.50.0/RELEASES.md)

r? `@Mark-Simulacrum`
cc `@rust-lang/release`

3 years agoTweak suggestion for missing field in patterns
Esteban Küber [Tue, 26 Jan 2021 19:24:43 +0000 (11:24 -0800)]
Tweak suggestion for missing field in patterns

Account for parser recovered struct and tuple patterns to avoid invalid
suggestion.

Follow up to #81103.

3 years agoCheck for rmeta crates when getting existing crates from cache
Ryan Levick [Tue, 26 Jan 2021 18:39:24 +0000 (19:39 +0100)]
Check for rmeta crates when getting existing crates from cache

3 years agoshrink_to shouldn't panic on len greater than capacity
Thom Wiggers [Sun, 24 Jan 2021 12:29:39 +0000 (13:29 +0100)]
shrink_to shouldn't panic on len greater than capacity

3 years agoFix assertion in `MaybeUninit::array_assume_init()` for zero-length arrays
hyd-dev [Tue, 26 Jan 2021 15:21:00 +0000 (23:21 +0800)]
Fix assertion in `MaybeUninit::array_assume_init()` for zero-length arrays

3 years agoUpdate RELEASES.md for 1.50.0
Erin Power [Fri, 8 Jan 2021 12:05:48 +0000 (12:05 +0000)]
Update RELEASES.md for 1.50.0

3 years agoAuto merge of #81217 - ssomers:btree_bring_back_the_slice, r=Mark-Simulacrum
bors [Tue, 26 Jan 2021 14:47:51 +0000 (14:47 +0000)]
Auto merge of #81217 - ssomers:btree_bring_back_the_slice, r=Mark-Simulacrum

BTreeMap: bring back the key slice for immutable lookup

Pave the way for binary search, by reverting a bit of #73971, which banned `keys` for misbehaving while it was defined for every `BorrowType`. Adding some `debug_assert`s along the way.

r? `@Mark-Simulacrum`

3 years agoAuto merge of #81367 - andersk:join-test-threads, r=dtolnay
bors [Tue, 26 Jan 2021 11:15:44 +0000 (11:15 +0000)]
Auto merge of #81367 - andersk:join-test-threads, r=dtolnay

libtest: Wait for test threads to exit after they report completion

Otherwise we can miss bugs where a test reports that it succeeded but then panics within a TLS destructor.

Example:

```rust
use std::thread::sleep;
use std::time::Duration;

struct Foo;

impl Drop for Foo {
    fn drop(&mut self) {
        sleep(Duration::from_secs(1));
        panic!()
    }
}

thread_local!(static FOO: Foo = Foo);

#[test]
pub fn test() {
    FOO.with(|_| {});
}
```

Before this fix, `cargo test` incorrectly reports success.

```console
$ cargo test
    Finished test [unoptimized + debuginfo] target(s) in 0.01s
     Running target/debug/deps/panicking_test-85130fa46b54f758

running 1 test
test test ... ok

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

$ echo $?
0
```

After this fix, the failure is visible. (The entire process is aborted due to #24479.)

```console
$ cargo test
    Finished test [unoptimized + debuginfo] target(s) in 0.01s
     Running target/debug/deps/panicking_test-76180625bc2ee3c9

running 1 test
thread 'test' panicked at 'explicit panic', src/main.rs:9:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
fatal runtime error: failed to initiate panic, error 5
error: test failed, to rerun pass '--bin panicking-test'

Caused by:
  process didn't exit successfully: `/tmp/panicking-test/target/debug/deps/panicking_test-76180625bc2ee3c9 --nocapture` (signal: 6, SIGABRT: process abort signal)

$ echo $?
101
```

3 years agoRefine "remove semicolon" suggestion in trait selection
Ömer Sinan Ağacan [Tue, 26 Jan 2021 10:10:54 +0000 (13:10 +0300)]
Refine "remove semicolon" suggestion in trait selection

Don't suggest it if the last statement doesn't have a semicolon

Fixes #81098

See also #54771 for why this suggestion was added

3 years agotypeck: Don't suggest converting LHS exprs
Ömer Sinan Ağacan [Sun, 24 Jan 2021 07:32:24 +0000 (10:32 +0300)]
typeck: Don't suggest converting LHS exprs

Converting LHS of an assignment does not work, so avoid suggesting that.

Fixes #81293

3 years agoAuto merge of #80692 - Aaron1011:feature/query-result-debug, r=estebank
bors [Tue, 26 Jan 2021 05:47:23 +0000 (05:47 +0000)]
Auto merge of #80692 - Aaron1011:feature/query-result-debug, r=estebank

Enforce that query results implement Debug

Currently, we require that query keys implement `Debug`, but we do not do the same for query values. This can make incremental compilation bugs difficult to debug - there isn't a good place to print out the result loaded from disk.

This PR adds `Debug` bounds to several query-related functions, allowing us to debug-print the query value when an 'unstable fingerprint' error occurs. This required adding `#[derive(Debug)]` to a fairly large number of types - hopefully, this doesn't have much of an impact on compiler bootstrapping times.

3 years agoAuto merge of #79113 - andjo403:raw_vec_ptr, r=m-ou-se
bors [Tue, 26 Jan 2021 02:56:37 +0000 (02:56 +0000)]
Auto merge of #79113 - andjo403:raw_vec_ptr, r=m-ou-se

mark raw_vec::ptr with inline

when a lot of vectors is used in a enum as in the example in #66617 if this function is not inlined and multiple cgus is used this results in huge compile times. with this fix the compile time is 6s from minutes for the example in #66617. I did not have the patience to wait for it to compile for more then 3 min.

3 years agoUpdate books
Eric Huss [Mon, 25 Jan 2021 23:10:10 +0000 (15:10 -0800)]
Update books

3 years agotidy: Remove unnecessary trailing semicolon.
Eric Huss [Mon, 25 Jan 2021 20:43:17 +0000 (12:43 -0800)]
tidy: Remove unnecessary trailing semicolon.

This will cause a failure due to the warning after the next beta branch
as https://github.com/rust-lang/rust/pull/79812 will hit beta.

3 years agotidy: Remove edition filter exceptions.
Eric Huss [Mon, 25 Jan 2021 20:40:22 +0000 (12:40 -0800)]
tidy: Remove edition filter exceptions.

These exceptions are no longer necessary.

3 years agotidy: Remove cargo check.
Eric Huss [Mon, 25 Jan 2021 20:28:29 +0000 (12:28 -0800)]
tidy: Remove cargo check.

The cargo check was checking that every dependency had an `extern crate`.
The compiler has not used `extern crate` in a long time (edition 2018).
The test was broken (the call to `!super::filter_dirs(path)` was backwards).
This just removes it since it is no longer valid.

3 years agolibtest: Store pending timeouts in a deque
Anders Kaseorg [Mon, 25 Jan 2021 20:19:25 +0000 (12:19 -0800)]
libtest: Store pending timeouts in a deque

This reduces the total complexity of checking timeouts from quadratic
to linear, and should also fix an unwrap of None on completion of an
already timed-out test.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
3 years agoThis should address issue 81294.
Felix S. Klock II [Mon, 25 Jan 2021 19:37:27 +0000 (14:37 -0500)]
This should address issue 81294.

(No test added. The relevant test *is* ui/panic-handler/weak-lang-item.rs, and this change should make it less flaky.)

3 years agoAuto merge of #68828 - oli-obk:inline_cycle, r=wesleywiser
bors [Mon, 25 Jan 2021 19:03:37 +0000 (19:03 +0000)]
Auto merge of #68828 - oli-obk:inline_cycle, r=wesleywiser

Prevent query cycles in the MIR inliner

r? `@eddyb` `@wesleywiser`

cc `@rust-lang/wg-mir-opt`

The general design is that we have a new query that is run on the `validated_mir` instead of on the `optimized_mir`. That query is forced before going into the optimization pipeline, so as to not try to read from a stolen MIR.

The query should not be cached cross crate, as you should never call it for items from other crates. By its very design calls into other crates can never cause query cycles.

This is a pessimistic approach to inlining, since we strictly have more calls in the `validated_mir` than we have in `optimized_mir`, but that's not a problem imo.

3 years agorustdoc: Document CommonMark extensions.
Eric Huss [Mon, 25 Jan 2021 19:00:02 +0000 (11:00 -0800)]
rustdoc: Document CommonMark extensions.

3 years agoAuto merge of #81375 - RalfJung:miri, r=RalfJung
bors [Mon, 25 Jan 2021 15:33:17 +0000 (15:33 +0000)]
Auto merge of #81375 - RalfJung:miri, r=RalfJung

update Miri

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

3 years agoAdd tracking issue
Miguel Ojeda [Mon, 25 Jan 2021 13:58:09 +0000 (14:58 +0100)]
Add tracking issue

Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
3 years agoImprove URL handling when clicking on a menu link while being on the search results...
Guillaume Gomez [Mon, 25 Jan 2021 12:21:12 +0000 (13:21 +0100)]
Improve URL handling when clicking on a menu link while being on the search results and overall

3 years agoLink the reference about undefined behavior
Miguel Ojeda [Mon, 25 Jan 2021 13:53:19 +0000 (14:53 +0100)]
Link the reference about undefined behavior

Suggested-by: Mara Bos <m-ou.se@m-ou.se>
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
3 years agoAuto merge of #81380 - pietroalbini:cargo-pgo-lockfile, r=Mark-Simulacrum
bors [Mon, 25 Jan 2021 12:38:03 +0000 (12:38 +0000)]
Auto merge of #81380 - pietroalbini:cargo-pgo-lockfile, r=Mark-Simulacrum

Use the monorepo's lockfile when building cargo for PGO profiling

Fixes https://github.com/rust-lang/rust/issues/81378. The description of the problem and the reasoning for the fix is in the source code comments.

r? `@Mark-Simulacrum`

3 years agoci: use the monorepo's lockfile when building cargo for pgo profiling
Pietro Albini [Mon, 25 Jan 2021 12:33:24 +0000 (13:33 +0100)]
ci: use the monorepo's lockfile when building cargo for pgo profiling

3 years agoCompletely remove search query parameter when clearing search input
Guillaume Gomez [Mon, 25 Jan 2021 11:54:25 +0000 (12:54 +0100)]
Completely remove search query parameter when clearing search input

3 years agoupdate Miri
Ralf Jung [Mon, 25 Jan 2021 10:42:38 +0000 (11:42 +0100)]
update Miri

3 years agoIgnore a test on wasm, because that changes landing pads
oli [Mon, 25 Jan 2021 09:34:33 +0000 (09:34 +0000)]
Ignore a test on wasm, because that changes landing pads

3 years agoFix some bugs reported by eslint
Guillaume Gomez [Sat, 23 Jan 2021 13:55:24 +0000 (14:55 +0100)]
Fix some bugs reported by eslint

3 years agoAccount for generics when suggesting bound
Esteban Küber [Tue, 19 Jan 2021 20:44:49 +0000 (12:44 -0800)]
Account for generics when suggesting bound

Fix #81175.

3 years agorustc_codegen_ssa: use wall time for codegen_to_LLVM_IR time-passes entry
Tyson Nottingham [Mon, 25 Jan 2021 05:23:38 +0000 (21:23 -0800)]
rustc_codegen_ssa: use wall time for codegen_to_LLVM_IR time-passes entry

Use elapsed wall time spent on codegen_to_LLVM_IR for all CGUs as a
whole, rather than the sum for each CGU (the distinction matters for
parallel builds, where some CGUs are processed in parallel).

3 years agoIgnore test on 32-bit architectures
Camelid [Mon, 25 Jan 2021 03:38:10 +0000 (19:38 -0800)]
Ignore test on 32-bit architectures

3 years agolibtest: Wait for test threads to exit after they report completion
Anders Kaseorg [Mon, 25 Jan 2021 02:16:31 +0000 (18:16 -0800)]
libtest: Wait for test threads to exit after they report completion

Otherwise we can miss bugs where a test reports that it succeeded but
then panics within a TLS destructor.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
3 years agoAuto merge of #81355 - jonas-schievink:rollup-vpaadij, r=jonas-schievink
bors [Sun, 24 Jan 2021 23:04:15 +0000 (23:04 +0000)]
Auto merge of #81355 - jonas-schievink:rollup-vpaadij, r=jonas-schievink

Rollup of 14 pull requests

Successful merges:

 - #75180 (Implement Error for &(impl Error))
 - #78578 (Permit mutable references in all const contexts)
 - #79174 (Make std::future a re-export of core::future)
 - #79884 (Replace magic numbers with existing constants)
 - #80855 (Expand assert!(expr, args..) to include $crate for hygiene on 2021.)
 - #80933 (Fix sysroot option not being honored across rustc)
 - #81259 (Replace version_check dependency with own version parsing code)
 - #81264 (Add unstable option to control doctest run directory)
 - #81279 (Small refactor in typeck)
 - #81297 (Don't provide backend_optimization_level query for extern crates)
 - #81302 (Fix rendering of stabilization version for trait implementors)
 - #81310 (Do not mark unit variants as used when in path pattern)
 - #81320 (Make bad shlex parsing a pretty error)
 - #81338 (Clean up `dominators_given_rpo`)

Failed merges:

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