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

Trying to put a named function into a twiddle box does weird thing #3461

Closed
brson opened this issue Sep 11, 2012 · 5 comments
Closed

Trying to put a named function into a twiddle box does weird thing #3461

brson opened this issue Sep 11, 2012 · 5 comments
Labels
A-lifetimes Area: lifetime related A-typesystem Area: The type system

Comments

@brson
Copy link
Contributor

brson commented Sep 11, 2012

If you write something like

fn foo() { }

let bar: ~fn() = ~foo;

It won't compile because rustc tries to give you a unique pointer to a 'bare' function (I think). Making bare functions not types, like str and vec, would probably fix this.

@burg
Copy link

burg commented Sep 12, 2012

This will probably interact with #3320, which removes bare function types.

@catamorphism
Copy link
Contributor

expected ~fn()but found~fn()`` -- reproduced as of d2ad028

@sanxiyn
Copy link
Member

sanxiyn commented Mar 26, 2013

It now reports expected ~fn()but found~extern fn() (expected fn but found ~-ptr).

@catamorphism
Copy link
Contributor

Since #3320 isn't blocking 0.6, this shouldn't either.

@catamorphism
Copy link
Contributor

I think this is a moot point since we don't have bare function types anymore.

astrieanna added a commit to astrieanna/rust that referenced this issue Nov 11, 2013
According to issue rust-lang#3461, it doesn't sound like this is planned to be fixed.
RalfJung pushed a commit to RalfJung/rust that referenced this issue Apr 23, 2024
Add localtime_r shim

- Implement ``localtime_r`` shim as mentioned in rust-lang#2057

Note:
- ``tm_zone``, ``tm_gmtoff`` might not be consistent with ``libc::localtime_r`` as custom implementation is provided through ``chrono``. Due to the lack of daylight saving information in ``chrono``, ``is_dst`` value will always be ``-1``.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-lifetimes Area: lifetime related A-typesystem Area: The type system
Projects
None yet
Development

No branches or pull requests

4 participants