Santiago Pastorino
5295de1694
Add opt_rpitit_info query
2023-03-01 12:56:38 -03:00
bors
609496eecf
Auto merge of #108446 - Zoxc:named-allocs, r=oli-obk
...
Name LLVM anonymous constants by a hash of their contents
This makes the names stable between different versions of a crate unlike the `AllocId` naming, making LLVM IR comparisons with `llvm-diff` more practical.
2023-03-01 15:36:15 +00:00
y21
0758c05c97
recover from for-else and while-else
2023-03-01 13:26:59 +01:00
Michael Woerister
b79f0261f8
Do not implement HashStable for HashSet.
2023-03-01 10:20:45 +01:00
Michael Woerister
04e5fa3ce2
Remove last instances of HashSet in query result types.
2023-03-01 10:20:45 +01:00
Michael Woerister
422208ae52
Use UnordSet instead of FxHashSet for names_imported_by_glob_use query.
2023-03-01 10:20:43 +01:00
Michael Woerister
ee8bc5b0b2
Use FxIndexSet instead of FxHashSet for asm_target_features query.
2023-03-01 10:19:26 +01:00
Michael Woerister
b0202d9c2c
Use LocalDefIdSet/Map instead of FxHashSet/Map for live_symbols_and_ignored_derived_traits query.
2023-03-01 10:19:26 +01:00
Michael Woerister
f0eadbafd4
Use LocalDefIdSet instead of FxHashSet for reachable_set query.
2023-03-01 10:19:25 +01:00
Michael Woerister
5ff00f96e6
Use DefIdMap instead of FxHashMap for impl_item_implementor_ids query.
2023-03-01 10:19:25 +01:00
Nikita Popov
655a810b66
Print NewPM passes
...
-C passes=list was printing passes for the legacy pass manager.
Use PassBuilder::printPassNames() to print NewPM passes instead.
2023-03-01 09:26:00 +01:00
Nikita Popov
45f694dbba
Remove pass initialization code
...
This is no longer necessary with the new pass manager.
2023-03-01 09:24:13 +01:00
bors
bcb610da7f
Auto merge of #108587 - matthiaskrgr:rollup-rw6po59, r=matthiaskrgr
...
Rollup of 10 pull requests
Successful merges:
- #108376 (compiler/rustc_session: fix sysroot detection logic)
- #108400 (add llvm cgu instructions stats to perf)
- #108496 (fix #108495 , postfix decrement and prefix decrement has no warning)
- #108505 (Further unify validity intrinsics)
- #108520 (Small cleanup to `one_bound_for_assoc_type`)
- #108560 (Some `infer/mod.rs` cleanups)
- #108563 (Make mailmap more correct)
- #108564 (Fix `x clean` with specific paths)
- #108571 (Add contains_key to SortedIndexMultiMap)
- #108578 (Update Fuchsia platform team members)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
2023-03-01 06:23:19 +00:00
Eric Huss
15450b1b21
Fix the ffi_unwind_calls lint documentation
2023-02-28 19:58:57 -08:00
Matthias Krüger
168589426c
Rollup merge of #108571 - Jesse-Bakker:sorted_index_multi_map_contains_key, r=Nilstrieb
...
Add contains_key to SortedIndexMultiMap
2023-03-01 01:21:59 +01:00
Matthias Krüger
3ff3011afb
Rollup merge of #108560 - Nilstrieb:infer-cleanup, r=compiler-errors
...
Some `infer/mod.rs` cleanups
2023-03-01 01:21:58 +01:00
Matthias Krüger
35ef8ea5e1
Rollup merge of #108520 - compiler-errors:one-bound-nit, r=jackh726
...
Small cleanup to `one_bound_for_assoc_type`
Use fewer closures :)
2023-03-01 01:21:57 +01:00
Matthias Krüger
5af16c1655
Rollup merge of #108505 - Nilstrieb:further-unify-validity-intrinsics, r=michaelwoerister
...
Further unify validity intrinsics
Also merges the inhabitedness check into the query to further unify the
code paths.
Depends on #108364
2023-03-01 01:21:57 +01:00
Matthias Krüger
1c3cc8bba5
Rollup merge of #108496 - nx2k3:issue-108495-dec, r=WaffleLapkin
...
fix #108495 , postfix decrement and prefix decrement has no warning
Fixes #108495
2023-03-01 01:21:56 +01:00
Matthias Krüger
32d7024100
Rollup merge of #108400 - csmoe:cgu-instr-perf, r=bjorn3
...
add llvm cgu instructions stats to perf
r? ```@bjorn3```
2023-03-01 01:21:56 +01:00
Matthias Krüger
a51006b8d2
Rollup merge of #108555 - Zoxc:par-fix, r=cjgillot
...
Fix a race in the query system
This fixes an issue where in between the `job` removal and `complete` call the query neither has a job nor a result, allowing another thread to start executing it again.
r? ``@cjgillot``
2023-03-01 01:20:26 +01:00
Matthias Krüger
19604c2362
Rollup merge of #108554 - compiler-errors:late-bound-object-default, r=oli-obk
...
Only look for param in item's generics if it actually comes from generics
Record whether a `hir::GenericParam` comes from an item's generics, or from a `for<...>` binder. Then, only look for the param in `object_lifetime_default` if it actually comes from the item's generics.
Fixes #108177
2023-03-01 01:20:25 +01:00
Matthias Krüger
b2dc8c505c
Rollup merge of #108551 - compiler-errors:rpitit-bad-spec, r=oli-obk
...
Descriptive error when users try to combine RPITIT/AFIT with specialization
Previously we failed with some esoteric error like:
```
error[E0053]: method `foo` has an incompatible type for trait
--> $DIR/dont-project-to-specializable-projection.rs:14:35
|
LL | default async fn foo(_: T) -> &'static str {
| ^^^^^^^^^^^^ expected associated type, found future
|
note: type in trait
--> $DIR/dont-project-to-specializable-projection.rs:10:27
|
LL | async fn foo(_: T) -> &'static str;
| ^^^^^^^^^^^^
= note: expected signature `fn(_) -> impl Future<Output = &'static str>`
found signature `fn(_) -> impl Future<Output = &'static str>`
```
Now we error like:
```
error: async associated function in trait cannot be specialized
--> $DIR/dont-project-to-specializable-projection.rs:14:5
|
LL | default async fn foo(_: T) -> &'static str {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: specialization behaves in inconsistent and surprising ways with `#![feature(async_fn_in_trait)]`, and for now is disallowed
```
2023-03-01 01:20:24 +01:00
Matthias Krüger
78f9bb11fe
Rollup merge of #108550 - clubby789:remove-disjoint, r=compiler-errors
...
Remove the `capture_disjoint_fields` feature
As best I can tell, this was stabilized for Edition 2021 in #88126 but the feature was never removed.
2023-03-01 01:20:24 +01:00
Matthias Krüger
371904bba6
Rollup merge of #108297 - chenyukang:yukang/delim-error-exit, r=petrochenkov
...
Exit when there are unmatched delims to avoid noisy diagnostics
From https://github.com/rust-lang/rust/pull/104012#issuecomment-1311764832
r? ``@petrochenkov``
2023-03-01 01:20:22 +01:00
Nathan Fenner
be15f174fa
restore unaddressed FIXME
2023-02-28 14:59:32 -08:00
Nathan Fenner
f0212e6532
Fix error spans for arguments to tuple enum constructors
2023-02-28 14:58:14 -08:00
Michael Goulet
b7e0ca993d
Shift vars for default RPITIT methods correctly
2023-02-28 21:34:59 +00:00
Rune Tynan
79f0021c16
Update header comment
2023-02-28 15:52:00 -05:00
Rune Tynan
3a87a18857
Make zeroed return an Option
2023-02-28 15:39:17 -05:00
Michael Goulet
cb9852b8e6
Erase **all** regions when probing for associated types in astconv
2023-02-28 17:29:46 +00:00
liushuyu
2186358e5a
compiler/rustc_session: fix sysroot detection logic ...
...
... on systems where /usr/lib contains a multi-arch structure
2023-02-28 10:02:38 -07:00
Kornel
2407b0c578
Explain compile-time vs run-time difference in env!() error message
2023-02-28 16:44:59 +00:00
Jesse Bakker
edf053036f
Add contains_key to SortedIndexMultiMap
2023-02-28 17:15:00 +01:00
Maybe Waffle
031206bc1d
micro fmt changes
2023-02-28 19:28:14 +04:00
Nilstrieb
e326777cca
Some infer/mod.rs cleanups
2023-02-28 11:49:05 +00:00
Nathan Fenner
2566b4105d
Point error span at Some constructor argument when trait resolution fails
2023-02-27 23:58:35 -08:00
yukang
f808877bbf
refactor parse_token_trees to not return unmatched_delims
2023-02-28 07:57:17 +00:00
yukang
88de2e1115
no need to return unmatched_delims from tokentrees
2023-02-28 07:57:17 +00:00
yukang
9ce7472db4
rename unmatched_braces to unmatched_delims
2023-02-28 07:57:17 +00:00
yukang
65ad5f8de7
remove duplicated diagnostic for unclosed delimiter
2023-02-28 07:57:17 +00:00
yukang
f01d0c02e7
Exit when there are unmatched delims to avoid noisy diagnostics
2023-02-28 07:55:19 +00:00
bors
5157d938c4
Auto merge of #108098 - notriddle:notriddle/rustdoc-tooltip-alloc, r=GuillaumeGomez
...
rustdoc: reduce allocations when generating tooltips
An attempt to reduce the perf regression in
https://github.com/rust-lang/rust/pull/108052#issuecomment-1430631861
2023-02-28 07:27:32 +00:00
John Kåre Alsaker
10b08e3c9c
Fix a race in the query system
2023-02-28 07:47:58 +01:00
Michael Goulet
f851a8aefa
Only look for param in generics if it actually comes from generics
2023-02-28 06:27:56 +00:00
Michael Goulet
cbf4d4e3a5
Deny capturing late-bound non-lifetime param in anon const
2023-02-28 05:59:54 +00:00
bors
fd1f1fa0d1
Auto merge of #106774 - Nugine:master, r=Amanieu
...
Stabilize cmpxchg16b_target_feature
Tracking issue for target features
+ #44839
stdarch issue
+ https://github.com/rust-lang/stdarch/issues/827
stdarch PR
+ https://github.com/rust-lang/stdarch/pull/1358
reference PR
+ https://github.com/rust-lang/reference/pull/1331
It's my first time contributing to rust-lang/rust. Please tell me if I missed something.
2023-02-28 04:12:34 +00:00
Michael Goulet
ecac8fd5af
Descriptive error when users try to combine RPITIT/AFIT with specialization
2023-02-28 02:03:43 +00:00
clubby789
f83ce99c32
Remove the capture_disjoint_fields feature
2023-02-28 01:21:15 +00:00
bors
b583ede652
Auto merge of #99767 - LeSeulArtichaut:stable-target-feature-11, r=estebank
...
Stabilize `#![feature(target_feature_11)]`
## Stabilization report
### Summary
Allows for safe functions to be marked with `#[target_feature]` attributes.
Functions marked with `#[target_feature]` are generally considered as unsafe functions: they are unsafe to call, cannot be assigned to safe function pointers, and don't implement the `Fn*` traits.
However, calling them from other `#[target_feature]` functions with a superset of features is safe.
```rust
// Demonstration function
#[target_feature(enable = "avx2")]
fn avx2() {}
fn foo() {
// Calling `avx2` here is unsafe, as we must ensure
// that AVX is available first.
unsafe {
avx2();
}
}
#[target_feature(enable = "avx2")]
fn bar() {
// Calling `avx2` here is safe.
avx2();
}
```
### Test cases
Tests for this feature can be found in [`src/test/ui/rfcs/rfc-2396-target_feature-11/`](b67ba9ba20/src/test/ui/rfcs/rfc-2396-target_feature-11/ ).
### Edge cases
- https://github.com/rust-lang/rust/issues/73631
Closures defined inside functions marked with `#[target_feature]` inherit the target features of their parent function. They can still be assigned to safe function pointers and implement the appropriate `Fn*` traits.
```rust
#[target_feature(enable = "avx2")]
fn qux() {
let my_closure = || avx2(); // this call to `avx2` is safe
let f: fn() = my_closure;
}
```
This means that in order to call a function with `#[target_feature]`, you must show that the target-feature is available while the function executes *and* for as long as whatever may escape from that function lives.
### Documentation
- Reference: https://github.com/rust-lang/reference/pull/1181
---
cc tracking issue #69098
r? `@ghost`
2023-02-28 01:14:56 +00:00