Remove mut #150
GitHub Actions / clippy
failed
Nov 30, 2023 in 0s
clippy
2 errors
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 2 |
Warning | 0 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.76.0-nightly (b10cfcd65 2023-11-29)
- cargo 1.76.0-nightly (26333c732 2023-11-28)
- clippy 0.1.76 (b10cfcd 2023-11-29)
Annotations
Check failure on line 176 in scopegraphs-lib/src/resolve/topdown.rs
github-actions / clippy
cannot return value referencing temporary value
error[E0515]: cannot return value referencing temporary value
--> scopegraphs-lib/src/resolve/topdown.rs:176:13
|
174 | let data = self.sg.borrow().get_data(path.target());
| ---------------- temporary value created here
175 | if (self.data_wellformedness)(data) {
176 | Env::single(path.clone().resolve(data))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ returns a value referencing data owned by the current function
Check failure on line 150 in scopegraphs-lib/src/resolve/topdown.rs
github-actions / clippy
cannot borrow `*self` as mutable, as it is behind a `&` reference
error[E0596]: cannot borrow `*self` as mutable, as it is behind a `&` reference
--> scopegraphs-lib/src/resolve/topdown.rs:150:33
|
150 | EdgeOrData::Data => self.resolve_data(path),
| ^^^^ `self` is a `&` reference, so the data it refers to cannot be borrowed as mutable
|
help: consider changing this to be a mutable reference
|
143 | &mut self,
| ~~~~~~~~~
Loading