Unify primitive errors with other intra-link errors

Now that `PrimTy::name()` exists, there's no need to carry around the
name of the primitive that failed to resolve. This removes the variants
special-casing primitives in favor of `NotResolved`.

- Remove `NoPrimitiveImpl` and `NoPrimitiveAssocItem`
- Remove hacky `has_primitive` check in `resolution_failure()`
- Fixup a couple tests that I forgot to `--bless` before
This commit is contained in:
Joshua Nelson 2020-09-20 02:39:19 -04:00
parent 472e52e5a0
commit 049d29bac5
4 changed files with 47 additions and 43 deletions

View file

@ -54,7 +54,16 @@
/// [u8::not_found]
//~^ ERROR unresolved link
//~| NOTE the builtin type `u8` does not have an associated item named `not_found`
//~| NOTE the builtin type `u8` has no associated item named `not_found`
/// [std::primitive::u8::not_found]
//~^ ERROR unresolved link
//~| NOTE the builtin type `u8` has no associated item named `not_found`
/// [type@Vec::into_iter]
//~^ ERROR unresolved link
//~| HELP to link to the associated function, add parentheses
//~| NOTE this link resolves to the associated function `into_iter`
/// [S!]
//~^ ERROR unresolved link