163917 Commits

Author SHA1 Message Date
Caio
d956c8b816 5 - Make more use of let_chains 2022-02-28 15:52:36 -03:00
Esteban Kuber
f42b4f595e Tweak diagnostics
* Recover from invalid `'label: ` before block.
* Make suggestion to enclose statements in a block multipart.
* Point at `match`, `while`, `loop` and `unsafe` keywords when failing
  to parse their expression.
* Do not suggest `{ ; }`.
* Do not suggest `|` when very unlikely to be what was wanted (in `let`
  statements).
2022-02-28 18:22:45 +00:00
Jubilee Young
4de99e187c Sync rust-lang/portable-simd@5f49d4c843 2022-02-28 10:17:40 -08:00
Guillaume Gomez
8f36d4a536 Update ui test with the add of E0726 explanation 2022-02-28 15:51:05 +01:00
Guillaume Gomez
911de7b98c Add explanation for E0726 2022-02-28 15:51:05 +01:00
Eric Huss
31267e8007 Fix extracting submodules on windows. 2022-02-28 06:31:50 -08:00
Eric Huss
fa73cf932b Error if submodule fetch fails. 2022-02-28 06:30:45 -08:00
bors
97cde9fe08 Auto merge of - matthiaskrgr:rollup-d8rj2xv, r=matthiaskrgr
Rollup of 5 pull requests

Successful merges:

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

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2022-02-28 14:20:13 +00:00
Matthias Krüger
ea39f46cad
Rollup merge of - mati865:fix-mingw-detection-for-rawdylib, r=michaelwoerister
Fix MinGW target detection in raw-dylib

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

It was one of concerns in https://github.com/rust-lang/rust/pull/88801 that was not fixed in https://github.com/rust-lang/rust/pull/90782.
2022-02-28 12:57:48 +01:00
Matthias Krüger
01ffa5fa0c
Rollup merge of - lsimons:patch-1, r=Dylan-DPC
Fix broken link from rustdoc docs to ayu theme
2022-02-28 12:57:47 +01:00
Matthias Krüger
4115c3f1ac
Rollup merge of - cameron1024:issue-90847-regression, r=Mark-Simulacrum
regression for issue 90847

Adds a regression test for issue 
2022-02-28 12:57:46 +01:00
Matthias Krüger
354e014b84
Rollup merge of - avborhanian:master, r=Dylan-DPC
Update search location from a relative path to absolute

This should address issue .
2022-02-28 12:57:45 +01:00
Matthias Krüger
770ee32b34
Rollup merge of - ibraheemdev:from_ptr_range, r=m-ou-se
Add `slice::{from_ptr_range, from_mut_ptr_range} `

Adds `slice::{from_ptr_range, from_mut_ptr_range}` as counterparts to `slice::{as_ptr_range, as_mut_ptr_range}`.
2022-02-28 12:57:44 +01:00
bors
edda7e959d Auto merge of - psumbera:sparc64-abi-fix2, r=nagisa
more complete sparc64 ABI fix for aggregates with floating point members

Previous fix didn't handle nested structures at all.
2022-02-28 11:54:17 +00:00
Caio
e3e902bb06 4 - Make more use of let_chains
Continuation of .

cc 
2022-02-28 07:49:56 -03:00
bors
48132caac2 Auto merge of - cjgillot:inline-fresh-expn, r=oli-obk
Only create a single expansion for each inline integration.

The inlining integrator used to create one expansion for each span from the callee body.
This PR reverses the logic to create a single expansion for the whole call,
which is more consistent with how macro expansions work for macros.

This should remove the large memory regression in .
2022-02-28 08:25:26 +00:00
bors
427cf81206 Auto merge of - erikdesjardins:more-more-noundef, r=nikic
Apply noundef metadata to loads of types that do not permit raw init

This matches the noundef attributes we apply on arguments/return types.

Fixes (partially) .
2022-02-28 06:11:20 +00:00
Michael Goulet
ca6e06efba make GATs print properly in traits 2022-02-27 21:36:29 -08:00
Michael Goulet
8a0c2c4e83 move method out of nesting 2022-02-27 21:03:56 -08:00
Erik Desjardins
dce14cfacc Remove LLVM attribute removal
This was necessary before, because `declare_raw_fn` would always apply
the default optimization attributes to every declared function,
and then `attributes::from_fn_attrs` would have to remove the default
attributes in the case of, e.g. `#[optimize(speed)]` in a `-Os` build.

