From a4b7ed7a42c716ab9f05e351f003d589124fd55d Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:18:58 +0200 Subject: Adding upstream version 1.68.2+dfsg1. Signed-off-by: Daniel Baumann --- src/test/ui/lint/lint-impl-fn.rs | 33 --------------------------------- 1 file changed, 33 deletions(-) delete mode 100644 src/test/ui/lint/lint-impl-fn.rs (limited to 'src/test/ui/lint/lint-impl-fn.rs') diff --git a/src/test/ui/lint/lint-impl-fn.rs b/src/test/ui/lint/lint-impl-fn.rs deleted file mode 100644 index 46874d95c..000000000 --- a/src/test/ui/lint/lint-impl-fn.rs +++ /dev/null @@ -1,33 +0,0 @@ -#![allow(while_true)] -#![allow(dead_code)] - -struct A(isize); - -impl A { - fn foo(&self) { while true {} } - - #[deny(while_true)] - fn bar(&self) { while true {} } //~ ERROR: infinite loops -} - -#[deny(while_true)] -mod foo { - struct B(isize); - - impl B { - fn foo(&self) { while true {} } //~ ERROR: infinite loops - - #[allow(while_true)] - fn bar(&self) { while true {} } - } -} - -#[deny(while_true)] -fn main() { - while true {} //~ ERROR: infinite loops -} - -#[deny(while_true)] -fn bar() { - while cfg!(unix) {} // no error -} -- cgit v1.2.3