Hey there, I’m working through the Rust book right now (it’s fantastic, by the way) but I’ve hit a snag with rustfmt.
On my work laptop it works absolutely fine, but on my home laptop (also an XPS 13 with Arch Linux) it errors when I use <dyn Error>
on this line https://github.com/Olical/rust-book/blob/984fcc7446d2a2b04ebee97760260e5032883d66/minigrep/src/lib.rs#L29
error: expected one of `!`, `(`, `+`, `,`, `::`, `<`, or `>`, found `Error`
--> /home/oliver/repos/rust-book/minigrep/src/lib.rs:29:50
|
29 | pub fn run(config: Config) -> Result<(), Box<dyn Error>> {
| ^^^^^
If I remove the dyn
it’s absolutely fine. My local version is:
$ rustfmt -V
0.8.3 ()
I’m using stable in both environments, I’ve tried to update everything I can. Does anything look out of date or sound strange? Is there any common thing I can do to make sure the right version is installed?
Thanks a lot!