You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Weird interaction between higher-ranked lifetimes and associated type bounds #23481
Error from rustc 1.0.0-nightly (30e1f9a1c 2015-03-14) (built 2015-03-15)
foo.rs:12:1: 12:19 error: the trait `for<'a> core::clone::Clone` is not implemented for the type `<&'a () as Bar>::Xyz` [E0277]
foo.rs:12 impl Foo for () {}
^~~~~~~~~~~~~~~~~~
changed the title [-]Weird interaction between higher-kinded lifetimes and associated type bounds[/-][+]Weird interaction between higher-ranked lifetimes and associated type bounds[/+]on Nov 23, 2015
rustc 1.17.0 (56124baa9 2017-04-24)
error[E0277]: the trait bound `for<'a> <&'a () as Bar>::Xyz: std::clone::Clone` is not satisfied
--> <anon>:10:6
|
10 | impl Foo for () {}
| ^^^ the trait `for<'a> std::clone::Clone` is not implemented for `<&'a () as Bar>::Xyz`
|
= help: the following implementations were found:
<&'a T as std::clone::Clone>
= note: required by `Foo`
error: aborting due to previous error
Compilation failed.
This code now compiles since 1.56. On 1.55, the error was:
error[E0277]: the trait bound `for<'a> <&'a () as Bar>::Xyz: Clone` is not satisfied
--> <source>:10:6
|
1 | pub trait Foo
| --- required by a bound in this
...
4 | for<'a> <&'a Self as Bar>::Xyz: Clone {}
| ----- required by this bound in `Foo`
...
10 | impl Foo for () {}
| ^^^ the trait `for<'a> Clone` is not implemented for `<&'a () as Bar>::Xyz`
|
= help: the following implementations were found:
<&T as Clone>
Activity
[-]Weird interaction between higher-kinded lifetimes and associated type bounds[/-][+]Weird interaction between higher-ranked lifetimes and associated type bounds[/+]brson commentedon May 4, 2017
Current error
steveklabnik commentedon Sep 24, 2018
Triage: no change
estebank commentedon Nov 5, 2019
Trieage: no change.
estebank commentedon Jun 8, 2022
This code now compiles since 1.56. On 1.55, the error was: