Crate rustc_errors

source ·
Expand description

Text rendering and related helper functions.

Reuse ‘styled_buffer.rs’ in ‘rustc_errors’, and ‘styled_buffer.rs’ has been modified to fit the feature of ‘Compiler-Base’.

  • add method appendl() and pushs() to StyledBuffer.

  • replaced the enum Style with generics T: Clone + PartialEq + Eq + Style to support extending more styles. StyledBuffer still should be valid when facing the user-defined style, rather than just supporting a built-in enum Style.

  • add some test cases for ‘StyledBuffer’.

Modules§

  • Bindings to acquire a global named lock.
  • ‘StyledBuffer’, a generic, is responsible for text rendering.

Traits§

  • ‘Style’ is a trait used to specify the user customize ‘XXXStyle’ can be accepted by ‘StyleBuffer’.