diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2025-07-29 20:14:02 +0000 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2025-08-07 21:39:00 +0000 |
| commit | dd3b8255ca6215b5129181ceb6912aed1370bdce (patch) | |
| tree | f1964d1ee7121e7be5620ece793f745e90681d1c /compiler/rustc_codegen_llvm/src | |
| parent | 26c12c746296e01c2dc13d8078b0a2f1569fcb1c (diff) | |
| download | rust-dd3b8255ca6215b5129181ceb6912aed1370bdce.tar.gz rust-dd3b8255ca6215b5129181ceb6912aed1370bdce.zip | |
Do not suggest pinning missing `.get_ref()`
When suggesting field access which would encounter a method not found, do not suggest pinning when those methods are on `impl Pin` itself. ``` error[E0599]: no method named `get_ref` found for tuple `(BufReader<File>,)` in the current scope --> $DIR/missing-field-access.rs:11:15 | LL | let x = f.get_ref(); | ^^^^^^^ method not found in `(BufReader<File>,)` | help: one of the expressions' fields has a method of the same name | LL | let x = f.0.get_ref(); | ++ ``` instead of ``` error[E0599]: no method named `get_ref` found for tuple `(BufReader<File>,)` in the current scope --> $DIR/missing-field-access.rs:11:15 | LL | let x = f.get_ref(); | ^^^^^^^ method not found in `(BufReader<File>,)` | help: one of the expressions' fields has a method of the same name | LL | let x = f.0.get_ref(); | ++ help: consider pinning the expression | LL ~ let mut pinned = std::pin::pin!(f); LL ~ let x = pinned.as_ref().get_ref(); | ```
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions
