Commit Graph

21 Commits

Author SHA1 Message Date
bjorn3 37dcd426f2 Make rustc_parse_format compile on stable
This allows it to be used by lightweight formatting systems and may
allow it to be used by rust-analyzer.
2022-05-03 11:26:58 +02:00
Yuri Astrakhan 4b2b8734c7 Spellchecking compiler comments
This PR cleans up the rest of the spelling mistakes in the compiler comments. This PR does not change any literal or code spelling issues.
2022-03-30 15:14:15 -04:00
Chayim Refael Friedman 1b206f31a6 Correctly mark the span of captured arguments in format_args!()
It should only include the identifier, or misspelling suggestions will be wrong.
2022-02-16 07:34:06 +00:00
Mark Rousskov f5a19f35c1 Migrate to 2021 2021-09-20 22:21:42 -04:00
Jade c72215df19 rfc3052: Remove authors field from Cargo manifests
Since RFC 3052 soft deprecated the authors field anyway, hiding it from
crates.io, docs.rs, and making Cargo not add it by default, and it is
not generally up to date/useful information, we should remove it from
crates in this repo.
2021-07-29 14:56:05 -07:00
Guillaume Gomez 5257da3d08 Rework SESSION_GLOBALS API to prevent overwriting it 2021-07-08 16:16:28 +02:00
Pietro Albini cfbc4671af remove cfg(bootstrap) 2021-05-24 11:07:48 -04:00
Yuki Okushi e4ad96394f Rollup merge of #83348 - osa1:issue83344, r=jackh726
format macro argument parsing fix

When the character next to `{}` is "shifted" (when mapping a byte index
in the format string to span) we should avoid shifting the span end
index, so first map the index of `}` to span, then bump the span,
instead of first mapping the next byte index to a span (which causes
bumping the end span too much).

Regression test added.

Fixes #83344

---

r? ```@estebank```
2021-03-28 01:33:13 +09:00
Ömer Sinan Ağacan 16b1878c02 format macro argument parsing fix
When the character next to `{}` is "shifted" (when mapping a byte index
in the format string to span) we should avoid shifting the span end
index, so first map the index of `}` to span, then bump the span,
instead of first mapping the next byte index to a span (which causes
bumping the end span too much).

Regression test added.

Fixes #83344
2021-03-27 13:06:36 +03:00
Yuki Okushi 8113e50bf6 Rollup merge of #83343 - osa1:issue83340, r=jackh726
Simplify and fix byte skipping in format! string parser

Fixes '\\' handling in format strings.

Fixes #83340
2021-03-27 12:37:19 +09:00
Ömer Sinan Ağacan 18abd1b4e3 Simplify and fix byte skipping in format! string parser
Fixes '\\' handling in format strings.

Fixes #83340
2021-03-21 14:42:27 +03:00
mark 8b7973863f stabilize or_patterns 2021-03-19 19:45:32 -05:00
David Hewitt 6d23448a13 parse_format: treat r" as a literal 2021-02-06 15:01:07 +00:00
Ömer Sinan Ağacan f624cdef3b rustc_parse_format: Fix character indices in find_skips
Fixes #81006
2021-01-17 17:40:58 +03:00
LingMan 382fe93c51 Use Option::map_or instead of .map(..).unwrap_or(..) 2021-01-14 19:23:59 +01:00
Erik Hofmayer de60043a75 /nightly/nightly-rustc 2020-09-23 21:51:56 +02:00
Erik Hofmayer 6785e43937 Updated html_root_url for compiler crates 2020-09-23 21:14:43 +02:00
ecstatic-morse acaaafaa83 Rollup merge of #76888 - matthiaskrgr:clippy_single_match_2, r=Dylan-DPC
use if let instead of single match arm expressions

use if let instead of single match arm expressions to compact code and reduce nesting (clippy::single_match)
2020-09-21 20:40:55 -07:00
Matthias Krüger de88da8426 use if let instead of single match arm expressions to compact code and reduce nesting (clippy::single_match) 2020-09-20 11:42:52 +02:00
est31 36c042edbf Remove redundant #![feature(...)] 's from compiler/ 2020-09-17 07:58:45 +02:00
mark c11a3894e6 mv compiler to compiler/ 2020-08-30 18:45:07 +03:00