Update nalgebra to fix compilation error on Rust 1.40#17
Merged
ecumene merged 1 commit intoecumene:masterfrom Jul 18, 2020
Merged
Update nalgebra to fix compilation error on Rust 1.40#17ecumene merged 1 commit intoecumene:masterfrom
ecumene merged 1 commit intoecumene:masterfrom
Conversation
In Rust 1.40 a future-compatibility-warning will become a hard error, which will cause the dependency `nalgebra v0.17.2` to no longer compile.
```
rust-sloth$ cargo +nightly check
Checking nalgebra v0.17.2
error[E0502]: cannot borrow `*self` as immutable because it is also borrowed as mutable
--> /home/myname/.cargo/registry/src/github.com-1ecc6299db9ec823/nalgebra-0.17.2/src/base/cg.rs:297:44
|
297 | self[(j, i)] += shift[j] * self[(D::dim() - 1, i)];
| ---------------------------^^^^-------------------
| | |
| | immutable borrow occurs here
| mutable borrow occurs here
| mutable borrow later used here
error: aborting due to previous error
For more information about this error, try `rustc --explain E0502`.
error: could not compile `nalgebra`.
To learn more, run the command again with --verbose.
```
To fix this, I ran `cargo update --package nalgebra` to update it to `v0.17.3`.
(Btw, just `cargo update` causes the terminal renderer to mess up...)
Owner
|
WOW This PR is OLD, and I'm sorry. Looks good to me, there's another PR that does the exact same thing. They ran cargo fmt on the code (which I didn't) but I don't really like how it mangles my meticulously written linear algebra!!! Well done! |
Closed
Contributor
Author
Time flys by, doesn't it! :) |
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.
In Rust 1.40 a future-compatibility-warning will become a hard error, which will cause the dependency
nalgebra v0.17.2to no longer compile.Reason: Rust 2015: No longer downgrade NLL errors
To fix this, I ran
cargo update --package nalgebrato update it tov0.17.3.(Just
cargo updatecauses the terminal renderer to mess up...)Btw, this project is amazing ^^
I've made a bash alias
pikachuand I show it to basically every IT person I meet :)