Comments (4)
No problem, glad I could be of help!
In the future, please avoid using this issue tracker for general questions.
Prefer any one of these: URLO, IRLO, Zulip, Discord, Reddit (unofficial).
from rust.
If you have control over the definition of trait A
, you can just update the assoc type Gat
in both the trait def and the trait impl to type Gat<'a, 'b: 'a>...
to make it pass:
trait A {
type Gat<'a, 'b: 'a>;
}
struct R<'a>(&'a u32);
struct T<'a, 'b>(&'a R<'b>);
struct S;
impl A for S {
type Gat<'a, 'b: 'a> = T<'a, 'b>;
}
from rust.
And if you can't change the definition of trait A
(e.g., if it's part of a different crate or if you don't want to), well, then you simply can't assign T<'a, 'b>
to it since they have different lifetime requirements.
from rust.
I see now, I had the requirements reversed, was trying to 'a: 'b
instead of 'b: 'a
. Sorry!
from rust.
Related Issues (20)
- RUST_BACKTRACE=full panic causes infinite loop on aarch64-pc-windows-msvc HOT 3
- Test failure when enabling vendoring HOT 1
- ICE: `Unsigned value 0x100 does not fit in 8 bits` HOT 4
- Macro hygienics don't prevent const cycles HOT 7
- ICE: `Size::sub: 0 - 1 would result in negative size` HOT 5
- [ICE][miscompile] segv with combined atomic operation and nonnull pointer arithmetic in incremental build HOT 10
- Rust 2015 and 2018 allow emoji in identifiers in "Unknown prefix" position HOT 3
- Internal Compiler Error when building an async closure that calls methods on a referenced variable and a cloned referenced variable in a specific order HOT 2
- ICE with async closure and unboxed_closures bound: tuple_fields called on non-tuple HOT 1
- test on custom type with std::io::Read impl fails on 1.76.0 HOT 8
- ICE: two delayed bugs: `{OpaqueTypeKey { def_id: ...}` and `error performing ParamEnvAnd {...}` HOT 2
- ICE: assertion `left == right` failed: `non-Aggregate field with matching ABI but differing alignment` HOT 3
- String::to_lowercase does not get vectorized well contrary to code comments HOT 4
- `rustc` suggests `for<'a>` when lifetime param already exists HOT 4
- [MacOS] UDP Multicast: Can't assign requested address on interface 0 (as suggested in the documentation) HOT 15
- Strange error message when trying to call a function that takes a closure that returns a future HOT 4
- Triggering 'this path really should be doomed...' error
- Windows: Consider disallowing `.bat` and `.cmd` files in `Command::new` HOT 6
- Add a check against multiple `only-` directives in the same line HOT 7
- Bikeshedding the 'gen' keyword & syntax HOT 17
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rust.