Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFC: Item grouping #849

Closed
wants to merge 1 commit into from
Closed

Conversation

kmcallister
Copy link
Contributor


```rust
#[cfg(target_os = "windows")]
impl {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this not just be mod imp { }?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sometimes it can, but sometimes you have a different set of items available on each platform. In that case you need a glob pub use or some cfg'd pub uses.

@sfackler
Copy link
Member

It feels wrong to use impl for this, and bare blocks won't work as you've pointed out. Maybe in { ... }?

@ghost
Copy link

ghost commented Feb 15, 2015

It feels wrong to use impl for this, and bare blocks won't work as you've pointed out. Maybe in { ... }?

This would be a really nice feature but I think I agree with @sfackler here. in { … } (or maybe for/with?) seems like it would be a better syntax.

@pnkfelix pnkfelix mentioned this pull request Mar 4, 2015
@pnkfelix
Copy link
Member

pnkfelix commented Mar 4, 2015

This is an interesting idea, but not critical for 1.0. It also sounds like there may be some better syntactic choices... I am postponing this, but I hope the discussion might continue on the postponed issue: #931 (or perhaps in an internals thread)

@pnkfelix pnkfelix closed this Mar 4, 2015
@pnkfelix pnkfelix added the postponed RFCs that have been postponed and may be revisited at a later time. label Mar 4, 2015
@pronebird
Copy link

Simply having scoped #[cfg(..)] { ... } would suffice

@Centril
Copy link
Contributor

Centril commented Oct 7, 2018

cc #2377

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
postponed RFCs that have been postponed and may be revisited at a later time.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants