I have this weird situation where:
If I copy/paste an example, it works.
My manually typed in code does not work.
I went through the official-example and my-typed-version and I can't find the difference.
Is there something better than
diff for computing the diff between two *.rs files ?
PS: I tracked down the error. I wrote
t.2 instead of
t.3 ... which caused a cryptic example on a COMPLETELY DIFFERENT LINE.
Anyway, I'm still looking for a tool that can do a "semantic diff" *ignoring comments, whitespace, etc ...) so it's easier to figure out where manually typed in code differs from sample code.
At least git diff and GNU diff can ignore various kinds of whitespace, including all of it with the
-w switch. GNU diff can also ignore changes on lines matching a regex (could help with comments). Git diff can also do
--word-diff to precisely locate changed words, GNU has separate wdiff for this.
That's all not really semantic, but still could help.
For larger projects I typically use kdiff3