Commit Graph

640 Commits

Author SHA1 Message Date
Lukas Wirth
6674bd898e fix: Add trait alias grammar to rust.ungram 2022-11-11 15:25:15 +01:00
bors
d1c9775171 Auto merge of #13568 - noritada:fix/len-of-byte-string-with-escaped-newlines, r=Veykril
Fix the length displayed for byte string literals with escaped newlines

This is a fix for the problem I reported earlier: "the length of byte strings containing escaped newlines is displayed two bytes longer when the first escaped character is a newline".

I would appreciate it if you could review the fix.
Many thanks.

Closes #13567
2022-11-07 15:04:40 +00:00
Noritada Kobayashi
2340d7059e Add test code for unescaping byte strings 2022-11-07 23:39:02 +09:00
Noritada Kobayashi
bdf8547013 Clarify the intent
Thanks to Lukas Wirth for a suggestion.
2022-11-07 22:51:29 +09:00
Lukas Wirth
ffd7bf8bf9 Bump Cargo rust-version fields to latest stable 2022-11-07 12:59:51 +01:00
Noritada Kobayashi
180b4cedec Fix the length displayed for byte string literals with escaped newlines
The length of byte strings containing escaped newlines is displayed two
bytes longer when the first escaped character is a newline.

This is due to a small bug in handling the first escaped newline in
string literals.

Closes #13567
2022-11-07 20:07:16 +09:00
Laurențiu Nicola
cff7ab1308 Fix typos 2022-11-07 12:54:12 +02:00
unexge
62a6cdfe46 Use let-else statements in Convert to guarded return assist 2022-11-01 23:02:10 +00:00
Ryo Yoshida
63cba43b48
Collect generic arguments in associated type bindings 2022-10-27 19:18:59 +09:00
Lukas Wirth
9d3e616f82 Simplify 2022-10-19 21:17:11 +02:00
bors
855cd5c280 Auto merge of #13418 - lnicola:bump-deps, r=lnicola
Bump deps
2022-10-15 11:27:12 +00:00
Laurențiu Nicola
f5bbf9a06a Bump proc-macro2 2022-10-15 13:02:10 +03:00
Laurențiu Nicola
39777bf941 Bump rowan 2022-10-15 12:58:57 +03:00
Laurențiu Nicola
cbce0cda08 Bump anyhow, arbitrary, itertools, semver, serde 2022-10-15 12:52:34 +03:00
Laurențiu Nicola
82a8774a08 Avoid format! in favor of to_string 2022-10-12 17:44:15 +03:00
DropDemBits
1015a177d4 Have to_generic_args return ast::GenericArgList 2022-10-09 21:03:38 -04:00
DropDemBits
bfe6ec9b77 Add {TypeParam, ConstParam}::remove_default
Also includes a drive-by refactor of `utils::generate_impl_text_inner`,
since that's what drove this change
2022-10-09 18:46:31 -04:00
DropDemBits
75f641799e Add GenericParamList::to_generic_args 2022-10-09 18:44:23 -04:00
Laurențiu Nicola
df7d39b2ed Bump once_cell 2022-10-08 21:25:11 +03:00
unexge
7e5e5177b6 Generate From impls manually 2022-09-26 19:29:28 +01:00
unexge
89107d5469 Emit unconfigured code diagnostics for fields 2022-09-26 19:04:57 +01:00
ice1000
364d9c4910 Fmt 2022-09-02 21:18:36 +00:00
ice1000
a695e900f6 Create trait Removable, replace ted APIs with builder APIs 2022-09-02 21:18:36 +00:00
bors
f23114c854 Auto merge of #13161 - ChayimFriedman2:pi-is-zero, r=jonas-schievink
fix: Lower float literals with underscores

Fixes #13155 (the problem was the `PI` is defined with `_f64` suffix). `PI` is still truncated, though, because `f64` cannot represent the value with full precision.
2022-09-01 20:51:22 +00:00
Chayim Refael Friedman
2eec4ed69d Lower float literals with underscores 2022-09-01 00:11:32 +00:00
Lukas Wirth
192a79c235 Remove hir::Expr::MacroStmts
This hir expression isn't needed and only existed as it was simpler to
deal with at first as it gave us a direct mapping for the ast version of
the same construct. This PR removes it, properly handling the statements
that are introduced by macro call expressions.
2022-08-31 16:58:11 +02:00
bors
d9e22079c4 Auto merge of #12963 - DesmondWillowbrook:clippy-matches-sourcegen, r=Veykril
clippy: make generated code nice to read

Feel free to close if this is too minor.

(For context, I _have_ read the clippy policy in `dev/style.md`)
2022-08-31 08:37:14 +00:00
DropDemBits
581a01d0cc Migrate syntax::make to use format arg captures 2022-08-18 13:42:10 -04:00
Dezhi Wu
23747419ca fix: a bunch of typos
This PR will fix some typos detected by [typos].

There are also some other typos in the function names, variable names, and file
names, which I leave as they are. I'm more certain that typos in comments
should be fixed.

[typos]: https://github.com/crate-ci/typos
2022-08-17 21:44:58 +08:00
KaDiWa
232176b46a
remove imports that are also in edition 2021's prelude 2022-08-09 01:16:32 +02:00
fprasx
e39918f553 Corrected order of printing op and = 2022-08-08 11:05:18 -04:00
Kartavya Vashishtha
bcab4be938
regenerate files with new syntax 2022-08-07 17:38:20 +05:30
Kartavya Vashishtha
a3fc4dbb04
more matches! sites 2022-08-07 17:37:50 +05:30
Kartavya Vashishtha
70255029cf
clippy: make generated code nice to read
Feel free to close if this is too minor.
2022-08-07 17:09:36 +05:30
Dorian Scheidt
405dd77d30 Support adding variants via structural editing 2022-08-02 14:37:12 -04:00
Jonas Schievink
bd7dfac5eb Fix r-a spelling in some places 2022-08-01 13:47:09 +02:00
Lukas Wirth
bf893d59b5 internal: Assume condition/iterable is missing if there is only a BlockExpr 2022-07-27 17:29:51 +02:00
Amos Wenger
74998e46e9 Fix .gitattributes for test_data 2022-07-24 14:05:35 +02:00
Amos Wenger
b351e115d6 Move cfg attrs up to the mod definitions to disable sourcegen 2022-07-24 10:38:34 +02:00
Amos Wenger
0bffdf2627 Disable all source-gen tests at compile time 2022-07-24 10:38:28 +02:00
Lukas Wirth
cb6703fe06 internal: Don't parse files unnecessarily in scope_for_offset 2022-07-23 00:50:59 +02:00
Amos Wenger
816f7fe12a Run cargo fix --edition-idioms 2022-07-20 15:02:08 +02:00
Amos Wenger
23d25a3094 Enable extra warnings required by rust-lang/rust 2022-07-20 15:00:17 +02:00
Amos Wenger
1b416473a3 Upgrade to expect-test@1.4.0
cf. https://github.com/rust-analyzer/expect-test/issues/33
cf. https://github.com/rust-lang/rust/pull/99444#issuecomment-1188844202
2022-07-19 13:00:45 +02:00
Jonas Schievink
6c6ae965ba Update remaining GitHub URLs 2022-07-08 15:44:49 +02:00
Laurențiu Nicola
6669f388a2 Bump indexmap 2022-07-03 10:09:35 +03:00
Laurențiu Nicola
c7c314d462 Bump quote 2022-07-03 10:09:35 +03:00
Lukas Wirth
531e152390 fix: Simplify macro statement expansion handling 2022-07-01 14:49:30 +02:00
Lukas Wirth
76ae5434fa internal: Bump Dependencies 2022-06-10 17:30:02 +02:00
feniljain
1f4870ff1c fix: f32 and f64 representation during lowering 2022-05-26 20:03:05 +05:30