about summary refs log tree commit diff
path: root/compiler/rustc_parse/src/parser/stmt.rs
diff options
context:
space:
mode:
authorTrevor Gross <t.gross35@gmail.com>2024-08-24 21:03:30 -0500
committerGitHub <noreply@github.com>2024-08-24 21:03:30 -0500
commit00308920aec0795e9de1a3f80324ac93b502a483 (patch)
tree8c9e57d8f0b6c846ced5e805402b5aab6aa8a8a0 /compiler/rustc_parse/src/parser/stmt.rs
parentf167efad2f51088d86180ee89177b3d7c9e7c2f5 (diff)
parentf6767f7a68f42101e6820171c033565e0f3a807a (diff)
downloadrust-00308920aec0795e9de1a3f80324ac93b502a483.tar.gz
rust-00308920aec0795e9de1a3f80324ac93b502a483.zip
Rollup merge of #128467 - estebank:unsized-args, r=cjgillot
Detect `*` operator on `!Sized` expression

The suggestion is new:

```
error[E0277]: the size for values of type `str` cannot be known at compilation time
  --> $DIR/unsized-str-in-return-expr-arg-and-local.rs:15:9
   |
LL |     let x = *"";
   |         ^ doesn't have a size known at compile-time
   |
   = help: the trait `Sized` is not implemented for `str`
   = note: all local variables must have a statically known size
   = help: unsized locals are gated as an unstable feature
help: references to `!Sized` types like `&str` are `Sized`; consider not dereferencing the expression
   |
LL -     let x = *"";
LL +     let x = "";
   |
```

Fix #128199.
Diffstat (limited to 'compiler/rustc_parse/src/parser/stmt.rs')
0 files changed, 0 insertions, 0 deletions