However, every relevant callsite of `declare_raw_fn` (i.e. where we
actually generate code for the function, and not e.g. a call to an
intrinsic, where optimization attributes don't [?] matter)
calls `from_fn_attrs`, so we can simply remove the attribute setting
from `declare_raw_fn`, and rely on `from_fn_attrs` to apply the correct
attributes all at once.
2022-02-28 00:02:11 -05:00
DrMeepster
d316aba04c expadn abi check + condese & fix tests 2022-02-27 20:25:16 -08:00
Erik Desjardins
0c78433749 update vec-shrink-panik test to allow panic_no_unwind in landingpads 2022-02-27 23:15:49 -05:00
Erik Desjardins
851fcc7a54 Revert "Auto merge of - erikdesjardins:coldland, r=nagisa"
This reverts commit 4f49627c6fe2a32d1fed6310466bb0e1c535c0c0, reversing
changes made to 028c6f1454787c068ff5117e9000a1de4fd98374.
2022-02-27 23:11:03 -05:00
Michael Goulet
75430670b3 only check method inputs once 2022-02-27 19:47:40 -08:00
bors
ec0ab61e8a Auto merge of - RalfJung:miri, r=RalfJung
update Miri

Fixes https://github.com/rust-lang/rust/issues/94318
r? `@ghost`
2022-02-28 03:44:19 +00:00
Michael Goulet
025b7c433c fix ICE when passing empty block to while-loop condition 2022-02-27 19:27:50 -08:00
Ralf Jung
a538b185f0 update Miri 2022-02-27 22:04:00 -05:00
bors
b07d59f794 Auto merge of - matthiaskrgr:rollup-1jsj0wu, r=matthiaskrgr
Rollup of 7 pull requests

Successful merges:

 -  (1 - Make more use of `let_chains`)
 -  (Document that pre-expansion lint passes are softly deprecated)
 -  (Add test for  to prevent regression)
 -  (avoid rebuilding bootstrap when PATH changes)
 -  (Use the first codegen backend in the config.toml as default)
 -  (Fix duplicated impl links)
 -  (3 - Make more use of `let_chains`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2022-02-28 01:18:01 +00:00
Michael Goulet
5ce3f56641 Make deref suggestion better 2022-02-27 16:20:18 -08:00
Ibraheem Ahmed
aac0281d30 add slice::{from_ptr_range, from_mut_ptr_range} 2022-02-27 16:53:26 -05:00
bors
9fbff89354 Auto merge of - erikdesjardins:more-noundef, r=nikic
Apply noundef attribute to all scalar types which do not permit raw init

Beyond `&`/`&mut`/`Box`, this covers `char`, enum discriminants, `NonZero*`, etc.
All such types currently cause a Miri error if left uninitialized,
and an `invalid_value` lint in cases like `mem::uninitialized::<char>()`.

Note that this _does not_ change whether or not it is UB for `u64` (or
other integer types with no invalid values) to be undef.

Fixes (partially) .

r? `@ghost` (blocked on )

`@rustbot` label S-blocked
2022-02-27 21:41:06 +00:00
Matthias Krüger
5570b1de40
Rollup merge of - c410-f3r:more-let-chains, r=Dylan-DPC
3 - Make more use of `let_chains`

Continuation of .

cc 
2022-02-27 21:46:38 +01:00
Matthias Krüger
04ecf52a48
Rollup merge of - GuillaumeGomez:fix-duplicated-impl-links, r=notriddle
Fix duplicated impl links

Fixes .

The problem is that the blanket impl has the same ID as the other impl, except that we don't derive IDs when we generate the sidebar. We now do.

r? ``@notriddle``
2022-02-27 21:46:37 +01:00
Matthias Krüger
c930884619
Rollup merge of - bjorn3:cfg_default_backend, r=Mark-Simulacrum
Use the first codegen backend in the config.toml as default

It is currently hard coded to llvm if enabled and cranelift otherwise.
This made some sense when cranelift was the only alternative codegen
backend. Since the introduction of the gcc backend this doesn't make
much sense anymore. Before this PR bootstrapping rustc using a backend
other than llvm or cranelift required changing the source of
rustc_interface. With this PR it becomes a matter of putting the right
backend as first enabled backend in config.toml.

cc ```@antoyo```
2022-02-27 21:46:36 +01:00
Matthias Krüger
736dae2f71
Rollup merge of - RalfJung:path, r=Mark-Simulacrum
avoid rebuilding bootstrap when PATH changes

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

r? ```@Mark-Simulacrum```
2022-02-27 21:46:35 +01:00
Matthias Krüger
19958c2d09
Rollup merge of - GuillaumeGomez:regression-test-79465, r=matthiaskrgr
Add test for  to prevent regression

Fixes .

Like this we will be able to close the issue.

r? ````@matthiaskrgr````
2022-02-27 21:46:34 +01:00
Matthias Krüger
9373d8b6ae
Rollup merge of - xFrednet:69838-deprecate-pre-expansion, r=cjgillot
Document that pre-expansion lint passes are softly deprecated

The pre-expansion lint pass has been softly deprecated since https://github.com/rust-lang/rust/pull/69838. Every once in a while I see someone mention it as a possibility, only get the feedback that it's deprecated. This PR officially documents that the method is soft deprecated to have a single point of truth for it.

That's it. Have a great rest of the day 🙃

---

* See [rust#69838](https://github.com/rust-lang/rust/pull/69838)
* See [rust-clippy#5518](https://github.com/rust-lang/rust-clippy/pull/5518)
2022-02-27 21:46:34 +01:00
Matthias Krüger
8cdafbf068
Rollup merge of - c410-f3r:yet-more-let-chains, r=Dylan-DPC
1 - Make more use of `let_chains`

Continuation of .

cc 
2022-02-27 21:46:33 +01:00
Simonas Kazlauskas
dfcfaa4ec1 Do not pass through features without +/- prefix
LLVM really dislikes this and will assert, saying something along the
lines of:

```
rustc: llvm/lib/MC/MCSubtargetInfo.cpp:60: void ApplyFeatureFlag(
  llvm::FeatureBitset&, llvm::StringRef, llvm::ArrayRef<llvm::SubtargetFeatureKV>
): Assertion
  `SubtargetFeatures::hasFlag(Feature) && "Feature flags should start with '+' or '-'"`
failed.
```
2022-02-27 21:21:38 +02:00
Erik Desjardins
45ee3fc700 make pgo-branch-weights test not dependent on argument attributes 2022-02-27 13:41:43 -05:00
Camille GILLOT
e77e4fcf89 Only create a single expansion for each inline integration. 2022-02-27 19:05:56 +01:00
bors
6a70556616 Auto merge of - scottmcm:cfg-out-miri-from-swap, r=oli-obk
For MIRI, cfg out the swap vectorization logic from 94212

Because of  the swap logic from  doesn't currently work in MIRI.

Copying in smaller pieces is probably much worse for its performance anyway, so it'd probably rather just use the simple path regardless.

Part of , though another PR will be needed for the CTFE aspect.

r? `@oli-obk`
cc `@RalfJung`
2022-02-27 17:42:48 +00:00
Erik Desjardins
fec4335407 Apply noundef metadata to loads of types that do not permit raw init
This matches the noundef attributes we apply on arguments/return types.
2022-02-27 12:16:16 -05:00
Ruby Lazuli
6dcf5d8fde
Lint against more useless #[must_use] attributes
This expands the existing `#[must_use]` check in `unused_attributes`
to lint against pretty much everything `#[must_use]` doesn't support.
Fixes .
2022-02-27 08:52:37 -06:00
Caio
0eb8b32de3 3 - Make more use of let_chains
Continuation of .

cc 
2022-02-27 11:10:20 -03:00
bors
3b1fe7e7c9 Auto merge of - Mark-Simulacrum:drop-sharded, r=cjgillot
Avoid query cache sharding code in single-threaded mode

In non-parallel compilers, this is just adding needless overhead at compilation time (since there is only one shard statically anyway). This amounts to roughly ~10 seconds reduction in bootstrap time, with overall neutral (some wins, some losses) performance results.

Parallel compiler performance should be largely unaffected by this PR; sharding is kept there.
2022-02-27 14:04:07 +00:00
bors
bab4c13f64 Auto merge of - c410-f3r:more-let-chains, r=Dylan-DPC
2 - Make more use of `let_chains`

Continuation of .

cc 
2022-02-27 11:45:55 +00:00
Guillaume Gomez
9b8a6b97e5 Add test to ensure that links to impls are correctly generated 2022-02-27 12:07:54 +01:00
Guillaume Gomez
7e0a2a765e Correctly generate links in the sidebar for impls 2022-02-27 12:07:38 +01:00
bjorn3
7ad4297a49 Use the first codegen backend in the config.toml as default
It is currently hard coded to llvm if enabled and cranelift otherwise.
This made some sense when cranelift was the only alternative codegen
backend. Since the introduction of the gcc backend this doesn't make
much sense anymore. Before this PR bootstrapping rustc using a backend
other than llvm or cranelift required changing the source of
rustc_interface. With this PR it becomes a matter of putting the right
backend as first enabled backend in config.toml.
2022-02-27 11:28:05 +01:00