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

Add support for const unsafe? extern fn #64906

Merged
merged 3 commits into from
Oct 7, 2019

Commits on Oct 2, 2019

  1. Add support for 'extern const fn'

    This works just as you might expect - an 'extern const fn' is a 'const
    fn' that is callable from foreign code.
    
    Currently, panicking is not allowed in consts. When RFC 2345 is
    stabilized, then panicking in an 'extern const fn' will produce a
    compile-time error when invoked at compile time, and an abort when
    invoked at runtime.
    
    Since this is extending the language (we're allowing the `const` keyword
    in a new context), I believe that this will need an FCP. However, it's a
    very minor change, so I didn't think that filing an RFC was necessary.
    
    This will allow libc (and other FFI crates) to make many functions
    `const`, without having to give up on making them `extern` as well.
    Aaron1011 committed Oct 2, 2019
    Configuration menu
    Copy the full SHA
    73b50d2 View commit details
    Browse the repository at this point in the history
  2. Add missing 'bump'

    Aaron1011 committed Oct 2, 2019
    Configuration menu
    Copy the full SHA
    84b680f View commit details
    Browse the repository at this point in the history

Commits on Oct 3, 2019

  1. Revert changes to src/test/ui/reify-intrinsic.stderr

    For some reason, I'm getting different output for this locally.
    Aaron1011 committed Oct 3, 2019
    Configuration menu
    Copy the full SHA
    a4cad41 View commit details
    Browse the repository at this point in the history