]> git.proxmox.com Git - rustc.git/blobdiff - src/test/ui/lint/lint-ctypes-73251-2.rs
New upstream version 1.56.0~beta.4+dfsg1
[rustc.git] / src / test / ui / lint / lint-ctypes-73251-2.rs
index 888671daca5e4164da42087e5fae24ee2166f4d8..79effd054b083f0db31ef8c209c0e91cb15b0fc3 100644 (file)
@@ -1,7 +1,4 @@
-// revisions: min_tait full_tait
-#![feature(min_type_alias_impl_trait)]
-#![cfg_attr(full_tait, feature(type_alias_impl_trait))]
-//[full_tait]~^ WARN incomplete
+#![feature(type_alias_impl_trait)]
 #![deny(improper_ctypes)]
 
 pub trait TraitA {
@@ -16,7 +13,10 @@ pub trait TraitB {
     type Assoc;
 }
 
-impl<T> TraitB for T where T: TraitA {
+impl<T> TraitB for T
+where
+    T: TraitA,
+{
     type Assoc = <T as TraitA>::Assoc;
 }
 
@@ -24,9 +24,13 @@ type AliasA = impl TraitA<Assoc = u32>;
 
 type AliasB = impl TraitB<Assoc = AliasA>;
 
-fn use_of_a() -> AliasA { 3 }
+fn use_of_a() -> AliasA {
+    3
+}
 
-fn use_of_b() -> AliasB { 3 }
+fn use_of_b() -> AliasB {
+    3
+}
 
 extern "C" {
     pub fn lint_me() -> <AliasB as TraitB>::Assoc; //~ ERROR: uses type `impl TraitA`