diff options
| author | Dylan DPC <99973273+Dylan-DPC@users.noreply.github.com> | 2022-04-10 21:03:34 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-04-10 21:03:34 +0200 |
| commit | 54597ba11f73e642797a51f7cdd264613759e693 (patch) | |
| tree | 4d1eee704eef9e9526117c1f101cb77806fd66fd /library/std/src/sys/unix/stack_overflow.rs | |
| parent | c0655dec7e5ca0b5ecbd843f47afadb57a657d08 (diff) | |
| parent | 8412d5dc5c4f284390f89d0352adae56dbc650e9 (diff) | |
| download | rust-54597ba11f73e642797a51f7cdd264613759e693.tar.gz rust-54597ba11f73e642797a51f7cdd264613759e693.zip | |
Rollup merge of #95784 - WaffleLapkin:typeof_cool_suggestion, r=compiler-errors
Suggest replacing `typeof(...)` with an actual type
This PR adds suggestion to replace `typeof(...)` with an actual type of `...`, for example in case of `typeof(1)` we suggest replacing it with `i32`.
If the expression
1. Is not const (`{ let a = 1; let _: typeof(a); }`)
2. Can't be found (`let _: typeof(this_variable_does_not_exist)`)
3. Or has non-suggestable type (closure, generator, error, etc)
we don't suggest anything.
The 1 one is sad, but it's not clear how to support non-consts expressions for `typeof`.
_This PR is inspired by [this tweet]._
[this tweet]: https://twitter.com/compiler_errors/status/1511945354752638976
Diffstat (limited to 'library/std/src/sys/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions
