]> git.lizzy.rs Git - rust.git/log
rust.git
22 months agoMake x.py check work
Eric Holk [Tue, 30 Aug 2022 19:39:28 +0000 (12:39 -0700)]
Make x.py check work

22 months agoUpdate feature flags on dyn-star tests
Eric Holk [Mon, 29 Aug 2022 19:02:03 +0000 (12:02 -0700)]
Update feature flags on dyn-star tests

22 months agoMake dyn-trait-method work
Michael Goulet [Mon, 29 Aug 2022 06:00:58 +0000 (06:00 +0000)]
Make dyn-trait-method work

22 months agoRename some variants
Michael Goulet [Mon, 29 Aug 2022 03:53:33 +0000 (03:53 +0000)]
Rename some variants

22 months agoConstruct dyn* during const interp
Michael Goulet [Mon, 29 Aug 2022 03:24:30 +0000 (03:24 +0000)]
Construct dyn* during const interp

22 months agoUse principal of cast target as dyn-star trait ref in codegen
Michael Goulet [Mon, 29 Aug 2022 02:49:04 +0000 (02:49 +0000)]
Use principal of cast target as dyn-star trait ref in codegen

22 months agoAdd test to make sure we run custom destructors
Eric Holk [Wed, 17 Aug 2022 23:58:49 +0000 (16:58 -0700)]
Add test to make sure we run custom destructors

22 months agoAdd test case for calling methods on dyn* object
Eric Holk [Wed, 17 Aug 2022 23:51:16 +0000 (16:51 -0700)]
Add test case for calling methods on dyn* object

22 months agoCall destructors when dyn* object goes out of scope
Eric Holk [Wed, 27 Jul 2022 21:50:11 +0000 (14:50 -0700)]
Call destructors when dyn* object goes out of scope

22 months agodyn* through more typechecking and MIR
Eric Holk [Tue, 28 Jun 2022 21:02:30 +0000 (14:02 -0700)]
dyn* through more typechecking and MIR

22 months agoTypecheck dyn* coercions
Eric Holk [Wed, 13 Apr 2022 23:38:16 +0000 (16:38 -0700)]
Typecheck dyn* coercions

Also changes things to treat dyn* as a sized type, unlike dyn Trait.

22 months agoPlumb dyn trait representation through ty::Dynamic
Eric Holk [Wed, 13 Apr 2022 23:11:28 +0000 (16:11 -0700)]
Plumb dyn trait representation through ty::Dynamic

22 months agoIntroduce dyn_star feature flag
Eric Holk [Fri, 8 Apr 2022 01:06:53 +0000 (18:06 -0700)]
Introduce dyn_star feature flag

The primary purpose of this commit is to introduce the
dyn_star flag so we can begin experimenting with implementation.

In order to have something to do in the feature gate test, we also add
parser support for `dyn* Trait` objects. These are currently treated
just like `dyn Trait` objects, but this will change in the future.

Note that for now `dyn* Trait` is experimental syntax to enable
implementing some of the machinery needed for async fn in dyn traits
without fully supporting the feature.

22 months agoAuto merge of #101729 - oli-obk:miriup, r=oli-obk
bors [Mon, 12 Sep 2022 19:34:30 +0000 (19:34 +0000)]
Auto merge of #101729 - oli-obk:miriup, r=oli-obk

Update miri submodule

r? `@ghost`

fixes #101649

22 months agoUpdate miri submodule
Oli Scherer [Mon, 12 Sep 2022 17:19:31 +0000 (17:19 +0000)]
Update miri submodule

22 months agoAuto merge of #99334 - NiklasJonsson:84447/error-privacy, r=oli-obk
bors [Mon, 12 Sep 2022 15:57:37 +0000 (15:57 +0000)]
Auto merge of #99334 - NiklasJonsson:84447/error-privacy, r=oli-obk

rustc_error, rustc_private: Switch to stable hash containers

Relates https://github.com/rust-lang/rust/issues/84447

22 months agoAuto merge of #101716 - Dylan-DPC:rollup-ayvh6nd, r=Dylan-DPC
bors [Mon, 12 Sep 2022 13:16:14 +0000 (13:16 +0000)]
Auto merge of #101716 - Dylan-DPC:rollup-ayvh6nd, r=Dylan-DPC

Rollup of 9 pull requests

Successful merges:

 - #100293 (Add inline-llvm option for disabling/enabling LLVM inlining)
 - #100767 (Remove manual <[u8]>::escape_ascii)
 - #101668 (Suggest pub instead of public for const type item)
 - #101671 (Fix naming format of IEEE 754 standard)
 - #101676 (Check that the types in return position `impl Trait` in traits are well-formed)
 - #101681 (Deny return-position `impl Trait` in traits for object safety)
 - #101693 (Update browser UI test 0 10)
 - #101701 (Rustdoc-Json: Add tests for trait impls.)
 - #101706 (rustdoc: remove no-op `#search`)

Failed merges:

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

