You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Auto merge of rust-lang#123594 - Urgau:fix-non_local_def-lint-overflow, r=<try>
Fix trait solver overflow with `non_local_definitions` lint
This PR fixes the trait solver overflow with the `non_local_definitions` lint reported in rust-lang#123573 using the suggestion from `@lcnr:` rust-lang#123573 (comment) to use the next trait solver.
~~I have not (yet) tried to create a minimized repro~~ ``@compiler-errors`` did the minimization (thanks you) but I have manually tested on the `starlark-rust` project that it fixes the issue.
Fixesrust-lang#123573
r? `@lcnr`
= note: the macro `non_local_macro::non_local_macro_rules` may come from an old version of the `non_local_macro` crate, try updating your dependency with `cargo update -p non_local_macro`
702
702
= note: this warning originates in the macro `non_local_macro::non_local_macro_rules` (in Nightly builds, run with -Z macro-backtrace for more info)
703
703
704
-
warning: 55 warnings emitted
704
+
warning: non-local `impl` definition, they should be avoided as they go against expectation
705
+
--> $DIR/non_local_definitions.rs:471:5
706
+
|
707
+
LL | impl StarlarkTypeRepr for &Local {}
708
+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
709
+
|
710
+
= help: move this `impl` block outside the of the current function `starlark`
711
+
= note: an `impl` definition is non-local if it is nested inside an item and may impact type checking outside of that item. This can be the case if neither the trait or the self type are at the same nesting level as the `impl`
712
+
= note: one exception to the rule are anon-const (`const _: () = { ... }`) at top-level module and anon-const at the same nesting as the trait or type
713
+
= note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
0 commit comments