diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:20:39 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:20:39 +0000 |
commit | 1376c5a617be5c25655d0d7cb63e3beaa5a6e026 (patch) | |
tree | 3bb8d61aee02bc7a15eab3f36e3b921afc2075d0 /tests/ui-fulldeps/internal-lints | |
parent | Releasing progress-linux version 1.69.0+dfsg1-1~progress7.99u1. (diff) | |
download | rustc-1376c5a617be5c25655d0d7cb63e3beaa5a6e026.tar.xz rustc-1376c5a617be5c25655d0d7cb63e3beaa5a6e026.zip |
Merging upstream version 1.70.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui-fulldeps/internal-lints')
8 files changed, 0 insertions, 182 deletions
diff --git a/tests/ui-fulldeps/internal-lints/diagnostics_incorrect.rs b/tests/ui-fulldeps/internal-lints/diagnostics_incorrect.rs deleted file mode 100644 index 99f99ffcd..000000000 --- a/tests/ui-fulldeps/internal-lints/diagnostics_incorrect.rs +++ /dev/null @@ -1,15 +0,0 @@ -// compile-flags: -Z unstable-options - -#![feature(rustc_attrs)] - -#[rustc_lint_diagnostics] -//~^ ERROR attribute should be applied to a function -struct Foo; - -impl Foo { - #[rustc_lint_diagnostics(a)] - //~^ ERROR malformed `rustc_lint_diagnostics` - fn bar() {} -} - -fn main() {} diff --git a/tests/ui-fulldeps/internal-lints/diagnostics_incorrect.stderr b/tests/ui-fulldeps/internal-lints/diagnostics_incorrect.stderr deleted file mode 100644 index e849ca282..000000000 --- a/tests/ui-fulldeps/internal-lints/diagnostics_incorrect.stderr +++ /dev/null @@ -1,17 +0,0 @@ -error: malformed `rustc_lint_diagnostics` attribute input - --> $DIR/diagnostics_incorrect.rs:10:5 - | -LL | #[rustc_lint_diagnostics(a)] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[rustc_lint_diagnostics]` - -error: attribute should be applied to a function definition - --> $DIR/diagnostics_incorrect.rs:5:1 - | -LL | #[rustc_lint_diagnostics] - | ^^^^^^^^^^^^^^^^^^^^^^^^^ -LL | -LL | struct Foo; - | ----------- not a function definition - -error: aborting due to 2 previous errors - diff --git a/tests/ui-fulldeps/internal-lints/existing_doc_keyword.rs b/tests/ui-fulldeps/internal-lints/existing_doc_keyword.rs deleted file mode 100644 index 7783dc40f..000000000 --- a/tests/ui-fulldeps/internal-lints/existing_doc_keyword.rs +++ /dev/null @@ -1,11 +0,0 @@ -// compile-flags: -Z unstable-options - -#![feature(rustc_private)] -#![feature(rustdoc_internals)] - -#![crate_type = "lib"] - -#![deny(rustc::existing_doc_keyword)] - -#[doc(keyword = "tadam")] //~ ERROR -mod tadam {} diff --git a/tests/ui-fulldeps/internal-lints/existing_doc_keyword.stderr b/tests/ui-fulldeps/internal-lints/existing_doc_keyword.stderr deleted file mode 100644 index 4e296fff6..000000000 --- a/tests/ui-fulldeps/internal-lints/existing_doc_keyword.stderr +++ /dev/null @@ -1,15 +0,0 @@ -error: found non-existing keyword `tadam` used in `#[doc(keyword = \"...\")]` - --> $DIR/existing_doc_keyword.rs:10:1 - | -LL | #[doc(keyword = "tadam")] - | ^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = help: only existing keywords are allowed in core/std -note: the lint level is defined here - --> $DIR/existing_doc_keyword.rs:8:9 - | -LL | #![deny(rustc::existing_doc_keyword)] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -error: aborting due to previous error - diff --git a/tests/ui-fulldeps/internal-lints/query_stability_incorrect.rs b/tests/ui-fulldeps/internal-lints/query_stability_incorrect.rs deleted file mode 100644 index f478b7332..000000000 --- a/tests/ui-fulldeps/internal-lints/query_stability_incorrect.rs +++ /dev/null @@ -1,15 +0,0 @@ -// compile-flags: -Z unstable-options - -#![feature(rustc_attrs)] - -#[rustc_lint_query_instability] -//~^ ERROR attribute should be applied to a function -struct Foo; - -impl Foo { - #[rustc_lint_query_instability(a)] - //~^ ERROR malformed `rustc_lint_query_instability` - fn bar() {} -} - -fn main() {} diff --git a/tests/ui-fulldeps/internal-lints/query_stability_incorrect.stderr b/tests/ui-fulldeps/internal-lints/query_stability_incorrect.stderr deleted file mode 100644 index 3f78b39ed..000000000 --- a/tests/ui-fulldeps/internal-lints/query_stability_incorrect.stderr +++ /dev/null @@ -1,17 +0,0 @@ -error: malformed `rustc_lint_query_instability` attribute input - --> $DIR/query_stability_incorrect.rs:10:5 - | -LL | #[rustc_lint_query_instability(a)] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[rustc_lint_query_instability]` - -error: attribute should be applied to a function definition - --> $DIR/query_stability_incorrect.rs:5:1 - | -LL | #[rustc_lint_query_instability] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -LL | -LL | struct Foo; - | ----------- not a function definition - -error: aborting due to 2 previous errors - diff --git a/tests/ui-fulldeps/internal-lints/rustc_pass_by_value_self.rs b/tests/ui-fulldeps/internal-lints/rustc_pass_by_value_self.rs deleted file mode 100644 index 6ce67dcaf..000000000 --- a/tests/ui-fulldeps/internal-lints/rustc_pass_by_value_self.rs +++ /dev/null @@ -1,54 +0,0 @@ -// compile-flags: -Z unstable-options -// NOTE: This test doesn't actually require `fulldeps` -// so we could instead use it as a `ui` test. -// -// Considering that all other `internal-lints` are tested here -// this seems like the cleaner solution though. -#![feature(rustc_attrs)] -#![deny(rustc::pass_by_value)] -#![allow(unused)] - -#[rustc_pass_by_value] -struct TyCtxt<'tcx> { - inner: &'tcx (), -} - -impl<'tcx> TyCtxt<'tcx> { - fn by_value(self) {} // OK - fn by_ref(&self) {} //~ ERROR passing `TyCtxt<'tcx>` by reference -} - -struct TyS<'tcx> { - inner: &'tcx (), -} - -#[rustc_pass_by_value] -type Ty<'tcx> = &'tcx TyS<'tcx>; - -impl<'tcx> TyS<'tcx> { - fn by_value(self: Ty<'tcx>) {} - fn by_ref(self: &Ty<'tcx>) {} //~ ERROR passing `Ty<'tcx>` by reference -} - -#[rustc_pass_by_value] -struct Foo; - -impl Foo { - fn with_ref(&self) {} //~ ERROR passing `Foo` by reference -} - -#[rustc_pass_by_value] -struct WithParameters<T, const N: usize, M = u32> { - slice: [T; N], - m: M, -} - -impl<T> WithParameters<T, 1> { - fn with_ref(&self) {} //~ ERROR passing `WithParameters<T, 1>` by reference -} - -impl<T> WithParameters<T, 1, u8> { - fn with_ref(&self) {} //~ ERROR passing `WithParameters<T, 1, u8>` by reference -} - -fn main() {} diff --git a/tests/ui-fulldeps/internal-lints/rustc_pass_by_value_self.stderr b/tests/ui-fulldeps/internal-lints/rustc_pass_by_value_self.stderr deleted file mode 100644 index fb39ed60b..000000000 --- a/tests/ui-fulldeps/internal-lints/rustc_pass_by_value_self.stderr +++ /dev/null @@ -1,38 +0,0 @@ -error: passing `TyCtxt<'tcx>` by reference - --> $DIR/rustc_pass_by_value_self.rs:18:15 - | -LL | fn by_ref(&self) {} - | ^^^^^ help: try passing by value: `TyCtxt<'tcx>` - | -note: the lint level is defined here - --> $DIR/rustc_pass_by_value_self.rs:8:9 - | -LL | #![deny(rustc::pass_by_value)] - | ^^^^^^^^^^^^^^^^^^^^ - -error: passing `Ty<'tcx>` by reference - --> $DIR/rustc_pass_by_value_self.rs:30:21 - | -LL | fn by_ref(self: &Ty<'tcx>) {} - | ^^^^^^^^^ help: try passing by value: `Ty<'tcx>` - -error: passing `Foo` by reference - --> $DIR/rustc_pass_by_value_self.rs:37:17 - | -LL | fn with_ref(&self) {} - | ^^^^^ help: try passing by value: `Foo` - -error: passing `WithParameters<T, 1>` by reference - --> $DIR/rustc_pass_by_value_self.rs:47:17 - | -LL | fn with_ref(&self) {} - | ^^^^^ help: try passing by value: `WithParameters<T, 1>` - -error: passing `WithParameters<T, 1, u8>` by reference - --> $DIR/rustc_pass_by_value_self.rs:51:17 - | -LL | fn with_ref(&self) {} - | ^^^^^ help: try passing by value: `WithParameters<T, 1, u8>` - -error: aborting due to 5 previous errors - |