Skip to content

Conversation

Kimundi
Copy link
Contributor

@Kimundi Kimundi commented May 6, 2014

No description provided.

function definition and a value, and would be usable in a static with this.

Another example would be to expose a static reference to a fixed memory address by
dereferencing a raw pointer in a const expr, which is useful in
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think dereferencing pointers is legal in blocks (although I guess one could just regard this as an extension).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

See rust-lang/rust#13973 - if that's a bug that gets fixed by not allowing dereferences in a static then the example indeed becomes invalid.

@emberian
Copy link
Contributor

+1

@alexcrichton
Copy link
Member

We discussed this in today's meeting and decided to merge it.

@alexcrichton alexcrichton merged commit 9da3eb8 into rust-lang:master May 13, 2014
withoutboats pushed a commit to withoutboats/rfcs that referenced this pull request Jan 15, 2017
@Centril Centril added A-syntax Syntax related proposals & ideas A-machine Proposals relating to Rust's abstract machine. A-static Proposals relating to static items. labels Nov 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-machine Proposals relating to Rust's abstract machine. A-static Proposals relating to static items. A-syntax Syntax related proposals & ideas
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants