Home Explore Blog CI



rustc

1st chunk of `src/part-4-intro.md`
fb816455df1395c6fee7c5717f99ac2a706fc2531e79a05900000001000002d9
# Analysis

This part discusses the many analyses that the compiler uses to check various
properties of the code and to inform later stages. Typically, this is what people
mean when they talk about "Rust's type system". This includes the
representation, inference, and checking of types, the trait system, and the
borrow checker. These analyses do not happen as one big pass or set of
contiguous passes. Rather, they are spread out throughout various parts of the
compilation process and use different intermediate representations. For example,
type checking happens on the HIR, while borrow checking happens on the MIR.
Nonetheless, for the sake of presentation, we will discuss all of these
analyses in this part of the guide.

Title: Compiler Analyses Overview
Summary
This section introduces the various analyses performed by the Rust compiler, often referred to as "Rust's type system." These analyses, including type checking, trait system evaluation, and borrow checking, are distributed throughout the compilation process using different intermediate representations like HIR and MIR. The following sections will discuss them.