profile
viewpoint
Maxim Banaev maxim-banaev JetBrains Moscow

create barnchmaxim-banaev/basicDemo

branch : origin

created branch time in 3 months

push eventmaxim-banaev/clang-tidy-inspections

Maxim Banaev

commit sha 2518f0819b445bab0b8f9c75fcae6d2baa0697ae

move method-can-be-static to readability-convert-member-functions-to-static

view details

push time in 3 months

issue openedintellij-rust/intellij-rust

Clion/Rust Plugin do not recognize generic parameter names when auto completing in impl block

<!-- Hello and thank you for the issue! If you would like to report a bug, we have added some points below that you can fill out. Consider using "Help | Create New Issue" action that fills out all necessary information automatically. Feel free to remove all the irrelevant text to request a new feature. -->

Environment

  • IntelliJ Rust plugin version:
  • Rust toolchain version:
  • IDE name and version: CLion 2021.1.3
  • Operating system: Windows 10

Problem description

When implementing for a struct that takes generic type parameters, the IDE does not recognize the name of the generic type as a viable auto-complete option in an impl block.

A simple example using a binary search tree:

Struct with Generics:

pub struct BinarySearchTree<Key, Value>{

pub root: Node<Key, Value>,

}

In the impl block, the IDE attempts to auto-import a different value than the generic parameter name. This is really annoying because it requires either hitting the escape key, which also brings you to normal mode if you are using the ideaVim extension, or requires going back and cleaning up the auto complete statement.

image

Submitted to CLion tracker as https://youtrack.jetbrains.com/issue/CPP-26364

Steps to reproduce

<!-- Please include as much of your codebase as needed to reproduce the error. If the relevant files are large, please provide a link to a public repository or a Gist.

If you provide a screenshot of some code, please also copy-paste the corresponding code snippet here. -->

created time in 3 months

issue openedintellij-rust/intellij-rust

False positive: Use after move on Copy type

<!-- Hello and thank you for the issue! If you would like to report a bug, we have added some points below that you can fill out. Consider using "Help | Create New Issue" action that fills out all necessary information automatically. Feel free to remove all the irrelevant text to request a new feature. -->

Environment

  • IntelliJ Rust plugin version: 0.4.153.4056-212
  • Rust toolchain version: nightly-x86_64-apple-darwin - rustc 1.56.0-nightly (5eacec9ec 2021-08-28) (also tested on stable 1.54.0)
  • IDE name and version: CL-212.4746.93
  • Operating system: OS Mac OS X(x86_64) v11.5.2

Problem description

The following code does compile but is detected as an error (use after move). u32 is Copy and is not actually moved. I have invalidated all caches, and the error persists.

fn main() { let x = 5u32; let y = x + 1; let z = x + 2; //< Use of moved value }

Steps to reproduce

<!-- Please include as much of your codebase as needed to reproduce the error. If the relevant files are large, please provide a link to a public repository or a Gist.

If you provide a screenshot of some code, please also copy-paste the corresponding code snippet here. -->

created time in 3 months

more