Commit graph

33149 commits

Author SHA1 Message Date
1hakusai1
e8a63e43b1 Use resolve_method_call_as_callable to handle function types 2025-01-16 10:00:30 +09:00
1hakusai1
afde04b443 refactor: Change order of arguments 2025-01-16 09:35:07 +09:00
1hakusai1
c6317a3e67 refactor: rename to descriptive name 2025-01-16 09:33:52 +09:00
Waffle Lapkin
dde6ab4983
update chalk
this brings in support from trait upcasting, yay!
(and as such fixes a test)
2025-01-16 00:38:36 +01:00
Waffle Lapkin
772266abeb
add a test for trait upcasting type mismatch
this adds a test asserting *incorrect* behavior that can be seen in
<https://github.com/rust-lang/rust-analyzer/issues/18083>, and a test
asserting the *correct* behavior for the case of no super traits.
2025-01-16 00:38:36 +01:00
Chayim Refael Friedman
cec9fa1606 Add smart completions that skip await or iter() and into_iter()
E.g. complete `await.foo()`.
2025-01-15 22:32:07 +02:00
HKalbasi
7d337c7f35
Merge pull request #18897 from duncanawoods/master
fix: Make test_runner::TestState::stdout optional to fix parsing cargo test json output
2025-01-15 19:51:36 +00:00
bors
36893c32d6 Auto merge of #133461 - ferrocene:add-copyright-files-to-dist, r=Kobzol
Add COPYRIGHT-*.html files to distribution and update `COPYRIGHT`

* Updates the `COPYRIGHT` file to describe how we actually do things now, and removes the licence text from it as they are stored elsewhere.
* dist tarballs get all of the files in `LICENSES/*`.
  * This folder is managed by `reuse` and each file exists because we refer to the licence somewhere in our tree. We should be supplying these licence texts to anyone who obtains a copy of the source code and now we do.
* The binary rust tarball gets `COPYRIGHT.html` and `COPYRIGHT-library.html`, which are auto-generated files that describe the licence information for both the in-tree source files used to build the Rust toolchain, and the out-of-tree dependencies we used to build the toolchain.
   * The other binary tarballs are unchanged, for now. In future you need to make a call whether to ship multiple version of COPYRIGHT.html, or whether to try and make, for example, a cargo-specific COPYRIGHT.html file.
* The `LICENSE-MIT` file now includes a blanket copyright statement, as the text indicates that it should and because users will expect to know who owns the copyright of the material they have been given (even if the answer is 'lots of people').

try-job: x86_64-fuchsia
2025-01-15 15:30:53 +00:00
Lukas Wirth
759a9e6805
Merge pull request #18922 from Veykril/push-tmtzukrsnott
fix: Don't return inlay hints outside requested range
2025-01-15 13:58:07 +00:00
Lukas Wirth
5ff89d86aa fix: Don't return inlay hints outside requested range 2025-01-15 14:42:53 +01:00
Lukas Wirth
1fc15e0673
Merge pull request #18940 from Veykril/push-ulowqkpprslq
fix: Fix semantics not always correctly caching file roots
2025-01-15 12:54:58 +00:00
Lukas Wirth
96d5b177cf
Merge pull request #18929 from ChayimFriedman2/i-acknowledge-defeat
fix: Fix another bug when reaching macro expansion limit caused a stack overflow
2025-01-15 12:41:17 +00:00
Lukas Wirth
96f8bc8c0f
Merge pull request #18939 from Veykril/push-wztmylkyqttu
Flip on typing config to be opt-in, better defaults
2025-01-15 12:40:45 +00:00
Lukas Wirth
d32b09dc1b fix: Fix semantics not always correctly caching file roots 2025-01-15 13:40:25 +01:00
1hakusai1
b6d63615d2 Fix wrong fixture 2025-01-15 21:28:37 +09:00
1hakusai1
65342f4a21 Use adjusted type 2025-01-15 21:04:19 +09:00
1hakusai1
dc075fd692 Add test cases 2025-01-15 20:43:28 +09:00
Lukas Wirth
557c467aa9 Flip on typing config to be opt-in, better defaults 2025-01-15 10:25:37 +01:00
Lukas Wirth
2a89e4a051 Early exit in search properly 2025-01-15 09:47:45 +01:00
Lukas Wirth
9384ceeef8
Merge pull request #18925 from Veykril/push-mtxxvpowwtrt
feat: Render type parameter projection target bounds in inlays
2025-01-15 08:08:15 +00:00
Lukas Wirth
5530167a1e feat: Render type parameter projection target bounds in inlays 2025-01-15 08:54:38 +01:00
Lukas Wirth
d82e1a2472
Merge pull request #18917 from boattime/master
feat: Add dereferencing autocomplete
2025-01-15 07:46:18 +00:00
Laurențiu Nicola
40710f2748
Merge pull request #18937 from darichey/hide-syntax-tree-default
Hide syntax tree view by default
2025-01-14 19:43:59 +00:00
David Richey
807328d1d2 Hide syntax tree view by default 2025-01-14 13:21:42 -06:00
bors
ef503dd293 Auto merge of #135313 - compiler-errors:needs-mono, r=BoxyUwU
Eagerly mono drop for structs with lifetimes

