Skip to content
This repository has been archived by the owner on May 23, 2024. It is now read-only.

ices/106874.rs: fixed with errors #1658

Merged
merged 1 commit into from
Oct 10, 2023
Merged

ices/106874.rs: fixed with errors #1658

merged 1 commit into from
Oct 10, 2023

Commits on Sep 1, 2023

  1. ices/106874.rs: fixed with errors

    === stdout ===
    === stderr ===
    error: higher-ranked lifetime error
     --> /home/runner/work/glacier/glacier/ices/106874.rs:5:5
      |
    5 |     A(B(C::new(D::new(move |st| f(st)))))
      |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    
    error[E0308]: mismatched types
      --> /home/runner/work/glacier/glacier/ices/106874.rs:5:7
       |
    5  |     A(B(C::new(D::new(move |st| f(st)))))
       |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ one type is more general than the other
       |
       = note: expected trait `for<'a> Fn<(&'a mut V,)>`
                  found trait `Fn<(&mut V,)>`
    note: this closure does not fulfill the lifetime requirements
      --> /home/runner/work/glacier/glacier/ices/106874.rs:5:23
       |
    5  |     A(B(C::new(D::new(move |st| f(st)))))
       |                       ^^^^^^^^^
    note: the lifetime requirement is introduced here
      --> /home/runner/work/glacier/glacier/ices/106874.rs:18:13
       |
    18 | struct C<T: Y>(T::V);
       |             ^
    help: consider specifying the type of the closure parameters
       |
    5  |     A(B(C::new(D::new(|st: &_| f(st)))))
       |                       ~~~~~~~~
    
    error: implementation of `FnOnce` is not general enough
     --> /home/runner/work/glacier/glacier/ices/106874.rs:5:7
      |
    5 |     A(B(C::new(D::new(move |st| f(st)))))
      |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ implementation of `FnOnce` is not general enough
      |
      = note: closure with signature `fn(&'2 mut V)` must implement `FnOnce<(&'1 mut V,)>`, for any lifetime `'1`...
      = note: ...but it actually implements `FnOnce<(&'2 mut V,)>`, for some specific lifetime `'2`
    
    error[E0308]: mismatched types
      --> /home/runner/work/glacier/glacier/ices/106874.rs:5:7
       |
    5  |     A(B(C::new(D::new(move |st| f(st)))))
       |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ one type is more general than the other
       |
       = note: expected trait `for<'a> Fn<(&'a mut V,)>`
                  found trait `Fn<(&mut V,)>`
    note: this closure does not fulfill the lifetime requirements
      --> /home/runner/work/glacier/glacier/ices/106874.rs:5:23
       |
    5  |     A(B(C::new(D::new(move |st| f(st)))))
       |                       ^^^^^^^^^
    note: the lifetime requirement is introduced here
      --> /home/runner/work/glacier/glacier/ices/106874.rs:15:10
       |
    15 | struct B<T>(Rc<T>);
       |          ^
    help: consider specifying the type of the closure parameters
       |
    5  |     A(B(C::new(D::new(|st: &_| f(st)))))
       |                       ~~~~~~~~
    
    error: implementation of `FnOnce` is not general enough
     --> /home/runner/work/glacier/glacier/ices/106874.rs:5:9
      |
    5 |     A(B(C::new(D::new(move |st| f(st)))))
      |         ^^^^^^ implementation of `FnOnce` is not general enough
      |
      = note: closure with signature `fn(&'2 mut V)` must implement `FnOnce<(&'1 mut V,)>`, for any lifetime `'1`...
      = note: ...but it actually implements `FnOnce<(&'2 mut V,)>`, for some specific lifetime `'2`
    
    error[E0308]: mismatched types
     --> /home/runner/work/glacier/glacier/ices/106874.rs:5:9
      |
    5 |     A(B(C::new(D::new(move |st| f(st)))))
      |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ one type is more general than the other
      |
      = note: expected trait `for<'a> Fn<(&'a mut V,)>`
                 found trait `Fn<(&mut V,)>`
    note: this closure does not fulfill the lifetime requirements
     --> /home/runner/work/glacier/glacier/ices/106874.rs:5:23
      |
    5 |     A(B(C::new(D::new(move |st| f(st)))))
      |                       ^^^^^^^^^
    help: consider specifying the type of the closure parameters
      |
    5 |     A(B(C::new(D::new(|st: &_| f(st)))))
      |                       ~~~~~~~~
    
    error: implementation of `FnOnce` is not general enough
     --> /home/runner/work/glacier/glacier/ices/106874.rs:5:9
      |
    5 |     A(B(C::new(D::new(move |st| f(st)))))
      |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ implementation of `FnOnce` is not general enough
      |
      = note: closure with signature `fn(&'2 mut V)` must implement `FnOnce<(&'1 mut V,)>`, for any lifetime `'1`...
      = note: ...but it actually implements `FnOnce<(&'2 mut V,)>`, for some specific lifetime `'2`
    
    error: higher-ranked subtype error
     --> /home/runner/work/glacier/glacier/ices/106874.rs:5:41
      |
    5 |     A(B(C::new(D::new(move |st| f(st)))))
      |                                         ^
    
    error: aborting due to 8 previous errors
    
    For more information about this error, try `rustc --explain E0308`.
    ==============
    rustbot committed Sep 1, 2023
    Configuration menu
    Copy the full SHA
    861aff2 View commit details
    Browse the repository at this point in the history