lcnr
9eeaf1fd13
normalize in trait_ref_is_knowable
in new solver
2023-08-12 20:37:53 +02:00
bors
cbb48a5e93
Auto merge of #114756 - matthiaskrgr:rollup-4m7l4p6, r=matthiaskrgr
...
Rollup of 7 pull requests
Successful merges:
- #94455 (Partially stabilize `int_roundings`)
- #114132 (Better Debug for Vars and VarsOs)
- #114584 (E0277 nolonger points at phantom `.await`)
- #114667 (Record binder for bare trait object in LifetimeCollectVisitor)
- #114692 (downgrade `internal_features` to warn)
- #114703 (Cover ParamConst in smir)
- #114734 (Mark oli as "on vacation")
r? `@ghost`
`@rustbot` modify labels: rollup
2023-08-12 17:51:16 +00:00
Michael Goulet
5c95e7743b
Fix tests
...
Co-authored-by: Ali MJ Al-Nasrawy <alimjalnasrawy@gmail.com>
2023-08-12 17:18:46 +00:00
Michael Goulet
d0c826cfc2
Opaques do not constrain generic params
2023-08-12 17:14:13 +00:00
Jakub Beránek
6ca13d051b
CI: fix Docker layer caching
2023-08-12 18:55:13 +02:00
bors
1e836d12d3
Auto merge of #114710 - Urgau:fix-expect-dead_code-114557, r=cjgillot
...
Respect `#[expect]` the same way `#[allow]` is with the `dead_code` lint
This PR makes the `#[expect]` attribute being respected in the same way the `#[allow]` attribute is with the `dead_code` lint.
The fix is much more involved than I would have liked (and it's not because I didn't tried!), because the implementation took advantage of the fact that firing a lint in a allow context is a nop (for the user, as the lint is suppressed) to not fire-it at all.
And will it's fine for `#[allow]`, it definitively isn't for `#[expect]`, as the presence and absence of the lint is significant. So a big part of the PR is just adding the context information of whenever an item is on the worklist because of an `[allow]`/`#[expect]` or not.
Fixes https://github.com/rust-lang/rust/issues/114557
2023-08-12 15:14:42 +00:00
bors
2fbe69d117
Auto merge of #15438 - Veykril:eager-parser-stuck, r=Veykril
...
fix: Fix parser being stuck in eager macro inputs
Fixes https://github.com/rust-lang/rust-analyzer/issues/15437
2023-08-12 14:30:38 +00:00
León Orell Valerian Liehr
1a18158891
Don't crash when reporting nice region errors for generic const items
2023-08-12 15:34:28 +02:00
DianQK
6f5b4e3581
Add test for method debuginfo declaration.
...
We've investigated one reason why debugging information often goes wrong at https://reviews.llvm.org/D152095 .
> LLVM can't handle IR where subprogram definitions are nested within DICompositeType when doing LTO builds,
> because there's no good way to cross the CU boundary to insert a nested DISubprogram definition in one CU into a type defined in another CU.
2023-08-12 21:27:46 +08:00
Urgau
b517dd5bc9
Also consider transmute
with the invalid_reference_casting
lint
2023-08-12 13:05:44 +02:00
Matthias Krüger
cf9081c0a1
Rollup merge of #114734 - oli-obk:vacation_time, r=oli-obk
...
Mark oli as "on vacation"
2023-08-12 12:06:37 +02:00
Matthias Krüger
1d0792bd80
Rollup merge of #114703 - ouz-a:smir_allocation, r=oli-obk
...
Cover ParamConst in smir
Others variants won't be useful for a while or ever(?), but we might need this one.
r? ````@oli-obk````
2023-08-12 12:06:37 +02:00
Matthias Krüger
70cd8d5f3f
Rollup merge of #114692 - lcnr:internal_features-warn, r=Nilstrieb
...
downgrade `internal_features` to warn
Not sure if this requires an FCP or whatever. By having the lint as deny I need to modify test cases when testing them outside of the test suite as the test suite implicitly allows the lint. This takes maybe 10 to 20 seconds per test, but given just how frequently I end up copying tests to different repos it's a significant annoyance.
r? `@Nilstrieb`
2023-08-12 12:06:36 +02:00
Matthias Krüger
a12c329b35
Rollup merge of #114667 - compiler-errors:issue-114664, r=davidtwco
...
Record binder for bare trait object in LifetimeCollectVisitor
The `LifetimeCollectVisitor` had a bug where it was not recording the binder of bate trait objects. This was uncovered in #114487 , when I changed opaque type lowering to ICE if it encountered a captured fresh lifetime with no def-id to map back to: https://github.com/rust-lang/rust/pull/114487/files#diff-ad0c15bbde97a607d4758ec7eaf88248be5d6b8ae084dfc84127f81e3f7a9bb4R1585
Fixes #114664
2023-08-12 12:06:36 +02:00
Matthias Krüger
83756d97a8
Rollup merge of #114584 - darklyspaced:master, r=cjgillot
...
E0277 nolonger points at phantom `.await`
fixes #113203
2023-08-12 12:06:35 +02:00
Matthias Krüger
8a997b159c
Rollup merge of #114132 - tamird:better-env-debug-impls, r=Amanieu
...
Better Debug for Vars and VarsOs
Display actual vars instead of two dots.
The same was done for Args and ArgsOs in 275f9a04af
.
2023-08-12 12:06:35 +02:00
Matthias Krüger
9aea966e4b
Rollup merge of #94455 - jhpratt:stabilize-int_roundings, r=joshtriplett
...
Partially stabilize `int_roundings`
This stabilizes the following:
```rust
impl uX {
pub const fn div_ceil(self, rhs: Self) -> Self;
pub const fn next_multiple_of(self, rhs: Self) -> Self;
pub const fn checked_next_multiple_of(self, rhs: Self) -> Option<Self>;
}
```
This feature is tracked in #88581 .
2023-08-12 12:06:35 +02:00
Guillaume Gomez
611c0ea21c
Migrate GUI colors test to original CSS color format
2023-08-12 12:05:13 +02:00
bors
f1b854818d
Auto merge of #109356 - jackh726:issue-108544, r=lcnr
...
Only check outlives goals on impl compared to trait
Fixes #108544
r? `@compiler-errors`
2023-08-12 10:02:45 +00:00
Jubilee Young
90dc2f839b
Name what ln_gamma does
...
The previous description omitted some important details.
2023-08-12 02:13:41 -07:00
Lukas Wirth
9ac88d8d36
Fix parser being stuck in eager macro inputs
2023-08-12 08:27:27 +02:00
bors
05773210b7
Auto merge of #3026 - rust-lang:rustup-2023-08-12, r=RalfJung
...
Automatic sync from rustc
2023-08-12 05:53:27 +00:00
The Miri Conjob Bot
b122fa6d6a
Merge from rustc
2023-08-12 05:33:13 +00:00
The Miri Conjob Bot
85de27ee87
Preparing for merge from rustc
2023-08-12 05:25:32 +00:00
Lukas Wirth
33f9250d21
Pass server extraEnv to isValidExecutable
2023-08-12 07:10:20 +02:00
bors
6cf06c1675
Auto merge of #15445 - Veykril:worl-symbols-traits, r=Veykril
...
fix: Fix `only_types` config filtering out traits from world symbols
It is a bit confusing that this apparently did not filter every trait out though...
Closes https://github.com/rust-lang/rust-analyzer/issues/15444
Closes https://github.com/rust-lang/rust-analyzer/issues/15200
2023-08-12 04:55:17 +00:00
Lukas Wirth
d6d188fce2
fix: Fix only_types
config filtering out traits from world symbols
2023-08-12 06:40:49 +02:00
bors
39ebc378c2
Auto merge of #15436 - Veykril:temp-alloc, r=Veykril
...
Preserve `resolve_obligations_as_possible` temporary allocation across calls
This saves ~20ms in the highlihting bench on my machine
```
284ms - highlight
150ms - infer:wait @ per_query_memory_usage
150ms - infer_query
0 - PerNs::filter_visibility (436 calls)
0 - crate_def_map:wait (336 calls)
2ms - deref_by_trait (909 calls)
0 - generic_params_query (1 calls)
0 - inherent_impls_in_block_query (1 calls)
107ms - resolve_obligations_as_possible (17013 calls)
0 - trait_solve::wait (1017 calls)
0 - PerNs::filter_visibility (13 calls)
17ms - Semantics::analyze_impl (19 calls)
0 - SourceBinder::to_module_def (30 calls)
0 - attrs_query (6 calls)
0 - classify_lifetime (1 calls)
0 - classify_lifetime_ref (4 calls)
35ms - classify_name (28 calls)
54ms - classify_name_ref (452 calls)
0 - crate_def_map:wait (375 calls)
7ms - descend_into_macros (776 calls)
0 - generic_params_query (5 calls)
0 - impl_data_with_diagnostics_query (1 calls)
17ms - infer:wait (32 calls)
0 - resolve_obligations_as_possible (1 calls)
0 - source_file_to_def (1 calls)
0 - trait_solve::wait (1 calls)
```
to
```
256ms - highlight
121ms - infer:wait @ per_query_memory_usage
121ms - infer_query
0 - PerNs::filter_visibility (436 calls)
0 - crate_def_map:wait (336 calls)
2ms - deref_by_trait (909 calls)
0 - generic_params_query (1 calls)
0 - inherent_impls_in_block_query (1 calls)
81ms - resolve_obligations_as_possible (17013 calls)
0 - trait_solve::wait (1017 calls)
0 - PerNs::filter_visibility (13 calls)
17ms - Semantics::analyze_impl (19 calls)
0 - SourceBinder::to_module_def (30 calls)
0 - attrs_query (6 calls)
0 - classify_lifetime (1 calls)
0 - classify_lifetime_ref (4 calls)
35ms - classify_name (28 calls)
56ms - classify_name_ref (452 calls)
0 - crate_def_map:wait (375 calls)
7ms - descend_into_macros (776 calls)
0 - generic_params_query (5 calls)
0 - impl_data_with_diagnostics_query (1 calls)
16ms - infer:wait (32 calls)
0 - resolve_obligations_as_possible (1 calls)
0 - source_file_to_def (1 calls)
0 - trait_solve::wait (1 calls)
```
2023-08-12 04:38:32 +00:00
Lukas Wirth
c1c8e787d2
Preserve resolve_obligations_as_possible
temporary allocation across calls
2023-08-12 06:36:31 +02:00
Jacob Pratt
62ca5aa8e4
Remove unnecessary feature gates
2023-08-12 00:21:04 -04:00
Jacob Pratt
7f08376964
Partially stabilize #![feature(int_roundings)]
2023-08-12 00:12:11 -04:00
Gurinder Singh
0af9dfc0a3
Update Sender documentation for Sync
2023-08-12 09:20:56 +05:30
Jack Huey
3028dc4ef7
Only check outlives goals on impl compared to trait
2023-08-11 21:09:17 -04:00
bors
b08dd92552
Auto merge of #114720 - scottmcm:better-sub, r=workingjubilee
...
Tell LLVM that the negation in `<*const T>::sub` cannot overflow
Today it's just `sub` <https://rust.godbolt.org/z/8EzEPnMr5 >; with this PR it's `sub nsw`.
2023-08-11 23:40:33 +00:00
Michael Goulet
e4cf708d2f
Don't add associated type bound for non-types
2023-08-11 21:33:08 +00:00
Ben Kimock
1852bb8d62
Include spans in use-after-free diagnostics
2023-08-11 17:21:22 -04:00
bors
13acd4f239
Auto merge of #3025 - eduardosm:float-to-int, r=RalfJung
...
Add checked float-to-int helper function
As discussed in https://github.com/rust-lang/miri/pull/2989#discussion_r1287252367
2023-08-11 20:51:59 +00:00
ouz-a
d5120d4a46
Make Const more useful in smir
2023-08-11 23:43:58 +03:00
bors
a6f8aa5a09
Auto merge of #114735 - RalfJung:miri, r=RalfJung
...
update Miri
r? `@ghost`
2023-08-11 20:02:14 +00:00
Eduardo Sánchez Muñoz
29b38ed76a
Remove float_to_int_unchecked
and inline it into its call sites
2023-08-11 20:23:08 +02:00
Daniel Paoliello
687bffa493
Use the same DISubprogram for each instance of the same inlined function within the caller
2023-08-11 10:21:52 -07:00
lcnr
bb76fde734
remove builtin impl for float and int infer
2023-08-11 19:08:11 +02:00
Eduardo Sánchez Muñoz
fe35dd1afc
Add checked float-to-int helper function
2023-08-11 17:58:09 +02:00
bors
8ce365ff79
Auto merge of #3024 - RalfJung:nomath, r=RalfJung
...
llvm.prefetch is not a math function
fixes the comment in src/shims/foreign_items.rs
2023-08-11 15:07:18 +00:00
Ralf Jung
05d5f9887d
llvm.prefetch is not a math function
2023-08-11 16:47:23 +02:00
bors
b03864d546
Auto merge of #114729 - flip1995:clippyup, r=Manishearth
...
Update Clippy
r? `@Manishearth`
cc `@Centri3` This reinstates the `filter_map_bool_then` lint https://github.com/rust-lang/rust/pull/114715 , since I think you fixed the ICE in beb57f074e
which is included in this sync.
2023-08-11 14:46:07 +00:00
Oli Scherer
2801ae83d5
Mark oli as "on vacation"
2023-08-11 14:18:01 +00:00
bors
a45f181eb0
Auto merge of #2989 - eduardosm:x86-intrinsics, r=RalfJung
...
miri: implement some `llvm.x86.sse.*` intrinsics and add tests
PR moved from https://github.com/rust-lang/rust/pull/113932 .
Implements LLVM intrisics needed to run most SSE functions from `core::arch::x86{,_64}`.
Also adds miri tests for those functions (mostly copied from core_arch tests).
r? `@RalfJung`
The first commit is the same that the commit in the PR I had opened in the Rust repository. I addressed review comments in additional commits to make it easier to review. I also fixed formatting and clippy warnings.
2023-08-11 13:47:30 +00:00
Gurinder Singh
e903752b48
Fix typo
2023-08-11 18:23:57 +05:30
bors
6276e5ad14
Auto merge of #3023 - RalfJung:gamma, r=RalfJung
...
add gamma function shims
needs a rustup to fetch the new declarations in std
2023-08-11 12:51:25 +00:00