Esteban Küber
65a54a7f27
Tweak multispan rendering
...
Consider comments and bare delimiters the same as an "empty line" for purposes of hiding rendered code output of long multispans. This results in more aggressive shortening of rendered output without losing too much context, specially in `*.stderr` tests that have "hidden" comments.
2024-12-12 23:36:27 +00:00
Urgau
37db365948
Also treat impl
definition parent as transparent regarding modules
2024-11-01 16:07:02 +01:00
Urgau
b5e91a00c8
Also use outermost const-anon for impl items in non_local_defs
lint
2024-10-13 18:14:29 +02:00
Urgau
77b3065ed2
Remove deprecation note in the non_local_definitions
warning
2024-10-11 21:21:32 +02:00
Urgau
7e05da8d42
Consider outermost const-anon in non_local_def lint
2024-10-11 09:39:53 +02:00
Urgau
9195d65725
Remove with/without trait and bounds consideration
2024-09-23 10:01:59 +02:00
Urgau
0f665e2bf3
Point to every relevant types in the main diag
2024-09-23 10:00:42 +02:00
Urgau
00a6ebfbf5
Rework non_local_definitions
lint to only be a syntactic heuristic
2024-09-23 09:59:31 +02:00
Urgau
cb58668748
Revert "Switch back non_local_definitions
lint to allow-by-default"
...
This reverts commit 0c0dfb88ee
.
2024-09-23 09:23:04 +02:00
Urgau
0c0dfb88ee
Switch back non_local_definitions
lint to allow-by-default
...
as request T-lang is requesting some major changes in the lint inner
workings in #126768#issuecomment-2192634762
2024-06-27 08:05:07 +02:00
Manish Goregaokar
e8a9af9ad9
Clarify that anonymous consts still do introduce a new scope
2024-06-19 18:34:15 -07:00
bors
1d1356d0f6
Auto merge of #125722 - Urgau:non_local_defs-macro-to-change, r=estebank
...
Indicate in `non_local_defs` lint that the macro needs to change
This PR adds a note to indicate that the macro needs to change in the `non_local_definitions` lint output.
Address https://github.com/rust-lang/rust/pull/125089#discussion_r1616311862
Fixes #125681
r? `@estebank`
2024-06-15 08:50:44 +00:00
Oli Scherer
cbee17d502
Revert "Create const block DefIds in typeck instead of ast lowering"
...
This reverts commit ddc5f9b6c1
.
2024-06-07 08:33:58 +00:00
Urgau
b5d4867936
non_local_defs: move cargo update suggestion upper
2024-05-29 17:03:11 +02:00
Urgau
c4c8bda689
non_local_defs: indicate that the macro needs to change
...
aaa
2024-05-29 17:03:11 +02:00
Oli Scherer
ddc5f9b6c1
Create const block DefIds in typeck instead of ast lowering
2024-05-28 13:38:43 +00:00
Urgau
c7d300442f
non_local_defs: point the parent item when appropriate
2024-05-27 23:59:18 +02:00
Urgau
98273ec612
non_local_defs: point to Self and Trait to give more context
2024-05-27 23:59:18 +02:00
Urgau
b71952904d
non_local_defs: suggest removing leading ref/ptr to make the impl local
2024-05-27 23:59:18 +02:00
Urgau
ab23fd8dea
non_local_defs: improve main without a trait note
2024-05-27 23:59:18 +02:00
Urgau
d3dfe14b53
non_local_defs: be more precise about what needs to be moved
2024-05-27 23:59:18 +02:00
Urgau
402580bcd5
non_local_defs: improve exception note for impl and macro_rules!
...
- Remove wrong exception text for non-local macro_rules!
- Simplify anonymous const exception note
2024-05-27 23:59:18 +02:00
Urgau
22095fbd8d
non_local_defs: use labels to indicate what may need to be moved
2024-05-27 23:58:55 +02:00
Urgau
26b873d030
non_local_defs: use span of the impl def and not the impl block
2024-05-27 23:58:55 +02:00
Urgau
de1c122950
non_local_defs: improve some notes around trait, bounds, consts
...
- Restrict const-anon exception diag to relevant places
- Invoke bounds (and type-inference) in non_local_defs
- Specialize diagnostic for impl without Trait
2024-05-27 23:58:55 +02:00
Urgau
06c6a2d9d6
non_local_defs: switch to more friendly primary message
2024-05-27 23:58:55 +02:00
Urgau
21c688af86
Consider inner modules to be local in the non_local_definitions
lint
2024-04-29 22:54:04 +02:00
Gary Guo
cfee72aa24
Fix tests and bless
2024-04-24 13:12:33 +01:00
Urgau
c2e2245fd8
Fix trait solver overflow with non_local_definitions
lint
2024-04-09 18:40:04 +02:00
Urgau
ddc16e98e6
Split non_local_definitions
lint tests in separate test files
2024-04-09 00:42:48 +02:00