diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-03-24 01:05:51 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-03-24 01:05:51 +0100 |
| commit | 1164c2725e23ade289f948153f915936ee3f6610 (patch) | |
| tree | 42b357ebb0d17d920494ada587497528358d82ee /compiler/rustc_interface/src | |
| parent | 3d9ee88ea28bdf39b8e5fbf11405ed60acaa3eb4 (diff) | |
| parent | f4d30b156b2958ba01b59a1751e16b5f6e157fcb (diff) | |
| download | rust-1164c2725e23ade289f948153f915936ee3f6610.tar.gz rust-1164c2725e23ade289f948153f915936ee3f6610.zip | |
Rollup merge of #122217 - estebank:issue-119685, r=fmease
Handle str literals written with `'` lexed as lifetime
Given `'hello world'` and `'1 str', provide a structured suggestion for a valid string literal:
```
error[E0762]: unterminated character literal
--> $DIR/lex-bad-str-literal-as-char-3.rs:2:26
|
LL | println!('hello world');
| ^^^^
|
help: if you meant to write a `str` literal, use double quotes
|
LL | println!("hello world");
| ~ ~
```
```
error[E0762]: unterminated character literal
--> $DIR/lex-bad-str-literal-as-char-1.rs:2:20
|
LL | println!('1 + 1');
| ^^^^
|
help: if you meant to write a `str` literal, use double quotes
|
LL | println!("1 + 1");
| ~ ~
```
Fix #119685.
Diffstat (limited to 'compiler/rustc_interface/src')
0 files changed, 0 insertions, 0 deletions