That is, use `!generics.requires_monomorphization()` rather than `generics.is_empty()` like the rest of the mono collector code.
2025-01-14 17:55:26 +00:00
1hakusai1
96ed889cdf refactor: get(0) -> first() 2025-01-14 19:00:35 +09:00
1hakusai1
a0be4b189c Remove trailing spaces 2025-01-14 17:54:15 +09:00
1hakusai1
c14cdcf5cc fix_typo 2025-01-14 17:43:28 +09:00
Laurențiu Nicola
4fbd9088bf
Merge pull request #18933 from decahedron1/notify-7
fix: Update `notify` to `8.0.0`
2025-01-14 07:46:22 +00:00
1hakusai1
ea87eab4ff Add the ability to jump from into to from definitions 2025-01-14 16:44:55 +09:00
Carson M.
297ce528f4
Update notify to 8.0.0 2025-01-14 01:31:07 -06:00
boattime
41687437af feat: Add dereferencing autocomplete 2025-01-13 17:00:49 -08:00
bors
8dbbb597f3 Auto merge of #135192 - jdupak-ms:cdb-tests, r=wesleywiser
Add and improve debuginfo tests for Windows

Adds new test for closures and function pointers.
Improves robustness of existing tests by sorting wildcard matched outputs.

try-job: i686-msvc
2025-01-13 18:13:53 +00:00
Chayim Refael Friedman
8ab18927ce Fix another bug when reaching macro expansion limit caused a stack overflow
This time without missing bindings.

Solve it by returning to the old ways, i.e. just throw the extra nodes away.

In other words, I acknowledge defeat.
2025-01-13 15:55:30 +02:00
bors
886afc40ff Auto merge of #135167 - mzacho:depth-limit-const-eval-query, r=oli-obk
Depth limit const eval query

Currently the const-eval query doesn't have a recursion limit or timeout, causing the complier to freeze in an infinite loop, see #125718. This PR depth limits the `eval_to_const_value_raw` query (with the [`recursion_limit`](https://doc.rust-lang.org/reference/attributes/limits.html) attribute) and improves the diagnostics for query overflow errors, so spans are reported for other dep kinds than `layout_of` (e.g. `eval_to_const_value_raw`).

fixes #125718
fixes #114192
2025-01-13 10:18:26 +00:00
Lukas Wirth
8364ef2997
Merge pull request #18923 from Veykril/push-oovkowowotqx
internal: Compute inlay hint tooltips lazily
2025-01-12 13:57:11 +00:00
Lukas Wirth
f66bbbf27d internal: Compute inlay hint tooltips lazily 2025-01-12 14:42:44 +01:00
Lukas Wirth
69ab0cfb48
Merge pull request #18921 from Veykril/push-zwullmxomvsm
internal: Compute inlay hint text edits lazily
2025-01-12 13:20:33 +00:00
Lukas Wirth
0f595b07bd Fix text edits for discriminant hints 2025-01-12 14:04:35 +01:00
Lukas Wirth
f43a37ad25 internal: Compute inlay hint text edits lazily 2025-01-12 14:00:37 +01:00
Lukas Wirth
1485a8819f
Merge pull request #18920 from Veykril/push-zxwtmooxumsl
fix: Fix `ref` text edit for binding mode hints
2025-01-12 12:28:57 +00:00
Lukas Wirth
720e727a9d fix: Fix ref text edit for binding mode hints 2025-01-12 13:14:00 +01:00
bors
b5c1d918ed Auto merge of #135292 - lqd:rustcperfup, r=kobzol
bump `rustc-perf` submodule

This updates the `rustc-perf` submodule to pull in the recent changes, in particular the error handling in https://github.com/rust-lang/rustc-perf/pull/2021 fixing the error we saw in a recent run.

I think I did this correctly, submodules are so annoying.

r? kobzol

(opening as draft to do a perf run and check that nothing has changed indeed)
2025-01-11 11:54:26 +00:00
bors
d8c92dc0ab Auto merge of #135274 - saethlin:array-repeats, r=compiler-errors
Add an InstSimplify for repetitive array expressions

I noticed in https://github.com/rust-lang/rust/pull/135068#issuecomment-2569955426 that GVN's implementation of this same transform was quite profitable on the deep-vector benchmark. But of course GVN doesn't run in unoptimized builds, so this is my attempt to write a version of this transform that benefits the deep-vector case and is fast enough to run in InstSimplify.

The benchmark suite indicates that this is effective.
2025-01-11 06:33:55 +00:00
Laurențiu Nicola
9923b0085c
Merge pull request #18913 from Wilfred/grammar_fix
minor: Fix grammar in doc comments
2025-01-11 06:19:03 +00:00
bors
157a81d6ce Auto merge of #135258 - oli-obk:push-ktzskvxuwnlt, r=saethlin
Use llvm.memset.p0i8.* to initialize all same-bytes arrays

Similar to #43488

debug builds can now handle `0x0101_u16` and other multi-byte scalars that have all the same bytes (instead of special casing just `0`)
2025-01-11 03:40:38 +00:00
Wilfred Hughes
7f6b8745c8 minor: Fix grammar in doc comments
"too" should be "to" here.
2025-01-10 17:38:14 -08:00
Lukas Wirth
4f35021ca9
Merge pull request #18907 from Veykril/push-uqlzpttmvurv
Implement `#[rust_analyzer::skip]` for bodies
2025-01-10 13:59:23 +00:00
Lukas Wirth
f209d50dcf Implement #[rust_analyzer::skip] for bodies 2025-01-10 14:41:27 +01:00
Lukas Wirth
e8ad0c03e8
Merge pull request #18906 from Veykril/push-upuxsyovskmt
feat: Re-implement rust string highlighting via tool attribute
2025-01-10 13:38:43 +00:00