Commit graph

277528 commits

Author SHA1 Message Date
Lukas Wirth
e4708fec85
Merge pull request #18880 from PrototypeNM1/extra-includes
Add config setting which allows adding additional include paths to the VFS.
2025-01-09 10:24:51 +00:00
Lukas Wirth
f6e8974fa8
Merge pull request #18861 from ChayimFriedman2/await-edition
fix: Make edition per-token, not per-file
2025-01-09 10:20:11 +00:00
Lukas Wirth
f4ecc34aa7
Merge pull request #18885 from qjerome/refactor-cargo-cfgs
refactor: struct holding cargo cfgs settings
2025-01-09 10:19:55 +00:00
Lukas Wirth
85310c4f25
Merge pull request #18890 from Veykril/push-nwnozlyppvzo
minor: Fixup macro error kinds
2025-01-09 08:54:05 +00:00
Lukas Wirth
cd60477dc8 minor: Fixup macro error kinds 2025-01-09 09:38:58 +01:00
Lukas Wirth
547a12e323
Merge pull request #18887 from vishruth-thimmaiah/refactor_completions_tests
refactor test helpers within ide-completions
2025-01-09 08:15:53 +00:00
Lukas Wirth
fbc1d511e9
Merge pull request #18524 from Giga-Bowser/migrate-wrap-unwrap-return
internal: Migrate `(un)wrap_return_type` assists to use `SyntaxEditor`
2025-01-09 07:05:48 +00:00
Chayim Refael Friedman
89a72c78fc Make edition per-token, not per-file
More correctly, *also* per-token. Because as it turns out, while the top-level edition affects parsing (I think), the per-token edition affects escaping of identifiers/keywords.
2025-01-09 05:43:08 +02:00
Giga Bowser
3d6c2f2ea1 minor: Use placeholders in unwrap_return_type 2025-01-08 18:12:06 -06:00
Giga Bowser
9b6b629334 internal: Migrate unwrap_return_type assist to use SyntaxEditor
Also changes `make::expr_empty_block()` to return `ast::BlockExpr` instead of `ast::Expr`
2025-01-08 18:12:06 -06:00
Giga Bowser
4001c468dd internal: Migrate wrap_return_type assist to use SyntaxEditor 2025-01-08 15:19:10 -06:00
Nicholas Rishel
253bba044e Add config setting which allows adding additional include paths to the VFS. 2025-01-08 10:57:46 -08:00
Vishruth-Thimmaiah
8d1ae29294
refactor test helpers within ide-completions 2025-01-08 23:51:18 +05:30
qjerome
93d08b7c77
fix: requested changed 2025-01-08 14:47:46 +01:00
qjerome
c59ecb3af4
fix: autogenerate files 2025-01-08 14:47:21 +01:00
qjerome
2be4ce099d
refactor: struct holding cargo cfgs settings 2025-01-08 11:20:08 +01:00
Lukas Wirth
8982535dc2
Merge pull request #18884 from Veykril/push-xwqkorxozzkq
fix: Fix `env`/`option_env` macro check disregarding macro_rules definitions
2025-01-08 10:14:51 +00:00
Lukas Wirth
bc1a7fa834 fix: Fix env/option_env macro check disregarding macro_rules definitions 2025-01-08 10:59:58 +01:00
Lukas Wirth
16721e33dc
Merge pull request #18855 from Giga-Bowser/migrate-if-let
internal: Migrate `if let` replacement assists to `SyntaxEditor`
2025-01-08 08:59:42 +00:00
Laurențiu Nicola
7c256e56ce
Merge pull request #18882 from lnicola/publish-test-fixture
minor: Fix `test-fixture` autopublishing
2025-01-08 08:34:41 +00:00
Laurențiu Nicola
cc07c98314 Fix test-fixture autopublishing 2025-01-08 10:19:46 +02:00
Laurențiu Nicola
a748001095
Merge pull request #18877 from ChayimFriedman2/crazy-hang
fix: Fix a bug with missing binding in MBE
2025-01-08 06:53:07 +00:00
Chayim Refael Friedman
bce64358b7 Fix a bug with missing binding in MBE
We should immediately mark them as finished, on the first entry.

The funny (or sad) part was that this bug was pre-existing, but previously to #18327, it was causing us to generate bindings non-stop, 65535 of them, until we get to the hardcoded repetition limit, and then throw it all away. And it was so Blazingly Fast that nobody noticed.

With #18327 however, this is still what happens, except that now instead of *merging* the fragments into the result, we write them on-demand. Meaning that when we hit the limit, we've already written all previous entries. This is a minor change, I thought for myself when I was writing this, and it's actually for the better, so who cares. Minor change? Not so fast. This caused us to emit 65535 repetitions, all of which the MBE infra needs to handle when calling other macros with the expansion, and convert to rowan tree etc., which resulted a *massive* hang.

The test (and also `analysis-stats`) used to crash with stack overflow on this macro, because we were dropping some crazily deep rowan tree. Now they work properly. Because I am lazy, and also because I could not find the exact conditions that causes a macro match but with a missing binding, I just copied all macros from tracing. Easy.
2025-01-07 23:04:53 +02:00
Laurențiu Nicola
fd1e95538f
Merge pull request #18874 from lnicola/sync-from-rust
minor: Sync from downstream
2025-01-07 16:13:25 +00:00
Laurențiu Nicola
e103ab1608 Merge from rust-lang/rust 2025-01-07 17:57:53 +02:00
Laurențiu Nicola
aa1ef0a432 Preparing for merge from rust-lang/rust 2025-01-07 17:57:18 +02:00
Lukas Wirth
8e4409cce3
Merge pull request #18870 from Veykril/push-vnpsptpolyol
Drop unnecessary tracing::warn
2025-01-07 13:55:28 +00:00
Lukas Wirth
21faec1fec
Merge pull request #18867 from Veykril/push-ntmxlropxkrr
internal: target-triple -> target-tuple + version fetching cleanup
2025-01-07 13:46:58 +00:00
Lukas Wirth
b039d3fc5c Drop unnecessary tracing::warn
We already emit an error
2025-01-07 14:40:00 +01:00
Lukas Wirth
380439c5f3 Add some smoke tests to toolchain_info 2025-01-07 14:33:24 +01:00
Lukas Wirth
d28a0b8fcd Align toolchain version fetching with other toolchain info querying
Fix --target flag argument order in rustc_cfg fetching
2025-01-07 14:30:46 +01:00
Lukas Wirth
05770f2599 target-triple -> target-tuple 2025-01-07 14:25:43 +01:00
Lukas Wirth
c360bf5517
Merge pull request #18788 from Veykril/push-zxystwnotuvq
Remove `rust-analyzer.cargo.sysrootQueryMetadata` config again
2025-01-07 13:14:29 +00:00
Lukas Wirth
764ce49445 Remove rust-analyzer.cargo.sysrootQueryMetadata config again 2025-01-07 14:00:22 +01:00
Lukas Wirth
f9a3c4122c
Merge pull request #18864 from alexkirsz/alexkirsz/fix-diagnostics-clearing
fix: Fix diagnostics not clearing between flychecks
2025-01-07 12:16:18 +00:00
Chayim Refael Friedman
3f2f3e5180
Merge pull request #18832 from vishruth-thimmaiah/fix_string_comp
fix: do not offer completions within macro strings
2025-01-07 12:11:59 +00:00
Lukas Wirth
1287e29e91
Merge pull request #18866 from bobozaur/fix-fetching-on-buildfile-changes
Fix JSON project `PackageRoot` buildfile inclusion
2025-01-07 12:11:46 +00:00
Bogdan Mircea
9fb7c15339 project-model: fix JSON project PackageRoot buildfile inclusion 2025-01-07 13:47:17 +02:00
Vishruth-Thimmaiah
09a4ac5e8b
fix: do not offer completions within macro strings 2025-01-07 17:02:28 +05:30
Alex Kirszenberg
4d3e6feb2f lint 2025-01-07 12:07:37 +01:00
Alex Kirszenberg
9294965217 fix: Fix diagnostics not clearing between flychecks 2025-01-07 11:11:04 +01:00
Laurențiu Nicola
9344334b19
Merge pull request #18862 from lnicola/publish-test-utils
minor: Set test-utils dependency version, since it's now published
2025-01-07 08:06:37 +00:00
Laurențiu Nicola
4b387254be Set test-utils dependency version, since it's now being published 2025-01-07 09:51:57 +02:00
bors
fb546ee09b Auto merge of #135173 - pietroalbini:pa-fix-rvp, r=workingjubilee
Avoid replacing the definition of `CURRENT_RUSTC_VERSION`

Before this PR, replace-version-placeholder hardcoded the path defining CURRENT_RUSTC_VERSION (to avoid replacing it). After a refactor moved the file defining it without changing the hardcoded path, the tool started replacing the constant itself with the version number.

To avoid this from happening in the future, this changes the definition of the constant to avoid the tool from ever matching it.

r? `@workingjubilee`
2025-01-07 07:21:09 +00:00
Laurențiu Nicola
8db8e3cc37
Merge pull request #18853 from ChayimFriedman2/no-completion
Fix case where completion inside macro that expands to `#[test]` was unavailable
2025-01-07 06:44:50 +00:00
bors
6f2ca607bc Auto merge of #135183 - jhpratt:rollup-qwg4pm0, r=jhpratt
Rollup of 9 pull requests

Successful merges:

 - #131830 (Add support for wasm exception handling to Emscripten target)
 - #132345 (Improve diagnostics for `HostEffectPredicate` in the new solver)
 - #134568 (Release notes for 1.84.0)
 - #134744 (Don't ice on bad transmute in typeck in new solver)
 - #135090 (Suggest to replace tuple constructor through projection)
 - #135116 (rustdoc: Fix mismatched capitalization in sidebar)
 - #135126 (mark deprecated option as deprecated in rustc_session to remove copypasta and small refactor)
 - #135139 ([generic_assert] Constify methods used by the formatting system)
 - #135170 (Update triagebot.toml: celinval vacation is over)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-01-07 04:35:05 +00:00
Jacob Pratt
ee55b347c9
Rollup merge of #135170 - celinval:chores-vacation-end, r=jieyouxu
Update triagebot.toml: celinval vacation is over

I'm also removing myself from the MIR syntax changes notifications.
2025-01-06 22:04:18 -05:00
Jacob Pratt
e78b1321e5
Rollup merge of #135139 - c410-f3r:8-years-rfc, r=jhpratt
[generic_assert] Constify methods used by the formatting system

cc #44838

Starts the "constification" of all the elements required to allow the execution of the formatting system in constant environments.

```rust
const _: () = { panic!("{:?}", 1i32); };
```

Further stuff is blocked by #133999.
2025-01-06 22:04:17 -05:00
Jacob Pratt
44808ae798
Rollup merge of #135126 - klensy:deprecated-and-do-nothing, r=jieyouxu
mark deprecated option as deprecated in rustc_session to remove copypasta and small refactor

This marks deprecated options as deprecated via flag in options table in rustc_session, which removes copypasted deprecation text from rustc_driver_impl.

This also adds warning for deprecated `-C ar` option, which didn't emitted any warnings before.
Makes `inline_threshold` `[UNTRACKED]`, as it do nothing.
Adds few tests.

See individual commits.
2025-01-06 22:04:17 -05:00
Jacob Pratt
1b370d32d6
Rollup merge of #135116 - camelid:sidebar-case, r=fmease
rustdoc: Fix mismatched capitalization in sidebar

Previously, the main content used "Aliased Type", while the sidebar said "Aliased type". Now, they both say "Aliased Type", which is the more common capitalization in Rustdoc.

See the following link for an example.
https://doc.rust-lang.org/1.83.0/std/io/type.Result.html
2025-01-06 22:04:16 -05:00