(Mostly) revert "Account for type param from other item in note_and_explain
"
This mostly reverts commit 7449478c2f
.
It also removes an `opt_param_at` that really is unnecessary given our
ICE policy for malformed intrinsics.
This commit is contained in:
parent
5ee4db4e05
commit
a25bb5f4ac
3 changed files with 45 additions and 93 deletions
|
@ -164,9 +164,8 @@ pub fn check_intrinsic_type(
|
|||
) {
|
||||
let generics = tcx.generics_of(intrinsic_id);
|
||||
let param = |n| {
|
||||
if let Some(&ty::GenericParamDef {
|
||||
name, kind: ty::GenericParamDefKind::Type { .. }, ..
|
||||
}) = generics.opt_param_at(n as usize, tcx)
|
||||
if let &ty::GenericParamDef { name, kind: ty::GenericParamDefKind::Type { .. }, .. } =
|
||||
generics.param_at(n as usize, tcx)
|
||||
{
|
||||
Ty::new_param(tcx, n, name)
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue