Comments (5)
We could use pub(restricted)
for this, instead of reintroducing priv
.
In particular, maybe we could use pub(impl)
to restrict visibility to the "implementation" of the trait.
from rfcs.
Closing in favor of #2028
from rfcs.
@petrochenkov
As I understand it, your proposal is different, as it disallows implementing a private trait item.
This RFC is for trait items that can be implemented, but not visible to users.
from rfcs.
Hm, indeed, that RFC proposes something very different (I wouldn't call that "private trait items").
from rfcs.
Hi, I just wanted to cross post my use case from #52 here so it can hopefully be given some attention.
Perhaps the RFC could be rewritten with some of the new ideas such as using pub(restricted) syntax instead of priv keyword or defaultly private methods?
from rfcs.
Related Issues (20)
- Allow using `as` to cast to different types (`As<T>` trait) HOT 10
- Better wrapper structs HOT 7
- Remove all panics from standard library HOT 25
- Generate an automatic implementation of TryFrom and Into for C-style enums HOT 5
- Redesign `Arc` API HOT 5
- Float rounding with specified digits HOT 4
- Refactor shared methods of `f32` and `f64` into new `Float` trait HOT 3
- Enable `Self = F` in generic `where` clause HOT 1
- Named opt-in trait impls HOT 2
- Question/proposal: Struct specialization HOT 3
- https://rust-lang.github.io/rfcs/0344-conventions-galore.html#lints uses `-` HOT 1
- new type of enum HOT 8
- Pre-RFC: Add a built-in support for totality (or non-panicking/aborting) asserting HOT 6
- Potential Compiler Optimization Issue with &Vec<Vec<T>> vs &[Vec<T>]? HOT 1
- Discussion/Pre-RFC/ACP: Unify privately constructed ("protected") ZSTs in std
- Create a struct similar to std::fs::File for directories HOT 2
- Converging let else HOT 1
- Conditional visibility: for integration testing purpose. HOT 1
- Enum of named structs boilerplate HOT 2
- [moved] Redefine `CARGO_TARGET_DIR` to be only an artifacts directory HOT 3
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 rfcs.