Michael Howell
c07a722847
diagnostics: remvoe unnecessary use of source_map.start_point
2023-01-20 14:53:34 -07:00
Michael Howell
dca160a06a
diagnostics: use module_path
to check crate import instead of strings
2023-01-20 14:53:34 -07:00
Michael Howell
e237690a28
diagnostics: add };
only if {
was added too
2023-01-20 14:53:33 -07:00
Michael Howell
e9d8d238ef
diagnostics: suggest changing s@self::{macro}@::macro
for exported
...
Fixes #99695
2023-01-20 14:52:24 -07:00
Matthias Krüger
68f12338af
Rollup merge of #104505 - WaffleLapkin:no-double-spaces-in-comments, r=jackh726
...
Remove double spaces after dots in comments
Most of the comments do not have double spaces, so I assume these are typos.
2023-01-17 20:21:25 +01:00
Maybe Waffle
6a28fb42a8
Remove double spaces after dots in comments
2023-01-17 08:09:33 +00:00
Michael Goulet
21725774a2
note -> help
2023-01-17 03:09:49 +00:00
Michael Goulet
716ea5f19c
Fix use suggestion span
2023-01-17 03:06:38 +00:00
Michael Goulet
566202b975
Only suggest adding type param if path being resolved was a type
2023-01-15 16:33:08 +00:00
Matthias Krüger
f7093826a4
Rollup merge of #106813 - oli-obk:sess_cleanup, r=GuillaumeGomez,petrochenkov
...
Remove redundant session field
There was already a session available in the resolver, so we access that session.
2023-01-13 19:16:45 +01:00
Oli Scherer
4aca7beab0
Remove redundant session field
2023-01-13 16:01:27 +00:00
Michael Goulet
bf0623e363
Don't suggest dyn as parameter to add
2023-01-12 22:04:30 +00:00
Michael Goulet
950b47fb96
Render missing generics suggestion verbosely
2023-01-12 22:04:30 +00:00
Esteban Küber
41e66d9025
review comments: Tweak output
...
* Account for `struct S(pub(super)Ty);` in suggestion
* Suggest changing field visibility in E0603 too
2023-01-11 21:36:02 +00:00
Esteban Küber
eb835093a3
review comment
2023-01-11 21:35:42 +00:00
Esteban Küber
ad13d9fbbe
Suggest making private tuple struct field public
...
Fix #52144 .
2023-01-11 21:35:42 +00:00
Albert Larsan
40ba0e84d5
Change src/test
to tests
in source files, fix tidy and tests
2023-01-11 09:32:13 +00:00
Yuki Okushi
684a3717cb
Rollup merge of #106175 - compiler-errors:bad-import-sugg, r=oli-obk
...
Fix bad import suggestion with nested `use` tree
Fixes #105566
Fixes #105373
Ideally, we'd find some way to turn these into structured suggestions -- perhaps on a separate line as a different `use` statement, but I have no idea how to access the span for the whole `use` from this point in the import resolution code.
2023-01-10 08:05:34 +09:00
Michael Goulet
1d66a675bb
review comment
2023-01-09 18:07:34 +00:00
Matthias Krüger
0c8d11b97c
Rollup merge of #105859 - compiler-errors:hr-lifetime-add, r=davidtwco
...
Point out span where we could introduce higher-ranked lifetime
Somewhat addresses #105422 , but not really. We don't have that much useful information here since we're still in resolution :^(
Maybe this suggestion isn't worth it. If the reviewer has an idea how we can get a more succinct binder information for a structured suggestion, it would be appreciated.
2023-01-07 20:43:21 +01:00
Michael Goulet
7690fe3bc6
Simplify some iterator combinators
2023-01-04 00:48:07 +00:00
Matthias Krüger
c610aeb592
Rollup merge of #106221 - Nilstrieb:rptr-more-like-ref-actually, r=compiler-errors
...
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-29 13:16:04 +01: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
Esteban Küber
7e84273b7f
Make resolve suggestion more generic
2022-12-27 12:16:25 -08:00
Esteban Küber
0c0685bb68
review comments: make suggestion more accurate
2022-12-27 09:25:00 -08:00
Michael Goulet
050bc95ce2
Fix some totally useless suggestions
2022-12-27 07:17:22 +00:00
Michael Goulet
d2404d6dca
Dont clobber as ..
rename in import suggestion
2022-12-27 07:05:45 +00:00
Michael Goulet
9e2536b938
Note alternative import candidates in nested use tree
2022-12-27 05:09:43 +00:00
Michael Goulet
564435f20a
Suppress suggestions for nested use tree
2022-12-27 05:09:43 +00:00
Esteban Küber
c9381fc334
Detect likely .
-> ..
typo in method calls
...
Fix #65015 .
2022-12-26 18:27:40 -08:00
Matthias Krüger
2cace6aa5d
Rollup merge of #105769 - lyming2007:issue-105177-fix, r=eholk
...
add function to tell the identical errors for ambiguity_errors
if 2 errors of the kind and ident and span of the ident, b1, b2 and misc1 misc2 are the same we call these 2 ambiguity errors identical
prevent identical ambiguity error from pushing into vector of ambiguity_errors this will fix #105177
2022-12-22 11:03:50 +01:00
Eric Holk
f20f86ec4e
Change comment to doc comment
2022-12-21 17:28:42 -08:00
Yiming Lei
bd12d151ee
add function to tell if the current ambiguity error matches a previous one in ambiguity_errors
...
if 2 errors of the kind and ident and span of the ident, b1, b2 and misc1 misc2 are the same
then these 2 ambiguity errors matched
prevent identical ambiguity error from pushing into vector of ambiguity_errors
this will fix #105177
2022-12-19 08:38:05 -08:00
Matthias Krüger
ebe3563764
Rollup merge of #105873 - matthiaskrgr:clippy_fmt, r=Nilstrieb
...
use &str / String literals instead of format!()
2022-12-18 23:03:07 +01:00
Matthias Krüger
221e71e7a1
Rollup merge of #105869 - matthiaskrgr:clone_on_copy, r=compiler-errors
...
don't clone Copy types
2022-12-18 23:03:07 +01:00
Matthias Krüger
a108d55ce6
don't restuct references just to reborrow
2022-12-18 17:04:32 +01:00
Matthias Krüger
3af7df91fc
use &str / String literals instead of format!()
2022-12-18 16:17:46 +01:00
Matthias Krüger
fec9e9ecf1
don't clone Copy types
2022-12-18 14:25:55 +01:00
Michael Goulet
5cccb36cfb
higher-ranked lifetime message
2022-12-18 03:04:26 +00:00
Matthias Krüger
6dbaf86672
Rollup merge of #104864 - chenyukang:yukang/fix-104700-binding, r=estebank
...
Account for item-local in inner scope for E0425
Fixes #104700
2022-12-13 01:17:08 +01:00
Oli Scherer
75ff5c7dd3
Fold Definitions
into the untracked data
2022-12-09 14:59:39 +00:00
Oli Scherer
1c1d3570ee
Move the untracked cstore and source_span into a struct
2022-12-09 14:53:24 +00:00
Oli Scherer
2cd36f2c89
Generate crate loaders on the fly
2022-12-09 14:53:23 +00:00
Oli Scherer
4b08fbaea8
ResolverTree does not require access to the crate loader, only the store
2022-12-09 14:50:09 +00:00
Oli Scherer
d30848b30a
Use Symbol
for the crate name instead of String
/str
2022-12-07 20:30:02 +00:00
Yuki Okushi
fa7d3ec630
Rollup merge of #105289 - Rageking8:fix-dupe-word-typos, r=cjgillot
...
Fix dupe word typos
2022-12-06 12:48:52 +09:00
Matthias Krüger
4ebbb20dad
Rollup merge of #105230 - cjgillot:issue-104312, r=petrochenkov
...
Skip recording resolution for duplicated generic params.
Turns out the fix was simpler than I thought.
Fixes https://github.com/rust-lang/rust/issues/104312
2022-12-05 20:43:44 +01:00
Rageking8
58110572fb
fix dupe word typos
2022-12-05 16:42:36 +08:00
Matthias Krüger
7dbd1603b8
Rollup merge of #101975 - chenyukang:fix-101749, r=compiler-errors
...
Suggest to use . instead of :: when accessing a method of an object
Fixes #101749
Fixes #101542
2022-12-04 16:25:32 +01:00
Camille GILLOT
b1514108e2
Skip recording resolution for duplicated generic params.
2022-12-03 22:40:30 +00:00