Commit Graph

224369 Commits

Author SHA1 Message Date
WANG Rui
8ad78cb02c Mark LoongArch float-point condition flags as clobbered in inline assembly 2023-05-08 11:05:46 +08:00
yukang
20e6e6a493 cleanup 2023-05-08 10:56:20 +08:00
yukang
0bb43c63c3 Suggest let for possible binding with ty 2023-05-08 10:56:20 +08:00
bors
04c53444df Auto merge of #111309 - saethlin:InstSimplify, r=scottmcm
Rename InstCombine to InstSimplify

```
╭ ➜ ben@archlinux:~/rust
╰ ➤ rg -i instcombine
src/doc/rustc-dev-guide/src/mir/optimizations.md
134:may have been misapplied. Examples of this are `InstCombine` and `ConstantPropagation`.

src/ci/docker/host-x86_64/disabled/dist-x86_64-haiku/llvm-config.sh
38:                    instcombine instrumentation interpreter ipo irreader lanai \

tests/codegen/slice_as_from_ptr_range.rs
4:// min-llvm-version: 15.0 (because this is a relatively new instcombine)
```

r? `@scottmcm`
2023-05-08 01:28:50 +00:00
Wang Qilin
bb4976ab2d supplement CHANGELOG for add rpath in target section 2023-05-08 09:13:42 +08:00
bors
ad6b20bf52 Auto merge of #111306 - Urgau:hashbrown-std-0.13, r=Amanieu
Update hashbrown from 0.12.3 to 0.13.1 for std

This PR updates hashbrown from 0.12.3 to 0.13.1 for std.

r? `@Amanieu`
2023-05-07 22:51:44 +00:00
bors
3d5a516710 Auto merge of #2878 - RalfJung:rustup, r=RalfJung
Rustup
2023-05-07 21:06:36 +00:00
Ralf Jung
e476f7ac36 Merge from rustc 2023-05-07 23:05:40 +02:00
Ralf Jung
ce3a2e5eb9 Preparing for merge from rustc 2023-05-07 23:05:30 +02:00
bors
c4190f2d3a Auto merge of #111224 - jyn514:default-tidy, r=pietroalbini
Remove `tidy` key in PR CI

This avoids confusing error messages when adding an `auto` job to CI (as recommended in the dev-guide: https://rustc-dev-guide.rust-lang.org/tests/ci.html#using-ci-to-test).

cc https://rust-lang.zulipchat.com/#narrow/stream/182449-t-compiler.2Fhelp/topic/Do.20.60needs-profiler-support.60.20tests.20not.20run.20in.20CI.3F/near/355302998

r? `@ghost`
2023-05-07 17:17:58 +00:00
Nilstrieb
f2645776dc Use smaller ints for bitflags 2023-05-07 18:24:46 +02:00
jyn
654f56e086 Give a more helpful error when running the rustc shim directly
cc https://rust-lang.zulipchat.com/#narrow/stream/326414-t-infra.2Fbootstrap/topic/Building.20.60coretests.60.20by.20hand
2023-05-07 11:20:16 -05:00
Nikolay Arhipov
3ba3df3764 PS Vita std support 2023-05-07 18:57:43 +03:00
bors
613a5c95ae Auto merge of #111222 - scottmcm:constify-is_ascii, r=thomcc
Constify `[u8]::is_ascii` (unstably)

UTF-8 checking in `const fn`-stabilized back in 1.63 (#97367), but apparently somehow ASCII checking was never const-ified, despite being simpler.

New constness-tracking issue for `is_ascii`: #111090

I noticed this working on `ascii::Char`: #110998
2023-05-07 14:18:05 +00:00
Caleb Zulawski
50416fcc2c
Merge pull request #345 from Sp00ph/from_to_slice
Use the new `load`/`store` functions in `{from,to}_slice`
2023-05-07 08:16:26 -04:00
Caleb Zulawski
45413e468d
Merge pull request #346 from Sp00ph/update_safety
Fix inaccurate safety comments
2023-05-07 08:16:05 -04:00
Gary Guo
8bafcdeac3 Add #[inline] to functions that are never called 2023-05-07 12:41:37 +01:00
Gary Guo
16abe6c83d Fix codegen test 2023-05-07 12:38:47 +01:00
Gary Guo
91afde57a2 Add todo for filter landing pad 2023-05-07 12:38:47 +01:00
Gary Guo
97926360e7 Fix num reserved clauses for landing pad 2023-05-07 12:38:47 +01:00
Gary Guo
ecd04fd1b5 Add test for unwinding past terminating POF 2023-05-07 12:38:47 +01:00
Gary Guo
37f7d322b8 Prevent aborting guard from aborting the process in a forced unwind 2023-05-07 12:35:54 +01:00
Gary Guo
62237536da Parse catch filter in personality function 2023-05-07 12:35:54 +01:00
Gary Guo
47171e0c50 Use landingpad filter to encode aborting landing pad 2023-05-07 12:35:54 +01:00
bors
0dddad0dc5 Auto merge of #111161 - compiler-errors:rtn-super, r=cjgillot
Support return-type bounds on associated methods from supertraits

Support `T: Trait<method(): Bound>` when `method` comes from a supertrait, aligning it with the behavior of associated type bounds (both equality and trait bounds).

The only wrinkle is that I have to extend `super_predicates_that_define_assoc_type` to look for *all* items, not just `AssocKind::Ty`. This will also be needed to support `feature(associated_const_equality)` as well, which is subtly broken when it comes to supertraits, though this PR does not fix those yet. There's a slight chance there's a perf regression here, in which case I guess I could split it out into a separate query.
2023-05-07 11:18:22 +00:00
Camille GILLOT
a8988519d5 Propagate PlaceElem::Index. 2023-05-07 11:10:52 +00:00
Arpad Borsos
48dfbeee27
Remove identity_future from stdlib
This function/lang_item was introduced in #104321 as a temporary workaround of future lowering.
The usage and need for it went away in #104833.
After a bootstrap update, the function itself can be removed from `std`.
2023-05-07 10:52:01 +02:00
bors
8660707bb2 Auto merge of #111125 - xfix:inline-socketaddr-methods, r=Mark-Simulacrum
Inline SocketAddr methods
2023-05-07 08:20:11 +00:00
Scott McMurray
c8c5a587ac Tune the is_ascii implementation used for short slices 2023-05-06 22:56:43 -07:00
Kyle Matsuda
d27f40175f changes from review: add FIXME to clippy and change subst_identity to skip_binder in mir subst methods 2023-05-06 23:36:04 -06:00
bors
8cc75b56a6 Auto merge of #111311 - JohnTitor:rollup-vfpjm0d, r=JohnTitor
Rollup of 7 pull requests

Successful merges:

 - #105583 (Operand::extract_field: only cast llval if it's a pointer and replace bitcast w/ pointercast.)
 - #110094 (clean up `transmute`s in `core`)
 - #111150 (added TraitAlias to check_item() for missing_docs)
 - #111293 (rustc --explain E0726 - grammar fixing (it's => its + add a `the` where it felt right to do so))
 - #111300 (Emit while_true lint spanning the entire loop condition)
 - #111301 (Remove calls to `mem::forget` and `mem::replace` in `Option::get_or_insert_with`.)
 - #111303 (update Rust Unstable Book docs for `--extern force`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2023-05-07 05:20:29 +00:00
Yuki Okushi
8372eaee0b
Rollup merge of #111303 - mhammerly:extern-force-docs, r=JohnTitor
update Rust Unstable Book docs for `--extern force`

Options for `--extern` are documented in [The Rust Unstable Book](https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/extern-options.html). https://github.com/rust-lang/rust/pull/109421 added a new `force` option and this PR updates the documentation accordingly.
2023-05-07 14:12:17 +09:00
Yuki Okushi
816e0295b5
Rollup merge of #111301 - JohnBobbo96:cleanup_option_insert_methods, r=scottmcm
Remove calls to `mem::forget` and `mem::replace` in `Option::get_or_insert_with`.

This removes the unneeded calls to `mem::forget` and `mem::replace` in `Option::get_or_insert_with`.
2023-05-07 14:12:17 +09:00
Yuki Okushi
88a0204fcb
Rollup merge of #111300 - Flying-Toast:while_true_span_condition, r=compiler-errors
Emit while_true lint spanning the entire loop condition

The lint that suggests `loop {}` instead of `while true {}` has functionality to 'pierce' parenthesis in cases like `while (true) {}`. In these cases, the emitted span only went to the hi of the `true` itself, not spanning the entire loop condition.

Before:
```
warning: denote infinite loops with `loop { ... }`
 --> /tmp/foobar.rs:2:5
  |
2 |     while ((((((true)))))) {}
  |     ^^^^^^^^^^^^^^^^ help: use `loop`
  |
  = note: `#[warn(while_true)]` on by default
```

After:
```
warning: denote infinite loops with `loop { ... }`
 --> /tmp/foobar.rs:2:5
  |
2 |     while ((((((true)))))) {}
  |     ^^^^^^^^^^^^^^^^^^^^^^ help: use `loop`
  |
  = note: `#[warn(while_true)]` on by default
```

This is especially a problem for rustfix.
2023-05-07 14:12:16 +09:00
Yuki Okushi
4e4e5bf17d
Rollup merge of #111293 - Astroide:patch-1, r=compiler-errors
rustc --explain E0726 - grammar fixing (it's => its + add a `the` where it felt right to do so)

Very small fix
2023-05-07 14:12:16 +09:00
Yuki Okushi
61115cd753
Rollup merge of #111150 - mj10021:issue-111025-fix, r=petrochenkov
added TraitAlias to check_item() for missing_docs

As in issue #111025 the `missing_docs` was not being triggered for trait aliases.  I added `TraitAlias` to the pattern match for check_item(), and the lint seems to be behaving appropriately
2023-05-07 14:12:15 +09:00
Yuki Okushi
aef008aa6d
Rollup merge of #110094 - lukas-code:less-transmute, r=thomcc
clean up `transmute`s in `core`

* Use `transmute_unchecked` instead of `transmute_copy` for `MaybeUninit::transpose`.
* Use manual transmute for `Option<Ordering>` → `i8`.
2023-05-07 14:12:15 +09:00
Yuki Okushi
58597717e2
Rollup merge of #105583 - luqmana:bitcast-immediates, r=oli-obk
Operand::extract_field: only cast llval if it's a pointer and replace bitcast w/ pointercast.

Fixes #105439.

Also cc `@erikdesjardins,` looks like another place to cleanup as part of #105545
2023-05-07 14:12:14 +09:00
Kyle Matsuda
e4f6b8b43b make subst_mir take EarlyBinder 2023-05-06 22:32:39 -06:00
Kyle Matsuda
82f57c16b7 use EarlyBinder in tcx.(try_)subst_mir_and_normalize_erasing_regions 2023-05-06 22:32:39 -06:00
Kyle Matsuda
e5d10cdbc3 make (try_)subst_and_normalize_erasing_regions take EarlyBinder 2023-05-06 22:32:39 -06:00
Zalathar
27a3ce29e3 Fix instrument-coverage tests by using Python to sort instantiation groups 2023-05-07 13:47:14 +10:00
Ben Kimock
ff855547f4 Rename InstCombine to InstSimplify 2023-05-06 23:22:32 -04:00
bors
70a779cb7d Auto merge of #110693 - clubby789:x-clap-take-2, r=Mark-Simulacrum
Migrate bootstrap to Clap-based argument parsing

Supercedes #108083

I chose to re-do the work rather than rebase the onto the large changes since the original PR. If it's preferred I can instead force-push the original PR to this version.

cc `@jyn514` `@albertlarsan68`
2023-05-07 02:36:15 +00:00
Markus Everling
b246e45438 Fix inaccurate safety comments 2023-05-07 00:15:18 +00:00
Markus Everling
4967f25f6b Use the new load/store functions in {from,to}_slice 2023-05-07 00:11:56 +00:00
bors
34bee196cb Auto merge of #111304 - matthiaskrgr:rollup-b9twh7l, r=matthiaskrgr
Rollup of 7 pull requests

Successful merges:

 - #111002 (Fix the test directories suggested by `./x.py suggest`)
 - #111077 (Make more ConstProp tests unit.)
 - #111151 (check bootstrap scripts syntax)
 - #111203 (Output LLVM optimization remark kind in `-Cremark` output)
 - #111237 (asm: loongarch64: Implementation of clobber_abi)
 - #111274 (Expand the LLVM coverage of `--print target-cpus`)
 - #111289 (Check arguments length in trivial diagnostic lint)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2023-05-06 23:58:27 +00:00
Astroide
d6ef6e0080
Update compiler/rustc_error_codes/src/error_codes/E0726.md
Co-authored-by: Michael Goulet <michael@errs.io>
2023-05-06 19:39:08 -04:00
Ali MJ Al-Nasrawy
d548747c85 use implied bounds when checking opaque types 2023-05-07 01:41:20 +03:00
Urgau
0b9feea0a4 Update hashbrown from 0.12.3 to 0.13.1 for std 2023-05-07 00:35:55 +02:00