rust/src/libsyntax
Andy Russell 2f6226518b
use top level fs functions where appropriate
This commit replaces many usages of `File::open` and reading or writing
with `fs::read_to_string`, `fs::read` and `fs::write`. This reduces code
complexity, and will improve performance for most reads, since the
functions allocate the buffer to be the size of the file.

I believe that this commit will not impact behavior in any way, so some
matches will check the error kind in case the file was not valid UTF-8.
Some of these cases may not actually care about the error.
2018-12-07 12:54:11 -05:00
..
attr updates all Filename variants to take a fingerprint 2018-12-04 17:24:12 -05:00
diagnostics Remove OneVector 2018-09-26 10:43:37 +02:00
ext use top level fs functions where appropriate 2018-12-07 12:54:11 -05:00
parse Auto merge of #56392 - petrochenkov:regensym, r=oli-obk 2018-12-06 15:08:11 +00:00
print syntax: Rename some keywords 2018-12-04 00:30:27 +03:00
util Rollup merge of #56516 - frewsxcv:frewsxcv-eq, r=Mark-Simulacrum 2018-12-07 12:42:32 +08:00
ast.rs Address review comments 2018-12-04 01:13:03 +03:00
build.rs rustc: Add some build scripts for librustc crates 2017-07-22 22:04:13 -07:00
Cargo.toml Use optimized SmallVec implementation 2018-08-23 10:45:53 +03:00
config.rs fix typos in various places 2018-10-23 15:56:25 +02:00
diagnostic_list.rs Add a stub feature so we can still test E0705 2018-10-19 22:26:02 -07:00
early_buffered_lints.rs make it a migration lint 2018-07-23 21:55:51 -05:00
entry.rs Cleanup InternedString. 2016-11-21 09:00:56 +00:00
feature_gate.rs Unsupport #[derive(Trait)] sugar for #[derive_Trait] legacy plugin attributes 2018-12-07 03:30:01 +03:00
fold.rs Rollup merge of #55734 - teresy:shorthand-fields, r=davidtwco 2018-11-07 21:27:00 +08:00
json.rs Rename other occs of (Code/File)Map to Source(Map/File) #51574 2018-10-29 21:26:13 +01:00
lib.rs Use iterator and pattern APIs instead of char_at 2018-12-04 09:27:24 +09:00
ptr.rs Reuse the P in InvocationCollector::fold_{,opt_}expr. 2018-11-20 20:55:37 +11:00
README.md rustc-guide has moved 2018-11-26 15:03:13 -06:00
show_span.rs use field init shorthand EVERYWHERE 2017-08-15 15:29:17 -07:00
source_map.rs use top level fs functions where appropriate 2018-12-07 12:54:11 -05:00
std_inject.rs syntax: Rename some keywords 2018-12-04 00:30:27 +03:00
test.rs Remove redundant clone 2018-10-26 12:07:39 +09:00
test_snippet.rs Rename other occs of (Code/File)Map to Source(Map/File) #51574 2018-10-29 21:26:13 +01:00
tokenstream.rs Auto merge of #55971 - SergioBenitez:skip-non-semantic, r=alexcrichton 2018-11-19 19:57:02 +00:00
visit.rs Auto merge of #53815 - F001:if-let-guard, r=petrochenkov 2018-09-01 20:31:29 +00: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: