False Cannot move on primitive types
See original GitHub issueEnvironment
- IntelliJ Rust plugin version: 0.2.114.2151-193
- Rust toolchain version: 1.42 nightly
- IDE name and version: CLion 2019.3.3
- Operating system: Windows 10
Problem description
Since the last update, there are a ton of false positive “Cannot move” errors on copying primitive types:
fn get_time_multiplier(&self) -> f32 {
self.time_multiplier // Cannot move
}
Steps to reproduce
Create a struct with a filed of primitive type and a getter for it.
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Cannot move std::any - c++ - Stack Overflow
The problem is not moving std::any, it's that std::any itself does not support move-only types (std::unique_ptr for example).
Read more >How to Handle the Incompatible Types Error in Java - Rollbar
The Java incompatible types error happens when a value assigned to a variable or returned by a method is incompatible with the one...
Read more >Data Types in Java | Primitive and Non-Primitive Data Types
A boolean data type comprises of a bit of information and can store only true or false values. This data type is used...
Read more >Primitive Data Types (The Java™ Tutorials > Learning the ...
The eight primitive data types supported by the Java programming language ... boolean: The boolean data type has only two possible values: true...
Read more >Understanding when not to std::move in C++
In this article, I will introduce two new warnings I've implemented for GCC 9 that deal with incorrect usage of std::move . -Wpessimizing-move....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I have also run into this issue. Code to reproduce: https://pastebin.com/4HS4w9Se The issue is on line 37,
self.ft * rhs.ft
:self
andrhs
are red-underlined with the tooltip “Cannot move”.I am not using the experimental macro expansion. I have tried invalidating my caches and restarting.
I am having this issue. The following is a minimal example:
The error only appears when I include the dependency
bevy = "0.5"
(even though I am not using the package). I have not found any other packages that replicate this behaviour. Earlier versions of Bevy do not cause this behaviour.I have tried invalidating the cache and restarting, and making a new project. The problem goes away when I set ‘Expand declarative macros’ to ‘Use old engine’.