Commit graph

16347 commits

Author SHA1 Message Date
Lukas Wirth
042528aa76 Move proc-macro protocol into legacy module 2024-12-30 11:47:08 +01:00
Lukas Wirth
0affbd4919 Cleanup proc-macro dylib handling 2024-12-30 11:14:27 +01:00
Lukas Wirth
d4b53f5aab Decouple proc-macro server protocol from the server implementation 2024-12-30 10:33:57 +01:00
Horu
4c279fb7af chore: fix typos 2024-12-30 14:56:21 +07:00
roife
9016a4cdf7 fix: avoid generating colliding names in extract_variable 2024-12-30 15:30:05 +08:00
bors
c1566141b6 Auto merge of #134865 - clubby789:proc-macro-tls, r=onur-ozkan
bootstrap: Don't apply -Ztls-model=initial-exec to deps of proc-macros

Fixes #134863

1. Checks if a crate name is in a static list before applying the flag
2. Adds a tidy check that gathers transitive deps of proc macros and ensures the list is up to date

cc `@bjorn3` - the issue specifies `rustc_fluent_macro` but I assume this applies to all proc macro crates.
2024-12-30 07:26:13 +00:00
Chayim Refael Friedman
33f1f1d787 Move some more AST makers to the quote macro
And implement addons as necessary.

There are many more makers to be moved, and I'm not completely satisfied with this (due to the ease of making a mistake in the AST structure, and slightly less but also because of the need to remember whitespaces), but this is already enough to see how this will look like.
2024-12-30 05:46:06 +02:00
Chayim Refael Friedman
a0c052fa57 Create a quote!-like API for crafting AST nodes
Instead of messing with textual `make`.

And port one `make` helper to it, for the sake of testing.
2024-12-30 04:54:39 +02:00
Chayim Refael Friedman
be12c80d23 Add a function to convert a SyntaxKind to its text, where possible
This will also help for the make's quote macro.
2024-12-30 04:01:05 +02:00
Chayim Refael Friedman
ca0c8da517 Generate a method for static retrieval of the SyntaxKind of a node, where possible
This will help for the quote macro for `ast::make`.
2024-12-30 03:13:17 +02:00
clubby789
f4d215ea91 Add tidy check for list of proc-macro crate transitive dependencies 2024-12-29 21:48:03 +00:00
Lukas Wirth
7f757b96f5 fix: Fix invalid -O flag used by cfg discovery 2024-12-29 16:04:17 +01:00
Lukas Wirth
b570206ca4
Merge pull request #18785 from Veykril/push-uvsqposqyvmo
Cleanup toolchain info fetching
2024-12-29 12:57:31 +00:00
Lukas Wirth
bde1322b90
Merge pull request #18787 from Veykril/push-uymlpukspxqr
Automatically cancel CI checks on new push to same PR
2024-12-29 12:55:40 +00:00
Lukas Wirth
f36a93ec52 Inline toolchain_info module 2024-12-29 13:43:12 +01:00
Lukas Wirth
3d9a15bbf9 Automatically cancel CI checks on new push to same PR 2024-12-29 13:41:22 +01:00
Lukas Wirth
d3ebb1469c
Merge pull request #18774 from Veykril/push-ysppqxpuknnw
Implement parameter variance inference
2024-12-29 12:34:48 +00:00
Lukas Wirth
d105253194 Force a current dir to be supplied for rustc info fetching 2024-12-29 13:26:04 +01:00
Lukas Wirth
a4a6a43000 Split out ProjectWorkspace::load_cargo 2024-12-29 12:54:41 +01:00
Lukas Wirth
8606441fcc Enforce a current directory being set for spawned commands 2024-12-29 12:51:13 +01:00
Lukas Wirth
d5f7e78f69 Cleanup toolchain info fetching 2024-12-29 12:25:51 +01:00
Lukas Wirth
0337e79c5c
Merge pull request #18784 from Veykril/push-pqtwsvquxoty
fix: Do not merge spans if they have different anchors
2024-12-29 10:44:04 +00:00
Lukas Wirth
1f0696de43 fix: Do not merge spans if they have different anchors 2024-12-29 11:29:32 +01:00
Lukas Wirth
a102ea1c2d Describe variance resolution approach differences to rustc 2024-12-29 10:53:17 +01:00
Oli Scherer
cabc386bd1
Merge pull request #4115 from RalfJung/epoll
epoll: avoid some clones
2024-12-29 09:04:36 +00:00
shamb0
342a2b6344 concurrency: Generalize UnblockCallback to MachineCallback
* Introduce UnblockKind enum to represent operation outcomes
    * Consolidate unblock/timeout methods into single callback interface
    * Update thread blocking system to use new callback mechanism
    * Refactor mutex and condvar implementations for new callback pattern

Signed-off-by: shamb0 <r.raajey@gmail.com>
2024-12-29 14:10:22 +05:30
Ralf Jung
bf9a76e360 an EpollEventInterest does not need to ref both its FD and its ready list 2024-12-29 09:39:53 +01:00
Ralf Jung
4a43173b67 triagebot: enable merge conflict notification 2024-12-29 09:36:07 +01:00
bors
480eec0692 Auto merge of #134867 - rust-lang:cargo_update, r=clubby789
Weekly `cargo update`

Automation to keep dependencies in `Cargo.lock` current.

The following is the output from `cargo update`:

```txt

compiler & tools dependencies:
     Locking 8 packages to latest compatible versions
    Updating anyhow v1.0.94 -> v1.0.95
    Updating glob v0.3.1 -> v0.3.2
    Updating quote v1.0.37 -> v1.0.38
    Updating rustversion v1.0.18 -> v1.0.19
    Updating serde v1.0.216 -> v1.0.217
    Updating serde_derive v1.0.216 -> v1.0.217
    Updating syn v2.0.90 -> v2.0.93
    Updating unicase v2.8.0 -> v2.8.1
note: pass `--verbose` to see 36 unchanged dependencies behind latest

library dependencies:
     Locking 0 packages to latest compatible versions
note: pass `--verbose` to see 5 unchanged dependencies behind latest

rustbook dependencies:
     Locking 7 packages to latest compatible versions
    Updating anyhow v1.0.94 -> v1.0.95
    Updating cc v1.2.5 -> v1.2.6
    Updating quote v1.0.37 -> v1.0.38
    Updating serde v1.0.216 -> v1.0.217
    Updating serde_derive v1.0.216 -> v1.0.217
    Updating syn v2.0.90 -> v2.0.93
    Updating unicase v2.8.0 -> v2.8.1
```
2024-12-29 03:16:29 +00:00
github-actions
519c233cbb cargo update
compiler & tools dependencies:
     Locking 8 packages to latest compatible versions
    Updating anyhow v1.0.94 -> v1.0.95
    Updating glob v0.3.1 -> v0.3.2
    Updating quote v1.0.37 -> v1.0.38
    Updating rustversion v1.0.18 -> v1.0.19
    Updating serde v1.0.216 -> v1.0.217
    Updating serde_derive v1.0.216 -> v1.0.217
    Updating syn v2.0.90 -> v2.0.93
    Updating unicase v2.8.0 -> v2.8.1
note: pass `--verbose` to see 36 unchanged dependencies behind latest

library dependencies:
     Locking 0 packages to latest compatible versions
note: pass `--verbose` to see 5 unchanged dependencies behind latest

rustbook dependencies:
     Locking 7 packages to latest compatible versions
    Updating anyhow v1.0.94 -> v1.0.95
    Updating cc v1.2.5 -> v1.2.6
    Updating quote v1.0.37 -> v1.0.38
    Updating serde v1.0.216 -> v1.0.217
    Updating serde_derive v1.0.216 -> v1.0.217
    Updating syn v2.0.90 -> v2.0.93
    Updating unicase v2.8.0 -> v2.8.1
2024-12-29 00:22:58 +00:00
Ralf Jung
943894289b epoll: avoid some clones 2024-12-28 23:53:25 +01:00
Chayim Refael Friedman
30fa18c44f Consider Enum::Variant even when it comes from a different crate 2024-12-28 22:43:51 +02:00
Lukas Wirth
bf27d88616 Show variance of parameters on hover 2024-12-28 20:31:20 +01:00
Lukas Wirth
e54cf80b98 Simplify 2024-12-28 19:54:22 +01:00
Lukas Wirth
d66a337658 Get rid of constrain and solve steps 2024-12-28 19:54:22 +01:00
Lukas Wirth
0e50c3c81b Remove unnecessary VarianceTerm 2024-12-28 19:54:22 +01:00
Lukas Wirth
4ea29d619c Implement parameter variance inference 2024-12-28 19:54:22 +01:00
Lukas Wirth
47f497d636
Merge pull request #18778 from Veykril/push-oontvoqmxkno
fix: Fix flycheck diagnostics flickering for binary targets
2024-12-28 17:31:11 +00:00
Ralf Jung
7e64216fd5 epoll: keep strong reference while blocking 2024-12-28 18:29:19 +01:00
Lukas Wirth
873cf255de Add DynTyExt::principal_id 2024-12-28 18:26:45 +01:00
Lukas Wirth
73ae6a0ba8 Downgrade salsa log levels 2024-12-28 18:23:24 +01:00
Lukas Wirth
171be2bd58 fix: Fix flycheck diagnostics flickering for binary targets 2024-12-28 18:16:55 +01:00
Ralf Jung
73c44fc368 FD handling: avoid unnecessary dynamic downcasts 2024-12-28 16:02:50 +01:00
Zalathar
2f8824a477 Simplify DebuggerCommands::parse_from to only take one prefix 2024-12-29 00:09:25 +11:00
Zalathar
a625ddd1ed Remove the unused cdbg-* debugger directive prefix
There are no tests in `tests/debuginfo` that use this prefix.
2024-12-29 00:09:25 +11:00
Ryan Mehri
0eb5acea2d fix toolchain flag parsing 2024-12-28 00:01:42 -07:00
Stuart Cook
41c74f4fb6
Rollup merge of #134840 - Zalathar:normalize, r=jieyouxu
compiletest: Only pass the post-colon value to `parse_normalize_rule`

Addresses one of the FIXMEs noted in #134759.

I started working on the other FIXME, but it became complex enough that I wanted to split it off from this PR.

r? jieyouxu
2024-12-28 16:50:39 +11:00
Stuart Cook
3048c4adfc
Rollup merge of #134829 - jieyouxu:migrate-libs-through-symlinks, r=lqd
Migrate `libs-through-symlink` to rmake.rs

Part of https://github.com/rust-lang/rust/issues/121876.

This PR migrates `tests/run-make/libs-through-symlink/` to use rmake.rs.

- Regression test for #13890.
- Original fix PR is #13903.
- Document test intent, backlink to #13890 and fix PR #13903.
- Fix the test logic: the `Makefile` version seems to not actually be exercising the "library search traverses symlink" logic, because the actual symlinked-to-library is present under the `$(TMPDIR)` directory tree when `bar.rs` is compiled, because the `$(RUSTC)` invocation has an implicit `-L $(TMPDIR)`. The symlink itself was actually broken, i.e. it should've been `ln -nsf $(TMPDIR)/outdir/$(NAME) $(TMPDIR)` but it used `ln -nsf outdir/$(NAME) $(TMPDIR)`. The rmake.rs version now explicitly separates the two directory trees and sets the CWD of the `bar.rs` rustc invocation so that the actual library is *not* present under its CWD tree.

I.e. it is now

```
$test_output/           # rustc foo.rs -o actual_lib_dir/libfoo.rlib
    actual_lib_dir/
        libfoo.rlib
    symlink_lib_dir/    # CWD set; rustc -L . bar.rs
        libfoo.rlib --> $test_output/actual_lib_dir/libfoo.rlib
```

Partially supersedes #129011.
This PR is co-authored with `@Oneirical.`

r? compiler
2024-12-28 16:50:38 +11:00
许杰友 Jieyou Xu (Joe)
b32591e580 tests: migrate branch-protection-check-IBT to rmake.rs
- The Makefile version *never* ran because of Makefile syntax confusion.
- The test would've always failed because precompiled std is not built
  with `-Z cf-protection=branch`, but linkers require all input object
  files to indicate IBT support in order to enable IBT for the
  executable, which is not the case for std.
- Thus, the test input file is instead changed to a `no_std` + `no_core`
  program.

Co-authored-by: Jerry Wang <jerrylwang123@gmail.com>
Co-authored-by: Oneirical <manchot@videotron.ca>
2024-12-28 11:58:32 +08:00
许杰友 Jieyou Xu (Joe)
b77ab2dd90 tests: migrate libs-through-symlink to rmake.rs
- Document test intent, backlink to #13890 and fix PR #13903.
- Fix the test logic: the `Makefile` version seems to not actually be
  exercising the "library search traverses symlink" logic, because the
  actual symlinked-to-library is present under the directory tree when
  `bar.rs` is compiled, because the `$(RUSTC)` invocation has an
  implicit `-L $(TMPDIR)`. The symlink itself was actually broken, i.e.
  it should've been `ln -nsf $(TMPDIR)/outdir/$(NAME) $(TMPDIR)` but it
  used `ln -nsf outdir/$(NAME) $(TMPDIR)`.

Co-authored-by: Oneirical <manchot@videotron.ca>
2024-12-28 11:53:01 +08:00