-
Notifications
You must be signed in to change notification settings - Fork 13k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Subtree update of rust-analyzer
#135775
Merged
Merged
Subtree update of rust-analyzer
#135775
+9,088
−2,920
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…`Into<ast::Expr>` This will help with specializing the various `make::expr_*` functions later
`expr_unit` is just a shortcut for a common expression, so it belongs in `make::ext`
`make::match_arm` should take a single `ast::Pat`, and callers can handle creating an `ast::OrPat` if need be. It should also take a proper `ast::MatchGuard`, instead of making one itself.
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 rust-lang#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 rust-lang#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.
fix: Fix a bug with missing binding in MBE
minor: Fix `test-fixture` autopublishing
internal: Migrate `if let` replacement assists to `SyntaxEditor`
fix: Fix `env`/`option_env` macro check disregarding macro_rules definitions
Also changes `make::expr_empty_block()` to return `ast::BlockExpr` instead of `ast::Expr`
It should be left biased, not right biased, because when e.g. the use has typed `h` then requested completion, the `h` is what we want to find, not the next token (which might indeed be inside a macro call). I'm not sure why I wrote `right_biased()` to begin with (I remember I had a reason and not just "both should work"), I might've copied the code in `expand_and_analyze()` (which is wrong, because there it lookups on the speculative file, where right biased will always find the correct token and left biased not). This is still not perfect, because there might not be an identifier already typed then we might still end up in a macro call, but this is the best we can do.
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.
the constant is wrong on some platforms (e.g., on mips64el it's 0x10, and 0x8 is RTLD_NOLOAD which makes all this functionality broken), the libc crate takes care of those differences for us. fallback to not setting the flag in non-glibc environments - some of them might have support for it using a different value that we don't know about, and some of them lack it entirely. Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
minor: Sync from downstream
…o-srv-portability proc-macro-srv: make usage of RTLD_DEEPBIND portable
…neric-args fix: Fix a bug where enum variants were not considered properly in type ns resolution
…es-on-background-thread lsp-server: Drop outgoing messages on background thread
Extract variable assist triggers less eagerly
…m_into feat: Add the ability to jump from `into` to `from` definitions
Properly record meaningful imports as re-exports in symbol index
rustbot
added
the
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
label
Jan 20, 2025
rust-analyzer is developed in its own repository. If possible, consider making this change to rust-lang/rust-analyzer instead. cc @rust-lang/rust-analyzer |
@bors r+ p=1 subtree sync |
bors
added
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
and removed
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
labels
Jan 20, 2025
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Jan 20, 2025
Subtree update of `rust-analyzer` r? `@ghost`
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Jan 20, 2025
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#133695 (Reexport likely/unlikely in std::hint) - rust-lang#135330 (Respect --sysroot for rustc -vV and -Cpasses=list) - rust-lang#135333 (Partial progress on rust-lang#132735: Replace extern "rust-intrinsic" with #[rustc_intrinsic] across the codebase) - rust-lang#135741 (Recognise new IPv6 documentation range from IETF RFC 9637) - rust-lang#135770 (Update contributing docs for submodule/subtree changes) - rust-lang#135775 (Subtree update of `rust-analyzer`) - rust-lang#135776 (Subtree sync for rustc_codegen_cranelift) r? `@ghost` `@rustbot` modify labels: rollup
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Jan 20, 2025
Rollup merge of rust-lang#135775 - lnicola:sync-from-ra, r=lnicola Subtree update of `rust-analyzer` r? ``@ghost``
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
r? @ghost