Add description for every module in check_consts
This commit is contained in:
parent
713ec152fc
commit
ff6faabda7
5 changed files with 17 additions and 0 deletions
|
|
@ -1,3 +1,9 @@
|
|||
//! Check the bodies of `const`s, `static`s and `const fn`s for illegal operations.
|
||||
//!
|
||||
//! This module will eventually replace the parts of `qualify_consts.rs` that check whether a local
|
||||
//! has interior mutability or needs to be dropped, as well as the visitor that emits errors when
|
||||
//! it finds operations that are invalid in a certain context.
|
||||
|
||||
use rustc::hir::def_id::DefId;
|
||||
use rustc::mir;
|
||||
use rustc::ty::{self, TyCtxt};
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
//! Concrete error types for all operations which may be invalid in a certain const context.
|
||||
|
||||
use rustc::hir::def_id::DefId;
|
||||
use rustc::mir::BorrowKind;
|
||||
use rustc::session::config::nightly_options;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
//! A copy of the `Qualif` trait in `qualify_consts.rs` that is suitable for the new validator.
|
||||
|
||||
use rustc::mir::*;
|
||||
use rustc::mir::interpret::ConstValue;
|
||||
use rustc::ty::{self, Ty};
|
||||
|
|
|
|||
|
|
@ -1,3 +1,8 @@
|
|||
//! Propagate `Qualif`s between locals and query the results.
|
||||
//!
|
||||
//! This also contains the dataflow analysis used to track `Qualif`s on complex control-flow
|
||||
//! graphs.
|
||||
|
||||
use rustc::mir::visit::Visitor;
|
||||
use rustc::mir::{self, BasicBlock, Local, Location};
|
||||
use rustc_data_structures::bit_set::BitSet;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
//! The `Visitor` responsible for actually checking a `mir::Body` for invalid operations.
|
||||
|
||||
use rustc::hir::{self, def_id::DefId};
|
||||
use rustc::mir::visit::{PlaceContext, Visitor, MutatingUseContext, NonMutatingUseContext};
|
||||
use rustc::mir::*;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue