Commit Graph

6 Commits

Author SHA1 Message Date
Corey Farwell
abd1cea145 Stop ignoring expected note/help messages in compiletest suite.
Original issue: https://github.com/rust-lang/rust/issues/21195

Relevant PR: https://github.com/rust-lang/rust/pull/30778

Prior to this commit, if a compiletest testcase included the text
"HELP:" or "NOTE:" (note the colons), then it would indicate to the
compiletest suite that we should verify "help" and "note" expected
messages.

This commit updates this check to also check "HELP" and "NOTE" (not the
absense of colons) so that we always verify "help" and "note" expected
messages.
2016-03-16 21:53:58 -04:00
Sean Patrick Santos
b4bbf3a88d Fix ICE that occurs when an associated const is ambiguous.
Also change several error messages to refer to "items" rather than
"methods", since associated items that require resolution during type
checking are not always methods.
2015-05-13 18:10:01 -06:00
Jorge Aparicio
a079d5e4d2 remove imports 2015-03-16 21:57:42 -05:00
Jorge Aparicio
5b118f5ecd impl str 2015-03-16 21:56:31 -05:00
Huon Wilson
e81ae40770 Try to only suggest implementable traits for method calls.
That is, when offering suggestions for unresolved method calls, avoid
suggesting traits for which implementing the trait for the receiver type
either makes little sense (e.g. type errors, or sugared unboxed
closures), or violates coherence.

The latter is approximated by ensuring that at least one of `{receiver
type, trait}` is local. This isn't precisely correct due to
multidispatch, but the error messages one encounters in such situation
are useless more often than not; it is better to be conservative and
miss some cases, than have overly many false positives (e.g. writing
`some_slice.map(|x| ...)` uselessly suggested that one should implement
`IteratorExt` for `&[T]`, while the correct fix is to call `.iter()`).

Closes #21420.
2015-02-03 22:33:54 +11:00
Huon Wilson
849a38ad86 Avoid suggesting traits multiple times.
This is clearly useless, the user doesn't need to know that they could
implement/import `foo::bar::Baz` 4 times.

Fixes #21405.
2015-01-20 23:10:37 +11:00