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
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
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
clubby789
696f182191
Fix non_exhaustive_omitted_patterns
lint span
2023-04-02 16:37:23 +01: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
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
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
Matthias Krüger
8ef3bf29fe
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-01 23:16:33 +02:00
clubby789
46f7d3deb7
Fix non_exhaustive_omitted_patterns
on arguments
2023-04-01 19:15:24 +01:00
Michael Howell
000e94e67d
diagnostics: account for glob shadowing when linting redundant imports
...
Co-Authored-By: Vadim Petrochenkov <vadim.petrochenkov@gmail.com>
2023-04-01 11:11:21 -07:00
bors
87e6b621a2
Auto merge of #109721 - QuinnPainter:armv4t-lld, r=petrochenkov
...
Switch to LLD as default linker for {arm,thumb}v4t-none-eabi
The LLVM 16 update brought ARMv4t support to LLD. We should use it by default so users don't need to install an external linker.
cc `@Lokathor`
2023-04-01 01:55:16 +00:00
bors
fadf164d8d
Auto merge of #109165 - aliemjay:fix-ice-annotation, r=davidtwco
...
allow ReError in CanonicalUserTypeAnnotation
Why not? we already allow `TyKind::Error`.
Fixes #109072 .
2023-03-31 23:15:52 +00:00
bors
5e1d3299a2
Auto merge of #109824 - GuillaumeGomez:rollup-i5r4uts, r=GuillaumeGomez
...
Rollup of 7 pull requests
Successful merges:
- #109104 (rustdoc: Fix invalid suggestions on ambiguous intra doc links v2)
- #109443 (Move `doc(primitive)` future incompat warning to `invalid_doc_attributes`)
- #109680 (Fix subslice capture in closure)
- #109798 (fluent_messages macro: don't emit the OS error in a note)
- #109805 (Source map cleanups)
- #109818 (rustdoc: Add GUI test for jump to collapsed item)
- #109820 (rustdoc-search: update docs for comma in `?` help popover)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
2023-03-31 20:38:06 +00:00
Guillaume Gomez
d732934fa8
Rollup merge of #109805 - nnethercote:source_map-cleanups, r=bjorn3
...
Source map cleanups
r? `@bjorn3`
2023-03-31 22:32:50 +02:00
Guillaume Gomez
bd4e3f37da
Rollup merge of #109798 - est31:ftl_test_note, r=davidtwco
...
fluent_messages macro: don't emit the OS error in a note
This makes it possible to make the normalization of the error message precise, allowing us to not normalize all notes away. See https://github.com/rust-lang/rust/pull/109700#discussion_r1152489053
2023-03-31 22:32:50 +02:00
Guillaume Gomez
45fcb6fd7c
Rollup merge of #109680 - clubby789:array-subslice-2229, r=davidtwco
...
Fix subslice capture in closure
Fixes #109298 by refining captures in the same way for Subslices and Indexes. The comment `// we never capture this` seems to have been inaccurate, as changing it to an assert causes many test failures
`@rustbot` label +A-closures
2023-03-31 22:32:49 +02:00