22 months agoRollup merge of #101706 - notriddle:notriddle/search-mobile, r=GuillaumeGomez
Dylan DPC [Mon, 12 Sep 2022 09:51:36 +0000 (15:21 +0530)]
Rollup merge of #101706 - notriddle:notriddle/search-mobile, r=GuillaumeGomez

rustdoc: remove no-op `#search`

The margin rule was added in c729e4dca7581fcd060978bcb0d7f98ea4eb6b82 to remove an unnecessary left margin that was present on desktop. This desktop-mode margin was itself removed in 135281ed1525db15edd8ebd092aa10aa40df2386.

The padding rule was added in 135281ed1525db15edd8ebd092aa10aa40df2386 when converting the rule for `#main`, but didn't do anything even then.

22 months agoRollup merge of #101701 - aDotInTheVoid:rdj-impl-tests, r=GuillaumeGomez
Dylan DPC [Mon, 12 Sep 2022 09:51:35 +0000 (15:21 +0530)]
Rollup merge of #101701 - aDotInTheVoid:rdj-impl-tests, r=GuillaumeGomez

Rustdoc-Json: Add tests for trait impls.

22 months agoRollup merge of #101693 - GuillaumeGomez:update-browser-ui-test-0-10, r=notriddle
Dylan DPC [Mon, 12 Sep 2022 09:51:34 +0000 (15:21 +0530)]
Rollup merge of #101693 - GuillaumeGomez:update-browser-ui-test-0-10, r=notriddle

Update browser UI test 0 10

The biggest change from this browser-ui-test update is the upgrade of the puppeteer version to `17.1.3` (the latest in short).

I also added the command `click-with-offset` to still allow us to click on the `[-]` part.

cc `@jsha`
r? `@notriddle`

22 months agoRollup merge of #101681 - compiler-errors:rpitit-obj-safety, r=lcnr
Dylan DPC [Mon, 12 Sep 2022 09:51:33 +0000 (15:21 +0530)]
Rollup merge of #101681 - compiler-errors:rpitit-obj-safety, r=lcnr

Deny return-position `impl Trait` in traits for object safety

Fixes #101667

22 months agoRollup merge of #101676 - compiler-errors:rpitit-wf, r=lcnr
Dylan DPC [Mon, 12 Sep 2022 09:51:33 +0000 (15:21 +0530)]
Rollup merge of #101676 - compiler-errors:rpitit-wf, r=lcnr

Check that the types in return position `impl Trait` in traits are well-formed

This effectively duplicates `check_associated_type_bounds`, but that shouldn't be for long, since we're going to remove it once we refactor RPITITs into regular associated items.

Fixes #101663

---

We don't check

```rust
trait Foo {
  fn bar() -> impl ?Sized;
}
```

currently, but that's for a different reason, which is that we don't currently check that a trait function's return type is sized (i.e. `fn bar() -> [u8]` also works in a trait).

22 months agoRollup merge of #101671 - LingMan:ieee_754, r=Dylan-DPC
Dylan DPC [Mon, 12 Sep 2022 09:51:32 +0000 (15:21 +0530)]
Rollup merge of #101671 - LingMan:ieee_754, r=Dylan-DPC

Fix naming format of IEEE 754 standard

Currently the documentation of f64::min refers to "IEEE-754 2008" while the documentation of f64::minimum refers to "IEEE 754-2019".
Note that one has the format IEEE,hyphen,number,space,year while the other is IEEE,space,number,hyphen,year. The official IEEE site [1] uses the later format and it is also the one most commonly used throughout the codebase.

Update all comments and - more importantly - documentation to consistently use the official format.

[1] https://standards.ieee.org/ieee/754/4211/

22 months agoRollup merge of #101668 - chenyukang:fix-101626, r=TaKO8Ki
Dylan DPC [Mon, 12 Sep 2022 09:51:31 +0000 (15:21 +0530)]
Rollup merge of #101668 - chenyukang:fix-101626, r=TaKO8Ki

Suggest pub instead of public for const type item

Fixes #101626

22 months agoRollup merge of #100767 - kadiwa4:escape_ascii, r=jackh726
Dylan DPC [Mon, 12 Sep 2022 09:51:30 +0000 (15:21 +0530)]
Rollup merge of #100767 - kadiwa4:escape_ascii, r=jackh726

Remove manual <[u8]>::escape_ascii

`@rustbot` label: +C-cleanup

22 months agoRollup merge of #100293 - yanchen4791:add-inline-llvm-option, r=nnethercote
Dylan DPC [Mon, 12 Sep 2022 09:51:29 +0000 (15:21 +0530)]
Rollup merge of #100293 - yanchen4791:add-inline-llvm-option, r=nnethercote

Add inline-llvm option for disabling/enabling LLVM inlining

In this PR, a new -Z option `inline-llvm` is added in order to be able to turn on/off LLVM inlining.

The capability of turning on/off inlining in LLVM backend is needed for testing performance implications of using recently enabled inlining in rustc's frontend (with -Z inline-mir=yes option, #91743). It would be interesting to see the performance effect using rustc's frontend inlining only without LLVM inlining enabled. Currently LLVM is still doing inlining no mater what value inline-mir is set to. With the option `inline-llvm` being added in this PR, user can turn off LLVM inlining by using `-Z inline-llvm=no` option (the default of inline-llvm is 'yes', LLVM inlining enabled).

22 months agoAuto merge of #101604 - compiler-errors:issue-101465, r=lcnr
bors [Mon, 12 Sep 2022 08:46:40 +0000 (08:46 +0000)]
Auto merge of #101604 - compiler-errors:issue-101465, r=lcnr

Fix ICE in opt_suggest_box_span

We were _totally_ mishandling substs and obligations in `opt_suggest_box_span`, so I reworked that function pretty heavily.

Also some drive-by changes, namely removing `ret_type_span`.

Fixes #101465

22 months agoAuto merge of #100502 - chenyukang:fix-100478, r=jackh726
bors [Mon, 12 Sep 2022 06:05:32 +0000 (06:05 +0000)]
Auto merge of #100502 - chenyukang:fix-100478, r=jackh726

Avoid infinite loop in function arguments checking

Fixes #100478
Fixes #101097

22 months agoAuto merge of #100251 - compiler-errors:tuple-trait-2, r=jackh726
bors [Mon, 12 Sep 2022 03:24:29 +0000 (03:24 +0000)]
Auto merge of #100251 - compiler-errors:tuple-trait-2, r=jackh726

Implement `std::marker::Tuple`

Split out from #99943 (https://github.com/rust-lang/rust/pull/99943#pullrequestreview-1064459183).

Implements part of rust-lang/compiler-team#537
r? `@jackh726`

22 months agoFix ICE in opt_suggest_box_span
Michael Goulet [Fri, 9 Sep 2022 05:50:25 +0000 (05:50 +0000)]
Fix ICE in opt_suggest_box_span

22 months agoNo more ret_type_span
Michael Goulet [Fri, 9 Sep 2022 03:10:06 +0000 (03:10 +0000)]
No more ret_type_span

22 months agorustdoc: remove no-op `#search`
Michael Howell [Mon, 12 Sep 2022 01:43:52 +0000 (18:43 -0700)]
rustdoc: remove no-op `#search`

The padding rule was added in 135281ed1525db15edd8ebd092aa10aa40df2386 when
converting the rule for #main, but didn't do anything even then.

22 months agorustdoc: remove no-op `#search { margin-left: 0 }`
Michael Howell [Mon, 12 Sep 2022 01:15:09 +0000 (18:15 -0700)]
rustdoc: remove no-op `#search { margin-left: 0 }`

This rule was added in c729e4dca7581fcd060978bcb0d7f98ea4eb6b82 to remove an
unnecessary left margin that was present on desktop. This desktop-mode margin
was itself removed in 135281ed1525db15edd8ebd092aa10aa40df2386.

22 months agoAuto merge of #101688 - cjgillot:verify-hir-parent, r=petrochenkov
bors [Mon, 12 Sep 2022 00:41:56 +0000 (00:41 +0000)]
Auto merge of #101688 - cjgillot:verify-hir-parent, r=petrochenkov

Assert that HIR nodes are not their own parent.

Fixes https://github.com/rust-lang/rust/issues/101505.
Replaces #101513

r? `@petrochenkov` `@nnethercote`

22 months agoAuto merge of #101442 - joboet:null_check_tcs, r=thomcc
bors [Sun, 11 Sep 2022 22:19:24 +0000 (22:19 +0000)]
Auto merge of #101442 - joboet:null_check_tcs, r=thomcc

Check if TCS is a null pointer on SGX

The `EENTER` instruction only checks if the TCS is aligned, not if it zero. Saying the address returned is a `NonNull<u8>` (for which `Tcs` is a type alias) is unsound. As well-behaved runners will not put the TCS at address zero, so the definition of `Tcs` is correct. However, `std` should check the address before casting it to a `NonNull`.

ping `@jethrogb` `@raoulstrackx`
`@rustbot` label I-unsound

22 months agoUpdate tests for new browser-ui-test version
Guillaume Gomez [Sat, 10 Sep 2022 15:36:17 +0000 (17:36 +0200)]
Update tests for new browser-ui-test version

22 months agoAuto merge of #101299 - saethlin:vecdeque-drain-drop, r=thomcc
bors [Sun, 11 Sep 2022 19:50:41 +0000 (19:50 +0000)]
Auto merge of #101299 - saethlin:vecdeque-drain-drop, r=thomcc

Remove &[T] from vec_deque::Drain

Fixes https://github.com/rust-lang/rust/issues/60076

I don't know what the right approach is here. There were a few suggestions in the issue, and they all seem a bit thorny to implement. So I just picked one that was kind of familiar.

