fee1-dead
8b3d0c4cf9
Rollup merge of #105484 - nbdd0121:upcast, r=compiler-errors
...
Implement allow-by-default `multiple_supertrait_upcastable` lint
The lint detects when an object-safe trait has multiple supertraits.
Enabled in libcore and liballoc as they are low-level enough that many embedded programs will use them.
r? `@nikomatsakis`
2022-12-28 15:51:41 +08:00
fee1-dead
ade9605a08
Rollup merge of #105347 - estebank:single-line-match, r=compiler-errors
...
Account for `match` expr in single line
When encountering `match Some(42) { Some(x) => x, None => "" };`, output
```
error[E0308]: `match` arms have incompatible types
--> f53.rs:2:52
|
2 | let _ = match Some(42) { Some(x) => x, None => "" };
| -------------- - ^^ expected integer, found `&str`
| | |
| | this is found to be of type `{integer}`
| `match` arms have incompatible types
```
2022-12-28 15:51:40 +08:00
Michael Goulet
605ad65f6a
Remove some totally duplicated files
2022-12-28 05:45:12 +00:00
Michael Goulet
96d8011fa8
better names and a comment
2022-12-28 04:18:37 +00:00
Michael Goulet
c7b414adb6
Rename module compare_method -> compare_impl_item
2022-12-28 04:18:37 +00:00
Michael Goulet
91613c5030
make some things less pub
2022-12-28 04:18:37 +00:00
Esteban Küber
b6453a454f
Trim more paths in obligation types
2022-12-27 18:56:00 -08:00
Esteban Küber
50c1be1d19
Emit fewer errors on invalid #[repr(transparent)] on enum
...
Fix #68420 .
2022-12-27 18:28:02 -08:00
Esteban Küber
8e039b6948
Silence knock-down errors on [type error] bindings
...
Fix #56036 , fix #76589 .
2022-12-27 18:26:54 -08:00
Jhonny Bill Mena
4d63d7d91c
UPDATE - migrate outstanding diagnostic in link.rs
2022-12-27 20:59:22 -05:00
Jhonny Bill Mena
29d8c87fe8
DELETE - fn span_invalid_monomorphization_error and localize intrinsics macros
2022-12-27 20:59:22 -05:00
Jhonny Bill Mena
27744460e2
ADD - create and emit Bug support for Diagnostics
...
UPDATE - migrate constant span_bug to translatable diagnostic.
2022-12-27 20:59:22 -05:00
Jhonny Bill Mena
d1030fab22
UPDATE - migrate fn simd_simple_float_intrinsic error messages
2022-12-27 20:59:21 -05:00
Jhonny Bill Mena
e26366ad99
[WIP] UPDATE - migrate intrinsic.rs to new diagnostic infrastructure
...
WIP - replacing span_invalid_monomorphization_error function. Still in progress due to its use in codegen_llvm inside macros
2022-12-27 20:59:21 -05:00
Jhonny Bill Mena
d41112a8c5
UPDATE - migrate constant.rs to new diagnostics infrastructure
2022-12-27 20:59:21 -05:00
Jhonny Bill Mena
78796ba637
ADD - fixme in type_names.rs until we are able to translate InterpError
2022-12-27 20:59:21 -05:00
Jhonny Bill Mena
82cf6f204a
UPDATE - migrate base.rs to new diagnostics infrastructure
2022-12-27 20:59:19 -05:00
Esteban Küber
05e8ba126c
Account for match expr in single line
...
When encountering `match Some(42) { Some(x) => x, None => "" };`, output
```
error[E0308]: `match` arms have incompatible types
--> f53.rs:2:52
|
2 | let _ = match Some(42) { Some(x) => x, None => "" };
| -------------- - ^^ expected integer, found `&str`
| | |
| | this is found to be of type `{integer}`
| `match` arms have incompatible types
```
2022-12-27 16:45:55 -08:00
Esteban Küber
b400bde52a
Shorten type in note
2022-12-27 15:36:10 -08:00
Esteban Küber
df2a35ea3d
review comments
2022-12-27 13:44:39 -08:00
Nilstrieb
1322e476bf
Improve debug logs of find_width_of_character_at_span
2022-12-27 22:18:22 +01:00
Michael Goulet
18bf19c3a9
Rollup merge of #106064 - lukas-code:outlives-macro, r=cjgillot
...
Partially fix `explicit_outlives_requirements` lint in macros
Show the suggestion if and only if the bounds are from the same source context.
fixes https://github.com/rust-lang/rust/issues/106044
fixes https://github.com/rust-lang/rust/issues/106063
2022-12-27 12:33:35 -08:00
Michael Goulet
3fba7b4523
Rollup merge of #105965 - compiler-errors:issue-105896, r=cjgillot
...
Provide local extern function arg names
Fixes #105896
2022-12-27 12:33:35 -08:00
Michael Goulet
996fb664d3
Rollup merge of #105852 - compiler-errors:hex-float-lit, r=cjgillot
...
Suggest rewriting a malformed hex literal if we expect a float
Fixes #104706
2022-12-27 12:33:34 -08:00
Michael Goulet
a9fdeddafd
Rollup merge of #105765 - estebank:range-typo, r=compiler-errors
...
Detect likely `.` -> `..` typo in method calls
Fix #65015 .
2022-12-27 12:33:34 -08:00
Esteban Küber
7e84273b7f
Make resolve suggestion more generic
2022-12-27 12:16:25 -08:00
Michael Goulet
9f59ab55e6
Restore cyclic closure message
2022-12-27 17:56:57 +00:00
Michael Goulet
0817b1d3ed
Don't deduce a signature that makes a closure cyclic
2022-12-27 17:56:56 +00:00
Esteban Küber
0c0685bb68
review comments: make suggestion more accurate
2022-12-27 09:25:00 -08:00
Michael Goulet
e5c159cf90
Provide local extern function arg names
2022-12-27 17:21:08 +00:00
Michael Goulet
3cf22de90f
Suggest rewriting a malformed hex literal if we expect a float
2022-12-27 17:14:45 +00:00
Matthias Krüger
b7657e9cec
Rollup merge of #106066 - JohnTitor:rm-bindings-after-at-fixme, r=compiler-errors
...
Always suggest as `MachineApplicable` in `recover_intersection_pat`
This resolves one FIXME in `recover_intersection_pat` by always applying `MachineApplicable` when suggesting, as `bindings_after_at` is now stable.
This also separates a test to apply `// run-rustfix`.
Signed-off-by: Yuki Okushi <jtitor@2k36.org >
2022-12-27 16:37:48 +01:00
Matthias Krüger
a0bf4f9b72
Rollup merge of #105817 - chenyukang:yukang/fix-105788-sugg-for-auto-trait, r=TaKO8Ki
...
Remove unreasonable help message for auto trait
Fixes #105788
2022-12-27 16:37:47 +01:00
bors
a1fc71196a
Auto merge of #106177 - matthiaskrgr:rollup-oe7z8ix, r=matthiaskrgr
...
Rollup of 4 pull requests
Successful merges:
- #105515 (Account for macros in const generics)
- #106146 (Readme: update section on how to run `x.py`)
- #106150 (Detect when method call on LHS might be shadowed)
- #106174 (Remove unused empty CSS rules in ayu theme)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
2022-12-27 10:23:32 +00:00
Matthias Krüger
e31e8b1176
Rollup merge of #106150 - estebank:issue-39232, r=compiler-errors
...
Detect when method call on LHS might be shadowed
Address #39232 .
2022-12-27 08:57:48 +01:00
Matthias Krüger
b8d71fc41f
Rollup merge of #105515 - estebank:issue-104141, r=oli-obk
...
Account for macros in const generics
Fix #104141 .
2022-12-27 08:57:45 +01:00
bors
0ca50032ce
Auto merge of #106095 - estebank:pin-mut-reborrow, r=compiler-errors
...
Suggest `Pin::as_mut` when encountering borrow error
Fix #65409 for `Pin<&mut T>`.
2022-12-27 07:31:42 +00: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
aff403cf68
Recover fn keyword as Fn trait in bounds
2022-12-27 06:14:46 +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
yukang
90753de099
fix #105788 , Remove unreasonable help message for auto trait
2022-12-27 12:56:40 +08:00
Ezra Shaw
f66e7529b5
docs: add long-form error docs for E0461
2022-12-27 17:03:39 +13:00
Michael Goulet
8bf7ec7534
Deduplicate more op-flavored methods
2022-12-27 03:12:31 +00:00
Michael Goulet
43b2486a95
Clean up operator type checking
2022-12-27 02:49:53 +00:00
Esteban Küber
c9381fc334
Detect likely . -> .. typo in method calls
...
Fix #65015 .
2022-12-26 18:27:40 -08:00
Esteban Küber
1b341fe8a1
Suggest impl Iterator when possible for _ return type
...
Address #106096 .
2022-12-26 18:21:45 -08:00
bors
58f5a0180c
Auto merge of #103020 - lyming2007:issue-102598-fix, r=jackh726
...
error parsing lifetime following by Sized and message + between them
Fixes #102598
2022-12-26 21:50:05 +00:00
Esteban Küber
8a13a7c148
review comments
2022-12-26 13:35:35 -08:00