Skip to content

Make libsyntax compile with minimal amount of feature flags #24518

Closed
@erickt

Description

@erickt

This a meta-bug that's tracking getting libsyntax to compile with the smallest possible feature flag set so that I can use it as the foundation for syntex. I've done a bunch of the work in #24487, but here are some more longer term dependencies that need some planning:

Here's what needs to be done:

#[feature(core)]:

  • Int::zero() in ast
  • ToPrimitive in codemap
  • usize::to_u32() in codemap
  • ptr::read_and_drop() in fold
  • slice::ref_slice() in parser

#[feature(collections)]:

  • std::collections::BitSet
  • String::escape_default

#[feature(libc)]:

  • libc::c_uint in codemap.rs
  • libc::isatty(libc::STDERR_FILENO) in diagnostic.rs

#[feature(unicode)]:

  • char.width() in diagnostic.rs
  • char.is_xid_start() in lexer
  • char.is_xid_continue() in lexer

#[feature(path_ext)]:

  • Path::exists() - easily replaced with call to metadata

#[feature(str_char)]:

  • str::char_at() - replace with s.chars().take()
  • str::slice_shift_char()

#[feature(rustc_private)]:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions