Skip to content

Errata RFC 4004: Discourage locally recursive accessible(..) - #4004

Draft
dingxiangfei2009 wants to merge 1 commit into
rust-lang:masterfrom
dingxiangfei2009:rfc-2523-no-local
Draft

Errata RFC 4004: Discourage locally recursive accessible(..)#4004
dingxiangfei2009 wants to merge 1 commit into
rust-lang:masterfrom
dingxiangfei2009:rfc-2523-no-local

Conversation

@dingxiangfei2009

@dingxiangfei2009 dingxiangfei2009 commented Aug 27, 2026

Copy link
Copy Markdown

Important

Since RFCs involve many conversations at once that can be difficult to follow, please use review comment threads on the text changes instead of direct comments on the RFC.

If you don't have a particular section of the RFC to comment on, you can click on the "Comment on this file" button on the top-right corner of the diff, to the right of the "Viewed" checkbox. This will create a separate thread even if others have commented on the file too.

Related to rust-lang/rust#64797

Rendered

Comment thread text/2523-cfg-path-version.md Outdated
Comment on lines +360 to +366
Most importantly, restricting accessibility condition allows us to reject the
following code that is impossible to compile.

```rust
#[cfg(not(accessible(MyTy)))]
pub type MyTy = u8;
```

@Darksonn Darksonn Aug 27, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Do we want to blanket disallow all usage within the same crate, or just disallow cyclic usage? I think it could be useful for one module to say cfg(accessible(crate::other_module)) to see if another module is available.

View changes since the review

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Is the availability of crate::other_module unconditional or is it a gadget to evaluate some large cfg expression?

@clarfonthey

Copy link
Copy Markdown
Contributor

Since RFCs are generally kept alone minus typos + links to future RFCs, I think what would make more sense is to create an RFC for the final merged version of cfg_accessible and then link to it from this RFC.

Errata: We discourage locally recursive accessible(..).A
@dingxiangfei2009 dingxiangfei2009 changed the title RFC 2523 Errata: Discourage locally recursive accessible(..) Errata RFC 4004: Discourage locally recursive accessible(..) Aug 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants