summaryrefslogtreecommitdiffstats
path: root/src/test/ui/privacy/reachable-unnameable-items.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:03 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:03 +0000
commit64d98f8ee037282c35007b64c2649055c56af1db (patch)
tree5492bcf97fce41ee1c0b1cc2add283f3e66cdab0 /src/test/ui/privacy/reachable-unnameable-items.rs
parentAdding debian version 1.67.1+dfsg1-1. (diff)
downloadrustc-64d98f8ee037282c35007b64c2649055c56af1db.tar.xz
rustc-64d98f8ee037282c35007b64c2649055c56af1db.zip
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/ui/privacy/reachable-unnameable-items.rs')
-rw-r--r--src/test/ui/privacy/reachable-unnameable-items.rs31
1 files changed, 0 insertions, 31 deletions
diff --git a/src/test/ui/privacy/reachable-unnameable-items.rs b/src/test/ui/privacy/reachable-unnameable-items.rs
deleted file mode 100644
index 1babe0119..000000000
--- a/src/test/ui/privacy/reachable-unnameable-items.rs
+++ /dev/null
@@ -1,31 +0,0 @@
-// run-pass
-// needs-unwind
-// aux-build:reachable-unnameable-items.rs
-
-extern crate reachable_unnameable_items;
-use reachable_unnameable_items::*;
-
-fn main() {
- let res1 = function_returning_unnameable_type().method_of_unnameable_type1();
- let res2 = CONSTANT_OF_UNNAMEABLE_TYPE.method_of_unnameable_type2();
- let res4 = AliasOfUnnameableType{}.method_of_unnameable_type4();
- let res5 = function_returning_unnameable_type().inherent_method_returning_unnameable_type().
- method_of_unnameable_type5();
- let res6 = function_returning_unnameable_type().trait_method_returning_unnameable_type().
- method_of_unnameable_type6();
- let res7 = STATIC.field_of_unnameable_type.method_of_unnameable_type7();
- let res8 = generic_function::<AliasOfUnnameableType>().method_of_unnameable_type8();
- let res_enum = NameableVariant.method_of_unnameable_enum();
- assert_eq!(res1, "Hello1");
- assert_eq!(res2, "Hello2");
- assert_eq!(res4, "Hello4");
- assert_eq!(res5, "Hello5");
- assert_eq!(res6, "Hello6");
- assert_eq!(res7, "Hello7");
- assert_eq!(res8, "Hello8");
- assert_eq!(res_enum, "HelloEnum");
-
- let none = None;
- function_accepting_unnameable_type(none);
- let _guard = std::panic::catch_unwind(|| none.unwrap().method_of_unnameable_type3());
-}