Migrate trivially translatable rustc_parse diagnostics#110873
Migrate trivially translatable rustc_parse diagnostics#110873bors merged 1 commit intorust-lang:masterfrom
rustc_parse diagnostics#110873Conversation
|
r? @nnethercote (rustbot has picked a reviewer for you, use r? to override) |
| span: kw_token.span, | ||
| item: item.unwrap().span, | ||
| kw_str, | ||
| keyword: keyword.as_str(), |
There was a problem hiding this comment.
Including a string here rather than the Symbol as the keywords are formatted as r#enum
| } | ||
|
|
||
| pub fn check_meta_bad_delim(sess: &ParseSess, span: DelimSpan, delim: MacDelimiter, msg: &str) { | ||
| pub fn check_meta_bad_delim(sess: &ParseSess, span: DelimSpan, delim: MacDelimiter) { |
There was a problem hiding this comment.
Split these to two diagnostics because of https://github.com/projectfluent/fluent/wiki/Good-Practices-for-Developers#prefer-wet-over-dry. I'm not entirely sure that there really needs to be a special message for cfg_attr however
| | | ||
| LL | use std:fs::File; | ||
| | ^ help: use double colon | ||
| | |
There was a problem hiding this comment.
If the repeated note here is bad, I can either back this out or add note_once to the derive API
There was a problem hiding this comment.
I don't think it's that big of a deal. note_once seems like overkill here honestly.
| | | ||
| LL | use std:fs::File; | ||
| | ^ help: use double colon | ||
| | |
There was a problem hiding this comment.
I don't think it's that big of a deal. note_once seems like overkill here honestly.
| parse_expect_label_found_ident = expected a label, found an identifier | ||
| .suggestion = labels start with a tick | ||
|
|
||
| parse_inappropriate_default = {$article} {$descr} cannot be `default` |
There was a problem hiding this comment.
Hmm... article + descr is gonna be hard to translate. but oh well.
|
@bors r+ |
…ial, r=compiler-errors Migrate trivially translatable `rustc_parse` diagnostics cc rust-lang#100717 Migrate diagnostics in `rustc_parse` which are emitted in a single statement. I worked on this by expanding the lint introduced in rust-lang#108760, although that isn't included here as there is much more work to be done to satisfy it
…iaskrgr Rollup of 6 pull requests Successful merges: - rust-lang#110766 (More core::fmt::rt cleanup.) - rust-lang#110873 (Migrate trivially translatable `rustc_parse` diagnostics) - rust-lang#110904 (rustdoc: rebind bound vars to type-outlives predicates) - rust-lang#110913 (Add some missing built-in lints) - rust-lang#110918 (`remove_dir_all`: try deleting the directory even if `FILE_LIST_DIRECTORY` access is denied) - rust-lang#110920 (Fix unavailable url) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
cc #100717
Migrate diagnostics in
rustc_parsewhich are emitted in a single statement. I worked on this by expanding the lint introduced in #108760, although that isn't included here as there is much more work to be done to satisfy it