about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/common.rs
diff options
context:
space:
mode:
authorJacob Pratt <jacob@jhpratt.dev>2024-12-21 01:18:40 -0500
committerGitHub <noreply@github.com>2024-12-21 01:18:40 -0500
commit36485acdac216c45fcdf8cacd5b762ffe2d58af7 (patch)
treed999f8a2664d8e106514d3f64410870c0f050d98 /compiler/rustc_codegen_llvm/src/common.rs
parent13170cd787cb733ed24842ee825bcbd98dc01476 (diff)
parent1549af29c3fea4c9afde42712b5092d8cc98e140 (diff)
downloadrust-36485acdac216c45fcdf8cacd5b762ffe2d58af7.tar.gz
rust-36485acdac216c45fcdf8cacd5b762ffe2d58af7.zip
Rollup merge of #133087 - estebank:stmt-misparse, r=chenyukang
Detect missing `.` in method chain in `let` bindings and statements

On parse errors where an ident is found where one wasn't expected, see if the next elements might have been meant as method call or field access.

```
error: expected one of `.`, `;`, `?`, `else`, or an operator, found `map`
  --> $DIR/missing-dot-on-statement-expression.rs:7:29
   |
LL |     let _ = [1, 2, 3].iter()map(|x| x);
   |                             ^^^ expected one of `.`, `;`, `?`, `else`, or an operator
   |
help: you might have meant to write a method call
   |
LL |     let _ = [1, 2, 3].iter().map(|x| x);
   |                             +
```
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/common.rs')
0 files changed, 0 insertions, 0 deletions