diff options
| author | kennytm <kennytm@gmail.com> | 2018-12-14 22:10:09 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-12-14 22:10:09 +0800 |
| commit | dadf7fcc2dc76dd90a9f5a4eea595cf7add8ffff (patch) | |
| tree | a9ba7855dc14b44d546cc4b0d2f3509edd68e80e /src/libsyntax_pos/lib.rs | |
| parent | 53a2de2d549f8f3af99de7c05fa8caa7aa2f2949 (diff) | |
| parent | 0f68749260d04b61dfe2b38dbc423aefe2914a58 (diff) | |
Rollup merge of #56699 - nnethercote:SymbolIndex, r=oli-obk
Use a `newtype_index!` within `Symbol`. This shrinks `Option<Symbol>` from 8 bytes to 4 bytes, which shrinks `Token` from 24 bytes to 16 bytes. This reduces instruction counts by up to 1% across a range of benchmarks. r? @oli-obk
Diffstat (limited to 'src/libsyntax_pos/lib.rs')
| -rw-r--r-- | src/libsyntax_pos/lib.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libsyntax_pos/lib.rs b/src/libsyntax_pos/lib.rs index 8b7ffa499cd..9aafb9fc549 100644 --- a/src/libsyntax_pos/lib.rs +++ b/src/libsyntax_pos/lib.rs @@ -24,10 +24,13 @@ #![feature(nll)] #![feature(non_exhaustive)] #![feature(optin_builtin_traits)] +#![feature(rustc_attrs)] #![feature(specialization)] +#![feature(step_trait)] #![cfg_attr(not(stage0), feature(stdsimd))] extern crate arena; +#[macro_use] extern crate rustc_data_structures; #[macro_use] |
