rt: get rid of rust_fn and replace with fn_env_pair plus a little cleanup. - #4915
Closed
luqmana wants to merge 3 commits into
Closed
rt: get rid of rust_fn and replace with fn_env_pair plus a little cleanup.#4915luqmana wants to merge 3 commits into
luqmana wants to merge 3 commits into
Conversation
Contributor
Author
|
Fixed alignment and rebased on incoming. r? |
RalfJung
added a commit
to RalfJung/rust
that referenced
this pull request
Mar 30, 2026
…threads Unblock all threads with exceeded timeouts at once
U007D
pushed a commit
to U007D/rust-mos
that referenced
this pull request
Aug 21, 2026
4913: Remove debugging code for incremental sync r=matklad a=lnicola 4915: Inspect markdown code fences to determine whether to apply syntax highlighting r=matklad a=ltentrup Fixes rust-lang#4904 4916: Warnings as hint or info r=matklad a=GabbeV Fixes rust-lang#4229 This PR is my second attempt at providing a solution to the above issue. My last PR(rust-lang#4721) had to be rolled back(rust-lang#4862) due to it overriding behavior many users expected. This PR solves a broader problem while trying to minimize surprises for the users. ### Problem description The underlying problem this PR tries to solve is the mismatch between [Rustc lint levels](https://doc.rust-lang.org/rustc/lints/levels.html) and [LSP diagnostic severity](https://microsoft.github.io/language-server-protocol/specification#diagnostic). Rustc currently doesn't have a lint level less severe than warning forcing the user to disable warnings if they think they get to noisy. LSP however provides two severitys below warning, information and hint. This allows editors like VSCode to provide more fine grained control over how prominently to show different diagnostics. Info severity shows a blue squiggly underline in code and can be filtered separately from errors and warnings in the problems panel.   Hint severity doesn't show up in the problems panel at all and only show three dots under the affected code or just faded text if the diagnostic also has the unnecessary tag.  ### Solution The solution provided by this PR allows the user to configure lists of of warnings to report as info severity and hint severity respectively. I purposefully only convert warnings and not errors as i believe it's a good idea to have the editor show the same severity as the compiler as much as possible.  ### Open questions #### Discoverability How do we teach this to new and existing users? Should a section be added to the user manual? If so where and what should it say? #### Defaults Other languages such as TypeScript report unused code as hint by default. Should rust-analyzer similarly report some problems as hint/info by default? Co-authored-by: Laurențiu Nicola <lnicola@dend.ro> Co-authored-by: Leander Tentrup <leander.tentrup@gmail.com> Co-authored-by: Gabriel Valfridsson <gabriel.valfridsson@gmail.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #1190.
Also, got rid of
rust_ptr_eqsince it isn't used any as well theRUST_REFCOUNTEDmacros.Fixes #2667: alignment & wrong structure.