Comments (3)
This is from #120584, I think it was expected because of existing brokenness but I may be wrong and see no FCP, so will cc its author @compiler-errors.
from rust.
Yeah, this is a legitimate bug in the code sample that was shared. Downstream crates can implement Vendor
with a Processor
type that implements VendorProcessor<EventGroup = MyEvent>
. Coherence doesn't take into account the privacy of the items, so privacy here doesn't really matter.
For the record, this also would have begun to fail when we land the new trait solver for coherence (#121848) which will ideally happen soon.
from rust.
Thanks guys. It is clear now that this code sample only compiled because of the HRTB, but it was nice because the trait solver did actually work correctly here for our particular use case, as it was able to disambiguate between our usages of VendorProcessor<MyEvent>
and VendorProcessor<Group>
but I understand other 99% of use cases where this is broken. Closing.
from rust.
Related Issues (20)
- Vec<T> implements PartialEq<[T; N]> but the other way round doesn't work HOT 1
- rustc can't find the linker when `--sysroot` is set to a local build of the sysroot HOT 14
- `async closure does not implement `FnMut` because it captures state from its environment` for async closures, while closure returning async block works fine HOT 1
- ICE: `assertion failed: unique` HOT 1
- Suboptimal interaction between lifetime oriented and value oriented type system in the presence of closures. HOT 1
- rustc should magically detect repeating refactoring errors and compress them
- Tracking Issue for `push_str` returning `self` HOT 3
- Exponential time complexity when type checking code with equality constraints HOT 1
- Suggest `Some(&v)` rather than `Some(v.clone())` when calling generic owning methods
- endless loop by running `cargo test` with toolchain 2024-05-14 HOT 4
- Call to function broken by unrelated constraint on generic function containing the call HOT 1
- It's not clear from the documentation when particular features were inctoduces or deprecated HOT 2
- pre-commit hook for `./x.py fmt` appears to not always know which files were changed.
- SIGSEGV when std::time::Instant::now() called HOT 3
- [dogfooding] `-Zbuild-std -vv` produces lots of warnings about check-cfg
- Emit errors or warning to user about recursion of display HOT 6
- [Specialization] Alternatve Minimal implementation: only allow whole-impl specialization, haskell style HOT 5
- negative trait bounds give nonsense error HOT 4
- Dynamic library generates functions with no meaningful assembly. HOT 6
- when SomeType::new() cannot be located due to trait bounds, rustc reccomends calling SomeType::new() HOT 1
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.