]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/rfc1623.stderr
move leak-check to during coherence, candidate eval
[rust.git] / src / test / ui / rfc1623.stderr
index 75df99137179b6b08d7c18a81a4d46a6c00ff2d1..90dc7cbfa5521574a50456b6d9f34fd7844a95ec 100644 (file)
@@ -1,46 +1,35 @@
 error[E0308]: mismatched types
-  --> $DIR/rfc1623.rs:22:35
+  --> $DIR/rfc1623.rs:21:35
    |
 LL |   static SOME_STRUCT: &SomeStruct = SomeStruct {
    |  ___________________________________^
+LL | |
 LL | |     foo: &Foo { bools: &[false, true] },
 LL | |     bar: &Bar { bools: &[true, true] },
 LL | |     f: &id,
 LL | |
-LL | |
 LL | | };
    | |_^ expected `&SomeStruct<'static, 'static, 'static>`, found struct `SomeStruct`
    |
 help: consider borrowing here
    |
 LL | static SOME_STRUCT: &SomeStruct = &SomeStruct {
+LL |
 LL |     foo: &Foo { bools: &[false, true] },
 LL |     bar: &Bar { bools: &[true, true] },
 LL |     f: &id,
-LL |
 LL |
  ...
 
-error[E0631]: type mismatch in function arguments
-  --> $DIR/rfc1623.rs:25:8
-   |
-LL | fn id<T>(t: T) -> T {
-   | ------------------- found signature of `fn(_) -> _`
-...
-LL |     f: &id,
-   |        ^^^ expected signature of `for<'a, 'b> fn(&'a Foo<'b>) -> _`
-   |
-   = note: required for the cast to the object type `dyn for<'a, 'b> std::ops::Fn(&'a Foo<'b>) -> &'a Foo<'b>`
-
-error[E0271]: type mismatch resolving `for<'a, 'b> <fn(_) -> _ {id::<_>} as std::ops::FnOnce<(&'a Foo<'b>,)>>::Output == &'a Foo<'b>`
+error[E0271]: type mismatch resolving `for<'a, 'b> <fn(&Foo<'_>) -> &Foo<'_> {id::<&Foo<'_>>} as std::ops::FnOnce<(&'a Foo<'b>,)>>::Output == &'a Foo<'b>`
   --> $DIR/rfc1623.rs:25:8
    |
 LL |     f: &id,
-   |        ^^^ expected bound lifetime parameter 'b, found concrete lifetime
+   |        ^^^ expected bound lifetime parameter 'a, found concrete lifetime
    |
    = note: required for the cast to the object type `dyn for<'a, 'b> std::ops::Fn(&'a Foo<'b>) -> &'a Foo<'b>`
 
-error: aborting due to 3 previous errors
+error: aborting due to 2 previous errors
 
-Some errors have detailed explanations: E0271, E0308, E0631.
+Some errors have detailed explanations: E0271, E0308.
 For more information about an error, try `rustc --explain E0271`.