about summary refs log tree commit diff
path: root/compiler/rustc_parse/src/parser
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2024-07-31 22:39:40 +0000
committerEsteban Küber <esteban@kuber.com.ar>2024-08-08 17:35:40 +0000
commitf6767f7a68f42101e6820171c033565e0f3a807a (patch)
tree4a665d914a01652bf6d8df250aaa062bd0ce2042 /compiler/rustc_parse/src/parser
parentd3a393932eeafa4638ae22f5ecbc38bf38760d0e (diff)
downloadrust-f6767f7a68f42101e6820171c033565e0f3a807a.tar.gz
rust-f6767f7a68f42101e6820171c033565e0f3a807a.zip
Detect `*` operator on `!Sized` expression
```
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 are always `Sized`, even if they point to unsized data; consider not dereferencing the expression
   |
LL -     let x = *"";
LL +     let x = "";
   |
```
Diffstat (limited to 'compiler/rustc_parse/src/parser')
0 files changed, 0 insertions, 0 deletions