rust/src/libsyntax
Aaron Hill 73b50d211b
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.
2019-10-02 00:38:52 -04:00
..
ast libsyntax: Unconfigure tests during normal build 2019-08-02 01:59:01 +03:00
attr syntax: Support modern attribute syntax in the meta matcher 2019-09-30 22:58:22 +03:00
diagnostics Replace diagnostic plugins with macro_rules 2019-09-05 12:35:15 -04:00
ext Rollup merge of #63931 - petrochenkov:stabmac, r=Centril 2019-10-01 09:55:28 +02:00
feature_gate Add support for 'extern const fn' 2019-10-02 00:38:52 -04:00
mut_visit Aggregation of cosmetic changes made during work on REPL PRs: libsyntax 2019-09-07 16:29:04 +01:00
parse Add support for 'extern const fn' 2019-10-02 00:38:52 -04:00
print syntax: Support modern attribute syntax in the meta matcher 2019-09-30 22:58:22 +03:00
source_map Apply suggestions from code review 2019-09-07 16:29:04 +01:00
tokenstream syntax_pos: NO_EXPANSION/SyntaxContext::empty() -> SyntaxContext::root() 2019-08-15 20:38:12 +03:00
util Rename Expr.node to Expr.kind 2019-09-26 18:21:09 +01:00
ast.rs Address review comments 2019-10-01 01:10:12 +03:00
build.rs Remove licenses 2018-12-25 21:08:33 -07:00
Cargo.toml remove bit_set re-export from rustc_data_structures 2019-09-29 16:11:30 +00:00
config.rs syntax: Support modern attribute syntax in the meta matcher 2019-09-30 22:58:22 +03:00
early_buffered_lints.rs Implement checks for meta-variables in macros 2019-07-19 19:59:12 +02:00
entry.rs Rename Item.node to Item.kind 2019-09-26 18:21:48 +01:00
error_codes.rs Add long error explanation for E0550 2019-09-30 15:52:47 +02:00
json.rs Don't emit explain with json short messages. 2019-09-24 16:53:33 -07:00
lib.rs remove bit_set re-export from rustc_data_structures 2019-09-29 16:11:30 +00:00
mut_visit.rs syntax: Support modern attribute syntax in the meta matcher 2019-09-30 22:58:22 +03:00
ptr.rs Switch over all StableHash impls to new format 2019-09-28 11:47:36 -04:00
README.md rustc-guide has moved 2018-11-26 15:03:13 -06:00
show_span.rs Rename rustc_errors dependency in rust 2018 crates 2019-02-13 00:28:52 +09:00
source_map.rs Fix backticks in documentation 2019-09-18 23:17:36 -06:00
tests.rs Replace DiagnosticBuilder with Diagnostic when emitting error 2019-09-17 09:29:46 -04:00
tokenstream.rs push TokenTree::parse down 2019-09-22 20:38:02 +03:00
visit.rs Rename ForeignItem.node to ForeignItem.kind 2019-09-26 18:21:48 +01:00

The syntax crate contains those things concerned purely with syntax that is, the AST ("abstract syntax tree"), parser, pretty-printer, lexer, macro expander, and utilities for traversing ASTs.

For more information about how these things work in rustc, see the rustc guide: