Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign up"help" messages in compiler output is ignored #21195
Comments
kmcallister
added
A-testsuite
E-easy
labels
Jan 16, 2015
This comment has been minimized.
This comment has been minimized.
|
Perhaps compiletest should yell loudly if there are any unparsed |
oli-obk
referenced this issue
Jan 19, 2015
Merged
librustc: hint close matches on accessing nonexisting fields #21187
oli-obk
changed the title
//~ HELP comments are ignored in unit tests.
"help" messages in compiler output is ignored
Jan 19, 2015
This comment has been minimized.
This comment has been minimized.
|
kmcallister: this already happens, it's the other direction that is not checked |
This comment has been minimized.
This comment has been minimized.
|
I think this is intentional. It’d be painful to have to annotate every single |
This comment has been minimized.
This comment has been minimized.
|
almost. |
fhahn
referenced this issue
Nov 28, 2015
Merged
Show similar trait implementations if no matching impl is found #29949
fhahn
added a commit
to fhahn/rust
that referenced
this issue
Jan 8, 2016
fhahn
referenced this issue
Jan 8, 2016
Merged
Expect all help/note messages are specified in a cfail test #30778
nikomatsakis
added
I-nominated
T-compiler
labels
Jan 8, 2016
This comment has been minimized.
This comment has been minimized.
|
(pointed here from #30778); it seems like a fine idea to me |
This comment has been minimized.
This comment has been minimized.
|
I also think it makes sense to have a way to make tests fail if there are unexpected note/help messages (e.g. making sure a new note/help messages does not show up in unexpected places). I guess we currently do not fail on unexpected help/note messages for historical reasons (as far as I remember, earlier versions of Rust did not have help/note messages). However failing on unexpected help/note messages as default now would require adding a lot of additional annotations. So providing a way to opt in seems reasonable to me. |
This comment has been minimized.
This comment has been minimized.
|
@fhahn opt-in seems good, for the reasons you cite. I've also rarely actually wanted a failure in those cases in the tests I write, at least. |
This comment has been minimized.
This comment has been minimized.
|
I personally like the idea that if any help/note are specified then they must be exhaustively specified, and otherwise they're entirely optional. Seems like a good way to ensure that the diagnostics are kept in check and they don't accidentally blow up to 1k help messages by accident. |
This comment has been minimized.
This comment has been minimized.
|
In discussion in the compiler meeting we agreed that "match all help/note if we match any help/note" is a reasonable heuristic and we should just do that. If we ever want to test that there are NO note/help, we can always add something like |
oli-obk commentedJan 15, 2015
Removing these will still pass make check.