Commit Graph

223745 Commits

Author SHA1 Message Date
Raoul Strackx
97eab4db84 Fix MXCSR configuration dependent timing
Some data-independent timing vector instructions may have subtle data-dependent
timing due to MXCSR configuration; dependent on (potentially secret) data
instruction retirement may be delayed by one cycle.
2023-05-03 17:11:15 +02:00
bors
9b99ff76b2 Auto merge of #110865 - cuviper:ct-ng-1.25, r=pietroalbini
ci: upgrade and refactor crosstool-ng builders

The first commit upgrades our builders from crosstool-ng 1.24.0 to 1.25.0. There are otherwise no changes intended to the toolchains we're using, but there are some minor version upgrades as a result, especially GCC 8.3.0 to 8.5.0. The newer crosstool-ng will position us well to make toolchain upgrades in the future though, as we were maxed out before and it now goes up to GCC 11.

The second commit refactors our config management to only commit a "mini-defconfig" for each target, produced by `ct-ng savedefconfig`. This makes it much clearer which settings we're actually changing, and also makes it easier to ensure consistency for things like mirror management.
2023-05-03 14:39:06 +00:00
lcnr
6bb1f792db cleanup nll generalizer 2023-05-03 15:47:36 +02:00
bors
c2e0d43485 Auto merge of #10734 - smoelius:patch-2, r=Alexendoo
Update macros.rs (typo)

r? `@Alexendoo`

changelog: none
2023-05-03 10:34:39 +00:00
Konrad Borowski
4fec8a35b6 Constify slice flatten method 2023-05-03 12:33:15 +02:00
Chris Denton
109a47fc9d
Use from_wide_to_user_path in read_link 2023-05-03 11:31:41 +01:00
Konrad Borowski
4603f0b8af Inline SocketAddr methods 2023-05-03 11:56:55 +02:00
Chris Denton
6e377849c0
Correctly convert an NT path to a Win32 path
This can be done by simply changing the `\??\` prefix to `\\?\` and then attempting to convert to a user path.

Currently it simply strips off the prefix which could lead to the wrong path being returned (e.g. if it's not a drive path or if the path contains trailing spaces, etc).
2023-05-03 10:24:56 +01:00
bors
82cd953c7c Auto merge of #110846 - jdno:reduce-builder-sizes, r=pietroalbini
Optimize builder sizes

The infra-team is continuously monitoring the efficiency of the CI system in an effort to improve overall build times and resource usage. Some builders have used much less than their allocated resources, so we are testing smaller builder sizes for them.

r? `@pietroalbini`
2023-05-03 07:06:42 +00:00
bors
cad92b4c97 Auto merge of #111107 - weihanglo:update-cargo, r=weihanglo
Update cargo

16 commits in 9e586fbd8b931494067144623b76c37d213b1ab6..ac84010322a31f4a581dafe26258aa4ac8dea9cd
2023-04-25 22:09:11 +0000 to 2023-05-02 13:41:16 +0000
- docs(registry): Further specify owner-remove response (rust-lang/cargo#12056) (rust-lang/cargo#12068)
- Remove repeated definite articles (rust-lang/cargo#12067)
- Document that adding `#[non_exhaustive]` on existing items is breaking. (rust-lang/cargo#10877)
- docs(commands): add missed preposition (rust-lang/cargo#12073)
- Fix warning with unused mut (rust-lang/cargo#12065)
- chore: move build-man workflow away from shell (rust-lang/cargo#12048)
- feat: Add `-Zmsrv-policy` feature flag (rust-lang/cargo#12043)
- chore: new xtask to check stale paths in autolabel defintions (rust-lang/cargo#12051)
- cargo-tree: Handle -e no-proc-macro when building the graph (rust-lang/cargo#12044)
- chore: update trigger_files in autolabel (rust-lang/cargo#12052)
- fix broken markdown in docs (rust-lang/cargo#12049)
- home: fix & enhance documentation (rust-lang/cargo#12047)
- chore: Mark unpublished crates as such (rust-lang/cargo#12045)
- Include rust-version in publish request (rust-lang/cargo#12041)
- chore(xtask): Add `cargo xtask unpublished` (rust-lang/cargo#12039)
- docs(ref): Specify 'rust_version' in Index format (rust-lang/cargo#12040)

r? `@ghost`
2023-05-03 03:38:54 +00:00
bors
9353170dfb Auto merge of #10730 - blyxyas:no_std_mul_add, r=Jarcho
`imprecise_flops`: Globally ignore `#[no_std]` crates

Really small fix.
Fixes #10728
changelog: [`imprecise_flops`]: Fix false positives with `#[no_std]`
2023-05-03 01:47:52 +00:00
bors
71af5c4074 Auto merge of #110579 - nnethercote:restrict-From-for-Diagnostics, r=davidtwco
Restrict `From<S>` for `{D,Subd}iagnosticMessage`.

Currently a `{D,Subd}iagnosticMessage` can be created from any type that impls `Into<String>`. That includes `&str`, `String`, and `Cow<'static, str>`, which are reasonable. It also includes `&String`, which is pretty weird, and results in many places making unnecessary allocations for patterns like this:
```
self.fatal(&format!(...))
```
This creates a string with `format!`, takes a reference, passes the reference to `fatal`, which does an `into()`, which clones the reference, doing a second allocation. Two allocations for a single string, bleh.

This commit changes the `From` impls so that you can only create a `{D,Subd}iagnosticMessage` from `&str`, `String`, or `Cow<'static, str>`. This requires changing all the places that currently create one from a `&String`. Most of these are of the `&format!(...)` form described above; each one removes an unnecessary static `&`, plus an allocation when executed. There are also a few places where the existing use of `&String` was more reasonable; these now just use `clone()` at the call site.

As well as making the code nicer and more efficient, this is a step towards possibly using `Cow<'static, str>` in
`{D,Subd}iagnosticMessage::{Str,Eager}`. That would require changing the `From<&'a str>` impls to `From<&'static str>`, which is doable, but I'm not yet sure if it's worthwhile.

r? `@davidtwco`
2023-05-03 00:22:19 +00:00
Samuel Moelius
7e24ff33e4
Update macros.rs 2023-05-02 19:02:06 -04:00
Nicholas Nethercote
431cce1540 Restrict From<S> for {D,Subd}iagnosticMessage.
Currently a `{D,Subd}iagnosticMessage` can be created from any type that
impls `Into<String>`. That includes `&str`, `String`, and `Cow<'static,
str>`, which are reasonable. It also includes `&String`, which is pretty
weird, and results in many places making unnecessary allocations for
patterns like this:
```
self.fatal(&format!(...))
```
This creates a string with `format!`, takes a reference, passes the
reference to `fatal`, which does an `into()`, which clones the
reference, doing a second allocation. Two allocations for a single
string, bleh.

This commit changes the `From` impls so that you can only create a
`{D,Subd}iagnosticMessage` from `&str`, `String`, or `Cow<'static,
str>`. This requires changing all the places that currently create one
from a `&String`. Most of these are of the `&format!(...)` form
described above; each one removes an unnecessary static `&`, plus an
allocation when executed. There are also a few places where the existing
use of `&String` was more reasonable; these now just use `clone()` at
the call site.

As well as making the code nicer and more efficient, this is a step
towards possibly using `Cow<'static, str>` in
`{D,Subd}iagnosticMessage::{Str,Eager}`. That would require changing
the `From<&'a str>` impls to `From<&'static str>`, which is doable, but
I'm not yet sure if it's worthwhile.
2023-05-03 08:44:39 +10:00
Nicholas Nethercote
6b62f37402 Restrict From<S> for {D,Subd}iagnosticMessage.
Currently a `{D,Subd}iagnosticMessage` can be created from any type that
impls `Into<String>`. That includes `&str`, `String`, and `Cow<'static,
str>`, which are reasonable. It also includes `&String`, which is pretty
weird, and results in many places making unnecessary allocations for
patterns like this:
```
self.fatal(&format!(...))
```
This creates a string with `format!`, takes a reference, passes the
reference to `fatal`, which does an `into()`, which clones the
reference, doing a second allocation. Two allocations for a single
string, bleh.

This commit changes the `From` impls so that you can only create a
`{D,Subd}iagnosticMessage` from `&str`, `String`, or `Cow<'static,
str>`. This requires changing all the places that currently create one
from a `&String`. Most of these are of the `&format!(...)` form
described above; each one removes an unnecessary static `&`, plus an
allocation when executed. There are also a few places where the existing
use of `&String` was more reasonable; these now just use `clone()` at
the call site.

As well as making the code nicer and more efficient, this is a step
towards possibly using `Cow<'static, str>` in
`{D,Subd}iagnosticMessage::{Str,Eager}`. That would require changing
the `From<&'a str>` impls to `From<&'static str>`, which is doable, but
I'm not yet sure if it's worthwhile.
2023-05-03 08:44:39 +10:00
Michael Goulet
6fca051b76 Rustfmt support for negative bounds, test 2023-05-02 22:36:25 +00:00
Michael Goulet
03469c3f2e Make negative trait bounds work with the old trait solver 2023-05-02 22:36:25 +00:00
Michael Goulet
40a63cb06f Make tools happy 2023-05-02 22:36:24 +00:00
Michael Goulet
86f50b9f5c Disallow associated type constraints on negative bounds 2023-05-02 22:36:24 +00:00
Michael Goulet
6e01e910cb Implement negative bounds 2023-05-02 22:36:24 +00:00
Nicholas Nethercote
51b9f78626 Amend the triagebot comment for Cargo.lock changes.
I don't like the current wording. It's obnoxious to be told by a bot
that a change I made intentionally is "probably unintentional"! I also
don't like describing unintentional changes as "Random", it's not the
right word.
2023-05-03 08:25:02 +10:00
Nicholas Nethercote
6af761a5aa Add some triagebot notifications for nnethercote. 2023-05-03 08:22:05 +10:00
bors
b4571bed99 Auto merge of #109729 - fortanix:raoul/bugfix_libtest_json_synchronization, r=pietroalbini
Ensure test library issues json string line-by-line

#108659 introduces a custom test display implementation. It does so by using libtest to output json. The stdout is read line by line and parsed. The code trims the line read and checks whether it starts with a `{` and ends with a `}`.

Unfortunately, there is a race condition in how json data is written to stdout. The `write_message` function calls `self.out.write_all` repeatedly to write a buffer that contains (partial) json data, or a new line. There is no lock around the `self.out.write_all` functions. Similarly, the `write_message` function itself is called with only partial json data. As these functions are called from concurrent threads, this may result in json data ending up on the same stdout line. This PR avoids this by buffering the complete json data before issuing a single `self.out.write_all`.

(#109484 implemented a partial fix for this issue; it only avoids that failed json parsing would result in a panic.)

cc: `@jethrogb,` `@pietroalbini`
2023-05-02 21:28:53 +00:00
Weihang Lo
7401d1883b
Update cargo 2023-05-02 19:48:27 +01:00
blyxyas
0dd2501e0d
Don't ignore check_radians 2023-05-02 20:47:18 +02:00
bors
a368898de7 Auto merge of #111028 - compiler-errors:attr-query-no-caching, r=cjgillot
Make some simple queries no longer cache on disk

I don't think we need to cache queries with really simple local providers, like loading hir and accessing an attr

r? `@ghost`
2023-05-02 17:49:39 +00:00
Manish Goregaokar
638287681a Regen baked data 2023-05-02 10:45:16 -07:00
Manish Goregaokar
522eeba412 Update ICU4X to 1.2 2023-05-02 10:45:16 -07:00
Boxy
4d0887e1a2 correctly recurse when expanding anon consts 2023-05-02 18:42:55 +01:00
Camille GILLOT
a4ef2f5fca Make ConstProp tests unit. 2023-05-02 16:46:56 +00:00
Oli Scherer
7bc6d598f9 Avoid ICEing miri on layout query cycles 2023-05-02 16:14:20 +00:00
clubby789
e3e93f2867 Use GrowableBitSet to store positional indexes in asm! 2023-05-02 16:42:36 +01:00
clubby789
1590350836 Remove allow(rustc::potential_query_instability) for builtin_macros 2023-05-02 16:33:00 +01:00
Maybe Waffle
36f86936b2 --bless tests 2023-05-02 14:48:39 +00:00
Maybe Waffle
04305c05d3 Remove [] <-> () From convertions
... with this convertions some tests fail :(
2023-05-02 14:37:40 +00:00
Maybe Waffle
4d04a062c8 Use metavar ${count(x)} instead of reimplementing it 2023-05-02 14:37:40 +00:00
Maybe Waffle
9fba2622a0 implement tuple<->array convertions via From 2023-05-02 14:37:40 +00:00
Vadim Petrochenkov
ef77dd232d resolve: One more attempt to simplify module_children 2023-05-02 17:21:08 +03:00
bors
9d795a6e6e Auto merge of #111082 - saethlin:box-assertkind, r=saethlin
Box AssertKind

r? `@nnethercote` this feels like your kind of thing

I want to add a new variant to `AssertKind` that needs 3 operands, and that ends up breaking a bunch of size assertions. So... what if we go the opposite direction first; shrinking `AssertKind` by boxing it?
2023-05-02 14:02:29 +00:00
bjorn3
8a08514dbd Add needs-unwind annotations to tests that need stack unwinding 2023-05-02 12:07:55 +00:00
Deadbeef
d30c668175 make cook generic 2023-05-02 10:32:08 +00:00
Deadbeef
6d905a8cc1 fix tidy 2023-05-02 10:32:08 +00:00
Deadbeef
abb181dfd9 make it semantic error 2023-05-02 10:32:08 +00:00
Deadbeef
bf3ca5979e try gating early, add non-ascii test 2023-05-02 10:32:08 +00:00
Deadbeef
78e3455d37 address comments 2023-05-02 10:32:07 +00:00
Deadbeef
4c01d494b8 refactor unescape 2023-05-02 10:32:07 +00:00
Deadbeef
d5e7206ca6 rm diag item, use lang item 2023-05-02 10:32:07 +00:00
Deadbeef
a49570fd20 fix TODO comments 2023-05-02 10:32:07 +00:00
Deadbeef
76d1f93896 update and add a few tests 2023-05-02 10:30:09 +00:00
Deadbeef
8ff3903643 initial step towards implementing C string literals 2023-05-02 10:30:09 +00:00