zhaixiaojuan
ad26dab27c
Initial support for loongarch64-unknown-linux-gnu
2023-04-04 17:05:07 +08:00
Oli Scherer
54214c8d8d
Use a simpler atomic operation than the compare_exchange hammer
2023-04-04 09:01:44 +00:00
Oli Scherer
300901b705
Use new iteration helpers instead of manually rolling them
2023-04-04 09:01:44 +00:00
Oli Scherer
a1d20cf7a2
Another AppendOnlyVec
2023-04-04 09:01:44 +00:00
Oli Scherer
7edd1d8799
Replace another lock with an append-only vec
2023-04-04 09:01:44 +00:00
Oli Scherer
4699632637
Remove a lock in favor of an AppendOnlyVec
2023-04-04 09:01:44 +00:00
Oli Scherer
daee746771
Add a usize-indexed append-only-vec
2023-04-04 09:01:44 +00:00
Oli Scherer
c7a3a943f2
Replace a lock with an atomic
2023-04-04 09:01:44 +00:00
Oli Scherer
aad33198ff
Remove a fishy Clone impl
2023-04-04 09:01:44 +00:00
kadmin
648a35e327
Add ability to transmute with generic consts
...
Previously if the expression contained generic consts and did not have a directly equivalent
type, transmuting the type in this way was forbidden, despite the two sizes being identical.
Instead, we should be able to lazily tell if the two consts are identical, and if so allow them
to be transmuted.
2023-04-04 08:05:15 +00:00
SparrowLii
8b21f9ee22
write threads info into log only when debugging
2023-04-04 15:31:37 +08:00
bors
35d06f9c74
Auto merge of #109599 - notriddle:notriddle/use-redundant-glob, r=petrochenkov
...
diagnostics: account for glob shadowing when linting redundant imports
Fixes #92904
2023-04-04 06:41:27 +00:00
Tam Pham
87b3ae3909
Make "unneccesary visibility qualifier" error much more clear
2023-04-03 21:52:27 -05:00
Amanieu d'Antras
69e3f7a30d
Disable has_thread_local on OpenHarmony
...
OpenHarmony uses emulated TLS, which doesn't link properly when using
thread-local variables across crate boundaries with `-C prefer-dynamic`.
This PR makes thread_local! use pthreads directly instead.
2023-04-04 02:42:42 +01:00
Michael Goulet
1b5ac39908
dyn* is a valid const
2023-04-04 00:28:05 +00:00
Michael Goulet
a368316905
Remove intercrate and mark_ambiguous from Relation
2023-04-04 00:09:12 +00:00
Scott McMurray
5c3e5af2ed
Doc-comment IndexVec::from_elem and use it in a few more places
2023-04-03 14:29:32 -07:00
Michael Goulet
ab0b9356e6
Emit feature error for parenthesized generics in associated type bounds
2023-04-03 21:20:48 +00:00
Yuki Okushi
7d3207be97
Rollup merge of #109896 - Nilstrieb:integers-are-not-fn-ptrs-remember-this-dear-transmuter, r=compiler-errors
...
Never consider int and float vars for `FnPtr` candidates
This solves a regression where `0.0.cmp()` was ambiguous when a custom trait with a `cmp` method was in scope.
For integers it shouldn't be a problem in practice so I wasn't able to add a test.
I'm not sure whether there could be more issues hidden in the shadows as mentioned in the issue, but this should at least fix the problematic regression immediately.
fixes #109892
r? oli-obk
2023-04-04 05:52:35 +09:00
Camille GILLOT
a84909c1e7
Enforce VarDebugInfo::Place in MIR validation.
2023-04-03 17:44:12 +00:00
bors
bf41e753ec
Auto merge of #109819 - scottmcm:index-slice, r=WaffleLapkin
...
Use `&IndexSlice` instead of `&IndexVec` where possible
All the same reasons as for `[T]`: more general, less pointer chasing, and `&mut IndexSlice` emphasizes that it doesn't change *length*.
r? `@ghost`
2023-04-03 16:41:49 +00:00
Camille GILLOT
a8187f8cb1
Rename hir_id to lint_root.
2023-04-03 16:16:14 +00:00
Camille GILLOT
03a6ef67fe
Only emit lint on refutable patterns.
2023-04-03 16:13:06 +00:00
Camille GILLOT
03fbb3db1e
Expand parameters.
2023-04-03 15:59:21 +00:00
Camille GILLOT
e73aeeaeee
Remove redundant field.
2023-04-03 15:59:21 +00:00
Camille GILLOT
4f97540432
Reinstate confusion note.
2023-04-03 15:59:21 +00:00
Camille GILLOT
5d8161c570
Hide warning.
2023-04-03 15:59:21 +00:00
Camille GILLOT
4240a0bed0
Cleanup PatCtxt.
2023-04-03 15:59:21 +00:00
Camille GILLOT
05082f57af
Perform match checking on THIR.
2023-04-03 15:59:21 +00:00
Camille GILLOT
3b47cdc439
Add Span to StmtKind::Let.
2023-04-03 15:59:21 +00:00
Camille GILLOT
28d74a9b72
Shrink binding span.
2023-04-03 15:59:21 +00:00
Camille GILLOT
fea7b59d12
Make check_match take a LocalDefId.
2023-04-03 15:59:21 +00:00
Nilstrieb
ca79b82c6c
Never consider int and float vars for FnPtr candidates
...
This solves a regression where `0.0.cmp()` was ambiguous when a custom
trait with a `cmp` method was in scope.
FOr integers it shouldn't be a problem in practice so I wasn't able to
add a test.
2023-04-03 15:25:06 +00:00
Pietro Albini
ef2bf6d505
implement --print=all-target-specs-json
2023-04-03 09:24:14 +02:00
bohan
d8a4e7cf51
fix(middle): emit error rather than delay bug when reaching limit
2023-04-03 11:08:14 +08:00
Scott McMurray
a2ee7592d6
Use &IndexSlice instead of &IndexVec where possible
...
All the same reasons as for `[T]`: more general, less pointer chasing, and `&mut IndexSlice` emphasizes that it doesn't change *length*.
2023-04-02 17:35:37 -07:00
bors
a93bcdc307
Auto merge of #109849 - scottmcm:more-fieldidx-rebase, r=oli-obk
...
Use `FieldIdx` in various things related to aggregates
Shrank `AggregateKind` by 8 bytes on x64, since the active field of a union is tracked as an `Option<FieldIdx>` instead of `Option<usize>`.
Part 3/? of https://github.com/rust-lang/compiler-team/issues/606
[`IndexSlice`](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_index/vec/struct.IndexVec.html#deref-methods-IndexSlice%3CI,+T%3E ) was added in https://github.com/rust-lang/rust/pull/109787
2023-04-02 21:40:29 +00:00
Tom Martin
56207b8faf
Skip help messages if macro span is from macro
2023-04-02 19:01:52 +01:00
clubby789
696f182191
Fix non_exhaustive_omitted_patterns lint span
2023-04-02 16:37:23 +01:00
Zachary Yedidia
48be303272
Add riscv relax target feature
2023-04-02 07:30:42 -07:00
bors
a5a690cf4b
Auto merge of #109008 - clubby789:drop-elaborate-array, r=davidtwco
...
Drop array patterns using subslices
Fixes #109004
Drops contiguous subslices of an array when moving elements out with a pattern, which improves perf for large arrays
r? `@compiler-errors`
2023-04-02 12:17:52 +00:00
Nilstrieb
59f394bf86
Rollup merge of #109846 - matthiaskrgr:clippy2023_04_III, r=Nilstrieb
...
more clippy::complexity fixes (iter_kv_map, map_flatten, nonminimal_bool)
2023-04-02 10:08:35 +02:00
Nilstrieb
e2ffe151a3
Rollup merge of #109844 - matthiaskrgr:clippy2023_04, r=Nilstrieb
...
a couple clippy::complexity fixes
map_identity
filter_next
option_as_ref_deref
unnecessary_find_map
redundant_slicing
unnecessary_unwrap
bool_comparison
derivable_impls
manual_flatten
needless_borrowed_reference
2023-04-02 10:08:34 +02:00
Mu42
80e4285531
Make each idx is used once
2023-04-02 11:41:50 +08:00
Scott McMurray
b5b6def021
Use FieldIdx in various things related to aggregates
...
Shrank `AggregateKind` by 8 bytes on x64, since the active field of a union is tracked as an `Option<FieldIdx>` instead of `Option<usize>`.
2023-04-01 20:32:50 -07:00
Mu42
bbfbecd59f
Do not repeat idx
2023-04-02 10:48:01 +08:00
clubby789
47ae42ee10
Only create graphviz nodes for reachable MIR bb's
2023-04-01 23:14:18 +01:00
Matthias Krüger
73bd953dea
slighty simplify a few boolean expressions (clippy::nonminimal_bool)
2023-04-01 23:55:22 +02:00
Matthias Krüger
5a07e33d2c
use and_then/flat_map for map().flatten()
2023-04-01 23:50:45 +02:00
Matthias Krüger
ac229c2819
fix clippy::iter_kv_map
2023-04-01 23:44:16 +02:00