SpanishPear
4447949e40
revert to previous span
2023-01-22 17:05:38 +11:00
Shrey Sudhir
655beb4ece
Attempt to address review comments via github web...
2023-01-22 17:05:38 +11:00
Shrey Sudhir
5287004aa4
Apply automatic suggestions from code review
...
Co-authored-by: Takayuki Maeda <takoyaki0316@gmail.com>
2023-01-22 17:05:37 +11:00
SpanishPear
e813132e4f
--wip-- [skip ci]
...
--wip-- [skip ci]
get the generic text and put it int he suggestion, but suggestion not working on derive subdiagnostic
refactor away from derives and use span_suggestion() instead. Show's the correct(?) generic contents, but overwrites the fn name :(
x fmt
drop commented code and s/todo/fixme
get the correct diagnostic for functions, at least
x fmt
remove some debugs
remove format
remove debugs
remove useless change
remove useless change
remove legacy approach
correct lookahead + error message contains the ident name
fmt
refactor code
tests
add tests
remoev debug
remove comment
2023-01-22 17:05:37 +11:00
Esteban Küber
5311938531
Detect struct literal needing parentheses
...
Fix #82051 .
2023-01-11 16:53:21 +00:00
Esteban Küber
6fdb54d2f1
Do not emit structured suggestion for turbofish with wrong span
...
Fix #79161 .
2023-01-08 22:27:13 +00:00
Matthias Krüger
031a2143f0
Rollup merge of #106242 - estebank:diff-markers, r=jyn514
...
Detect diff markers in the parser
Partly address #32059 .
2022-12-29 13:16:06 +01:00
Esteban Küber
62c8e3144a
Add support for diff3 format
2022-12-28 20:55:46 -08:00
Esteban Küber
698ebe357f
Tweak wording
2022-12-28 20:45:07 -08:00
Esteban Küber
375f025805
Detect diff markers in the parser
...
Partly address #32059 .
2022-12-28 17:56:22 -08:00
Nilstrieb
9067e4417e
Rename Rptr
to Ref
in AST and HIR
...
The name makes a lot more sense, and `ty::TyKind` calls it `Ref` already
as well.
2022-12-28 18:52:36 +01:00
Takayuki Maeda
a8f468f5c6
remove unused imports
2022-12-26 15:01:20 +09:00
bors
309c469eec
Auto merge of #104875 - chenyukang:yukang/fix-104867-inc, r=estebank
...
Properly handle postfix inc/dec in standalone and subexpr scenarios
Fixes #104867
r? `@estebank`
2022-12-14 04:00:05 +00:00
Maybe Waffle
1d42936b18
Prefer doc comments over //
-comments in compiler
2022-11-27 11:19:04 +00:00
yukang
ded10a13d2
will not suggest for postfix operator when can not handle precedences well
2022-11-26 17:08:25 +08:00
yukang
dee85a391f
add start_stmt to handle postfix increment
2022-11-26 05:34:12 +08:00
yukang
7c11a53f9c
fix #104867 , Properly handle postfix inc/dec in standalone and subexpr scenarios
2022-11-25 17:13:45 +08:00
bors
872631d0f0
Auto merge of #104507 - WaffleLapkin:asderefsyou, r=wesleywiser
...
Use `as_deref` in compiler (but only where it makes sense)
This simplifies some code :3
(there are some changes that are not exacly `as_deref`, but more like "clever `Option`/`Result` method use")
2022-11-24 00:17:35 +00:00
Maybe Waffle
616df0f03b
rustc_parse
: remove ref
patterns
2022-11-22 18:49:16 +00:00
mejrs
fe212eca76
Match crate and slug names
2022-11-21 15:24:50 +01:00
Dylan DPC
3c6fc06906
Rollup merge of #104566 - matthiaskrgr:clippy_perf_nov18, r=oli-obk
...
couple of clippy::perf fixes
2022-11-19 11:54:46 +05:30
Matthias Krüger
e3036df003
couple of clippy::perf fixes
2022-11-18 10:30:47 +01:00
Nicholas Nethercote
67d5cc0462
Use ThinVec
in ast::Path
.
2022-11-17 13:56:38 +11:00
Nicholas Nethercote
6b7ca2fcf2
Box ExprKind::{Closure,MethodCall}
, and QSelf
in expressions, types, and patterns.
2022-11-17 13:45:59 +11:00
Maybe Waffle
94470f4efd
Use as_deref
in compiler (but only where it makes sense)
2022-11-16 21:58:58 +00:00
Manish Goregaokar
fd5ff82f28
Rollup merge of #103468 - chenyukang:yukang/fix-103435-extra-parentheses, r=estebank
...
Fix unused lint and parser caring about spaces to won't produce invalid code
Fixes #103435
2022-11-11 12:12:29 -05:00
Michael Goulet
4e7fc663cc
Don't silently eat label before block in block-like expr
2022-11-04 21:35:58 +00:00
Nilstrieb
29e50e8d35
Gate some recovery behind a flag
...
Mainly in `expr.rs`
2022-10-28 22:07:36 +02:00
yukang
a46af18cb1
fix parentheses surrounding spacing issue in parser
2022-10-24 18:24:10 +08:00
Nilstrieb
c65ebae221
Migrate all diagnostics
2022-10-23 10:09:44 +02:00
Dylan DPC
0a0e9f73af
Rollup merge of #102922 - kper:bugfix/102902-filtering-json, r=oli-obk
...
Filtering spans when emitting json
According to the issue #102902 , we shouldn't emit spans which have an empty span and no suggested replacement.
2022-10-21 17:29:58 +05:30
Kevin Per
28d0312b7d
Implement assertions and fixes to not emit empty spans without suggestions
2022-10-20 08:25:31 +00:00
yukang
0af255a5aa
Fix the bug of next_point in span
2022-10-18 02:59:38 +08:00
Rageking8
7122abaddf
more dupe word typos
2022-10-14 12:57:56 +08:00
Michael Goulet
85a726e754
Remove expr_parentheses_needed from ParseSess
2022-09-30 01:39:20 +00:00
Xiretza
d7c64574e0
Implement IntoDiagnosticArg for rustc_ast::token::Token(Kind)
2022-09-27 20:29:19 +02:00
Xiretza
caefac034e
Document use of Symbol::to_string()
2022-09-27 20:29:19 +02:00
Xiretza
00f95468c4
Migrate even more diagnostics in rustc_parse to diagnostic structs
2022-09-27 20:29:19 +02:00
Xiretza
760c4352d6
Migrate "struct literal body without path" error to diagnostic struct
2022-09-27 20:29:19 +02:00
Xiretza
ba10f2c0f2
Migrate "expected semicolon" diagnostics to diagnostic structs
2022-09-27 20:29:19 +02:00
Xiretza
7507ee29fc
Migrate "expected identifier" diagnostics to diagnostic structs
2022-09-27 20:29:19 +02:00
Xiretza
e1b1d7b029
Migrate more rustc_parse diagnostics to diagnostic structs
2022-09-27 20:29:18 +02:00
Xiretza
e56d6a68db
Move rustc_parse diagnostic structs to separate module
2022-09-27 20:29:18 +02:00
Xiretza
6ae7a30927
Migrate "invalid literal suffix" diagnostic to diagnostic structs
2022-09-27 20:29:18 +02:00
Xiretza
ab7c7dc7ce
Migrate more diagnostics in rustc_parse to diagnostic structs
2022-09-27 20:29:18 +02:00
Matthias Krüger
6f5e8c2ed4
Rollup merge of #102286 - compiler-errors:recover-semi-in-block-item, r=davidtwco
...
Recover some items that expect braces and don't take semicolons
Fixes #102262
2022-09-26 19:19:21 +02:00
Michael Goulet
4d0d688a3c
Recover some items that expect braces and don't take semicolons
2022-09-25 22:34:25 +00:00
Xiretza
ae56d2a118
Add missing code="" attributes to suggestion subdiagnostics
2022-09-22 17:25:50 +02:00
Jhonny Bill Mena
e52e2344dc
FIX - adopt new Diagnostic naming in newly migrated modules
...
FIX - ambiguous Diagnostic link in docs
UPDATE - rename diagnostic_items to IntoDiagnostic and AddToDiagnostic
[Gardening] FIX - formatting via `x fmt`
FIX - rebase conflicts. NOTE: Confirm wheather or not we want to handle TargetDataLayoutErrorsWrapper this way
DELETE - unneeded allow attributes in Handler method
FIX - broken test
FIX - Rebase conflict
UPDATE - rename residual _SessionDiagnostic and fix LintDiag link
2022-09-21 11:43:22 -04:00
Jhonny Bill Mena
5f91719f75
UPDATE - rename SessionSubdiagnostic macro to Subdiagnostic
...
Also renames:
- sym::AddSubdiagnostic to sym:: Subdiagnostic
- rustc_diagnostic_item = "AddSubdiagnostic" to rustc_diagnostic_item = "Subdiagnostic"
2022-09-21 11:39:53 -04:00