-
Notifications
You must be signed in to change notification settings - Fork 13.3k
⬆️ rust-analyzer #103177
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
⬆️ rust-analyzer #103177
Conversation
VS Code problem matcher are restricted to be static "regexes". You can't create a problem matcher dynamically, and you can't use custom code in lieu of problem matcher. This creates a problem for rust/cargo compiler errors. They use paths relative to the root of the Cargo workspace, but VS Code doesn't necessary know where that root is. Luckily, there's a way out: our current problem matcher is defined like this: "fileLocation": [ "autoDetect", "${workspaceRoot}" ], That means that relative pahts would be resoleved relative to workspace root. VS Code allows to specify a command inside `${}`. So we can plug custom logic there to fetch Cargo's workspace root! And that's exactly what this PR is doing!
Also includes a drive-by refactor of `utils::generate_impl_text_inner`, since that's what drove this change
…defaults, r=Veykril internal: Add `GenericParamList::to_generic_args` and `{TypeParam,ConstParam}::remove_default` APIs Also fixes `generate_impl` not removing the default const param value, though it seems that no one has encountered or reported that issue yet 😅 This initially started out as refactoring `utils::generate_impl_text_inner` to understand it better (which was the reason for adding `{TypeParam,ConstParam}::remove_default`), but ended up also finding another place that needed `GenericParamList::to_generic_args`, hence its addition in here.
… r=Veykril fix: Underline only the intra-doc link itself instead of the whole doc comment
fix: in VSCode, correctly resolve relative paths to errors VS Code problem matcher are restricted to be static "regexes". You can't create a problem matcher dynamically, and you can't use custom code in lieu of problem matcher. This creates a problem for rust/cargo compiler errors. They use paths relative to the root of the Cargo workspace, but VS Code doesn't necessary know where that root is. Luckily, there's a way out: our current problem matcher is defined like this: "fileLocation": [ "autoDetect", "${workspaceRoot}" ], That means that relative pahts would be resoleved relative to workspace root. VS Code allows to specify a command inside `${}`. So we can plug custom logic there to fetch Cargo's workspace root! And that's exactly what this PR is doing!
…-struct, r=Veykril Add convert_named_struct_to_tuple_struct assist Closes rust-lang#11643, since the assist for converting in the other direction is already there (I based most of the implementation and all of the tests on it).
This should be closer to the expected output and gets rid of a few type mismatches in rustc/library
fix(generate_method): correct method indentation inside generated impl and change gen loc should fix rust-lang#10619
Bump `actions/setup-node` Fixes more Node 12 deprecation warnings.
fix: Ignore auto-import assist on parameter names Fixes rust-lang#13105; before & after https://user-images.githubusercontent.com/29666622/195999489-0474c93a-b2bf-41c4-b7da-a4242a8082d8.mov https://user-images.githubusercontent.com/29666622/195999571-605ee09c-bc6f-4ee5-bfe4-73e37254c647.mov
Cast runnableEnv items to string fix rust-lang#13390 An alternative approach could be raising an error if there is non string values.
Update guide.md to reflect support for proc-macros
Two breaking changes: - `TypeFolder` has been split into `TypeFolder` and `FallibleTypeFolder` - `ProjectionTy::self_type_parameter()` has been removed
Bump chalk There's a bug in current chalk that prevents us from properly supporting GATs, which is supposed to be fixed in v0.86. Note the following: - v0.86 is only going to be released next Sunday so I'll keep this PR as draft until then. - This doesn't compile without rust-lang/chalk#779, which I hope will be included in v0.86. I confirmed this compiles with it locally. Two breaking changes from v0.84: - `TypeFolder` has been split into `TypeFolder` and `FallibleTypeFolder` (rust-lang/chalk#772) - `ProjectionTy::self_type_parameter()` has been removed (rust-lang/chalk#778)
feat: Diagnose some incorrect usages of the question mark operator Trying to figure out how the type stuff in r-a works some more, I think I am doing this correct here but I am not quite sure :)
fix link in syntax.md
@bors r+ rollup=iffy
|
☀️ Test successful - checks-actions |
Finished benchmarking commit (e0f8e60): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesThis benchmark run did not return any relevant results for this metric. Footnotes |
r? @ghost