about summary refs log tree commit diff
path: root/tests/ui/issues
diff options
context:
space:
mode:
authorlcnr <rust@lcnr.de>2025-09-23 15:32:25 +0200
committerlcnr <rust@lcnr.de>2025-09-26 16:33:15 +0200
commit6b379b560df483307958f2a606a1dd514fff36ca (patch)
tree857c1e760d4c66445a8295f657a97ab7253109a1 /tests/ui/issues
parent70f6493f261810b07d69ab0ffb661cf4ed8a97a7 (diff)
downloadrust-6b379b560df483307958f2a606a1dd514fff36ca.tar.gz
rust-6b379b560df483307958f2a606a1dd514fff36ca.zip
use `try_structurally_resolve_type` for method receiver
We'll still error due to the `opt_bad_ty` of `method_autoderef_steps`.
This slightly worsens the span of `infer_var.method()` which is now the
same as for `Box::new(infer_var).method()`.

Unlike `structurally_resolve_type`, `probe_op` does not check whether
the infcx is already tainted, so this results in 2 previously not emitted
errors.
Diffstat (limited to 'tests/ui/issues')
-rw-r--r--tests/ui/issues/issue-2151.stderr2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/ui/issues/issue-2151.stderr b/tests/ui/issues/issue-2151.stderr
index b130f162414..59fef42eb5e 100644
--- a/tests/ui/issues/issue-2151.stderr
+++ b/tests/ui/issues/issue-2151.stderr
@@ -4,7 +4,7 @@ error[E0282]: type annotations needed
 LL |     let x = panic!();
    |         ^
 LL |     x.clone();
-   |     - type must be known at this point
+   |       ----- type must be known at this point
    |
 help: consider giving `x` an explicit type
    |