]> git.proxmox.com Git - rustc.git/blobdiff - src/test/ui/impl-trait/trait_type.stderr
New upstream version 1.48.0~beta.8+dfsg1
[rustc.git] / src / test / ui / impl-trait / trait_type.stderr
index c91ebb705deece16026f9b3cc6e1bbfa67d237fe..e94f2c702150acb3819388af0b1ae916f9a49cef 100644 (file)
@@ -1,37 +1,37 @@
 error[E0053]: method `fmt` has an incompatible type for trait
-  --> $DIR/trait_type.rs:17:4
+  --> $DIR/trait_type.rs:7:4
    |
 LL |    fn fmt(&self, x: &str) -> () { }
    |    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ types differ in mutability
    |
-   = note: expected type `fn(&MyType, &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error>`
-              found type `fn(&MyType, &str)`
+   = note: expected fn pointer `fn(&MyType, &mut Formatter<'_>) -> std::result::Result<(), std::fmt::Error>`
+              found fn pointer `fn(&MyType, &str)`
 
 error[E0050]: method `fmt` has 1 parameter but the declaration in trait `std::fmt::Display::fmt` has 2
-  --> $DIR/trait_type.rs:22:11
+  --> $DIR/trait_type.rs:12:11
    |
 LL |    fn fmt(&self) -> () { }
    |           ^^^^^ expected 2 parameters, found 1
    |
-   = note: `fmt` from trait: `fn(&Self, &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error>`
+   = note: `fmt` from trait: `fn(&Self, &mut Formatter<'_>) -> std::result::Result<(), std::fmt::Error>`
 
 error[E0186]: method `fmt` has a `&self` declaration in the trait, but not in the impl
-  --> $DIR/trait_type.rs:27:4
+  --> $DIR/trait_type.rs:17:4
    |
 LL |    fn fmt() -> () { }
    |    ^^^^^^^^^^^^^^ expected `&self` in impl
    |
-   = note: `fmt` from trait: `fn(&Self, &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error>`
+   = note: `fmt` from trait: `fn(&Self, &mut Formatter<'_>) -> std::result::Result<(), std::fmt::Error>`
 
 error[E0046]: not all trait items implemented, missing: `fmt`
-  --> $DIR/trait_type.rs:31:1
+  --> $DIR/trait_type.rs:21:1
    |
 LL | impl std::fmt::Display for MyType4 {}
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `fmt` in implementation
    |
-   = note: `fmt` from trait: `fn(&Self, &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error>`
+   = help: implement the missing item: `fn fmt(&self, _: &mut Formatter<'_>) -> std::result::Result<(), std::fmt::Error> { todo!() }`
 
 error: aborting due to 4 previous errors
 
-Some errors occurred: E0046, E0050, E0053, E0186.
+Some errors have detailed explanations: E0046, E0050, E0053, E0186.
 For more information about an error, try `rustc --explain E0046`.