22 months agoRustdoc-Json: Add tests for trait impls.
Nixon Enraght-Moony [Sun, 11 Sep 2022 19:32:47 +0000 (20:32 +0100)]
Rustdoc-Json: Add tests for trait impls.

22 months agoAssert that HIR nodes are not their own parent.
Camille GILLOT [Sun, 11 Sep 2022 13:11:58 +0000 (15:11 +0200)]
Assert that HIR nodes are not their own parent.

22 months agoAuto merge of #101678 - jannic:fix-101640, r=jyn514
bors [Sun, 11 Sep 2022 16:30:59 +0000 (16:30 +0000)]
Auto merge of #101678 - jannic:fix-101640, r=jyn514

Add diagnostic arg 'current_crate'

With this fix, I get almost the same error message as on stable, again.

However, I expected to get the new error message `std is required by {$current_crate} because it does not declare #![no_std]`, but I didn't. Instead, I got a new line `help: consider building the standard library from source with cargo build -Zbuild-std`. So I obviously do not fully understand what is going on.

In any case, the bug itself seems to be fixed by this patch.

Closes #101640

22 months agoAuto merge of #101682 - compiler-errors:rpitit-encode, r=fee1-dead
bors [Sun, 11 Sep 2022 13:49:52 +0000 (13:49 +0000)]
Auto merge of #101682 - compiler-errors:rpitit-encode, r=fee1-dead

Only encode return-position `impl Trait` in trait when parent function has a default body

Semi-blocked on #101679, because I can't currently write a test for when we _should_ encode the type of the return-position `impl Trait` in trait, which is when a trait has a default function body, like so:

```rust
trait Foo {
  fn bar() -> impl Sized { }
}
```

Though this can land even without #101679, since it does prevent ICEs from occuring any time you use `#![feature(return_position_impl_trait_in_trait)]` in a library, which is kind annoying.

22 months agostd: check if TCS is a null pointer
joboet [Mon, 5 Sep 2022 09:42:46 +0000 (11:42 +0200)]
std: check if TCS is a null pointer

22 months agoOnly encode RPITIT when trait method has default body
Michael Goulet [Sun, 11 Sep 2022 09:35:43 +0000 (09:35 +0000)]
Only encode RPITIT when trait method has default body

22 months agoDeny RPITIT for object safety
Michael Goulet [Sun, 11 Sep 2022 09:13:55 +0000 (09:13 +0000)]
Deny RPITIT for object safety

22 months agoAuto merge of #101673 - crlf0710:generator_clone, r=oli-obk
bors [Sun, 11 Sep 2022 08:50:35 +0000 (08:50 +0000)]
Auto merge of #101673 - crlf0710:generator_clone, r=oli-obk

Allow generators to impl Clone/Copy

Revives #95137. It's a pity that the original pr didn't land because the implementation is almost complete! All credits goes to `@canndrew,` and i just resolved the merge conflicts and updated the feature gate version number.

r? `@oli-obk`

22 months agoAdd diagnostic arg 'current_crate'
Jan Niehusmann [Sat, 10 Sep 2022 23:01:36 +0000 (23:01 +0000)]
Add diagnostic arg 'current_crate'

22 months agoCheck that the types in RPITITs are WF
Michael Goulet [Sun, 11 Sep 2022 06:58:11 +0000 (06:58 +0000)]
Check that the types in RPITITs are WF

22 months agoAuto merge of #101670 - obi1kenobi:patch-1, r=jyn514
bors [Sun, 11 Sep 2022 06:27:29 +0000 (06:27 +0000)]
Auto merge of #101670 - obi1kenobi:patch-1, r=jyn514

Add @obi1kenobi to the cc list for rustdoc-json-types

I'm one of the maintainers of `cargo-semver-checks`, and as mentioned [in Zulip](https://rust-lang.zulipchat.com/#narrow/stream/266220-rustdoc/topic/Long.20Term.20Rustdoc.20JSON.20Stability) it's very useful to me to know about upcoming rustdoc JSON types changes so I can be ready to publish new `cargo-semver-checks` releases compatible with the new JSON format.

22 months agoUpdate unit test outputs
Charles Lew [Sun, 11 Sep 2022 06:21:40 +0000 (14:21 +0800)]
Update unit test outputs

22 months agoUse current rustc version.
Charles Lew [Sun, 11 Sep 2022 05:57:41 +0000 (13:57 +0800)]
Use current rustc version.

22 months agofix tests after rebase
Andrew Cann [Sun, 10 Apr 2022 07:28:31 +0000 (15:28 +0800)]
fix tests after rebase

22 months agotest async diagnostics for feature(generator_clone)
Andrew Cann [Sun, 10 Apr 2022 07:04:04 +0000 (15:04 +0800)]
test async diagnostics for feature(generator_clone)

22 months agominor fixups as per PR feedback
Andrew Cann [Sun, 10 Apr 2022 06:05:31 +0000 (14:05 +0800)]
minor fixups as per PR feedback

