diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2025-07-13 13:42:02 +0000 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2025-07-13 13:50:00 +0000 |
| commit | 277b0ecf3493a89818a4008afbb36ae4e77c1024 (patch) | |
| tree | a443eca26453ce2f89f70ff3a870d137d98ae727 /tests | |
| parent | 3ecd03bdfd8da8464e2e381523adb15d60975254 (diff) | |
| download | rust-277b0ecf3493a89818a4008afbb36ae4e77c1024.tar.gz rust-277b0ecf3493a89818a4008afbb36ae4e77c1024.zip | |
Remove hir::AssocItemKind.
Diffstat (limited to 'tests')
9 files changed, 49 insertions, 49 deletions
diff --git a/tests/ui/associated-types/defaults-in-other-trait-items.stderr b/tests/ui/associated-types/defaults-in-other-trait-items.stderr index bdcfadd3955..56abd6ebf73 100644 --- a/tests/ui/associated-types/defaults-in-other-trait-items.stderr +++ b/tests/ui/associated-types/defaults-in-other-trait-items.stderr @@ -2,7 +2,7 @@ error[E0308]: mismatched types --> $DIR/defaults-in-other-trait-items.rs:9:13 | LL | type A = (); - | ------------ associated type defaults can't be assumed inside the trait defining them + | ------ associated type defaults can't be assumed inside the trait defining them ... LL | let () = p; | ^^ - this expression has type `<Self as Tr>::A` @@ -16,7 +16,7 @@ error[E0308]: mismatched types --> $DIR/defaults-in-other-trait-items.rs:36:25 | LL | type Ty = u8; - | ------------- associated type defaults can't be assumed inside the trait defining them + | ------- associated type defaults can't be assumed inside the trait defining them ... LL | const C: Self::Ty = 0u8; | ^^^ expected associated type, found `u8` @@ -28,7 +28,7 @@ error[E0308]: mismatched types --> $DIR/defaults-in-other-trait-items.rs:54:9 | LL | type Res = isize; - | ----------------- associated type defaults can't be assumed inside the trait defining them + | -------- associated type defaults can't be assumed inside the trait defining them LL | LL | fn infer_me_correctly() -> Self::Res { | --------- expected `<Self as Trait>::Res` because of return type diff --git a/tests/ui/associated-types/defaults-specialization.stderr b/tests/ui/associated-types/defaults-specialization.stderr index fd2a1a0c2d1..7d19ac85982 100644 --- a/tests/ui/associated-types/defaults-specialization.stderr +++ b/tests/ui/associated-types/defaults-specialization.stderr @@ -31,7 +31,7 @@ error[E0053]: method `make` has an incompatible type for trait --> $DIR/defaults-specialization.rs:35:18 | LL | default type Ty = bool; - | ----------------------- associated type is `default` and may be overridden + | --------------- associated type is `default` and may be overridden LL | LL | fn make() -> bool { true } | ^^^^ expected associated type, found `bool` @@ -53,7 +53,7 @@ error[E0308]: mismatched types --> $DIR/defaults-specialization.rs:10:9 | LL | type Ty = u8; - | ------------- associated type defaults can't be assumed inside the trait defining them + | ------- associated type defaults can't be assumed inside the trait defining them LL | LL | fn make() -> Self::Ty { | -------- expected `<Self as Tr>::Ty` because of return type @@ -80,7 +80,7 @@ error[E0308]: mismatched types --> $DIR/defaults-specialization.rs:44:29 | LL | default type Ty = bool; - | ----------------------- associated type is `default` and may be overridden + | --------------- associated type is `default` and may be overridden LL | LL | fn make() -> Self::Ty { true } | -------- ^^^^ expected associated type, found `bool` diff --git a/tests/ui/associated-types/issue-26681.stderr b/tests/ui/associated-types/issue-26681.stderr index b64bcee07f0..5fb1a4ef3f5 100644 --- a/tests/ui/associated-types/issue-26681.stderr +++ b/tests/ui/associated-types/issue-26681.stderr @@ -2,7 +2,7 @@ error[E0308]: mismatched types --> $DIR/issue-26681.rs:17:39 | LL | type Fv: Foo = u8; - | ------------------ associated type defaults can't be assumed inside the trait defining them + | ------------ associated type defaults can't be assumed inside the trait defining them LL | const C: <Self::Fv as Foo>::Bar = 6665; | ^^^^ expected associated type, found integer | diff --git a/tests/ui/generics/export-name-on-generics.stderr b/tests/ui/generics/export-name-on-generics.stderr index 7bc7b8ca559..e08b2b1c8f3 100644 --- a/tests/ui/generics/export-name-on-generics.stderr +++ b/tests/ui/generics/export-name-on-generics.stderr @@ -4,7 +4,7 @@ error: functions generic over types or consts must be mangled LL | #[export_name = "foo"] | ---------------------- help: remove this attribute LL | pub fn foo<T>() {} - | ^^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^^ | note: the lint level is defined here --> $DIR/export-name-on-generics.rs:3:9 @@ -18,7 +18,7 @@ error: functions generic over types or consts must be mangled LL | #[export_name = "bar"] | ---------------------- help: remove this attribute LL | pub extern "C" fn bar<T>() {} - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ error: functions generic over types or consts must be mangled --> $DIR/export-name-on-generics.rs:21:5 @@ -26,7 +26,7 @@ error: functions generic over types or consts must be mangled LL | #[export_name = "foo"] | ---------------------- help: remove this attribute LL | pub fn foo<T>() {} - | ^^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^^ error: functions generic over types or consts must be mangled --> $DIR/export-name-on-generics.rs:24:5 @@ -34,7 +34,7 @@ error: functions generic over types or consts must be mangled LL | #[export_name = "bar"] | ---------------------- help: remove this attribute LL | pub extern "C" fn bar<T>() {} - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ error: functions generic over types or consts must be mangled --> $DIR/export-name-on-generics.rs:42:5 @@ -42,7 +42,7 @@ error: functions generic over types or consts must be mangled LL | #[export_name = "foo"] | ---------------------- help: remove this attribute LL | fn foo<T>() {} - | ^^^^^^^^^^^^^^ + | ^^^^^^^^^^^ error: functions generic over types or consts must be mangled --> $DIR/export-name-on-generics.rs:45:5 @@ -50,7 +50,7 @@ error: functions generic over types or consts must be mangled LL | #[export_name = "bar"] | ---------------------- help: remove this attribute LL | extern "C" fn bar<T>() {} - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^^^^^^^^^ error: functions generic over types or consts must be mangled --> $DIR/export-name-on-generics.rs:64:5 @@ -58,7 +58,7 @@ error: functions generic over types or consts must be mangled LL | #[export_name = "foo"] | ---------------------- help: remove this attribute LL | fn foo() {} - | ^^^^^^^^^^^ + | ^^^^^^^^ error: functions generic over types or consts must be mangled --> $DIR/export-name-on-generics.rs:67:5 @@ -66,7 +66,7 @@ error: functions generic over types or consts must be mangled LL | #[export_name = "foo2"] | ----------------------- help: remove this attribute LL | fn foo2<U>() {} - | ^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^ error: functions generic over types or consts must be mangled --> $DIR/export-name-on-generics.rs:70:5 @@ -74,7 +74,7 @@ error: functions generic over types or consts must be mangled LL | #[export_name = "baz"] | ---------------------- help: remove this attribute LL | extern "C" fn bar() {} - | ^^^^^^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^^^^^^ error: functions generic over types or consts must be mangled --> $DIR/export-name-on-generics.rs:73:5 @@ -82,7 +82,7 @@ error: functions generic over types or consts must be mangled LL | #[export_name = "baz"] | ---------------------- help: remove this attribute LL | fn baz(x: &i32) -> &i32 { x } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^^^^^^^^^^ error: functions generic over types or consts must be mangled --> $DIR/export-name-on-generics.rs:76:5 @@ -90,7 +90,7 @@ error: functions generic over types or consts must be mangled LL | #[export_name = "qux"] | ---------------------- help: remove this attribute LL | fn qux<'a>(x: &'a i32) -> &i32 { x } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: functions generic over types or consts must be mangled --> $DIR/export-name-on-generics.rs:83:5 @@ -98,7 +98,7 @@ error: functions generic over types or consts must be mangled LL | #[export_name = "foo"] | ---------------------- help: remove this attribute LL | pub fn foo() {} - | ^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^ error: functions generic over types or consts must be mangled --> $DIR/export-name-on-generics.rs:86:5 @@ -106,7 +106,7 @@ error: functions generic over types or consts must be mangled LL | #[export_name = "bar"] | ---------------------- help: remove this attribute LL | pub extern "C" fn bar() {} - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^^^^^^^^^^ error: functions generic over types or consts must be mangled --> $DIR/export-name-on-generics.rs:89:5 @@ -114,7 +114,7 @@ error: functions generic over types or consts must be mangled LL | #[export_name = "baz"] | ---------------------- help: remove this attribute LL | pub fn baz<U>() {} - | ^^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^^ error: functions generic over types or consts must be mangled --> $DIR/export-name-on-generics.rs:105:5 @@ -122,7 +122,7 @@ error: functions generic over types or consts must be mangled LL | #[export_name = "foo"] | ---------------------- help: remove this attribute LL | fn foo() {} - | ^^^^^^^^^^^ + | ^^^^^^^^ error: functions generic over types or consts must be mangled --> $DIR/export-name-on-generics.rs:108:5 @@ -130,7 +130,7 @@ error: functions generic over types or consts must be mangled LL | #[export_name = "bar"] | ---------------------- help: remove this attribute LL | extern "C" fn bar() {} - | ^^^^^^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^^^^^^ error: functions generic over types or consts must be mangled --> $DIR/export-name-on-generics.rs:111:5 @@ -138,7 +138,7 @@ error: functions generic over types or consts must be mangled LL | #[export_name = "baz"] | ---------------------- help: remove this attribute LL | fn baz<U>() {} - | ^^^^^^^^^^^^^^ + | ^^^^^^^^^^^ error: aborting due to 17 previous errors diff --git a/tests/ui/generics/generic-no-mangle.stderr b/tests/ui/generics/generic-no-mangle.stderr index adfddbe9ca7..39fbe4dd76d 100644 --- a/tests/ui/generics/generic-no-mangle.stderr +++ b/tests/ui/generics/generic-no-mangle.stderr @@ -4,7 +4,7 @@ error: functions generic over types or consts must be mangled LL | #[no_mangle] | ------------ help: remove this attribute LL | pub fn foo<T>() {} - | ^^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^^ | note: the lint level is defined here --> $DIR/generic-no-mangle.rs:3:9 @@ -18,7 +18,7 @@ error: functions generic over types or consts must be mangled LL | #[no_mangle] | ------------ help: remove this attribute LL | pub extern "C" fn bar<T>() {} - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ error: functions generic over types or consts must be mangled --> $DIR/generic-no-mangle.rs:21:5 @@ -26,7 +26,7 @@ error: functions generic over types or consts must be mangled LL | #[no_mangle] | ------------ help: remove this attribute LL | pub fn foo<T>() {} - | ^^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^^ error: functions generic over types or consts must be mangled --> $DIR/generic-no-mangle.rs:24:5 @@ -34,7 +34,7 @@ error: functions generic over types or consts must be mangled LL | #[no_mangle] | ------------ help: remove this attribute LL | pub extern "C" fn bar<T>() {} - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ error: functions generic over types or consts must be mangled --> $DIR/generic-no-mangle.rs:42:5 @@ -42,7 +42,7 @@ error: functions generic over types or consts must be mangled LL | #[no_mangle] | ------------ help: remove this attribute LL | fn foo<T>() {} - | ^^^^^^^^^^^^^^ + | ^^^^^^^^^^^ error: functions generic over types or consts must be mangled --> $DIR/generic-no-mangle.rs:45:5 @@ -50,7 +50,7 @@ error: functions generic over types or consts must be mangled LL | #[no_mangle] | ------------ help: remove this attribute LL | extern "C" fn bar<T>() {} - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^^^^^^^^^ error: functions generic over types or consts must be mangled --> $DIR/generic-no-mangle.rs:64:5 @@ -58,7 +58,7 @@ error: functions generic over types or consts must be mangled LL | #[no_mangle] | ------------ help: remove this attribute LL | fn foo() {} - | ^^^^^^^^^^^ + | ^^^^^^^^ error: functions generic over types or consts must be mangled --> $DIR/generic-no-mangle.rs:67:5 @@ -66,7 +66,7 @@ error: functions generic over types or consts must be mangled LL | #[no_mangle] | ------------ help: remove this attribute LL | fn foo2<U>() {} - | ^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^ error: functions generic over types or consts must be mangled --> $DIR/generic-no-mangle.rs:70:5 @@ -74,7 +74,7 @@ error: functions generic over types or consts must be mangled LL | #[no_mangle] | ------------ help: remove this attribute LL | extern "C" fn bar() {} - | ^^^^^^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^^^^^^ error: functions generic over types or consts must be mangled --> $DIR/generic-no-mangle.rs:73:5 @@ -82,7 +82,7 @@ error: functions generic over types or consts must be mangled LL | #[no_mangle] | ------------ help: remove this attribute LL | fn baz(x: &i32) -> &i32 { x } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^^^^^^^^^^ error: functions generic over types or consts must be mangled --> $DIR/generic-no-mangle.rs:76:5 @@ -90,7 +90,7 @@ error: functions generic over types or consts must be mangled LL | #[no_mangle] | ------------ help: remove this attribute LL | fn qux<'a>(x: &'a i32) -> &i32 { x } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: functions generic over types or consts must be mangled --> $DIR/generic-no-mangle.rs:83:5 @@ -98,7 +98,7 @@ error: functions generic over types or consts must be mangled LL | #[no_mangle] | ------------ help: remove this attribute LL | pub fn foo() {} - | ^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^ error: functions generic over types or consts must be mangled --> $DIR/generic-no-mangle.rs:86:5 @@ -106,7 +106,7 @@ error: functions generic over types or consts must be mangled LL | #[no_mangle] | ------------ help: remove this attribute LL | pub extern "C" fn bar() {} - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^^^^^^^^^^ error: functions generic over types or consts must be mangled --> $DIR/generic-no-mangle.rs:89:5 @@ -114,7 +114,7 @@ error: functions generic over types or consts must be mangled LL | #[no_mangle] | ------------ help: remove this attribute LL | pub fn baz<U>() {} - | ^^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^^ error: functions generic over types or consts must be mangled --> $DIR/generic-no-mangle.rs:105:5 @@ -122,7 +122,7 @@ error: functions generic over types or consts must be mangled LL | #[no_mangle] | ------------ help: remove this attribute LL | fn foo() {} - | ^^^^^^^^^^^ + | ^^^^^^^^ error: functions generic over types or consts must be mangled --> $DIR/generic-no-mangle.rs:108:5 @@ -130,7 +130,7 @@ error: functions generic over types or consts must be mangled LL | #[no_mangle] | ------------ help: remove this attribute LL | extern "C" fn bar() {} - | ^^^^^^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^^^^^^ error: functions generic over types or consts must be mangled --> $DIR/generic-no-mangle.rs:111:5 @@ -138,7 +138,7 @@ error: functions generic over types or consts must be mangled LL | #[no_mangle] | ------------ help: remove this attribute LL | fn baz<U>() {} - | ^^^^^^^^^^^^^^ + | ^^^^^^^^^^^ error: aborting due to 17 previous errors diff --git a/tests/ui/lint/suggestions.stderr b/tests/ui/lint/suggestions.stderr index a4871ead74b..c35e92f5980 100644 --- a/tests/ui/lint/suggestions.stderr +++ b/tests/ui/lint/suggestions.stderr @@ -65,7 +65,7 @@ LL | #[no_mangle] | ------------ help: remove this attribute LL | LL | pub fn defiant<T>(_t: T) {} - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^^^^^^^^^^^ | = note: `#[warn(no_mangle_generic_items)]` on by default @@ -89,7 +89,7 @@ warning: functions generic over types or consts must be mangled --> $DIR/suggestions.rs:26:18 | LL | #[no_mangle] pub fn val_jean<T>() {} - | ------------ ^^^^^^^^^^^^^^^^^^^^^^^ + | ------------ ^^^^^^^^^^^^^^^^^^^^ | | | help: remove this attribute @@ -105,7 +105,7 @@ warning: functions generic over types or consts must be mangled --> $DIR/suggestions.rs:35:18 | LL | #[no_mangle] pub(crate) fn crossfield<T>() {} - | ------------ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ------------ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | | help: remove this attribute diff --git a/tests/ui/specialization/specialization-default-types.current.stderr b/tests/ui/specialization/specialization-default-types.current.stderr index 67477f9a6d5..09689681740 100644 --- a/tests/ui/specialization/specialization-default-types.current.stderr +++ b/tests/ui/specialization/specialization-default-types.current.stderr @@ -12,7 +12,7 @@ error[E0308]: mismatched types --> $DIR/specialization-default-types.rs:19:9 | LL | default type Output = Box<T>; - | ----------------------------- associated type is `default` and may be overridden + | ------------------- associated type is `default` and may be overridden LL | default fn generate(self) -> Self::Output { | ------------ expected `<T as Example>::Output` because of return type LL | Box::new(self) diff --git a/tests/ui/specialization/specialization-default-types.next.stderr b/tests/ui/specialization/specialization-default-types.next.stderr index 4f7c4765446..1535c6473bd 100644 --- a/tests/ui/specialization/specialization-default-types.next.stderr +++ b/tests/ui/specialization/specialization-default-types.next.stderr @@ -12,7 +12,7 @@ error[E0308]: mismatched types --> $DIR/specialization-default-types.rs:19:9 | LL | default type Output = Box<T>; - | ----------------------------- associated type is `default` and may be overridden + | ------------------- associated type is `default` and may be overridden LL | default fn generate(self) -> Self::Output { | ------------ expected `<T as Example>::Output` because of return type LL | Box::new(self) diff --git a/tests/ui/stats/input-stats.stderr b/tests/ui/stats/input-stats.stderr index 7c92044ef5f..7b3acdeb207 100644 --- a/tests/ui/stats/input-stats.stderr +++ b/tests/ui/stats/input-stats.stderr @@ -112,12 +112,12 @@ hir-stats Param 64 (NN.N%) 2 32 hir-stats GenericArg 64 (NN.N%) 4 16 hir-stats - Type 16 (NN.N%) 1 hir-stats - Lifetime 48 (NN.N%) 3 -hir-stats TraitItemRef 56 (NN.N%) 2 28 -hir-stats ImplItemRef 56 (NN.N%) 2 28 +hir-stats TraitItemRef 48 (NN.N%) 2 24 +hir-stats ImplItemRef 48 (NN.N%) 2 24 hir-stats ExprField 40 (NN.N%) 1 40 hir-stats Mod 32 (NN.N%) 1 32 hir-stats Lifetime 28 (NN.N%) 1 28 hir-stats ForeignItemRef 24 (NN.N%) 1 24 hir-stats ---------------------------------------------------------------- -hir-stats Total 8_700 173 +hir-stats Total 8_684 173 hir-stats ================================================================ |
