Skip to content

Commit e543b14

Browse files
authored
Unrolled build for rust-lang#131565
Rollup merge of rust-lang#131565 - Urgau:non_local_def-rm-deprecate, r=compiler-errors Remove deprecation note in the `non_local_definitions` lint This PR removes the edition deprecation note emitted by the `non_local_definitions` lint. Specifically this part: ``` = note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <rust-lang#120363> ``` because it [didn't make the cut](rust-lang#120363 (comment)) for the 2024 edition. `@rustbot` label +L-non_local_definitions
2 parents fb20e4d + 77b3065 commit e543b14

14 files changed

+0
-53
lines changed

compiler/rustc_lint/messages.ftl

-2
Original file line numberDiff line numberDiff line change
@@ -581,8 +581,6 @@ lint_non_glob_import_type_ir_inherent = non-glob import of `rustc_type_ir::inher
581581
582582
lint_non_local_definitions_cargo_update = the {$macro_kind} `{$macro_name}` may come from an old version of the `{$crate_name}` crate, try updating your dependency with `cargo update -p {$crate_name}`
583583
584-
lint_non_local_definitions_deprecation = 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>
585-
586584
lint_non_local_definitions_impl = non-local `impl` definition, `impl` blocks should be written at the same level as their item
587585
.non_local = an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`
588586
.doctest = make this doc-test a standalone test with its own `fn main() {"{"} ... {"}"}`

compiler/rustc_lint/src/lints.rs

-3
Original file line numberDiff line numberDiff line change
@@ -1430,8 +1430,6 @@ impl<'a> LintDiagnostic<'a, ()> for NonLocalDefinitionsDiag {
14301430
);
14311431
}
14321432
}
1433-
1434-
diag.note(fluent::lint_non_local_definitions_deprecation);
14351433
}
14361434
NonLocalDefinitionsDiag::MacroRules {
14371435
depth,
@@ -1452,7 +1450,6 @@ impl<'a> LintDiagnostic<'a, ()> for NonLocalDefinitionsDiag {
14521450
}
14531451

14541452
diag.note(fluent::lint_non_local);
1455-
diag.note(fluent::lint_non_local_definitions_deprecation);
14561453

14571454
if let Some(cargo_update) = cargo_update {
14581455
diag.subdiagnostic(cargo_update);

tests/rustdoc-ui/doctest/non-local-defs-impl.stdout

-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ LL | impl Trait for &Local {}
1818
| `Trait` is not local
1919
|
2020
= note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`
21-
= 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>
2221
note: the lint level is defined here
2322
--> $DIR/non-local-defs-impl.rs:11:9
2423
|

tests/rustdoc-ui/doctest/non_local_defs.stderr

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ LL | macro_rules! a_macro { () => {} }
66
|
77
= help: remove the `#[macro_export]` or make this doc-test a standalone test with its own `fn main() { ... }`
88
= note: a `macro_rules!` definition is non-local if it is nested inside an item and has a `#[macro_export]` attribute
9-
= 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>
109
= note: `#[warn(non_local_definitions)]` on by default
1110

1211
warning: 1 warning emitted

tests/ui/lint/non-local-defs/cargo-update.stderr

-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ LL | non_local_macro::non_local_impl!(LocalStruct);
1212
= note: the macro `non_local_macro::non_local_impl` may come from an old version of the `non_local_macro` crate, try updating your dependency with `cargo update -p non_local_macro`
1313
= note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`
1414
= note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint
15-
= 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>
1615
= note: `#[warn(non_local_definitions)]` on by default
1716
= note: this warning originates in the macro `non_local_macro::non_local_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
1817

tests/ui/lint/non-local-defs/consts.stderr

-9
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ LL | impl Uto for &Test {}
1515
|
1616
= note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`
1717
= note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint
18-
= 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>
1918
= note: `#[warn(non_local_definitions)]` on by default
2019

2120
warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
@@ -31,7 +30,6 @@ LL | impl Uto2 for Test {}
3130
|
3231
= note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`
3332
= note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint
34-
= 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>
3533

3634
warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
3735
--> $DIR/consts.rs:32:5
@@ -46,7 +44,6 @@ LL | impl Uto3 for Test {}
4644
|
4745
= note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`
4846
= note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint
49-
= 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>
5047

5148
warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
5249
--> $DIR/consts.rs:43:5
@@ -59,7 +56,6 @@ LL | impl Test {
5956
| `Test` is not local
6057
|
6158
= note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`
62-
= 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>
6359

6460
warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
6561
--> $DIR/consts.rs:50:9
@@ -78,7 +74,6 @@ LL | | };
7874
| |_____- move the `impl` block outside of this inline constant `<unnameable>` and up 2 bodies
7975
|
8076
= note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`
81-
= 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>
8277

8378
warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
8479
--> $DIR/consts.rs:59:9
@@ -92,7 +87,6 @@ LL | impl Test {
9287
|
9388
= note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`
9489
= note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint
95-
= 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>
9690

9791
warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
9892
--> $DIR/consts.rs:69:13
@@ -106,7 +100,6 @@ LL | impl Test {}
106100
|
107101
= note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`
108102
= note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint
109-
= 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>
110103

111104
warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
112105
--> $DIR/consts.rs:79:9
@@ -120,7 +113,6 @@ LL | impl Uto9 for Test {}
120113
| `Uto9` is not local
121114
|
122115
= note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`
123-
= 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>
124116

125117
warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
126118
--> $DIR/consts.rs:86:9
@@ -138,7 +130,6 @@ LL | | }];
138130
| |_____- move the `impl` block outside of this constant expression `<unnameable>` and up 2 bodies
139131
|
140132
= note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`
141-
= 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>
142133

143134
warning: 9 warnings emitted
144135

tests/ui/lint/non-local-defs/exhaustive-trait.stderr

-6
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ LL | impl PartialEq<()> for Dog {
1010
| `PartialEq` is not local
1111
|
1212
= note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`
13-
= 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>
1413
= note: `#[warn(non_local_definitions)]` on by default
1514

1615
warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
@@ -26,7 +25,6 @@ LL | impl PartialEq<()> for &Dog {
2625
| `PartialEq` is not local
2726
|
2827
= note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`
29-
= 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>
3028

3129
warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
3230
--> $DIR/exhaustive-trait.rs:21:5
@@ -41,7 +39,6 @@ LL | impl PartialEq<Dog> for () {
4139
| `PartialEq` is not local
4240
|
4341
= note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`
44-
= 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>
4542

4643
warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
4744
--> $DIR/exhaustive-trait.rs:28:5
@@ -56,7 +53,6 @@ LL | impl PartialEq<&Dog> for () {
5653
| `PartialEq` is not local
5754
|
5855
= note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`
59-
= 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>
6056

6157
warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
6258
--> $DIR/exhaustive-trait.rs:35:5
@@ -72,7 +68,6 @@ LL | impl PartialEq<Dog> for &Dog {
7268
| `PartialEq` is not local
7369
|
7470
= note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`
75-
= 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>
7671

7772
warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
7873
--> $DIR/exhaustive-trait.rs:42:5
@@ -88,7 +83,6 @@ LL | impl PartialEq<&Dog> for &Dog {
8883
| `PartialEq` is not local
8984
|
9085
= note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`
91-
= 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>
9286

9387
warning: 6 warnings emitted
9488

0 commit comments

Comments
 (0)