22 months agoAdd some comments to generator clone shim code
Andrew Cann [Sun, 10 Apr 2022 06:04:44 +0000 (14:04 +0800)]
Add some comments to generator clone shim code

22 months agoAdd tracking issue number to feature(generator_clone)
Andrew Cann [Sun, 27 Mar 2022 07:50:40 +0000 (15:50 +0800)]
Add tracking issue number to feature(generator_clone)

22 months agoAdd feature gate tests for generator_clone
Andrew Cann [Mon, 21 Mar 2022 05:57:10 +0000 (13:57 +0800)]
Add feature gate tests for generator_clone

22 months agoApply formatting fixes
Andrew Cann [Mon, 21 Mar 2022 04:57:06 +0000 (12:57 +0800)]
Apply formatting fixes

22 months agomove generator_clone feature definition
Andrew Cann [Mon, 21 Mar 2022 04:56:22 +0000 (12:56 +0800)]
move generator_clone feature definition

Move it to the list of features with no tracking issue, since it has no
tracking issue.

22 months agofix GeneratorWitness: Clone check
Andrew Cann [Fri, 18 Mar 2022 06:24:54 +0000 (14:24 +0800)]
fix GeneratorWitness: Clone check

22 months agoloosen restriction on when GeneratorWitness: Clone
Andrew Cann [Mon, 14 Mar 2022 02:24:10 +0000 (10:24 +0800)]
loosen restriction on when GeneratorWitness: Clone

22 months agoadd generator_clone feature gate
Andrew Cann [Sun, 13 Mar 2022 06:41:44 +0000 (14:41 +0800)]
add generator_clone feature gate

22 months agoimplement Copy/Clone for generators
Andrew Cann [Sun, 13 Mar 2022 05:39:20 +0000 (13:39 +0800)]
implement Copy/Clone for generators

22 months agoAuto merge of #101482 - joboet:netbsd_parker, r=sanxiyn
bors [Sun, 11 Sep 2022 04:07:17 +0000 (04:07 +0000)]
Auto merge of #101482 - joboet:netbsd_parker, r=sanxiyn

Optimize thread parking on NetBSD

