Unhelpful Error with #[project] when ommitting dummy attribute on nightly and forgetting mut on self #63
Labels
A-diagnostics
Area: Messages for errors and warnings
C-upstream-bug
Category: This is a bug of compiler or dependencies (the fix may require action in the upstream)
Apologies for the long title, this issue is hard to put in a sentence. Basically I upgraded from a previous alpha to alpha 7 and ended up with something like this modified example code (from the docs on #[project]):
As I am on nightly (tested on latest 2019-09-02 und 2019-08-21), I didn't put the dummy #[project] on the function itself. Then my code didn't have the mut self (I think this wasn't required in a previous version?). With the code in question rustc literally just outputs
error[E0596]: cannot borrow
selfas mutable, as it is not declared as mutable
without any further information in what file or line the error actually occurs.
Putting the #[project] attribute on the function produces a proper error message:
I don't know enough about proc macros to tell whether anything can be done about this or if its just a rustc issue, so I'm posting it here for now.
The text was updated successfully, but these errors were encountered: