Skip to content

Commit fcd730c

Browse files
committed
lint pass wiout err
1 parent fc1b988 commit fcd730c

32 files changed

+66
-0
lines changed

compiler/rustc_borrowck/src/borrow_set.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![deny(rustc::untranslatable_diagnostic)]
2+
#![deny(rustc::diagnostic_outside_of_impl)]
13
use crate::nll::ToRegionVid;
24
use crate::path_utils::allow_two_phase_borrow;
35
use crate::place_ext::PlaceExt;

compiler/rustc_borrowck/src/constraint_generation.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![deny(rustc::untranslatable_diagnostic)]
2+
#![deny(rustc::diagnostic_outside_of_impl)]
13
use rustc_infer::infer::InferCtxt;
24
use rustc_middle::mir::visit::TyContext;
35
use rustc_middle::mir::visit::Visitor;

compiler/rustc_borrowck/src/constraints/graph.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
#![deny(rustc::untranslatable_diagnostic)]
2+
#![deny(rustc::diagnostic_outside_of_impl)]
3+
14
use rustc_data_structures::graph;
25
use rustc_index::vec::IndexVec;
36
use rustc_middle::mir::ConstraintCategory;

compiler/rustc_borrowck/src/constraints/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
#![deny(rustc::untranslatable_diagnostic)]
2+
#![deny(rustc::diagnostic_outside_of_impl)]
3+
14
use rustc_data_structures::graph::scc::Sccs;
25
use rustc_index::vec::IndexVec;
36
use rustc_middle::mir::ConstraintCategory;

compiler/rustc_borrowck/src/consumers.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![deny(rustc::untranslatable_diagnostic)]
2+
#![deny(rustc::diagnostic_outside_of_impl)]
13
//! This file provides API for compiler consumers.
24
35
use rustc_hir::def_id::LocalDefId;

compiler/rustc_borrowck/src/dataflow.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![deny(rustc::untranslatable_diagnostic)]
2+
#![deny(rustc::diagnostic_outside_of_impl)]
13
use rustc_data_structures::fx::FxHashMap;
24
use rustc_index::bit_set::BitSet;
35
use rustc_middle::mir::{self, BasicBlock, Body, Location, Place};

compiler/rustc_borrowck/src/def_use.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![deny(rustc::untranslatable_diagnostic)]
2+
#![deny(rustc::diagnostic_outside_of_impl)]
13
use rustc_middle::mir::visit::{
24
MutatingUseContext, NonMutatingUseContext, NonUseContext, PlaceContext,
35
};

compiler/rustc_borrowck/src/facts.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![deny(rustc::untranslatable_diagnostic)]
2+
#![deny(rustc::diagnostic_outside_of_impl)]
13
use crate::location::{LocationIndex, LocationTable};
24
use crate::BorrowIndex;
35
use polonius_engine::AllFacts as PoloniusFacts;

compiler/rustc_borrowck/src/invalidation.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![deny(rustc::untranslatable_diagnostic)]
2+
#![deny(rustc::diagnostic_outside_of_impl)]
13
use rustc_data_structures::graph::dominators::Dominators;
24
use rustc_middle::mir::visit::Visitor;
35
use rustc_middle::mir::{self, BasicBlock, Body, Location, NonDivergingIntrinsic, Place, Rvalue};

compiler/rustc_borrowck/src/location.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![deny(rustc::untranslatable_diagnostic)]
2+
#![deny(rustc::diagnostic_outside_of_impl)]
13
use rustc_index::vec::{Idx, IndexVec};
24
use rustc_middle::mir::{BasicBlock, Body, Location};
35

compiler/rustc_borrowck/src/member_constraints.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![deny(rustc::untranslatable_diagnostic)]
2+
#![deny(rustc::diagnostic_outside_of_impl)]
13
use rustc_data_structures::captures::Captures;
24
use rustc_data_structures::fx::FxHashMap;
35
use rustc_index::vec::IndexVec;

compiler/rustc_borrowck/src/nll.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![deny(rustc::untranslatable_diagnostic)]
2+
#![deny(rustc::diagnostic_outside_of_impl)]
13
//! The entry point of the NLL borrow checker.
24
35
use rustc_data_structures::vec_map::VecMap;

compiler/rustc_borrowck/src/path_utils.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![deny(rustc::untranslatable_diagnostic)]
2+
#![deny(rustc::diagnostic_outside_of_impl)]
13
use crate::borrow_set::{BorrowData, BorrowSet, TwoPhaseActivation};
24
use crate::places_conflict;
35
use crate::AccessDepth;

compiler/rustc_borrowck/src/place_ext.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![deny(rustc::untranslatable_diagnostic)]
2+
#![deny(rustc::diagnostic_outside_of_impl)]
13
use crate::borrow_set::LocalsStateAtExit;
24
use rustc_hir as hir;
35
use rustc_middle::mir::ProjectionElem;

compiler/rustc_borrowck/src/places_conflict.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![deny(rustc::untranslatable_diagnostic)]
2+
#![deny(rustc::diagnostic_outside_of_impl)]
13
use crate::ArtificialField;
24
use crate::Overlap;
35
use crate::{AccessDepth, Deep, Shallow};

compiler/rustc_borrowck/src/prefixes.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![deny(rustc::untranslatable_diagnostic)]
2+
#![deny(rustc::diagnostic_outside_of_impl)]
13
//! From the NLL RFC: "The deep [aka 'supporting'] prefixes for an
24
//! place are formed by stripping away fields and derefs, except that
35
//! we stop when we reach the deref of a shared reference. [...] "

compiler/rustc_borrowck/src/region_infer/dump_mir.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![deny(rustc::untranslatable_diagnostic)]
2+
#![deny(rustc::diagnostic_outside_of_impl)]
13
//! As part of generating the regions, if you enable `-Zdump-mir=nll`,
24
//! we will generate an annotated copy of the MIR that includes the
35
//! state of region inference. This code handles emitting the region

compiler/rustc_borrowck/src/region_infer/graphviz.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![deny(rustc::untranslatable_diagnostic)]
2+
#![deny(rustc::diagnostic_outside_of_impl)]
13
//! This module provides linkage between RegionInferenceContext and
24
//! `rustc_graphviz` traits, specialized to attaching borrowck analysis
35
//! data to rendered labels.

compiler/rustc_borrowck/src/region_infer/reverse_sccs.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![deny(rustc::untranslatable_diagnostic)]
2+
#![deny(rustc::diagnostic_outside_of_impl)]
13
use crate::constraints::ConstraintSccIndex;
24
use crate::RegionInferenceContext;
35
use itertools::Itertools;

compiler/rustc_borrowck/src/region_infer/values.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![deny(rustc::untranslatable_diagnostic)]
2+
#![deny(rustc::diagnostic_outside_of_impl)]
13
use rustc_data_structures::fx::FxIndexSet;
24
use rustc_index::bit_set::SparseBitMatrix;
35
use rustc_index::interval::IntervalSet;

compiler/rustc_borrowck/src/renumber.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![deny(rustc::untranslatable_diagnostic)]
2+
#![deny(rustc::diagnostic_outside_of_impl)]
13
use rustc_index::vec::IndexVec;
24
use rustc_infer::infer::{InferCtxt, NllRegionVariableOrigin};
35
use rustc_middle::mir::visit::{MutVisitor, TyContext};

compiler/rustc_borrowck/src/type_check/canonical.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![deny(rustc::untranslatable_diagnostic)]
2+
#![deny(rustc::diagnostic_outside_of_impl)]
13
use std::fmt;
24

35
use rustc_infer::infer::canonical::Canonical;

compiler/rustc_borrowck/src/type_check/constraint_conversion.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![deny(rustc::untranslatable_diagnostic)]
2+
#![deny(rustc::diagnostic_outside_of_impl)]
13
use rustc_infer::infer::canonical::QueryOutlivesConstraint;
24
use rustc_infer::infer::canonical::QueryRegionConstraints;
35
use rustc_infer::infer::outlives::env::RegionBoundPairs;

compiler/rustc_borrowck/src/type_check/free_region_relations.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![deny(rustc::untranslatable_diagnostic)]
2+
#![deny(rustc::diagnostic_outside_of_impl)]
13
use rustc_data_structures::frozen::Frozen;
24
use rustc_data_structures::transitive_relation::{TransitiveRelation, TransitiveRelationBuilder};
35
use rustc_infer::infer::canonical::QueryRegionConstraints;

compiler/rustc_borrowck/src/type_check/input_output.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![deny(rustc::untranslatable_diagnostic)]
2+
#![deny(rustc::diagnostic_outside_of_impl)]
13
//! This module contains code to equate the input/output types appearing
24
//! in the MIR with the expected input/output types from the function
35
//! signature. This requires a bit of processing, as the expected types

compiler/rustc_borrowck/src/type_check/liveness/local_use_map.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![deny(rustc::untranslatable_diagnostic)]
2+
#![deny(rustc::diagnostic_outside_of_impl)]
13
use rustc_data_structures::vec_linked_list as vll;
24
use rustc_index::vec::IndexVec;
35
use rustc_middle::mir::visit::{PlaceContext, Visitor};

compiler/rustc_borrowck/src/type_check/liveness/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![deny(rustc::untranslatable_diagnostic)]
2+
#![deny(rustc::diagnostic_outside_of_impl)]
13
use itertools::{Either, Itertools};
24
use rustc_data_structures::fx::FxHashSet;
35
use rustc_middle::mir::{Body, Local};

compiler/rustc_borrowck/src/type_check/liveness/polonius.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![deny(rustc::untranslatable_diagnostic)]
2+
#![deny(rustc::diagnostic_outside_of_impl)]
13
use crate::def_use::{self, DefUse};
24
use crate::location::{LocationIndex, LocationTable};
35
use rustc_middle::mir::visit::{MutatingUseContext, PlaceContext, Visitor};

compiler/rustc_borrowck/src/type_check/liveness/trace.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![deny(rustc::untranslatable_diagnostic)]
2+
#![deny(rustc::diagnostic_outside_of_impl)]
13
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
24
use rustc_index::bit_set::HybridBitSet;
35
use rustc_index::interval::IntervalSet;

compiler/rustc_borrowck/src/type_check/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![deny(rustc::untranslatable_diagnostic)]
2+
#![deny(rustc::diagnostic_outside_of_impl)]
13
//! This pass type-checks the MIR to ensure it is not broken.
24
35
use std::rc::Rc;

compiler/rustc_borrowck/src/type_check/relate_tys.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![deny(rustc::untranslatable_diagnostic)]
2+
#![deny(rustc::diagnostic_outside_of_impl)]
13
use rustc_infer::infer::nll_relate::{NormalizationStrategy, TypeRelating, TypeRelatingDelegate};
24
use rustc_infer::infer::NllRegionVariableOrigin;
35
use rustc_infer::traits::ObligationCause;

compiler/rustc_borrowck/src/used_muts.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![deny(rustc::untranslatable_diagnostic)]
2+
#![deny(rustc::diagnostic_outside_of_impl)]
13
use rustc_data_structures::fx::FxHashSet;
24
use rustc_middle::mir::visit::{PlaceContext, Visitor};
35
use rustc_middle::mir::{

0 commit comments

Comments
 (0)