As the futex syscall is not present in the latest stable release, NetBSD cannot use the efficient thread parker and locks Linux uses. Currently, it therefore relies on a pthread-based parker, consisting of a mutex and semaphore which protect a state variable. NetBSD however has more efficient syscalls available: [`_lwp_park`](https://man.netbsd.org/_lwp_park.2) and [`_lwp_unpark`](https://man.netbsd.org/_lwp_unpark.2). These already provide the exact semantics of `thread::park` and `Thread::unpark`, but work with thread ids. In `std`, this ID is here stored in an atomic state variable, which is also used to optimize cases were the parking token is already available at the time `thread::park` is called.

r? `@m-ou-se`

22 months agoFix naming format of IEEE 754 standard
LingMan [Sat, 10 Sep 2022 05:30:29 +0000 (07:30 +0200)]
Fix naming format of IEEE 754 standard

Currently the documentation of f64::min refers to "IEEE-754 2008" while the documentation of
f64::minimum refers to "IEEE 754-2019".
Note that one has the format IEEE,hyphen,number,space,year while the other is
IEEE,space,number,hyphen,year. The official IEEE site [1] uses the later format and it is also the
one most commonly used throughout the codebase.

Update all comments and - more importantly - documentation to consistently use the official format.

[1] https://standards.ieee.org/ieee/754/4211/

22 months agoAdd @obi1kenobi to the cc list for rustdoc-json-types
Predrag Gruevski [Sun, 11 Sep 2022 02:04:57 +0000 (22:04 -0400)]
Add @obi1kenobi to the cc list for rustdoc-json-types

22 months agoAuto merge of #101643 - ChrisDenton:alloc-link-kernel32, r=thomcc
bors [Sun, 11 Sep 2022 01:44:09 +0000 (01:44 +0000)]
Auto merge of #101643 - ChrisDenton:alloc-link-kernel32, r=thomcc

Explicitly link kernel32.lib from alloc

22 months agofix #101626, suggest pub instead of public for const type item
yukang [Sun, 11 Sep 2022 00:29:38 +0000 (08:29 +0800)]
fix #101626, suggest pub instead of public for const type item

22 months agoAuto merge of #101613 - GuillaumeGomez:codeblock-tooltip, r=notriddle
bors [Sat, 10 Sep 2022 23:13:23 +0000 (23:13 +0000)]
Auto merge of #101613 - GuillaumeGomez:codeblock-tooltip, r=notriddle

Simplify codeblock and their associated tooltip

It is based on https://github.com/rust-lang/rust/pull/101600 so it needs to wait for this one to be merged first.

This PR does two things:

 * Remove CSS class duplication by setting CSS classes such as `compile_fail` directly on the `div` wrapping both the codeblock and the tooltip.
 * Simplify DOM: no need to wrap the tooltip into a `<div>`, it can work just as well without it.

You can test it [here](https://rustdoc.crud.net/imperio/codeblock-tooltip/std/string/struct.String.html#deref).

r? `@notriddle`

22 months agoAlternate approach; just modify Drain
Ben Kimock [Sat, 10 Sep 2022 20:24:28 +0000 (16:24 -0400)]
Alternate approach; just modify Drain

22 months agoRemove &[T] from vec_deque::Drain
Ben Kimock [Fri, 2 Sep 2022 00:29:39 +0000 (20:29 -0400)]
Remove &[T] from vec_deque::Drain

22 months agoAuto merge of #98559 - jackh726:remove-reempty, r=oli-obk
bors [Sat, 10 Sep 2022 20:54:01 +0000 (20:54 +0000)]
Auto merge of #98559 - jackh726:remove-reempty, r=oli-obk

Remove ReEmpty

r? rust-lang/types

22 months agostd: optimize thread parking on NetBSD
joboet [Tue, 6 Sep 2022 12:32:45 +0000 (14:32 +0200)]
std: optimize thread parking on NetBSD

22 months agoAuto merge of #101647 - crlf0710:test_for_99551, r=bjorn3
bors [Sat, 10 Sep 2022 17:39:16 +0000 (17:39 +0000)]
Auto merge of #101647 - crlf0710:test_for_99551, r=bjorn3

Fix LLVM IR type mismatch reported in #99551

Closes #99551 .

22 months agoUpdate browser-ui-test version to 0.10.0
Guillaume Gomez [Sat, 10 Sep 2022 15:50:40 +0000 (17:50 +0200)]
Update browser-ui-test version to 0.10.0

22 months agoFix pointer value punning.
Charles Lew [Sat, 10 Sep 2022 11:42:51 +0000 (19:42 +0800)]
Fix pointer value punning.

Seems this doesn't trigger error on LLVM 15, but let's fix it for better compatibility.

22 months agoAuto merge of #101652 - Dylan-DPC:rollup-f4atky0, r=Dylan-DPC
bors [Sat, 10 Sep 2022 14:48:34 +0000 (14:48 +0000)]
Auto merge of #101652 - Dylan-DPC:rollup-f4atky0, r=Dylan-DPC

Rollup of 6 pull requests

Successful merges:

 - #101578 (remove bound var hack in `resolve`)
 - #101606 (doc: fix minor typo)
 - #101614 (Equate fn outputs when inferring RPITIT hidden types)
 - #101631 (rustdoc: avoid cleaning modules with duplicate names)
 - #101635 (Move `Queries::new` out of the macro)
 - #101641 (Update browser-ui-test version to 0.9.8)

Failed merges:

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

22 months agoRollup merge of #101641 - GuillaumeGomez:update-browser-ui-test, r=Dylan-DPC
Dylan DPC [Sat, 10 Sep 2022 13:26:11 +0000 (18:56 +0530)]
Rollup merge of #101641 - GuillaumeGomez:update-browser-ui-test, r=Dylan-DPC

Update browser-ui-test version to 0.9.8

This version improves the error output mostly.

r? `@Dylan-DPC`

22 months agoRollup merge of #101635 - jyn514:queries-new-derived, r=cjgillot
Dylan DPC [Sat, 10 Sep 2022 13:26:10 +0000 (18:56 +0530)]
Rollup merge of #101635 - jyn514:queries-new-derived, r=cjgillot

Move `Queries::new` out of the macro

Split out from https://github.com/rust-lang/rust/pull/101178 to make sure it's not contributing to the perf impact.

r? `@cjgillot`

22 months agoRollup merge of #101631 - rust-lang:notriddle/duplicate-module, r=GuillaumeGomez
Dylan DPC [Sat, 10 Sep 2022 13:26:09 +0000 (18:56 +0530)]
Rollup merge of #101631 - rust-lang:notriddle/duplicate-module, r=GuillaumeGomez

rustdoc: avoid cleaning modules with duplicate names

Fixes #83375

22 months agoRollup merge of #101614 - compiler-errors:rpitit-eq, r=jackh726
Dylan DPC [Sat, 10 Sep 2022 13:26:08 +0000 (18:56 +0530)]
Rollup merge of #101614 - compiler-errors:rpitit-eq, r=jackh726

Equate fn outputs when inferring RPITIT hidden types

When we are trying to infer the hidden types for RPITITs, we need to equate the output tys instead of just subtyping them. For example:

```rust
trait Foo { fn bar() -> impl Sized {} }

impl Foo for () { fn bar() -> &'static str { "" } }
```

If we just subtype the signatures `fn() -> &'static str <: fn() -> _#1t` (where `_#1t` is the variable we've used to infer `impl Sized`), we'll end up `&'static str <: _#1t`, which causes us to infer `_#1t = #'_#2r str`, where `'_#2r` is unconstrained, which gets fixed up to `ReEmpty`, and which is certainly not what we want.

I can't actually think of a way to make this fail to compile, because during borrowck we've already done the method probe, and so we just look at the `impl` method signature and see the `&'static str` any time we call `<() as Foo>::bar()`. But this _does_ cause the ICE [here](https://github.com/rust-lang/rust/pull/98559#issuecomment-1241891994) in `@jackh726's` "Remove ReEmpty" PR (#98559) to stop ICEing, because after that PR we were leaking unconstrained region variables into the typeck results.

r? types

22 months agoRollup merge of #101606 - akhi3030:patch-1, r=Dylan-DPC
Dylan DPC [Sat, 10 Sep 2022 13:26:07 +0000 (18:56 +0530)]
Rollup merge of #101606 - akhi3030:patch-1, r=Dylan-DPC

doc: fix minor typo

22 months agoRollup merge of #101578 - lcnr:resolve-hack, r=jackh726
Dylan DPC [Sat, 10 Sep 2022 13:26:07 +0000 (18:56 +0530)]
Rollup merge of #101578 - lcnr:resolve-hack, r=jackh726

remove bound var hack in `resolve`

somehow dropped that change from #98900.

r? `@jackh726`

22 months agoAuto merge of #100968 - cjgillot:mir-upvar-vec, r=wesleywiser
bors [Sat, 10 Sep 2022 12:07:29 +0000 (12:07 +0000)]
Auto merge of #100968 - cjgillot:mir-upvar-vec, r=wesleywiser

Only compute captures once when building MIR.

22 months agoExplicitly link kernel32.lib from alloc
Chris Denton [Sat, 10 Sep 2022 10:57:36 +0000 (11:57 +0100)]
Explicitly link kernel32.lib from alloc

22 months agoRemove unused temp.
Camille Gillot [Sat, 10 Sep 2022 10:10:04 +0000 (12:10 +0200)]
Remove unused temp.

Co-authored-by: Wesley Wiser <wwiser@gmail.com>
22 months agoAuto merge of #101483 - oli-obk:guaranteed_opt, r=fee1-dead
bors [Sat, 10 Sep 2022 09:50:21 +0000 (09:50 +0000)]
Auto merge of #101483 - oli-obk:guaranteed_opt, r=fee1-dead

The `<*const T>::guaranteed_*` methods now return an option for the unknown case

cc https://github.com/rust-lang/rust/issues/53020#issuecomment-1236932443

I chose `0` for "not equal" and `1` for "equal" and left `2` for the unknown case so backends can just forward to raw pointer equality and it works ✨

r? `@fee1-dead` or `@lcnr`

cc `@rust-lang/wg-const-eval`

22 months agorustc_error, rustc_private, rustc_ast: Switch to stable hash containers
Niklas Jonsson [Sat, 16 Jul 2022 13:16:57 +0000 (15:16 +0200)]
rustc_error, rustc_private, rustc_ast: Switch to stable hash containers

22 months agoUpdate browser-ui-test version to 0.9.8
Guillaume Gomez [Sat, 10 Sep 2022 08:26:47 +0000 (10:26 +0200)]
Update browser-ui-test version to 0.9.8

22 months agoUpdate rustdoc GUI tests
Guillaume Gomez [Fri, 9 Sep 2022 14:18:22 +0000 (16:18 +0200)]
Update rustdoc GUI tests

22 months agoSimplify DOM for codeblocks tooltips
Guillaume Gomez [Fri, 9 Sep 2022 14:18:14 +0000 (16:18 +0200)]
Simplify DOM for codeblocks tooltips

22 months agoAuto merge of #101639 - matthiaskrgr:rollup-sewkrgm, r=matthiaskrgr
bors [Sat, 10 Sep 2022 06:55:37 +0000 (06:55 +0000)]
Auto merge of #101639 - matthiaskrgr:rollup-sewkrgm, r=matthiaskrgr

Rollup of 6 pull requests

Successful merges:

 - #101413 (Use RelocModel::Pic for UEFI targets)
 - #101595 (Fix ICE report flags display.)
 - #101616 (Adapt test for msan message change)
 - #101624 (rustdoc: remove unused CSS `#search { position: relative }`)
 - #101633 (Rustdoc-Json: Correcty handle intra-doc-links to items without HTML page)
 - #101634 (Rustdoc-Json Tests: Use ``@is`` and ``@ismany`` more often.)

Failed merges:

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

22 months agoRollup merge of #101634 - aDotInTheVoid:rdj-test, r=CraftSpider
Matthias Krüger [Sat, 10 Sep 2022 05:09:23 +0000 (07:09 +0200)]
Rollup merge of #101634 - aDotInTheVoid:rdj-test, r=CraftSpider

Rustdoc-Json Tests: Use `@is` and `@ismany` more often.

22 months agoRollup merge of #101633 - aDotInTheVoid:rdj-idl, r=jyn514
Matthias Krüger [Sat, 10 Sep 2022 05:09:22 +0000 (07:09 +0200)]
Rollup merge of #101633 - aDotInTheVoid:rdj-idl, r=jyn514

Rustdoc-Json: Correcty handle intra-doc-links to items without HTML page

Closes #101531

I renamed the `did` field in `ItemLink ` to more accurately describe what it does.

r? `@jyn514`

22 months agoRollup merge of #101624 - notriddle:notriddle/search, r=GuillaumeGomez
Matthias Krüger [Sat, 10 Sep 2022 05:09:21 +0000 (07:09 +0200)]
Rollup merge of #101624 - notriddle:notriddle/search, r=GuillaumeGomez

rustdoc: remove unused CSS `#search { position: relative }`

This was added in 611d0e6ccef8b60fa86ff5aa8fe3571cd36c444a, to allow its child `#results` element to be absolutely positioned inside it. The child stopped being absolute in 8c0469552e879f6319f8f96db660bab9eae1de5c.

To keep the layout looking the same, the links need to not have `width: 100%` any more, relying instead on the box naturally growing to fit because it has `display: block`.

22 months agoRollup merge of #101616 - TimNN:relax-msan, r=lqd
Matthias Krüger [Sat, 10 Sep 2022 05:09:21 +0000 (07:09 +0200)]
Rollup merge of #101616 - TimNN:relax-msan, r=lqd

Adapt test for msan message change

Similar to rust-lang/rust#100445, this adapts the new test added by rust-lang/rust#99207 to some relatively recent [LLVM changes](https://github.com/llvm/llvm-project/commit/057cabd997aeaef136e1e14f2ee645bd5bb197dd) that removed the function name from msan messages.

Found via our experimental rust + llvm @ HEAD bot:
https://buildkite.com/llvm-project/rust-llvm-integrate-prototype/builds/13347#018321b2-0cc3-4c91-b4db-774477e8b074

`@rustbot` label +llvm-main

22 months agoRollup merge of #101595 - ehuss:fix-ice-flag-report, r=tmiasko
Matthias Krüger [Sat, 10 Sep 2022 05:09:20 +0000 (07:09 +0200)]
Rollup merge of #101595 - ehuss:fix-ice-flag-report, r=tmiasko

Fix ICE report flags display.

#92310 made some changes to the ICE report that displays the rustc flags, but it introduced a bug where a flag like `-Z incremental-verify-ich=yes` was being treated as-if it was `-Cincremental`. This corrupted the output and made it confusing. The cause was using `starts_with` instead of properly splitting the option.

For example, with the command like `rustc foo.rs -Cincremental=/tmp/a -Zincremental-verify-ich=yes --crate-type lib` would previously look like:

```
note: compiler flags: -C incremental -Z incremental --crate-type lib
```

It now looks like:

```
note: compiler flags: -C incremental=[REDACTED] -Z incremental-verify-ich=yes --crate-type lib
```

I added a `[REDACTED]` marker for `-Cincremental` so it is a little less confusing that a value has been removed.

Fixes #101588

22 months agoRollup merge of #101413 - nicholasbishop:bishop-remove-uefi-static-reloc, r=petrochenkov
Matthias Krüger [Sat, 10 Sep 2022 05:09:19 +0000 (07:09 +0200)]
Rollup merge of #101413 - nicholasbishop:bishop-remove-uefi-static-reloc, r=petrochenkov

Use RelocModel::Pic for UEFI targets

In https://github.com/rust-lang/rust/pull/100537, the relocation model for UEFI targets was changed from PIC (the default value) to
static. There was some dicussion of this change here: https://github.com/rust-lang/rust/pull/100537#discussion_r952363012

It turns out that this can cause compilation to fail as described in https://github.com/rust-lang/rust/issues/101377, so switch back to PIC.

Fixes https://github.com/rust-lang/rust/issues/101377

22 months agoAuto merge of #99916 - dpaoliello:stablizerawdylib, r=wesleywiser
bors [Sat, 10 Sep 2022 04:14:34 +0000 (04:14 +0000)]
Auto merge of #99916 - dpaoliello:stablizerawdylib, r=wesleywiser

Stabilize raw-dylib for non-x86

This stabilizes the `raw-dylib` and `link_ordinal` features (#58713) for non-x86 architectures (i.e., `x86_64`, `aarch64` and `thumbv7a`):
* Marked the `raw_dylib` feature as `active`.
* Marked the `link_ordinal` attribute as `ungated`.
* Added new errors if either feature is used on x86 targets without the `raw_dylib` feature being enabled.
* Updated tests to only set the `raw_dylib` feature when building for x86.

22 months agoAuto merge of #101609 - flip1995:clippyup, r=Manishearth
bors [Sat, 10 Sep 2022 01:51:24 +0000 (01:51 +0000)]
Auto merge of #101609 - flip1995:clippyup, r=Manishearth

Update Clippy

r? `@Manishearth`

22 months agorustdoc: add another test case for glob shadowing
Michael Howell [Sat, 10 Sep 2022 01:13:31 +0000 (18:13 -0700)]
rustdoc: add another test case for glob shadowing