Rollup merge of #152727 - lcnr:method-ambig-err-taint, r=jackh726
`probe_op` silence ambiguity errors if tainted see the `proc-macro/quote/not-repeatable.rs` test for a case where this is useful r? types
This commit is contained in:
commit
dd27f85cb3
9 changed files with 57 additions and 53 deletions
|
|
@ -490,6 +490,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
|
|||
.unwrap_or_else(|_| span_bug!(span, "instantiating {:?} failed?", ty));
|
||||
let ty = self.resolve_vars_if_possible(ty.value);
|
||||
let guar = match *ty.kind() {
|
||||
_ if let Some(guar) = self.tainted_by_errors() => guar,
|
||||
ty::Infer(ty::TyVar(_)) => {
|
||||
// We want to get the variable name that the method
|
||||
// is being called on. If it is a method call.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue