mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-16 14:07:04 +00:00
Auto merge of #108325 - matthiaskrgr:rollup-73qihie, r=matthiaskrgr
Rollup of 7 pull requests Successful merges: - #104239 (Better debug logs for borrowck constraint graph) - #108202 (Make sure `test_type_match` doesn't ICE with late-bound types) - #108295 (Use DefKind to give more item kind information during BindingObligation note ) - #108306 (compiletest: up deps) - #108313 (Fix compiletest possible crash in option only-modified) - #108322 (Clean ConstProp) - #108323 (hir-analysis: make one diagnostic translatable) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
This commit is contained in:
commit
f9216b7564
@ -891,11 +891,11 @@ dependencies = [
|
||||
"diff",
|
||||
"getopts",
|
||||
"glob",
|
||||
"lazy_static",
|
||||
"lazycell",
|
||||
"libc",
|
||||
"miow 0.3.7",
|
||||
"miow 0.5.0",
|
||||
"miropt-test-tools",
|
||||
"once_cell",
|
||||
"regex",
|
||||
"rustfix",
|
||||
"serde",
|
||||
|
@ -17,7 +17,7 @@ pub(crate) mod graph;
|
||||
/// constraints of the form `R1: R2`. Each constraint is identified by
|
||||
/// a unique `OutlivesConstraintIndex` and you can index into the set
|
||||
/// (`constraint_set[i]`) to access the constraint details.
|
||||
#[derive(Clone, Default)]
|
||||
#[derive(Clone, Debug, Default)]
|
||||
pub(crate) struct OutlivesConstraintSet<'tcx> {
|
||||
outlives: IndexVec<OutlivesConstraintIndex, OutlivesConstraint<'tcx>>,
|
||||
}
|
||||
|
@ -25,7 +25,9 @@ use rustc_hir as hir;
|
||||
use rustc_hir::def_id::LocalDefId;
|
||||
use rustc_index::bit_set::ChunkedBitSet;
|
||||
use rustc_index::vec::IndexVec;
|
||||
use rustc_infer::infer::{DefiningAnchor, InferCtxt, TyCtxtInferExt};
|
||||
use rustc_infer::infer::{
|
||||
DefiningAnchor, InferCtxt, NllRegionVariableOrigin, RegionVariableOrigin, TyCtxtInferExt,
|
||||
};
|
||||
use rustc_middle::mir::{
|
||||
traversal, Body, ClearCrossCrate, Local, Location, Mutability, NonDivergingIntrinsic, Operand,
|
||||
Place, PlaceElem, PlaceRef, VarDebugInfoContents,
|
||||
@ -43,6 +45,7 @@ use smallvec::SmallVec;
|
||||
use std::cell::OnceCell;
|
||||
use std::cell::RefCell;
|
||||
use std::collections::BTreeMap;
|
||||
use std::ops::Deref;
|
||||
use std::rc::Rc;
|
||||
|
||||
use rustc_mir_dataflow::impls::{
|
||||
@ -94,6 +97,7 @@ use nll::{PoloniusOutput, ToRegionVid};
|
||||
use place_ext::PlaceExt;
|
||||
use places_conflict::{places_conflict, PlaceConflictBias};
|
||||
use region_infer::RegionInferenceContext;
|
||||
use renumber::RegionCtxt;
|
||||
|
||||
// FIXME(eddyb) perhaps move this somewhere more centrally.
|
||||
#[derive(Debug)]
|
||||
@ -167,10 +171,10 @@ fn do_mir_borrowck<'tcx>(
|
||||
return_body_with_facts: bool,
|
||||
) -> (BorrowCheckResult<'tcx>, Option<Box<BodyWithBorrowckFacts<'tcx>>>) {
|
||||
let def = input_body.source.with_opt_param().as_local().unwrap();
|
||||
|
||||
debug!(?def);
|
||||
|
||||
let tcx = infcx.tcx;
|
||||
let infcx = BorrowckInferCtxt::new(infcx);
|
||||
let param_env = tcx.param_env(def.did);
|
||||
|
||||
let mut local_names = IndexVec::from_elem(None, &input_body.local_decls);
|
||||
@ -218,7 +222,7 @@ fn do_mir_borrowck<'tcx>(
|
||||
let mut body_owned = input_body.clone();
|
||||
let mut promoted = input_promoted.clone();
|
||||
let free_regions =
|
||||
nll::replace_regions_in_mir(infcx, param_env, &mut body_owned, &mut promoted);
|
||||
nll::replace_regions_in_mir(&infcx, param_env, &mut body_owned, &mut promoted);
|
||||
let body = &body_owned; // no further changes
|
||||
|
||||
let location_table_owned = LocationTable::new(body);
|
||||
@ -256,7 +260,7 @@ fn do_mir_borrowck<'tcx>(
|
||||
opt_closure_req,
|
||||
nll_errors,
|
||||
} = nll::compute_regions(
|
||||
infcx,
|
||||
&infcx,
|
||||
free_regions,
|
||||
body,
|
||||
&promoted,
|
||||
@ -271,12 +275,12 @@ fn do_mir_borrowck<'tcx>(
|
||||
|
||||
// Dump MIR results into a file, if that is enabled. This let us
|
||||
// write unit-tests, as well as helping with debugging.
|
||||
nll::dump_mir_results(infcx, &body, ®ioncx, &opt_closure_req);
|
||||
nll::dump_mir_results(&infcx, &body, ®ioncx, &opt_closure_req);
|
||||
|
||||
// We also have a `#[rustc_regions]` annotation that causes us to dump
|
||||
// information.
|
||||
nll::dump_annotation(
|
||||
infcx,
|
||||
&infcx,
|
||||
&body,
|
||||
®ioncx,
|
||||
&opt_closure_req,
|
||||
@ -320,7 +324,7 @@ fn do_mir_borrowck<'tcx>(
|
||||
|
||||
if let Err((move_data, move_errors)) = move_data_results {
|
||||
let mut promoted_mbcx = MirBorrowckCtxt {
|
||||
infcx,
|
||||
infcx: &infcx,
|
||||
param_env,
|
||||
body: promoted_body,
|
||||
move_data: &move_data,
|
||||
@ -349,7 +353,7 @@ fn do_mir_borrowck<'tcx>(
|
||||
}
|
||||
|
||||
let mut mbcx = MirBorrowckCtxt {
|
||||
infcx,
|
||||
infcx: &infcx,
|
||||
param_env,
|
||||
body,
|
||||
move_data: &mdpe.move_data,
|
||||
@ -481,8 +485,84 @@ pub struct BodyWithBorrowckFacts<'tcx> {
|
||||
pub location_table: LocationTable,
|
||||
}
|
||||
|
||||
pub struct BorrowckInferCtxt<'cx, 'tcx> {
|
||||
pub(crate) infcx: &'cx InferCtxt<'tcx>,
|
||||
pub(crate) reg_var_to_origin: RefCell<FxHashMap<ty::RegionVid, RegionCtxt>>,
|
||||
}
|
||||
|
||||
impl<'cx, 'tcx> BorrowckInferCtxt<'cx, 'tcx> {
|
||||
pub(crate) fn new(infcx: &'cx InferCtxt<'tcx>) -> Self {
|
||||
BorrowckInferCtxt { infcx, reg_var_to_origin: RefCell::new(Default::default()) }
|
||||
}
|
||||
|
||||
pub(crate) fn next_region_var<F>(
|
||||
&self,
|
||||
origin: RegionVariableOrigin,
|
||||
get_ctxt_fn: F,
|
||||
) -> ty::Region<'tcx>
|
||||
where
|
||||
F: Fn() -> RegionCtxt,
|
||||
{
|
||||
let next_region = self.infcx.next_region_var(origin);
|
||||
let vid = next_region
|
||||
.as_var()
|
||||
.unwrap_or_else(|| bug!("expected RegionKind::RegionVar on {:?}", next_region));
|
||||
|
||||
if cfg!(debug_assertions) {
|
||||
debug!("inserting vid {:?} with origin {:?} into var_to_origin", vid, origin);
|
||||
let ctxt = get_ctxt_fn();
|
||||
let mut var_to_origin = self.reg_var_to_origin.borrow_mut();
|
||||
let prev = var_to_origin.insert(vid, ctxt);
|
||||
|
||||
// This only makes sense if not called in a canonicalization context. If this
|
||||
// ever changes we either want to get rid of `BorrowckInferContext::reg_var_to_origin`
|
||||
// or modify how we track nll region vars for that map.
|
||||
assert!(matches!(prev, None));
|
||||
}
|
||||
|
||||
next_region
|
||||
}
|
||||
|
||||
#[instrument(skip(self, get_ctxt_fn), level = "debug")]
|
||||
pub(crate) fn next_nll_region_var<F>(
|
||||
&self,
|
||||
origin: NllRegionVariableOrigin,
|
||||
get_ctxt_fn: F,
|
||||
) -> ty::Region<'tcx>
|
||||
where
|
||||
F: Fn() -> RegionCtxt,
|
||||
{
|
||||
let next_region = self.infcx.next_nll_region_var(origin.clone());
|
||||
let vid = next_region
|
||||
.as_var()
|
||||
.unwrap_or_else(|| bug!("expected RegionKind::RegionVar on {:?}", next_region));
|
||||
|
||||
if cfg!(debug_assertions) {
|
||||
debug!("inserting vid {:?} with origin {:?} into var_to_origin", vid, origin);
|
||||
let ctxt = get_ctxt_fn();
|
||||
let mut var_to_origin = self.reg_var_to_origin.borrow_mut();
|
||||
let prev = var_to_origin.insert(vid, ctxt);
|
||||
|
||||
// This only makes sense if not called in a canonicalization context. If this
|
||||
// ever changes we either want to get rid of `BorrowckInferContext::reg_var_to_origin`
|
||||
// or modify how we track nll region vars for that map.
|
||||
assert!(matches!(prev, None));
|
||||
}
|
||||
|
||||
next_region
|
||||
}
|
||||
}
|
||||
|
||||
impl<'cx, 'tcx> Deref for BorrowckInferCtxt<'cx, 'tcx> {
|
||||
type Target = InferCtxt<'tcx>;
|
||||
|
||||
fn deref(&self) -> &'cx Self::Target {
|
||||
self.infcx
|
||||
}
|
||||
}
|
||||
|
||||
struct MirBorrowckCtxt<'cx, 'tcx> {
|
||||
infcx: &'cx InferCtxt<'tcx>,
|
||||
infcx: &'cx BorrowckInferCtxt<'cx, 'tcx>,
|
||||
param_env: ParamEnv<'tcx>,
|
||||
body: &'cx Body<'tcx>,
|
||||
move_data: &'cx MoveData<'tcx>,
|
||||
|
@ -5,7 +5,6 @@
|
||||
use rustc_data_structures::vec_map::VecMap;
|
||||
use rustc_hir::def_id::LocalDefId;
|
||||
use rustc_index::vec::IndexVec;
|
||||
use rustc_infer::infer::InferCtxt;
|
||||
use rustc_middle::mir::{create_dump_file, dump_enabled, dump_mir, PassWhere};
|
||||
use rustc_middle::mir::{
|
||||
BasicBlock, Body, ClosureOutlivesSubject, ClosureRegionRequirements, LocalKind, Location,
|
||||
@ -37,7 +36,7 @@ use crate::{
|
||||
renumber,
|
||||
type_check::{self, MirTypeckRegionConstraints, MirTypeckResults},
|
||||
universal_regions::UniversalRegions,
|
||||
Upvar,
|
||||
BorrowckInferCtxt, Upvar,
|
||||
};
|
||||
|
||||
pub type PoloniusOutput = Output<RustcFacts>;
|
||||
@ -58,7 +57,7 @@ pub(crate) struct NllOutput<'tcx> {
|
||||
/// `compute_regions`.
|
||||
#[instrument(skip(infcx, param_env, body, promoted), level = "debug")]
|
||||
pub(crate) fn replace_regions_in_mir<'tcx>(
|
||||
infcx: &InferCtxt<'tcx>,
|
||||
infcx: &BorrowckInferCtxt<'_, 'tcx>,
|
||||
param_env: ty::ParamEnv<'tcx>,
|
||||
body: &mut Body<'tcx>,
|
||||
promoted: &mut IndexVec<Promoted, Body<'tcx>>,
|
||||
@ -157,7 +156,7 @@ fn populate_polonius_move_facts(
|
||||
///
|
||||
/// This may result in errors being reported.
|
||||
pub(crate) fn compute_regions<'cx, 'tcx>(
|
||||
infcx: &InferCtxt<'tcx>,
|
||||
infcx: &BorrowckInferCtxt<'_, 'tcx>,
|
||||
universal_regions: UniversalRegions<'tcx>,
|
||||
body: &Body<'tcx>,
|
||||
promoted: &IndexVec<Promoted, Body<'tcx>>,
|
||||
@ -259,6 +258,7 @@ pub(crate) fn compute_regions<'cx, 'tcx>(
|
||||
);
|
||||
|
||||
let mut regioncx = RegionInferenceContext::new(
|
||||
infcx,
|
||||
var_origins,
|
||||
universal_regions,
|
||||
placeholder_indices,
|
||||
@ -322,7 +322,7 @@ pub(crate) fn compute_regions<'cx, 'tcx>(
|
||||
}
|
||||
|
||||
pub(super) fn dump_mir_results<'tcx>(
|
||||
infcx: &InferCtxt<'tcx>,
|
||||
infcx: &BorrowckInferCtxt<'_, 'tcx>,
|
||||
body: &Body<'tcx>,
|
||||
regioncx: &RegionInferenceContext<'tcx>,
|
||||
closure_region_requirements: &Option<ClosureRegionRequirements<'_>>,
|
||||
@ -372,7 +372,7 @@ pub(super) fn dump_mir_results<'tcx>(
|
||||
#[allow(rustc::diagnostic_outside_of_impl)]
|
||||
#[allow(rustc::untranslatable_diagnostic)]
|
||||
pub(super) fn dump_annotation<'tcx>(
|
||||
infcx: &InferCtxt<'tcx>,
|
||||
infcx: &BorrowckInferCtxt<'_, 'tcx>,
|
||||
body: &Body<'tcx>,
|
||||
regioncx: &RegionInferenceContext<'tcx>,
|
||||
closure_region_requirements: &Option<ClosureRegionRequirements<'_>>,
|
||||
|
@ -34,6 +34,7 @@ use crate::{
|
||||
},
|
||||
type_check::{free_region_relations::UniversalRegionRelations, Locations},
|
||||
universal_regions::UniversalRegions,
|
||||
BorrowckInferCtxt,
|
||||
};
|
||||
|
||||
mod dump_mir;
|
||||
@ -243,6 +244,70 @@ pub enum ExtraConstraintInfo {
|
||||
PlaceholderFromPredicate(Span),
|
||||
}
|
||||
|
||||
#[instrument(skip(infcx, sccs), level = "debug")]
|
||||
fn sccs_info<'cx, 'tcx>(
|
||||
infcx: &'cx BorrowckInferCtxt<'cx, 'tcx>,
|
||||
sccs: Rc<Sccs<RegionVid, ConstraintSccIndex>>,
|
||||
) {
|
||||
use crate::renumber::RegionCtxt;
|
||||
|
||||
let var_to_origin = infcx.reg_var_to_origin.borrow();
|
||||
|
||||
let mut var_to_origin_sorted = var_to_origin.clone().into_iter().collect::<Vec<_>>();
|
||||
var_to_origin_sorted.sort_by(|a, b| a.0.cmp(&b.0));
|
||||
let mut debug_str = "region variables to origins:\n".to_string();
|
||||
for (reg_var, origin) in var_to_origin_sorted.into_iter() {
|
||||
debug_str.push_str(&format!("{:?}: {:?}\n", reg_var, origin));
|
||||
}
|
||||
debug!(debug_str);
|
||||
|
||||
let num_components = sccs.scc_data().ranges().len();
|
||||
let mut components = vec![FxHashSet::default(); num_components];
|
||||
|
||||
for (reg_var_idx, scc_idx) in sccs.scc_indices().iter().enumerate() {
|
||||
let reg_var = ty::RegionVid::from_usize(reg_var_idx);
|
||||
let origin = var_to_origin.get(®_var).unwrap_or_else(|| &RegionCtxt::Unknown);
|
||||
components[scc_idx.as_usize()].insert((reg_var, *origin));
|
||||
}
|
||||
|
||||
let mut components_str = "strongly connected components:".to_string();
|
||||
for (scc_idx, reg_vars_origins) in components.iter().enumerate() {
|
||||
let regions_info = reg_vars_origins.clone().into_iter().collect::<Vec<_>>();
|
||||
components_str.push_str(&format!(
|
||||
"{:?}: {:?})",
|
||||
ConstraintSccIndex::from_usize(scc_idx),
|
||||
regions_info,
|
||||
))
|
||||
}
|
||||
debug!(components_str);
|
||||
|
||||
// calculate the best representative for each component
|
||||
let components_representatives = components
|
||||
.into_iter()
|
||||
.enumerate()
|
||||
.map(|(scc_idx, region_ctxts)| {
|
||||
let repr = region_ctxts
|
||||
.into_iter()
|
||||
.map(|reg_var_origin| reg_var_origin.1)
|
||||
.max_by(|x, y| x.preference_value().cmp(&y.preference_value()))
|
||||
.unwrap();
|
||||
|
||||
(ConstraintSccIndex::from_usize(scc_idx), repr)
|
||||
})
|
||||
.collect::<FxHashMap<_, _>>();
|
||||
|
||||
let mut scc_node_to_edges = FxHashMap::default();
|
||||
for (scc_idx, repr) in components_representatives.iter() {
|
||||
let edges_range = sccs.scc_data().ranges()[*scc_idx].clone();
|
||||
let edges = &sccs.scc_data().all_successors()[edges_range];
|
||||
let edge_representatives =
|
||||
edges.iter().map(|scc_idx| components_representatives[scc_idx]).collect::<Vec<_>>();
|
||||
scc_node_to_edges.insert((scc_idx, repr), edge_representatives);
|
||||
}
|
||||
|
||||
debug!("SCC edges {:#?}", scc_node_to_edges);
|
||||
}
|
||||
|
||||
impl<'tcx> RegionInferenceContext<'tcx> {
|
||||
/// Creates a new region inference context with a total of
|
||||
/// `num_region_variables` valid inference variables; the first N
|
||||
@ -251,7 +316,8 @@ impl<'tcx> RegionInferenceContext<'tcx> {
|
||||
///
|
||||
/// The `outlives_constraints` and `type_tests` are an initial set
|
||||
/// of constraints produced by the MIR type check.
|
||||
pub(crate) fn new(
|
||||
pub(crate) fn new<'cx>(
|
||||
_infcx: &BorrowckInferCtxt<'cx, 'tcx>,
|
||||
var_infos: VarInfos,
|
||||
universal_regions: Rc<UniversalRegions<'tcx>>,
|
||||
placeholder_indices: Rc<PlaceholderIndices>,
|
||||
@ -263,6 +329,11 @@ impl<'tcx> RegionInferenceContext<'tcx> {
|
||||
liveness_constraints: LivenessValues<RegionVid>,
|
||||
elements: &Rc<RegionValueElements>,
|
||||
) -> Self {
|
||||
debug!("universal_regions: {:#?}", universal_regions);
|
||||
debug!("outlives constraints: {:#?}", outlives_constraints);
|
||||
debug!("placeholder_indices: {:#?}", placeholder_indices);
|
||||
debug!("type tests: {:#?}", type_tests);
|
||||
|
||||
// Create a RegionDefinition for each inference variable.
|
||||
let definitions: IndexVec<_, _> = var_infos
|
||||
.iter()
|
||||
@ -274,6 +345,10 @@ impl<'tcx> RegionInferenceContext<'tcx> {
|
||||
let fr_static = universal_regions.fr_static;
|
||||
let constraint_sccs = Rc::new(constraints.compute_sccs(&constraint_graph, fr_static));
|
||||
|
||||
if cfg!(debug_assertions) {
|
||||
sccs_info(_infcx, constraint_sccs.clone());
|
||||
}
|
||||
|
||||
let mut scc_values =
|
||||
RegionValues::new(elements, universal_regions.len(), &placeholder_indices);
|
||||
|
||||
|
@ -181,7 +181,7 @@ impl<N: Idx> LivenessValues<N> {
|
||||
/// Maps from `ty::PlaceholderRegion` values that are used in the rest of
|
||||
/// rustc to the internal `PlaceholderIndex` values that are used in
|
||||
/// NLL.
|
||||
#[derive(Default)]
|
||||
#[derive(Debug, Default)]
|
||||
pub(crate) struct PlaceholderIndices {
|
||||
indices: FxIndexSet<ty::PlaceholderRegion>,
|
||||
}
|
||||
|
@ -1,18 +1,20 @@
|
||||
#![deny(rustc::untranslatable_diagnostic)]
|
||||
#![deny(rustc::diagnostic_outside_of_impl)]
|
||||
use crate::BorrowckInferCtxt;
|
||||
use rustc_index::vec::IndexVec;
|
||||
use rustc_infer::infer::{InferCtxt, NllRegionVariableOrigin};
|
||||
use rustc_infer::infer::NllRegionVariableOrigin;
|
||||
use rustc_middle::mir::visit::{MutVisitor, TyContext};
|
||||
use rustc_middle::mir::Constant;
|
||||
use rustc_middle::mir::{Body, Location, Promoted};
|
||||
use rustc_middle::ty::subst::SubstsRef;
|
||||
use rustc_middle::ty::{self, Ty, TyCtxt, TypeFoldable};
|
||||
use rustc_span::{Span, Symbol};
|
||||
|
||||
/// Replaces all free regions appearing in the MIR with fresh
|
||||
/// inference variables, returning the number of variables created.
|
||||
#[instrument(skip(infcx, body, promoted), level = "debug")]
|
||||
pub fn renumber_mir<'tcx>(
|
||||
infcx: &InferCtxt<'tcx>,
|
||||
infcx: &BorrowckInferCtxt<'_, 'tcx>,
|
||||
body: &mut Body<'tcx>,
|
||||
promoted: &mut IndexVec<Promoted, Body<'tcx>>,
|
||||
) {
|
||||
@ -29,27 +31,68 @@ pub fn renumber_mir<'tcx>(
|
||||
|
||||
/// Replaces all regions appearing in `value` with fresh inference
|
||||
/// variables.
|
||||
#[instrument(skip(infcx), level = "debug")]
|
||||
pub fn renumber_regions<'tcx, T>(infcx: &InferCtxt<'tcx>, value: T) -> T
|
||||
#[instrument(skip(infcx, get_ctxt_fn), level = "debug")]
|
||||
pub(crate) fn renumber_regions<'tcx, T, F>(
|
||||
infcx: &BorrowckInferCtxt<'_, 'tcx>,
|
||||
value: T,
|
||||
get_ctxt_fn: F,
|
||||
) -> T
|
||||
where
|
||||
T: TypeFoldable<'tcx>,
|
||||
F: Fn() -> RegionCtxt,
|
||||
{
|
||||
infcx.tcx.fold_regions(value, |_region, _depth| {
|
||||
let origin = NllRegionVariableOrigin::Existential { from_forall: false };
|
||||
infcx.next_nll_region_var(origin)
|
||||
infcx.next_nll_region_var(origin, || get_ctxt_fn())
|
||||
})
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, Eq, PartialEq, Hash)]
|
||||
pub(crate) enum BoundRegionInfo {
|
||||
Name(Symbol),
|
||||
Span(Span),
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, Eq, PartialEq, Hash)]
|
||||
pub(crate) enum RegionCtxt {
|
||||
Location(Location),
|
||||
TyContext(TyContext),
|
||||
Free(Symbol),
|
||||
Bound(BoundRegionInfo),
|
||||
LateBound(BoundRegionInfo),
|
||||
Existential(Option<Symbol>),
|
||||
Placeholder(BoundRegionInfo),
|
||||
Unknown,
|
||||
}
|
||||
|
||||
impl RegionCtxt {
|
||||
/// Used to determine the representative of a component in the strongly connected
|
||||
/// constraint graph
|
||||
pub(crate) fn preference_value(self) -> usize {
|
||||
let _anon = Symbol::intern("anon");
|
||||
|
||||
match self {
|
||||
RegionCtxt::Unknown => 1,
|
||||
RegionCtxt::Existential(None) => 2,
|
||||
RegionCtxt::Existential(Some(_anon)) | RegionCtxt::Free(_anon) => 2,
|
||||
RegionCtxt::Location(_) => 3,
|
||||
RegionCtxt::TyContext(_) => 4,
|
||||
_ => 5,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
struct NllVisitor<'a, 'tcx> {
|
||||
infcx: &'a InferCtxt<'tcx>,
|
||||
infcx: &'a BorrowckInferCtxt<'a, 'tcx>,
|
||||
}
|
||||
|
||||
impl<'a, 'tcx> NllVisitor<'a, 'tcx> {
|
||||
fn renumber_regions<T>(&mut self, value: T) -> T
|
||||
fn renumber_regions<T, F>(&mut self, value: T, region_ctxt_fn: F) -> T
|
||||
where
|
||||
T: TypeFoldable<'tcx>,
|
||||
F: Fn() -> RegionCtxt,
|
||||
{
|
||||
renumber_regions(self.infcx, value)
|
||||
renumber_regions(self.infcx, value, region_ctxt_fn)
|
||||
}
|
||||
}
|
||||
|
||||
@ -60,14 +103,14 @@ impl<'a, 'tcx> MutVisitor<'tcx> for NllVisitor<'a, 'tcx> {
|
||||
|
||||
#[instrument(skip(self), level = "debug")]
|
||||
fn visit_ty(&mut self, ty: &mut Ty<'tcx>, ty_context: TyContext) {
|
||||
*ty = self.renumber_regions(*ty);
|
||||
*ty = self.renumber_regions(*ty, || RegionCtxt::TyContext(ty_context));
|
||||
|
||||
debug!(?ty);
|
||||
}
|
||||
|
||||
#[instrument(skip(self), level = "debug")]
|
||||
fn visit_substs(&mut self, substs: &mut SubstsRef<'tcx>, location: Location) {
|
||||
*substs = self.renumber_regions(*substs);
|
||||
*substs = self.renumber_regions(*substs, || RegionCtxt::Location(location));
|
||||
|
||||
debug!(?substs);
|
||||
}
|
||||
@ -75,7 +118,7 @@ impl<'a, 'tcx> MutVisitor<'tcx> for NllVisitor<'a, 'tcx> {
|
||||
#[instrument(skip(self), level = "debug")]
|
||||
fn visit_region(&mut self, region: &mut ty::Region<'tcx>, location: Location) {
|
||||
let old_region = *region;
|
||||
*region = self.renumber_regions(old_region);
|
||||
*region = self.renumber_regions(old_region, || RegionCtxt::Location(location));
|
||||
|
||||
debug!(?region);
|
||||
}
|
||||
@ -83,7 +126,7 @@ impl<'a, 'tcx> MutVisitor<'tcx> for NllVisitor<'a, 'tcx> {
|
||||
#[instrument(skip(self), level = "debug")]
|
||||
fn visit_constant(&mut self, constant: &mut Constant<'tcx>, _location: Location) {
|
||||
let literal = constant.literal;
|
||||
constant.literal = self.renumber_regions(literal);
|
||||
constant.literal = self.renumber_regions(literal, || RegionCtxt::Location(_location));
|
||||
debug!("constant: {:#?}", constant);
|
||||
}
|
||||
}
|
||||
|
@ -64,7 +64,7 @@ use crate::{
|
||||
region_infer::TypeTest,
|
||||
type_check::free_region_relations::{CreateResult, UniversalRegionRelations},
|
||||
universal_regions::{DefiningTy, UniversalRegions},
|
||||
Upvar,
|
||||
BorrowckInferCtxt, Upvar,
|
||||
};
|
||||
|
||||
macro_rules! span_mirbug {
|
||||
@ -123,7 +123,7 @@ mod relate_tys;
|
||||
/// - `move_data` -- move-data constructed when performing the maybe-init dataflow analysis
|
||||
/// - `elements` -- MIR region map
|
||||
pub(crate) fn type_check<'mir, 'tcx>(
|
||||
infcx: &InferCtxt<'tcx>,
|
||||
infcx: &BorrowckInferCtxt<'_, 'tcx>,
|
||||
param_env: ty::ParamEnv<'tcx>,
|
||||
body: &Body<'tcx>,
|
||||
promoted: &IndexVec<Promoted, Body<'tcx>>,
|
||||
@ -866,7 +866,7 @@ impl<'a, 'b, 'tcx> TypeVerifier<'a, 'b, 'tcx> {
|
||||
/// way, it accrues region constraints -- these can later be used by
|
||||
/// NLL region checking.
|
||||
struct TypeChecker<'a, 'tcx> {
|
||||
infcx: &'a InferCtxt<'tcx>,
|
||||
infcx: &'a BorrowckInferCtxt<'a, 'tcx>,
|
||||
param_env: ty::ParamEnv<'tcx>,
|
||||
last_span: Span,
|
||||
body: &'a Body<'tcx>,
|
||||
@ -1019,7 +1019,7 @@ impl Locations {
|
||||
|
||||
impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
|
||||
fn new(
|
||||
infcx: &'a InferCtxt<'tcx>,
|
||||
infcx: &'a BorrowckInferCtxt<'a, 'tcx>,
|
||||
body: &'a Body<'tcx>,
|
||||
param_env: ty::ParamEnv<'tcx>,
|
||||
region_bound_pairs: &'a RegionBoundPairs<'tcx>,
|
||||
@ -1356,11 +1356,34 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
|
||||
}
|
||||
};
|
||||
let (sig, map) = tcx.replace_late_bound_regions(sig, |br| {
|
||||
self.infcx.next_region_var(LateBoundRegion(
|
||||
term.source_info.span,
|
||||
br.kind,
|
||||
LateBoundRegionConversionTime::FnCall,
|
||||
))
|
||||
use crate::renumber::{BoundRegionInfo, RegionCtxt};
|
||||
use rustc_span::Symbol;
|
||||
|
||||
let region_ctxt_fn = || {
|
||||
let reg_info = match br.kind {
|
||||
ty::BoundRegionKind::BrAnon(_, Some(span)) => {
|
||||
BoundRegionInfo::Span(span)
|
||||
}
|
||||
ty::BoundRegionKind::BrAnon(..) => {
|
||||
BoundRegionInfo::Name(Symbol::intern("anon"))
|
||||
}
|
||||
ty::BoundRegionKind::BrNamed(_, name) => BoundRegionInfo::Name(name),
|
||||
ty::BoundRegionKind::BrEnv => {
|
||||
BoundRegionInfo::Name(Symbol::intern("env"))
|
||||
}
|
||||
};
|
||||
|
||||
RegionCtxt::LateBound(reg_info)
|
||||
};
|
||||
|
||||
self.infcx.next_region_var(
|
||||
LateBoundRegion(
|
||||
term.source_info.span,
|
||||
br.kind,
|
||||
LateBoundRegionConversionTime::FnCall,
|
||||
),
|
||||
region_ctxt_fn,
|
||||
)
|
||||
});
|
||||
debug!(?sig);
|
||||
// IMPORTANT: We have to prove well formed for the function signature before
|
||||
|
@ -4,11 +4,12 @@ use rustc_infer::traits::PredicateObligations;
|
||||
use rustc_middle::mir::ConstraintCategory;
|
||||
use rustc_middle::ty::relate::TypeRelation;
|
||||
use rustc_middle::ty::{self, Ty};
|
||||
use rustc_span::Span;
|
||||
use rustc_span::{Span, Symbol};
|
||||
use rustc_trait_selection::traits::query::Fallible;
|
||||
|
||||
use crate::constraints::OutlivesConstraint;
|
||||
use crate::diagnostics::UniverseInfo;
|
||||
use crate::renumber::{BoundRegionInfo, RegionCtxt};
|
||||
use crate::type_check::{InstantiateOpaqueType, Locations, TypeChecker};
|
||||
|
||||
impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
|
||||
@ -100,23 +101,65 @@ impl<'tcx> TypeRelatingDelegate<'tcx> for NllTypeRelatingDelegate<'_, '_, 'tcx>
|
||||
universe
|
||||
}
|
||||
|
||||
fn next_existential_region_var(&mut self, from_forall: bool) -> ty::Region<'tcx> {
|
||||
#[instrument(skip(self), level = "debug")]
|
||||
fn next_existential_region_var(
|
||||
&mut self,
|
||||
from_forall: bool,
|
||||
_name: Option<Symbol>,
|
||||
) -> ty::Region<'tcx> {
|
||||
let origin = NllRegionVariableOrigin::Existential { from_forall };
|
||||
self.type_checker.infcx.next_nll_region_var(origin)
|
||||
|
||||
let reg_var =
|
||||
self.type_checker.infcx.next_nll_region_var(origin, || RegionCtxt::Existential(_name));
|
||||
|
||||
reg_var
|
||||
}
|
||||
|
||||
#[instrument(skip(self), level = "debug")]
|
||||
fn next_placeholder_region(&mut self, placeholder: ty::PlaceholderRegion) -> ty::Region<'tcx> {
|
||||
self.type_checker
|
||||
let reg = self
|
||||
.type_checker
|
||||
.borrowck_context
|
||||
.constraints
|
||||
.placeholder_region(self.type_checker.infcx, placeholder)
|
||||
.placeholder_region(self.type_checker.infcx, placeholder);
|
||||
|
||||
let reg_info = match placeholder.name {
|
||||
ty::BoundRegionKind::BrAnon(_, Some(span)) => BoundRegionInfo::Span(span),
|
||||
ty::BoundRegionKind::BrAnon(..) => BoundRegionInfo::Name(Symbol::intern("anon")),
|
||||
ty::BoundRegionKind::BrNamed(_, name) => BoundRegionInfo::Name(name),
|
||||
ty::BoundRegionKind::BrEnv => BoundRegionInfo::Name(Symbol::intern("env")),
|
||||
};
|
||||
|
||||
let reg_var =
|
||||
reg.as_var().unwrap_or_else(|| bug!("expected region {:?} to be of kind ReVar", reg));
|
||||
let mut var_to_origin = self.type_checker.infcx.reg_var_to_origin.borrow_mut();
|
||||
let prev = var_to_origin.insert(reg_var, RegionCtxt::Placeholder(reg_info));
|
||||
assert!(matches!(prev, None));
|
||||
|
||||
reg
|
||||
}
|
||||
|
||||
#[instrument(skip(self), level = "debug")]
|
||||
fn generalize_existential(&mut self, universe: ty::UniverseIndex) -> ty::Region<'tcx> {
|
||||
self.type_checker.infcx.next_nll_region_var_in_universe(
|
||||
let reg = self.type_checker.infcx.next_nll_region_var_in_universe(
|
||||
NllRegionVariableOrigin::Existential { from_forall: false },
|
||||
universe,
|
||||
)
|
||||
);
|
||||
|
||||
let reg_var =
|
||||
reg.as_var().unwrap_or_else(|| bug!("expected region {:?} to be of kind ReVar", reg));
|
||||
|
||||
if cfg!(debug_assertions) {
|
||||
let mut var_to_origin = self.type_checker.infcx.reg_var_to_origin.borrow_mut();
|
||||
let prev = var_to_origin.insert(reg_var, RegionCtxt::Existential(None));
|
||||
|
||||
// It only makes sense to track region vars in non-canonicalization contexts. If this
|
||||
// ever changes we either want to get rid of `BorrowckInferContext::reg_var_to_origin`
|
||||
// or modify how we track nll region vars for that map.
|
||||
assert!(matches!(prev, None));
|
||||
}
|
||||
|
||||
reg
|
||||
}
|
||||
|
||||
fn push_outlives(
|
||||
|
@ -20,15 +20,18 @@ use rustc_hir::def_id::{DefId, LocalDefId};
|
||||
use rustc_hir::lang_items::LangItem;
|
||||
use rustc_hir::{BodyOwnerKind, HirId};
|
||||
use rustc_index::vec::{Idx, IndexVec};
|
||||
use rustc_infer::infer::{InferCtxt, NllRegionVariableOrigin};
|
||||
use rustc_infer::infer::NllRegionVariableOrigin;
|
||||
use rustc_middle::ty::fold::TypeFoldable;
|
||||
use rustc_middle::ty::{
|
||||
self, DefIdTree, InlineConstSubsts, InlineConstSubstsParts, RegionVid, Ty, TyCtxt,
|
||||
};
|
||||
use rustc_middle::ty::{InternalSubsts, SubstsRef};
|
||||
use rustc_span::Symbol;
|
||||
use std::iter;
|
||||
|
||||
use crate::nll::ToRegionVid;
|
||||
use crate::renumber::{BoundRegionInfo, RegionCtxt};
|
||||
use crate::BorrowckInferCtxt;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct UniversalRegions<'tcx> {
|
||||
@ -224,7 +227,7 @@ impl<'tcx> UniversalRegions<'tcx> {
|
||||
/// signature. This will also compute the relationships that are
|
||||
/// known between those regions.
|
||||
pub fn new(
|
||||
infcx: &InferCtxt<'tcx>,
|
||||
infcx: &BorrowckInferCtxt<'_, 'tcx>,
|
||||
mir_def: ty::WithOptConstParam<LocalDefId>,
|
||||
param_env: ty::ParamEnv<'tcx>,
|
||||
) -> Self {
|
||||
@ -385,7 +388,7 @@ impl<'tcx> UniversalRegions<'tcx> {
|
||||
}
|
||||
|
||||
struct UniversalRegionsBuilder<'cx, 'tcx> {
|
||||
infcx: &'cx InferCtxt<'tcx>,
|
||||
infcx: &'cx BorrowckInferCtxt<'cx, 'tcx>,
|
||||
mir_def: ty::WithOptConstParam<LocalDefId>,
|
||||
mir_hir_id: HirId,
|
||||
param_env: ty::ParamEnv<'tcx>,
|
||||
@ -403,7 +406,10 @@ impl<'cx, 'tcx> UniversalRegionsBuilder<'cx, 'tcx> {
|
||||
assert_eq!(FIRST_GLOBAL_INDEX, self.infcx.num_region_vars());
|
||||
|
||||
// Create the "global" region that is always free in all contexts: 'static.
|
||||
let fr_static = self.infcx.next_nll_region_var(FR).to_region_vid();
|
||||
let fr_static = self
|
||||
.infcx
|
||||
.next_nll_region_var(FR, || RegionCtxt::Free(Symbol::intern("static")))
|
||||
.to_region_vid();
|
||||
|
||||
// We've now added all the global regions. The next ones we
|
||||
// add will be external.
|
||||
@ -435,7 +441,17 @@ impl<'cx, 'tcx> UniversalRegionsBuilder<'cx, 'tcx> {
|
||||
|r| {
|
||||
debug!(?r);
|
||||
if !indices.indices.contains_key(&r) {
|
||||
let region_vid = self.infcx.next_nll_region_var(FR);
|
||||
let region_vid = {
|
||||
let name = match r.get_name() {
|
||||
Some(name) => name,
|
||||
_ => Symbol::intern("anon"),
|
||||
};
|
||||
|
||||
self.infcx.next_nll_region_var(FR, || {
|
||||
RegionCtxt::LateBound(BoundRegionInfo::Name(name))
|
||||
})
|
||||
};
|
||||
|
||||
debug!(?region_vid);
|
||||
indices.insert_late_bound_region(r, region_vid.to_region_vid());
|
||||
}
|
||||
@ -463,7 +479,17 @@ impl<'cx, 'tcx> UniversalRegionsBuilder<'cx, 'tcx> {
|
||||
for_each_late_bound_region_in_item(self.infcx.tcx, self.mir_def.did, |r| {
|
||||
debug!(?r);
|
||||
if !indices.indices.contains_key(&r) {
|
||||
let region_vid = self.infcx.next_nll_region_var(FR);
|
||||
let region_vid = {
|
||||
let name = match r.get_name() {
|
||||
Some(name) => name,
|
||||
_ => Symbol::intern("anon"),
|
||||
};
|
||||
|
||||
self.infcx.next_nll_region_var(FR, || {
|
||||
RegionCtxt::LateBound(BoundRegionInfo::Name(name))
|
||||
})
|
||||
};
|
||||
|
||||
debug!(?region_vid);
|
||||
indices.insert_late_bound_region(r, region_vid.to_region_vid());
|
||||
}
|
||||
@ -480,8 +506,13 @@ impl<'cx, 'tcx> UniversalRegionsBuilder<'cx, 'tcx> {
|
||||
LangItem::VaList,
|
||||
Some(self.infcx.tcx.def_span(self.mir_def.did)),
|
||||
);
|
||||
let region =
|
||||
self.infcx.tcx.mk_re_var(self.infcx.next_nll_region_var(FR).to_region_vid());
|
||||
|
||||
let reg_vid = self
|
||||
.infcx
|
||||
.next_nll_region_var(FR, || RegionCtxt::Free(Symbol::intern("c-variadic")))
|
||||
.to_region_vid();
|
||||
|
||||
let region = self.infcx.tcx.mk_re_var(reg_vid);
|
||||
let va_list_ty =
|
||||
self.infcx.tcx.type_of(va_list_did).subst(self.infcx.tcx, &[region.into()]);
|
||||
|
||||
@ -491,7 +522,11 @@ impl<'cx, 'tcx> UniversalRegionsBuilder<'cx, 'tcx> {
|
||||
}
|
||||
}
|
||||
|
||||
let fr_fn_body = self.infcx.next_nll_region_var(FR).to_region_vid();
|
||||
let fr_fn_body = self
|
||||
.infcx
|
||||
.next_nll_region_var(FR, || RegionCtxt::Free(Symbol::intern("fn_body")))
|
||||
.to_region_vid();
|
||||
|
||||
let num_universals = self.infcx.num_region_vars();
|
||||
|
||||
debug!("build: global regions = {}..{}", FIRST_GLOBAL_INDEX, first_extern_index);
|
||||
@ -718,7 +753,8 @@ trait InferCtxtExt<'tcx> {
|
||||
);
|
||||
}
|
||||
|
||||
impl<'tcx> InferCtxtExt<'tcx> for InferCtxt<'tcx> {
|
||||
impl<'cx, 'tcx> InferCtxtExt<'tcx> for BorrowckInferCtxt<'cx, 'tcx> {
|
||||
#[instrument(skip(self), level = "debug")]
|
||||
fn replace_free_regions_with_nll_infer_vars<T>(
|
||||
&self,
|
||||
origin: NllRegionVariableOrigin,
|
||||
@ -727,7 +763,17 @@ impl<'tcx> InferCtxtExt<'tcx> for InferCtxt<'tcx> {
|
||||
where
|
||||
T: TypeFoldable<'tcx>,
|
||||
{
|
||||
self.tcx.fold_regions(value, |_region, _depth| self.next_nll_region_var(origin))
|
||||
self.infcx.tcx.fold_regions(value, |region, _depth| {
|
||||
let name = match region.get_name() {
|
||||
Some(name) => name,
|
||||
_ => Symbol::intern("anon"),
|
||||
};
|
||||
debug!(?region, ?name);
|
||||
|
||||
let reg_var = self.next_nll_region_var(origin, || RegionCtxt::Free(name));
|
||||
|
||||
reg_var
|
||||
})
|
||||
}
|
||||
|
||||
#[instrument(level = "debug", skip(self, indices))]
|
||||
@ -744,7 +790,15 @@ impl<'tcx> InferCtxtExt<'tcx> for InferCtxt<'tcx> {
|
||||
let (value, _map) = self.tcx.replace_late_bound_regions(value, |br| {
|
||||
debug!(?br);
|
||||
let liberated_region = self.tcx.mk_re_free(all_outlive_scope.to_def_id(), br.kind);
|
||||
let region_vid = self.next_nll_region_var(origin);
|
||||
let region_vid = {
|
||||
let name = match br.kind.get_name() {
|
||||
Some(name) => name,
|
||||
_ => Symbol::intern("anon"),
|
||||
};
|
||||
|
||||
self.next_nll_region_var(origin, || RegionCtxt::Bound(BoundRegionInfo::Name(name)))
|
||||
};
|
||||
|
||||
indices.insert_late_bound_region(liberated_region, region_vid.to_region_vid());
|
||||
debug!(?liberated_region, ?region_vid);
|
||||
region_vid
|
||||
@ -770,7 +824,17 @@ impl<'tcx> InferCtxtExt<'tcx> for InferCtxt<'tcx> {
|
||||
for_each_late_bound_region_in_recursive_scope(self.tcx, mir_def_id, |r| {
|
||||
debug!(?r);
|
||||
if !indices.indices.contains_key(&r) {
|
||||
let region_vid = self.next_nll_region_var(FR);
|
||||
let region_vid = {
|
||||
let name = match r.get_name() {
|
||||
Some(name) => name,
|
||||
_ => Symbol::intern("anon"),
|
||||
};
|
||||
|
||||
self.next_nll_region_var(FR, || {
|
||||
RegionCtxt::LateBound(BoundRegionInfo::Name(name))
|
||||
})
|
||||
};
|
||||
|
||||
debug!(?region_vid);
|
||||
indices.insert_late_bound_region(r, region_vid.to_region_vid());
|
||||
}
|
||||
@ -786,8 +850,17 @@ impl<'tcx> InferCtxtExt<'tcx> for InferCtxt<'tcx> {
|
||||
for_each_late_bound_region_in_item(self.tcx, mir_def_id, |r| {
|
||||
debug!(?r);
|
||||
if !indices.indices.contains_key(&r) {
|
||||
let region_vid = self.next_nll_region_var(FR);
|
||||
debug!(?region_vid);
|
||||
let region_vid = {
|
||||
let name = match r.get_name() {
|
||||
Some(name) => name,
|
||||
_ => Symbol::intern("anon"),
|
||||
};
|
||||
|
||||
self.next_nll_region_var(FR, || {
|
||||
RegionCtxt::LateBound(BoundRegionInfo::Name(name))
|
||||
})
|
||||
};
|
||||
|
||||
indices.insert_late_bound_region(r, region_vid.to_region_vid());
|
||||
}
|
||||
});
|
||||
|
@ -27,7 +27,7 @@ pub struct Sccs<N: Idx, S: Idx> {
|
||||
scc_data: SccData<S>,
|
||||
}
|
||||
|
||||
struct SccData<S: Idx> {
|
||||
pub struct SccData<S: Idx> {
|
||||
/// For each SCC, the range of `all_successors` where its
|
||||
/// successors can be found.
|
||||
ranges: IndexVec<S, Range<usize>>,
|
||||
@ -43,6 +43,14 @@ impl<N: Idx, S: Idx + Ord> Sccs<N, S> {
|
||||
SccsConstruction::construct(graph)
|
||||
}
|
||||
|
||||
pub fn scc_indices(&self) -> &IndexVec<N, S> {
|
||||
&self.scc_indices
|
||||
}
|
||||
|
||||
pub fn scc_data(&self) -> &SccData<S> {
|
||||
&self.scc_data
|
||||
}
|
||||
|
||||
/// Returns the number of SCCs in the graph.
|
||||
pub fn num_sccs(&self) -> usize {
|
||||
self.scc_data.len()
|
||||
@ -115,6 +123,14 @@ impl<S: Idx> SccData<S> {
|
||||
self.ranges.len()
|
||||
}
|
||||
|
||||
pub fn ranges(&self) -> &IndexVec<S, Range<usize>> {
|
||||
&self.ranges
|
||||
}
|
||||
|
||||
pub fn all_successors(&self) -> &Vec<S> {
|
||||
&self.all_successors
|
||||
}
|
||||
|
||||
/// Returns the successors of the given SCC.
|
||||
fn successors(&self, scc: S) -> &[S] {
|
||||
// Annoyingly, `range` does not implement `Copy`, so we have
|
||||
|
@ -124,3 +124,6 @@ hir_analysis_linkage_type =
|
||||
hir_analysis_auto_deref_reached_recursion_limit = reached the recursion limit while auto-dereferencing `{$ty}`
|
||||
.label = deref recursion limit reached
|
||||
.help = consider increasing the recursion limit by adding a `#![recursion_limit = "{$suggested_limit}"]` attribute to your crate (`{$crate_name}`)
|
||||
|
||||
hir_analysis_track_caller_on_main = `main` function is not allowed to be `#[track_caller]`
|
||||
.label = `main` function is not allowed to be `#[track_caller]`
|
||||
|
@ -312,3 +312,12 @@ pub struct AutoDerefReachedRecursionLimit<'a> {
|
||||
pub suggested_limit: rustc_session::Limit,
|
||||
pub crate_name: Symbol,
|
||||
}
|
||||
|
||||
#[derive(Diagnostic)]
|
||||
#[diag(hir_analysis_track_caller_on_main)]
|
||||
pub(crate) struct TrackCallerOnMain {
|
||||
#[primary_span]
|
||||
pub span: Span,
|
||||
#[label]
|
||||
pub annotated: Span,
|
||||
}
|
||||
|
@ -297,10 +297,7 @@ fn check_main_fn_ty(tcx: TyCtxt<'_>, main_def_id: DefId) {
|
||||
}
|
||||
|
||||
for attr in tcx.get_attrs(main_def_id, sym::track_caller) {
|
||||
tcx.sess
|
||||
.struct_span_err(attr.span, "`main` function is not allowed to be `#[track_caller]`")
|
||||
.span_label(main_span, "`main` function is not allowed to be `#[track_caller]`")
|
||||
.emit();
|
||||
tcx.sess.emit_err(errors::TrackCallerOnMain { span: attr.span, annotated: main_span });
|
||||
error = true;
|
||||
}
|
||||
|
||||
|
@ -27,7 +27,7 @@ use rustc_middle::ty::fold::TypeFoldable;
|
||||
use rustc_middle::ty::relate::TypeRelation;
|
||||
use rustc_middle::ty::subst::{GenericArg, GenericArgKind};
|
||||
use rustc_middle::ty::{self, BoundVar, ToPredicate, Ty, TyCtxt};
|
||||
use rustc_span::Span;
|
||||
use rustc_span::{Span, Symbol};
|
||||
use std::fmt::Debug;
|
||||
use std::iter;
|
||||
|
||||
@ -683,7 +683,11 @@ impl<'tcx> TypeRelatingDelegate<'tcx> for QueryTypeRelatingDelegate<'_, 'tcx> {
|
||||
self.infcx.create_next_universe()
|
||||
}
|
||||
|
||||
fn next_existential_region_var(&mut self, from_forall: bool) -> ty::Region<'tcx> {
|
||||
fn next_existential_region_var(
|
||||
&mut self,
|
||||
from_forall: bool,
|
||||
_name: Option<Symbol>,
|
||||
) -> ty::Region<'tcx> {
|
||||
let origin = NllRegionVariableOrigin::Existential { from_forall };
|
||||
self.infcx.next_nll_region_var(origin)
|
||||
}
|
||||
|
@ -1111,11 +1111,13 @@ impl<'tcx> InferCtxt<'tcx> {
|
||||
}
|
||||
|
||||
/// Just a convenient wrapper of `next_region_var` for using during NLL.
|
||||
#[instrument(skip(self), level = "debug")]
|
||||
pub fn next_nll_region_var(&self, origin: NllRegionVariableOrigin) -> ty::Region<'tcx> {
|
||||
self.next_region_var(RegionVariableOrigin::Nll(origin))
|
||||
}
|
||||
|
||||
/// Just a convenient wrapper of `next_region_var` for using during NLL.
|
||||
#[instrument(skip(self), level = "debug")]
|
||||
pub fn next_nll_region_var_in_universe(
|
||||
&self,
|
||||
origin: NllRegionVariableOrigin,
|
||||
|
@ -31,7 +31,7 @@ use rustc_middle::ty::error::TypeError;
|
||||
use rustc_middle::ty::relate::{self, Relate, RelateResult, TypeRelation};
|
||||
use rustc_middle::ty::visit::{ir::TypeVisitor, TypeSuperVisitable, TypeVisitable};
|
||||
use rustc_middle::ty::{self, InferConst, Ty, TyCtxt};
|
||||
use rustc_span::Span;
|
||||
use rustc_span::{Span, Symbol};
|
||||
use std::fmt::Debug;
|
||||
use std::ops::ControlFlow;
|
||||
|
||||
@ -100,7 +100,11 @@ pub trait TypeRelatingDelegate<'tcx> {
|
||||
/// we will invoke this method to instantiate `'a` with an
|
||||
/// inference variable (though `'b` would be instantiated first,
|
||||
/// as a placeholder).
|
||||
fn next_existential_region_var(&mut self, was_placeholder: bool) -> ty::Region<'tcx>;
|
||||
fn next_existential_region_var(
|
||||
&mut self,
|
||||
was_placeholder: bool,
|
||||
name: Option<Symbol>,
|
||||
) -> ty::Region<'tcx>;
|
||||
|
||||
/// Creates a new region variable representing a
|
||||
/// higher-ranked region that is instantiated universally.
|
||||
@ -188,7 +192,7 @@ where
|
||||
let placeholder = ty::PlaceholderRegion { universe, name: br.kind };
|
||||
delegate.next_placeholder_region(placeholder)
|
||||
} else {
|
||||
delegate.next_existential_region_var(true)
|
||||
delegate.next_existential_region_var(true, br.kind.get_name())
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -186,7 +186,8 @@ impl<'tcx> TypeRelation<'tcx> for Match<'tcx> {
|
||||
|
||||
#[instrument(skip(self), level = "debug")]
|
||||
fn tys(&mut self, pattern: Ty<'tcx>, value: Ty<'tcx>) -> RelateResult<'tcx, Ty<'tcx>> {
|
||||
if let ty::Error(_) = pattern.kind() {
|
||||
// FIXME(non_lifetime_binders): What to do here?
|
||||
if matches!(pattern.kind(), ty::Error(_) | ty::Bound(..)) {
|
||||
// Unlike normal `TypeRelation` rules, `ty::Error` does not equal any type.
|
||||
self.no_match()
|
||||
} else if pattern == value {
|
||||
|
@ -1214,7 +1214,7 @@ impl<'tcx> MirVisitable<'tcx> for Option<Terminator<'tcx>> {
|
||||
|
||||
/// Extra information passed to `visit_ty` and friends to give context
|
||||
/// about where the type etc appears.
|
||||
#[derive(Debug)]
|
||||
#[derive(Copy, Clone, Debug, Hash, Eq, PartialEq)]
|
||||
pub enum TyContext {
|
||||
LocalDecl {
|
||||
/// The index of the local variable we are visiting.
|
||||
|
@ -1751,6 +1751,13 @@ impl<'tcx> Region<'tcx> {
|
||||
pub fn is_var(self) -> bool {
|
||||
matches!(self.kind(), ty::ReVar(_))
|
||||
}
|
||||
|
||||
pub fn as_var(self) -> Option<RegionVid> {
|
||||
match self.kind() {
|
||||
ty::ReVar(vid) => Some(vid),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Type utilities
|
||||
|
@ -13,11 +13,7 @@ use rustc_index::vec::IndexVec;
|
||||
use rustc_middle::mir::visit::{
|
||||
MutVisitor, MutatingUseContext, NonMutatingUseContext, PlaceContext, Visitor,
|
||||
};
|
||||
use rustc_middle::mir::{
|
||||
BasicBlock, BinOp, Body, Constant, ConstantKind, Local, LocalDecl, LocalKind, Location,
|
||||
Operand, Place, Rvalue, SourceInfo, Statement, StatementKind, Terminator, TerminatorKind,
|
||||
RETURN_PLACE,
|
||||
};
|
||||
use rustc_middle::mir::*;
|
||||
use rustc_middle::ty::layout::{LayoutError, LayoutOf, LayoutOfHelpers, TyAndLayout};
|
||||
use rustc_middle::ty::InternalSubsts;
|
||||
use rustc_middle::ty::{self, ConstKind, Instance, ParamEnv, Ty, TyCtxt, TypeVisitable};
|
||||
@ -456,27 +452,6 @@ impl<'mir, 'tcx> ConstPropagator<'mir, 'tcx> {
|
||||
};
|
||||
}
|
||||
|
||||
fn use_ecx<F, T>(&mut self, f: F) -> Option<T>
|
||||
where
|
||||
F: FnOnce(&mut Self) -> InterpResult<'tcx, T>,
|
||||
{
|
||||
match f(self) {
|
||||
Ok(val) => Some(val),
|
||||
Err(error) => {
|
||||
trace!("InterpCx operation failed: {:?}", error);
|
||||
// Some errors shouldn't come up because creating them causes
|
||||
// an allocation, which we should avoid. When that happens,
|
||||
// dedicated error variants should be introduced instead.
|
||||
assert!(
|
||||
!error.kind().formatted_string(),
|
||||
"const-prop encountered formatting error: {}",
|
||||
error
|
||||
);
|
||||
None
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Returns the value, if any, of evaluating `c`.
|
||||
fn eval_constant(&mut self, c: &Constant<'tcx>) -> Option<OpTy<'tcx>> {
|
||||
// FIXME we need to revisit this for #67176
|
||||
@ -491,7 +466,7 @@ impl<'mir, 'tcx> ConstPropagator<'mir, 'tcx> {
|
||||
/// Returns the value, if any, of evaluating `place`.
|
||||
fn eval_place(&mut self, place: Place<'tcx>) -> Option<OpTy<'tcx>> {
|
||||
trace!("eval_place(place={:?})", place);
|
||||
self.use_ecx(|this| this.ecx.eval_place_to_op(place, None))
|
||||
self.ecx.eval_place_to_op(place, None).ok()
|
||||
}
|
||||
|
||||
/// Returns the value, if any, of evaluating `op`. Calls upon `eval_constant`
|
||||
@ -595,35 +570,37 @@ impl<'mir, 'tcx> ConstPropagator<'mir, 'tcx> {
|
||||
rvalue: &Rvalue<'tcx>,
|
||||
place: Place<'tcx>,
|
||||
) -> Option<()> {
|
||||
self.use_ecx(|this| match rvalue {
|
||||
match rvalue {
|
||||
Rvalue::BinaryOp(op, box (left, right))
|
||||
| Rvalue::CheckedBinaryOp(op, box (left, right)) => {
|
||||
let l = this.ecx.eval_operand(left, None).and_then(|x| this.ecx.read_immediate(&x));
|
||||
let l = self.ecx.eval_operand(left, None).and_then(|x| self.ecx.read_immediate(&x));
|
||||
let r =
|
||||
this.ecx.eval_operand(right, None).and_then(|x| this.ecx.read_immediate(&x));
|
||||
self.ecx.eval_operand(right, None).and_then(|x| self.ecx.read_immediate(&x));
|
||||
|
||||
let const_arg = match (l, r) {
|
||||
(Ok(x), Err(_)) | (Err(_), Ok(x)) => x, // exactly one side is known
|
||||
(Err(e), Err(_)) => return Err(e), // neither side is known
|
||||
(Ok(_), Ok(_)) => return this.ecx.eval_rvalue_into_place(rvalue, place), // both sides are known
|
||||
(Err(_), Err(_)) => return None, // neither side is known
|
||||
(Ok(_), Ok(_)) => return self.ecx.eval_rvalue_into_place(rvalue, place).ok(), // both sides are known
|
||||
};
|
||||
|
||||
if !matches!(const_arg.layout.abi, abi::Abi::Scalar(..)) {
|
||||
// We cannot handle Scalar Pair stuff.
|
||||
// No point in calling `eval_rvalue_into_place`, since only one side is known
|
||||
throw_machine_stop_str!("cannot optimize this")
|
||||
return None;
|
||||
}
|
||||
|
||||
let arg_value = const_arg.to_scalar().to_bits(const_arg.layout.size)?;
|
||||
let dest = this.ecx.eval_place(place)?;
|
||||
let arg_value = const_arg.to_scalar().to_bits(const_arg.layout.size).ok()?;
|
||||
let dest = self.ecx.eval_place(place).ok()?;
|
||||
|
||||
match op {
|
||||
BinOp::BitAnd if arg_value == 0 => this.ecx.write_immediate(*const_arg, &dest),
|
||||
BinOp::BitAnd if arg_value == 0 => {
|
||||
self.ecx.write_immediate(*const_arg, &dest).ok()
|
||||
}
|
||||
BinOp::BitOr
|
||||
if arg_value == const_arg.layout.size.truncate(u128::MAX)
|
||||
|| (const_arg.layout.ty.is_bool() && arg_value == 1) =>
|
||||
{
|
||||
this.ecx.write_immediate(*const_arg, &dest)
|
||||
self.ecx.write_immediate(*const_arg, &dest).ok()
|
||||
}
|
||||
BinOp::Mul if const_arg.layout.ty.is_integral() && arg_value == 0 => {
|
||||
if let Rvalue::CheckedBinaryOp(_, _) = rvalue {
|
||||
@ -631,16 +608,16 @@ impl<'mir, 'tcx> ConstPropagator<'mir, 'tcx> {
|
||||
const_arg.to_scalar(),
|
||||
Scalar::from_bool(false),
|
||||
);
|
||||
this.ecx.write_immediate(val, &dest)
|
||||
self.ecx.write_immediate(val, &dest).ok()
|
||||
} else {
|
||||
this.ecx.write_immediate(*const_arg, &dest)
|
||||
self.ecx.write_immediate(*const_arg, &dest).ok()
|
||||
}
|
||||
}
|
||||
_ => throw_machine_stop_str!("cannot optimize this"),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
_ => this.ecx.eval_rvalue_into_place(rvalue, place),
|
||||
})
|
||||
_ => self.ecx.eval_rvalue_into_place(rvalue, place).ok(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Creates a new `Operand::Constant` from a `Scalar` value
|
||||
@ -682,7 +659,7 @@ impl<'mir, 'tcx> ConstPropagator<'mir, 'tcx> {
|
||||
}
|
||||
|
||||
// FIXME> figure out what to do when read_immediate_raw fails
|
||||
let imm = self.use_ecx(|this| this.ecx.read_immediate_raw(value));
|
||||
let imm = self.ecx.read_immediate_raw(value).ok();
|
||||
|
||||
if let Some(Right(imm)) = imm {
|
||||
match *imm {
|
||||
@ -702,25 +679,23 @@ impl<'mir, 'tcx> ConstPropagator<'mir, 'tcx> {
|
||||
if let ty::Tuple(types) = ty.kind() {
|
||||
// Only do it if tuple is also a pair with two scalars
|
||||
if let [ty1, ty2] = types[..] {
|
||||
let alloc = self.use_ecx(|this| {
|
||||
let ty_is_scalar = |ty| {
|
||||
this.ecx.layout_of(ty).ok().map(|layout| layout.abi.is_scalar())
|
||||
== Some(true)
|
||||
};
|
||||
if ty_is_scalar(ty1) && ty_is_scalar(ty2) {
|
||||
let alloc = this
|
||||
.ecx
|
||||
.intern_with_temp_alloc(value.layout, |ecx, dest| {
|
||||
ecx.write_immediate(*imm, dest)
|
||||
})
|
||||
.unwrap();
|
||||
Ok(Some(alloc))
|
||||
} else {
|
||||
Ok(None)
|
||||
}
|
||||
});
|
||||
let ty_is_scalar = |ty| {
|
||||
self.ecx.layout_of(ty).ok().map(|layout| layout.abi.is_scalar())
|
||||
== Some(true)
|
||||
};
|
||||
let alloc = if ty_is_scalar(ty1) && ty_is_scalar(ty2) {
|
||||
let alloc = self
|
||||
.ecx
|
||||
.intern_with_temp_alloc(value.layout, |ecx, dest| {
|
||||
ecx.write_immediate(*imm, dest)
|
||||
})
|
||||
.unwrap();
|
||||
Some(alloc)
|
||||
} else {
|
||||
None
|
||||
};
|
||||
|
||||
if let Some(Some(alloc)) = alloc {
|
||||
if let Some(alloc) = alloc {
|
||||
// Assign entire constant in a single statement.
|
||||
// We can't use aggregates, as we run after the aggregate-lowering `MirPhase`.
|
||||
let const_val = ConstValue::ByRef { alloc, offset: Size::ZERO };
|
||||
@ -921,84 +896,80 @@ impl<'tcx> MutVisitor<'tcx> for ConstPropagator<'_, 'tcx> {
|
||||
trace!("visit_statement: {:?}", statement);
|
||||
let source_info = statement.source_info;
|
||||
self.source_info = Some(source_info);
|
||||
if let StatementKind::Assign(box (place, ref mut rval)) = statement.kind {
|
||||
let can_const_prop = self.ecx.machine.can_const_prop[place.local];
|
||||
if let Some(()) = self.const_prop(rval, place) {
|
||||
// This will return None if the above `const_prop` invocation only "wrote" a
|
||||
// type whose creation requires no write. E.g. a generator whose initial state
|
||||
// consists solely of uninitialized memory (so it doesn't capture any locals).
|
||||
if let Some(ref value) = self.get_const(place) && self.should_const_prop(value) {
|
||||
trace!("replacing {:?} with {:?}", rval, value);
|
||||
self.replace_with_const(rval, value, source_info);
|
||||
if can_const_prop == ConstPropMode::FullConstProp
|
||||
|| can_const_prop == ConstPropMode::OnlyInsideOwnBlock
|
||||
{
|
||||
trace!("propagated into {:?}", place);
|
||||
}
|
||||
}
|
||||
match can_const_prop {
|
||||
ConstPropMode::OnlyInsideOwnBlock => {
|
||||
trace!(
|
||||
"found local restricted to its block. \
|
||||
Will remove it from const-prop after block is finished. Local: {:?}",
|
||||
place.local
|
||||
);
|
||||
}
|
||||
ConstPropMode::OnlyPropagateInto | ConstPropMode::NoPropagation => {
|
||||
trace!("can't propagate into {:?}", place);
|
||||
if place.local != RETURN_PLACE {
|
||||
Self::remove_const(&mut self.ecx, place.local);
|
||||
match statement.kind {
|
||||
StatementKind::Assign(box (place, ref mut rval)) => {
|
||||
let can_const_prop = self.ecx.machine.can_const_prop[place.local];
|
||||
if let Some(()) = self.const_prop(rval, place) {
|
||||
// This will return None if the above `const_prop` invocation only "wrote" a
|
||||
// type whose creation requires no write. E.g. a generator whose initial state
|
||||
// consists solely of uninitialized memory (so it doesn't capture any locals).
|
||||
if let Some(ref value) = self.get_const(place) && self.should_const_prop(value) {
|
||||
trace!("replacing {:?} with {:?}", rval, value);
|
||||
self.replace_with_const(rval, value, source_info);
|
||||
if can_const_prop == ConstPropMode::FullConstProp
|
||||
|| can_const_prop == ConstPropMode::OnlyInsideOwnBlock
|
||||
{
|
||||
trace!("propagated into {:?}", place);
|
||||
}
|
||||
}
|
||||
ConstPropMode::FullConstProp => {}
|
||||
}
|
||||
} else {
|
||||
// Const prop failed, so erase the destination, ensuring that whatever happens
|
||||
// from here on, does not know about the previous value.
|
||||
// This is important in case we have
|
||||
// ```rust
|
||||
// let mut x = 42;
|
||||
// x = SOME_MUTABLE_STATIC;
|
||||
// // x must now be uninit
|
||||
// ```
|
||||
// FIXME: we overzealously erase the entire local, because that's easier to
|
||||
// implement.
|
||||
trace!(
|
||||
"propagation into {:?} failed.
|
||||
Nuking the entire site from orbit, it's the only way to be sure",
|
||||
place,
|
||||
);
|
||||
Self::remove_const(&mut self.ecx, place.local);
|
||||
}
|
||||
} else {
|
||||
match statement.kind {
|
||||
StatementKind::SetDiscriminant { ref place, .. } => {
|
||||
match self.ecx.machine.can_const_prop[place.local] {
|
||||
ConstPropMode::FullConstProp | ConstPropMode::OnlyInsideOwnBlock => {
|
||||
if self.use_ecx(|this| this.ecx.statement(statement)).is_some() {
|
||||
trace!("propped discriminant into {:?}", place);
|
||||
} else {
|
||||
match can_const_prop {
|
||||
ConstPropMode::OnlyInsideOwnBlock => {
|
||||
trace!(
|
||||
"found local restricted to its block. \
|
||||
Will remove it from const-prop after block is finished. Local: {:?}",
|
||||
place.local
|
||||
);
|
||||
}
|
||||
ConstPropMode::OnlyPropagateInto | ConstPropMode::NoPropagation => {
|
||||
trace!("can't propagate into {:?}", place);
|
||||
if place.local != RETURN_PLACE {
|
||||
Self::remove_const(&mut self.ecx, place.local);
|
||||
}
|
||||
}
|
||||
ConstPropMode::OnlyPropagateInto | ConstPropMode::NoPropagation => {
|
||||
ConstPropMode::FullConstProp => {}
|
||||
}
|
||||
} else {
|
||||
// Const prop failed, so erase the destination, ensuring that whatever happens
|
||||
// from here on, does not know about the previous value.
|
||||
// This is important in case we have
|
||||
// ```rust
|
||||
// let mut x = 42;
|
||||
// x = SOME_MUTABLE_STATIC;
|
||||
// // x must now be uninit
|
||||
// ```
|
||||
// FIXME: we overzealously erase the entire local, because that's easier to
|
||||
// implement.
|
||||
trace!(
|
||||
"propagation into {:?} failed.
|
||||
Nuking the entire site from orbit, it's the only way to be sure",
|
||||
place,
|
||||
);
|
||||
Self::remove_const(&mut self.ecx, place.local);
|
||||
}
|
||||
}
|
||||
StatementKind::SetDiscriminant { ref place, .. } => {
|
||||
match self.ecx.machine.can_const_prop[place.local] {
|
||||
ConstPropMode::FullConstProp | ConstPropMode::OnlyInsideOwnBlock => {
|
||||
if self.ecx.statement(statement).is_ok() {
|
||||
trace!("propped discriminant into {:?}", place);
|
||||
} else {
|
||||
Self::remove_const(&mut self.ecx, place.local);
|
||||
}
|
||||
}
|
||||
ConstPropMode::OnlyPropagateInto | ConstPropMode::NoPropagation => {
|
||||
Self::remove_const(&mut self.ecx, place.local);
|
||||
}
|
||||
}
|
||||
StatementKind::StorageLive(local) | StatementKind::StorageDead(local) => {
|
||||
let frame = self.ecx.frame_mut();
|
||||
frame.locals[local].value =
|
||||
if let StatementKind::StorageLive(_) = statement.kind {
|
||||
LocalValue::Live(interpret::Operand::Immediate(
|
||||
interpret::Immediate::Uninit,
|
||||
))
|
||||
} else {
|
||||
LocalValue::Dead
|
||||
};
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
StatementKind::StorageLive(local) | StatementKind::StorageDead(local) => {
|
||||
let frame = self.ecx.frame_mut();
|
||||
frame.locals[local].value = if let StatementKind::StorageLive(_) = statement.kind {
|
||||
LocalValue::Live(interpret::Operand::Immediate(interpret::Immediate::Uninit))
|
||||
} else {
|
||||
LocalValue::Dead
|
||||
};
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
|
||||
self.super_statement(statement, location);
|
||||
@ -1008,12 +979,10 @@ impl<'tcx> MutVisitor<'tcx> for ConstPropagator<'_, 'tcx> {
|
||||
let source_info = terminator.source_info;
|
||||
self.source_info = Some(source_info);
|
||||
self.super_terminator(terminator, location);
|
||||
// Do NOT early return in this function, it does some crucial fixup of the state at the end!
|
||||
|
||||
match &mut terminator.kind {
|
||||
TerminatorKind::Assert { expected, ref mut cond, .. } => {
|
||||
if let Some(ref value) = self.eval_operand(&cond)
|
||||
// FIXME should be used use_ecx rather than a local match... but we have
|
||||
// quite a few of these read_scalar/read_immediate that need fixing.
|
||||
&& let Ok(value_const) = self.ecx.read_scalar(&value)
|
||||
&& self.should_const_prop(value)
|
||||
{
|
||||
@ -1050,6 +1019,10 @@ impl<'tcx> MutVisitor<'tcx> for ConstPropagator<'_, 'tcx> {
|
||||
// gated on `mir_opt_level=3`.
|
||||
TerminatorKind::Call { .. } => {}
|
||||
}
|
||||
}
|
||||
|
||||
fn visit_basic_block_data(&mut self, block: BasicBlock, data: &mut BasicBlockData<'tcx>) {
|
||||
self.super_basic_block_data(block, data);
|
||||
|
||||
// We remove all Locals which are restricted in propagation to their containing blocks and
|
||||
// which were modified in the current block.
|
||||
|
@ -2784,7 +2784,13 @@ impl<'tcx> TypeErrCtxtExt<'tcx> for TypeErrCtxt<'_, 'tcx> {
|
||||
_ => true,
|
||||
};
|
||||
if ident.span.is_visible(sm) && !ident.span.overlaps(span) && !same_line {
|
||||
multispan.push_span_label(ident.span, "required by a bound in this");
|
||||
multispan.push_span_label(
|
||||
ident.span,
|
||||
format!(
|
||||
"required by a bound in this {}",
|
||||
tcx.def_kind(item_def_id).descr(item_def_id)
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
let descr = format!("required by a bound in `{item_name}`");
|
||||
|
@ -16,7 +16,7 @@ regex = "1.0"
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
serde_json = "1.0"
|
||||
rustfix = "0.6.0"
|
||||
lazy_static = "1.0"
|
||||
once_cell = "1.16.0"
|
||||
walkdir = "2"
|
||||
glob = "0.3.0"
|
||||
lazycell = "1.3.0"
|
||||
@ -25,5 +25,5 @@ lazycell = "1.3.0"
|
||||
libc = "0.2"
|
||||
|
||||
[target.'cfg(windows)'.dependencies]
|
||||
miow = "0.3"
|
||||
miow = "0.5"
|
||||
winapi = { version = "0.3", features = ["winerror"] }
|
||||
|
@ -7,7 +7,7 @@ use std::io::BufReader;
|
||||
use std::path::Path;
|
||||
use std::str::FromStr;
|
||||
|
||||
use lazy_static::lazy_static;
|
||||
use once_cell::sync::Lazy;
|
||||
use regex::Regex;
|
||||
use tracing::*;
|
||||
|
||||
@ -117,10 +117,8 @@ fn parse_expected(
|
||||
// //~^^^^^
|
||||
// //[cfg1]~
|
||||
// //[cfg1,cfg2]~^^
|
||||
lazy_static! {
|
||||
static ref RE: Regex =
|
||||
Regex::new(r"//(?:\[(?P<cfgs>[\w,]+)])?~(?P<adjust>\||\^*)").unwrap();
|
||||
}
|
||||
static RE: Lazy<Regex> =
|
||||
Lazy::new(|| Regex::new(r"//(?:\[(?P<cfgs>[\w,]+)])?~(?P<adjust>\||\^*)").unwrap());
|
||||
|
||||
let captures = RE.captures(line)?;
|
||||
|
||||
|
@ -588,7 +588,8 @@ fn modified_tests(config: &Config, dir: &Path) -> Result<Vec<PathBuf>, String> {
|
||||
let full_paths = {
|
||||
let mut full_paths: Vec<PathBuf> = all_paths
|
||||
.into_iter()
|
||||
.map(|f| fs::canonicalize(&f).unwrap().with_extension("").with_extension("rs"))
|
||||
.map(|f| PathBuf::from(f).with_extension("").with_extension("rs"))
|
||||
.filter_map(|f| if Path::new(&f).exists() { f.canonicalize().ok() } else { None })
|
||||
.collect();
|
||||
full_paths.dedup();
|
||||
full_paths.sort_unstable();
|
||||
|
@ -32,7 +32,7 @@ use std::process::{Child, Command, ExitStatus, Output, Stdio};
|
||||
use std::str;
|
||||
|
||||
use glob::glob;
|
||||
use lazy_static::lazy_static;
|
||||
use once_cell::sync::Lazy;
|
||||
use tracing::*;
|
||||
|
||||
use crate::extract_gdb_version;
|
||||
@ -52,9 +52,8 @@ fn disable_error_reporting<F: FnOnce() -> R, R>(f: F) -> R {
|
||||
use winapi::um::errhandlingapi::SetErrorMode;
|
||||
use winapi::um::winbase::SEM_NOGPFAULTERRORBOX;
|
||||
|
||||
lazy_static! {
|
||||
static ref LOCK: Mutex<()> = Mutex::new(());
|
||||
}
|
||||
static LOCK: Mutex<()> = Mutex::new(());
|
||||
|
||||
// Error mode is a global variable, so lock it so only one thread will change it
|
||||
let _lock = LOCK.lock().unwrap();
|
||||
|
||||
@ -2848,11 +2847,10 @@ impl<'test> TestCx<'test> {
|
||||
// the form <crate-name1>.<crate-disambiguator1>-in-<crate-name2>.<crate-disambiguator2>,
|
||||
// remove all crate-disambiguators.
|
||||
fn remove_crate_disambiguator_from_cgu(cgu: &str) -> String {
|
||||
lazy_static! {
|
||||
static ref RE: Regex =
|
||||
Regex::new(r"^[^\.]+(?P<d1>\.[[:alnum:]]+)(-in-[^\.]+(?P<d2>\.[[:alnum:]]+))?")
|
||||
.unwrap();
|
||||
}
|
||||
static RE: Lazy<Regex> = Lazy::new(|| {
|
||||
Regex::new(r"^[^\.]+(?P<d1>\.[[:alnum:]]+)(-in-[^\.]+(?P<d2>\.[[:alnum:]]+))?")
|
||||
.unwrap()
|
||||
});
|
||||
|
||||
let captures =
|
||||
RE.captures(cgu).unwrap_or_else(|| panic!("invalid cgu name encountered: {}", cgu));
|
||||
@ -3170,12 +3168,12 @@ impl<'test> TestCx<'test> {
|
||||
// 'uploaded "$TEST_BUILD_DIR/<test_executable>, waiting for result"'
|
||||
// is printed to stdout by the client and then captured in the ProcRes,
|
||||
// so it needs to be removed when comparing the run-pass test execution output
|
||||
lazy_static! {
|
||||
static ref REMOTE_TEST_RE: Regex = Regex::new(
|
||||
static REMOTE_TEST_RE: Lazy<Regex> = Lazy::new(|| {
|
||||
Regex::new(
|
||||
"^uploaded \"\\$TEST_BUILD_DIR(/[[:alnum:]_\\-.]+)+\", waiting for result\n"
|
||||
)
|
||||
.unwrap();
|
||||
}
|
||||
.unwrap()
|
||||
});
|
||||
REMOTE_TEST_RE
|
||||
.replace(
|
||||
&self.normalize_output(&proc_res.stdout, &self.props.normalize_stdout),
|
||||
@ -3620,10 +3618,8 @@ impl<'test> TestCx<'test> {
|
||||
// with placeholders as we do not want tests needing updated when compiler source code
|
||||
// changes.
|
||||
// eg. $SRC_DIR/libcore/mem.rs:323:14 becomes $SRC_DIR/libcore/mem.rs:LL:COL
|
||||
lazy_static! {
|
||||
static ref SRC_DIR_RE: Regex =
|
||||
Regex::new("SRC_DIR(.+):\\d+:\\d+(: \\d+:\\d+)?").unwrap();
|
||||
}
|
||||
static SRC_DIR_RE: Lazy<Regex> =
|
||||
Lazy::new(|| Regex::new("SRC_DIR(.+):\\d+:\\d+(: \\d+:\\d+)?").unwrap());
|
||||
|
||||
normalized = SRC_DIR_RE.replace_all(&normalized, "SRC_DIR$1:LL:COL").into_owned();
|
||||
|
||||
@ -3634,19 +3630,17 @@ impl<'test> TestCx<'test> {
|
||||
// since they duplicate actual errors and make the output hard to read.
|
||||
// This mirrors the regex in src/tools/tidy/src/style.rs, please update
|
||||
// both if either are changed.
|
||||
lazy_static! {
|
||||
static ref ANNOTATION_RE: Regex = Regex::new("\\s*//(\\[.*\\])?~.*").unwrap();
|
||||
}
|
||||
static ANNOTATION_RE: Lazy<Regex> =
|
||||
Lazy::new(|| Regex::new("\\s*//(\\[.*\\])?~.*").unwrap());
|
||||
|
||||
normalized = ANNOTATION_RE.replace_all(&normalized, "").into_owned();
|
||||
|
||||
// This code normalizes various hashes in v0 symbol mangling that is
|
||||
// emitted in the ui and mir-opt tests.
|
||||
lazy_static! {
|
||||
static ref V0_CRATE_HASH_PREFIX_RE: Regex =
|
||||
Regex::new(r"_R.*?Cs[0-9a-zA-Z]+_").unwrap();
|
||||
static ref V0_CRATE_HASH_RE: Regex = Regex::new(r"Cs[0-9a-zA-Z]+_").unwrap();
|
||||
}
|
||||
static V0_CRATE_HASH_PREFIX_RE: Lazy<Regex> =
|
||||
Lazy::new(|| Regex::new(r"_R.*?Cs[0-9a-zA-Z]+_").unwrap());
|
||||
static V0_CRATE_HASH_RE: Lazy<Regex> =
|
||||
Lazy::new(|| Regex::new(r"Cs[0-9a-zA-Z]+_").unwrap());
|
||||
|
||||
const V0_CRATE_HASH_PLACEHOLDER: &str = r"CsCRATE_HASH_";
|
||||
if V0_CRATE_HASH_PREFIX_RE.is_match(&normalized) {
|
||||
@ -3655,10 +3649,9 @@ impl<'test> TestCx<'test> {
|
||||
V0_CRATE_HASH_RE.replace_all(&normalized, V0_CRATE_HASH_PLACEHOLDER).into_owned();
|
||||
}
|
||||
|
||||
lazy_static! {
|
||||
static ref V0_BACK_REF_PREFIX_RE: Regex = Regex::new(r"\(_R.*?B[0-9a-zA-Z]_").unwrap();
|
||||
static ref V0_BACK_REF_RE: Regex = Regex::new(r"B[0-9a-zA-Z]_").unwrap();
|
||||
}
|
||||
static V0_BACK_REF_PREFIX_RE: Lazy<Regex> =
|
||||
Lazy::new(|| Regex::new(r"\(_R.*?B[0-9a-zA-Z]_").unwrap());
|
||||
static V0_BACK_REF_RE: Lazy<Regex> = Lazy::new(|| Regex::new(r"B[0-9a-zA-Z]_").unwrap());
|
||||
|
||||
const V0_BACK_REF_PLACEHOLDER: &str = r"B<REF>_";
|
||||
if V0_BACK_REF_PREFIX_RE.is_match(&normalized) {
|
||||
@ -3681,21 +3674,23 @@ impl<'test> TestCx<'test> {
|
||||
/// Replaces backslashes in paths with forward slashes, and replaces CRLF line endings
|
||||
/// with LF.
|
||||
fn normalize_platform_differences(output: &str) -> String {
|
||||
lazy_static! {
|
||||
/// Used to find Windows paths.
|
||||
///
|
||||
/// It's not possible to detect paths in the error messages generally, but this is a
|
||||
/// decent enough heuristic.
|
||||
static ref PATH_BACKSLASH_RE: Regex = Regex::new(r#"(?x)
|
||||
/// Used to find Windows paths.
|
||||
///
|
||||
/// It's not possible to detect paths in the error messages generally, but this is a
|
||||
/// decent enough heuristic.
|
||||
static PATH_BACKSLASH_RE: Lazy<Regex> = Lazy::new(|| {
|
||||
Regex::new(
|
||||
r#"(?x)
|
||||
(?:
|
||||
# Match paths that don't include spaces.
|
||||
(?:\\[\pL\pN\.\-_']+)+\.\pL+
|
||||
|
|
||||
# If the path starts with a well-known root, then allow spaces.
|
||||
\$(?:DIR|SRC_DIR|TEST_BUILD_DIR|BUILD_DIR|LIB_DIR)(?:\\[\pL\pN\.\-_' ]+)+
|
||||
)"#
|
||||
).unwrap();
|
||||
}
|
||||
)"#,
|
||||
)
|
||||
.unwrap()
|
||||
});
|
||||
|
||||
let output = output.replace(r"\\", r"\");
|
||||
|
||||
|
@ -15,7 +15,7 @@ note: required by a bound in `foo`
|
||||
--> $DIR/associated-types-eq-hr.rs:45:36
|
||||
|
|
||||
LL | fn foo<T>()
|
||||
| --- required by a bound in this
|
||||
| --- required by a bound in this function
|
||||
LL | where
|
||||
LL | T: for<'x> TheTrait<&'x isize, A = &'x isize>,
|
||||
| ^^^^^^^^^^^^^ required by this bound in `foo`
|
||||
@ -37,7 +37,7 @@ note: required by a bound in `bar`
|
||||
--> $DIR/associated-types-eq-hr.rs:52:36
|
||||
|
|
||||
LL | fn bar<T>()
|
||||
| --- required by a bound in this
|
||||
| --- required by a bound in this function
|
||||
LL | where
|
||||
LL | T: for<'x> TheTrait<&'x isize, A = &'x usize>,
|
||||
| ^^^^^^^^^^^^^ required by this bound in `bar`
|
||||
|
@ -27,7 +27,7 @@ LL | Self::Ty: Clone,
|
||||
| ^^^^^ required by this bound in `Tr2::Ty`
|
||||
LL | {
|
||||
LL | type Ty = NotClone;
|
||||
| -- required by a bound in this
|
||||
| -- required by a bound in this associated type
|
||||
help: consider annotating `NotClone` with `#[derive(Clone)]`
|
||||
|
|
||||
LL | #[derive(Clone)]
|
||||
@ -75,7 +75,7 @@ LL | Self::Assoc: IsU8<Self::Assoc>,
|
||||
| ^^^^^^^^^^^^^^^^^ required by this bound in `D::Assoc`
|
||||
...
|
||||
LL | type Assoc = NotClone;
|
||||
| ----- required by a bound in this
|
||||
| ----- required by a bound in this associated type
|
||||
|
||||
error[E0277]: the trait bound `<Self as Foo2<T>>::Baz: Clone` is not satisfied
|
||||
--> $DIR/defaults-suitability.rs:65:23
|
||||
@ -124,7 +124,7 @@ LL | Self::Baz: Clone,
|
||||
| ^^^^^ required by this bound in `Foo3::Baz`
|
||||
...
|
||||
LL | type Baz = T;
|
||||
| --- required by a bound in this
|
||||
| --- required by a bound in this associated type
|
||||
help: consider further restricting type parameter `T`
|
||||
|
|
||||
LL | Self::Baz: Clone, T: std::clone::Clone
|
||||
|
@ -9,7 +9,7 @@ note: required by a bound in `X`
|
||||
--> $DIR/hr-associated-type-bound-1.rs:3:33
|
||||
|
|
||||
LL | trait X<'a>
|
||||
| - required by a bound in this
|
||||
| - required by a bound in this trait
|
||||
LL | where
|
||||
LL | for<'b> <Self as X<'b>>::U: Clone,
|
||||
| ^^^^^ required by this bound in `X`
|
||||
|
@ -8,7 +8,7 @@ note: required by a bound in `X`
|
||||
--> $DIR/hr-associated-type-bound-object.rs:3:33
|
||||
|
|
||||
LL | trait X<'a>
|
||||
| - required by a bound in this
|
||||
| - required by a bound in this trait
|
||||
LL | where
|
||||
LL | for<'b> <Self as X<'b>>::U: Clone,
|
||||
| ^^^^^ required by this bound in `X`
|
||||
|
@ -9,7 +9,7 @@ note: required by a bound in `Y`
|
||||
--> $DIR/hr-associated-type-bound-param-1.rs:4:36
|
||||
|
|
||||
LL | trait Y<'a, T: ?Sized>
|
||||
| - required by a bound in this
|
||||
| - required by a bound in this trait
|
||||
...
|
||||
LL | for<'b> <Self as Y<'b, T>>::V: Clone,
|
||||
| ^^^^^ required by this bound in `Y`
|
||||
|
@ -9,7 +9,7 @@ note: required by a bound in `Z`
|
||||
--> $DIR/hr-associated-type-bound-param-2.rs:6:35
|
||||
|
|
||||
LL | trait Z<'a, T: ?Sized>
|
||||
| - required by a bound in this
|
||||
| - required by a bound in this trait
|
||||
...
|
||||
LL | for<'b> <T as Z<'b, u16>>::W: Clone,
|
||||
| ^^^^^ required by this bound in `Z`
|
||||
@ -25,7 +25,7 @@ note: required by a bound in `Z`
|
||||
--> $DIR/hr-associated-type-bound-param-2.rs:6:35
|
||||
|
|
||||
LL | trait Z<'a, T: ?Sized>
|
||||
| - required by a bound in this
|
||||
| - required by a bound in this trait
|
||||
...
|
||||
LL | for<'b> <T as Z<'b, u16>>::W: Clone,
|
||||
| ^^^^^ required by this bound in `Z`
|
||||
@ -41,7 +41,7 @@ note: required by a bound in `Z`
|
||||
--> $DIR/hr-associated-type-bound-param-2.rs:6:35
|
||||
|
|
||||
LL | trait Z<'a, T: ?Sized>
|
||||
| - required by a bound in this
|
||||
| - required by a bound in this trait
|
||||
...
|
||||
LL | for<'b> <T as Z<'b, u16>>::W: Clone,
|
||||
| ^^^^^ required by this bound in `Z`
|
||||
|
@ -9,7 +9,7 @@ note: required by a bound in `X`
|
||||
--> $DIR/hr-associated-type-bound-param-3.rs:4:33
|
||||
|
|
||||
LL | trait X<'a, T>
|
||||
| - required by a bound in this
|
||||
| - required by a bound in this trait
|
||||
...
|
||||
LL | for<'b> <T as X<'b, T>>::U: Clone,
|
||||
| ^^^^^ required by this bound in `X`
|
||||
|
@ -9,7 +9,7 @@ note: required by a bound in `X`
|
||||
--> $DIR/hr-associated-type-bound-param-4.rs:4:36
|
||||
|
|
||||
LL | trait X<'a, T>
|
||||
| - required by a bound in this
|
||||
| - required by a bound in this trait
|
||||
...
|
||||
LL | for<'b> <(T,) as X<'b, T>>::U: Clone,
|
||||
| ^^^^^ required by this bound in `X`
|
||||
|
@ -9,7 +9,7 @@ note: required by a bound in `X`
|
||||
--> $DIR/hr-associated-type-bound-param-5.rs:17:45
|
||||
|
|
||||
LL | trait X<'a, T: Cycle + for<'b> X<'b, T>>
|
||||
| - required by a bound in this
|
||||
| - required by a bound in this trait
|
||||
...
|
||||
LL | for<'b> <T::Next as X<'b, T::Next>>::U: Clone,
|
||||
| ^^^^^ required by this bound in `X`
|
||||
@ -25,7 +25,7 @@ note: required by a bound in `X`
|
||||
--> $DIR/hr-associated-type-bound-param-5.rs:17:45
|
||||
|
|
||||
LL | trait X<'a, T: Cycle + for<'b> X<'b, T>>
|
||||
| - required by a bound in this
|
||||
| - required by a bound in this trait
|
||||
...
|
||||
LL | for<'b> <T::Next as X<'b, T::Next>>::U: Clone,
|
||||
| ^^^^^ required by this bound in `X`
|
||||
|
@ -10,7 +10,7 @@ note: required by a bound in `UnsafeCopy`
|
||||
--> $DIR/hr-associated-type-projection-1.rs:3:64
|
||||
|
|
||||
LL | trait UnsafeCopy<'a, T: Copy>
|
||||
| ---------- required by a bound in this
|
||||
| ---------- required by a bound in this trait
|
||||
LL | where
|
||||
LL | for<'b> <Self as UnsafeCopy<'b, T>>::Item: std::ops::Deref<Target = T>,
|
||||
| ^^^^^^^^^^ required by this bound in `UnsafeCopy`
|
||||
|
@ -23,7 +23,7 @@ LL | Self::Assoc: Bar,
|
||||
| ^^^ required by this bound in `Baz::Assoc`
|
||||
LL | {
|
||||
LL | type Assoc;
|
||||
| ----- required by a bound in this
|
||||
| ----- required by a bound in this associated type
|
||||
|
||||
error[E0277]: the trait bound `bool: Bar` is not satisfied
|
||||
--> $DIR/point-at-type-on-obligation-failure-2.rs:30:18
|
||||
@ -38,7 +38,7 @@ LL | <Self as Bat>::Assoc: Bar,
|
||||
| ^^^ required by this bound in `Bat::Assoc`
|
||||
LL | {
|
||||
LL | type Assoc;
|
||||
| ----- required by a bound in this
|
||||
| ----- required by a bound in this associated type
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
|
||||
|
@ -12,7 +12,7 @@ note: required by a bound in `with_closure`
|
||||
--> $DIR/expect-infer-var-appearing-twice.rs:2:14
|
||||
|
|
||||
LL | fn with_closure<F, A>(_: F)
|
||||
| ------------ required by a bound in this
|
||||
| ------------ required by a bound in this function
|
||||
LL | where F: FnOnce(A, A)
|
||||
| ^^^^^^^^^^^^ required by this bound in `with_closure`
|
||||
|
||||
|
@ -23,7 +23,7 @@ note: required by a bound in `WhereClause`
|
||||
--> $DIR/wfness.rs:8:9
|
||||
|
|
||||
LL | struct WhereClause<const N: u8 = 2>
|
||||
| ----------- required by a bound in this
|
||||
| ----------- required by a bound in this struct
|
||||
LL | where
|
||||
LL | (): Trait<N>;
|
||||
| ^^^^^^^^ required by this bound in `WhereClause`
|
||||
|
@ -9,7 +9,7 @@ note: required by a bound in `bar`
|
||||
--> $DIR/ensure_is_evaluatable.rs:15:10
|
||||
|
|
||||
LL | fn bar<const N: usize>() -> [(); N]
|
||||
| --- required by a bound in this
|
||||
| --- required by a bound in this function
|
||||
LL | where
|
||||
LL | [(); N + 1]:,
|
||||
| ^^^^^ required by this bound in `bar`
|
||||
|
@ -9,7 +9,7 @@ note: required by a bound in `bar`
|
||||
--> $DIR/fn_with_two_const_inputs.rs:18:10
|
||||
|
|
||||
LL | fn bar<const N: usize>() -> [(); N]
|
||||
| --- required by a bound in this
|
||||
| --- required by a bound in this function
|
||||
LL | where
|
||||
LL | [(); N + 1]:,
|
||||
| ^^^^^ required by this bound in `bar`
|
||||
|
@ -10,7 +10,7 @@ note: required by a bound in `Arr`
|
||||
--> $DIR/issue-72819-generic-in-const-eval.rs:8:39
|
||||
|
|
||||
LL | struct Arr<const N: usize>
|
||||
| --- required by a bound in this
|
||||
| --- required by a bound in this struct
|
||||
LL | where Assert::<{N < usize::MAX / 2}>: IsTrue,
|
||||
| ^^^^^^ required by this bound in `Arr`
|
||||
|
||||
@ -26,7 +26,7 @@ note: required by a bound in `Arr`
|
||||
--> $DIR/issue-72819-generic-in-const-eval.rs:8:39
|
||||
|
|
||||
LL | struct Arr<const N: usize>
|
||||
| --- required by a bound in this
|
||||
| --- required by a bound in this struct
|
||||
LL | where Assert::<{N < usize::MAX / 2}>: IsTrue,
|
||||
| ^^^^^^ required by this bound in `Arr`
|
||||
|
||||
|
@ -10,7 +10,7 @@ note: required by a bound in `g`
|
||||
--> $DIR/obligation-cause.rs:13:44
|
||||
|
|
||||
LL | fn g<T>()
|
||||
| - required by a bound in this
|
||||
| - required by a bound in this function
|
||||
...
|
||||
LL | Is<{ std::mem::size_of::<T>() == 0 }>: True,
|
||||
| ^^^^ required by this bound in `g`
|
||||
|
@ -35,7 +35,7 @@ note: required by a bound in `Foo`
|
||||
--> $DIR/issue-67185-2.rs:15:25
|
||||
|
|
||||
LL | trait Foo
|
||||
| --- required by a bound in this
|
||||
| --- required by a bound in this trait
|
||||
...
|
||||
LL | <u8 as Baz>::Quaks: Bar,
|
||||
| ^^^ required by this bound in `Foo`
|
||||
@ -53,7 +53,7 @@ note: required by a bound in `Foo`
|
||||
--> $DIR/issue-67185-2.rs:14:30
|
||||
|
|
||||
LL | trait Foo
|
||||
| --- required by a bound in this
|
||||
| --- required by a bound in this trait
|
||||
LL | where
|
||||
LL | [<u8 as Baz>::Quaks; 2]: Bar,
|
||||
| ^^^ required by this bound in `Foo`
|
||||
@ -71,7 +71,7 @@ note: required by a bound in `Foo`
|
||||
--> $DIR/issue-67185-2.rs:14:30
|
||||
|
|
||||
LL | trait Foo
|
||||
| --- required by a bound in this
|
||||
| --- required by a bound in this trait
|
||||
LL | where
|
||||
LL | [<u8 as Baz>::Quaks; 2]: Bar,
|
||||
| ^^^ required by this bound in `Foo`
|
||||
@ -89,7 +89,7 @@ note: required by a bound in `Foo`
|
||||
--> $DIR/issue-67185-2.rs:15:25
|
||||
|
|
||||
LL | trait Foo
|
||||
| --- required by a bound in this
|
||||
| --- required by a bound in this trait
|
||||
...
|
||||
LL | <u8 as Baz>::Quaks: Bar,
|
||||
| ^^^ required by this bound in `Foo`
|
||||
|
@ -10,7 +10,7 @@ note: required by a bound in `Arr`
|
||||
--> $DIR/issue-73260.rs:5:37
|
||||
|
|
||||
LL | struct Arr<const N: usize>
|
||||
| --- required by a bound in this
|
||||
| --- required by a bound in this struct
|
||||
LL | where
|
||||
LL | Assert::<{N < usize::MAX / 2}>: IsTrue,
|
||||
| ^^^^^^ required by this bound in `Arr`
|
||||
@ -27,7 +27,7 @@ note: required by a bound in `Arr`
|
||||
--> $DIR/issue-73260.rs:5:37
|
||||
|
|
||||
LL | struct Arr<const N: usize>
|
||||
| --- required by a bound in this
|
||||
| --- required by a bound in this struct
|
||||
LL | where
|
||||
LL | Assert::<{N < usize::MAX / 2}>: IsTrue,
|
||||
| ^^^^^^ required by this bound in `Arr`
|
||||
|
@ -10,7 +10,7 @@ note: required by a bound in `requires_distinct`
|
||||
--> $DIR/issue-79674.rs:23:37
|
||||
|
|
||||
LL | fn requires_distinct<A, B>(_a: A, _b: B) where
|
||||
| ----------------- required by a bound in this
|
||||
| ----------------- required by a bound in this function
|
||||
LL | A: MiniTypeId, B: MiniTypeId,
|
||||
LL | Lift<{is_same_type::<A, B>()}>: IsFalse {}
|
||||
| ^^^^^^^ required by this bound in `requires_distinct`
|
||||
|
@ -10,7 +10,7 @@ note: required by a bound in `z`
|
||||
--> $DIR/issue-86530.rs:10:8
|
||||
|
|
||||
LL | fn z<T>(t: T)
|
||||
| - required by a bound in this
|
||||
| - required by a bound in this function
|
||||
LL | where
|
||||
LL | T: X,
|
||||
| ^ required by this bound in `z`
|
||||
|
@ -9,7 +9,7 @@ note: required by a bound in `A`
|
||||
--> $DIR/unused-substs-1.rs:9:11
|
||||
|
|
||||
LL | struct A<const N: usize>
|
||||
| - required by a bound in this
|
||||
| - required by a bound in this unit struct
|
||||
LL | where
|
||||
LL | A<N>: Bar<N>;
|
||||
| ^^^^^^ required by this bound in `A`
|
||||
|
@ -8,7 +8,7 @@ note: required by a bound in `bar`
|
||||
--> $DIR/unify_with_nested_expr.rs:14:10
|
||||
|
|
||||
LL | fn bar<const N: usize>()
|
||||
| --- required by a bound in this
|
||||
| --- required by a bound in this function
|
||||
LL | where
|
||||
LL | [(); N + 1]:,
|
||||
| ^^^^^ required by this bound in `bar`
|
||||
|
@ -8,7 +8,7 @@ note: required by a bound in `Foo::<T, N>::unsatisfied`
|
||||
--> $DIR/ct-var-in-collect_all_mismatches.rs:15:12
|
||||
|
|
||||
LL | fn unsatisfied(self)
|
||||
| ----------- required by a bound in this
|
||||
| ----------- required by a bound in this associated function
|
||||
LL | where
|
||||
LL | T: Bar<N>,
|
||||
| ^^^^^^ required by this bound in `Foo::<T, N>::unsatisfied`
|
||||
|
@ -19,7 +19,7 @@ note: required by a bound in `want_cyclic_generator_return`
|
||||
--> $DIR/generator-yielding-or-returning-itself.rs:10:36
|
||||
|
|
||||
LL | pub fn want_cyclic_generator_return<T>(_: T)
|
||||
| ---------------------------- required by a bound in this
|
||||
| ---------------------------- required by a bound in this function
|
||||
LL | where T: Generator<Yield = (), Return = T>
|
||||
| ^^^^^^^^^^ required by this bound in `want_cyclic_generator_return`
|
||||
|
||||
@ -44,7 +44,7 @@ note: required by a bound in `want_cyclic_generator_yield`
|
||||
--> $DIR/generator-yielding-or-returning-itself.rs:23:24
|
||||
|
|
||||
LL | pub fn want_cyclic_generator_yield<T>(_: T)
|
||||
| --------------------------- required by a bound in this
|
||||
| --------------------------- required by a bound in this function
|
||||
LL | where T: Generator<Yield = T, Return = ()>
|
||||
| ^^^^^^^^^ required by this bound in `want_cyclic_generator_yield`
|
||||
|
||||
|
@ -11,7 +11,7 @@ note: required by a bound in `test`
|
||||
--> $DIR/issue-88460.rs:15:27
|
||||
|
|
||||
LL | fn test<T>(value: T)
|
||||
| ---- required by a bound in this
|
||||
| ---- required by a bound in this function
|
||||
...
|
||||
LL | for<'a> T::Assoc<'a>: Marker,
|
||||
| ^^^^^^ required by this bound in `test`
|
||||
|
@ -13,7 +13,7 @@ note: required by a bound in `LendingIterator::consume`
|
||||
--> $DIR/issue-101020.rs:9:33
|
||||
|
|
||||
LL | fn consume<F>(self, _f: F)
|
||||
| ------- required by a bound in this
|
||||
| ------- required by a bound in this associated function
|
||||
...
|
||||
LL | for<'a> Self::Item<'a>: FuncInput<'a, Self::Item<'a>>,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `LendingIterator::consume`
|
||||
|
@ -10,7 +10,7 @@ note: required by a bound in `want_bar_for_any_ccx`
|
||||
--> $DIR/hrtb-higher-ranker-supertraits-transitive.rs:32:15
|
||||
|
|
||||
LL | fn want_bar_for_any_ccx<B>(b: &B)
|
||||
| -------------------- required by a bound in this
|
||||
| -------------------- required by a bound in this function
|
||||
LL | where B : for<'ccx> Bar<'ccx>
|
||||
| ^^^^^^^^^^^^^^^^^^^ required by this bound in `want_bar_for_any_ccx`
|
||||
help: consider further restricting this bound
|
||||
|
@ -10,7 +10,7 @@ note: required by a bound in `want_foo_for_any_tcx`
|
||||
--> $DIR/hrtb-higher-ranker-supertraits.rs:22:15
|
||||
|
|
||||
LL | fn want_foo_for_any_tcx<F>(f: &F)
|
||||
| -------------------- required by a bound in this
|
||||
| -------------------- required by a bound in this function
|
||||
LL | where F : for<'tcx> Foo<'tcx>
|
||||
| ^^^^^^^^^^^^^^^^^^^ required by this bound in `want_foo_for_any_tcx`
|
||||
help: consider further restricting this bound
|
||||
@ -30,7 +30,7 @@ note: required by a bound in `want_bar_for_any_ccx`
|
||||
--> $DIR/hrtb-higher-ranker-supertraits.rs:39:15
|
||||
|
|
||||
LL | fn want_bar_for_any_ccx<B>(b: &B)
|
||||
| -------------------- required by a bound in this
|
||||
| -------------------- required by a bound in this function
|
||||
LL | where B : for<'ccx> Bar<'ccx>
|
||||
| ^^^^^^^^^^^^^^^^^^^ required by this bound in `want_bar_for_any_ccx`
|
||||
help: consider further restricting this bound
|
||||
|
@ -25,7 +25,7 @@ note: required by a bound in `T1::m`
|
||||
--> $DIR/issue-62203-hrtb-ice.rs:27:51
|
||||
|
|
||||
LL | fn m<'a, B: Ty<'a>, F>(&self, f: F) -> Unit1
|
||||
| - required by a bound in this
|
||||
| - required by a bound in this associated function
|
||||
LL | where
|
||||
LL | F: for<'r> T0<'r, (<Self as Ty<'r>>::V,), O = <B as Ty<'r>>::V>,
|
||||
| ^^^^^^^^^^^^^^^^^^^^ required by this bound in `T1::m`
|
||||
@ -56,7 +56,7 @@ note: required by a bound in `T1::m`
|
||||
--> $DIR/issue-62203-hrtb-ice.rs:27:12
|
||||
|
|
||||
LL | fn m<'a, B: Ty<'a>, F>(&self, f: F) -> Unit1
|
||||
| - required by a bound in this
|
||||
| - required by a bound in this associated function
|
||||
LL | where
|
||||
LL | F: for<'r> T0<'r, (<Self as Ty<'r>>::V,), O = <B as Ty<'r>>::V>,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `T1::m`
|
||||
|
@ -15,7 +15,7 @@ note: required by a bound in `StackContext`
|
||||
--> $DIR/issue-89118.rs:9:14
|
||||
|
|
||||
LL | trait StackContext
|
||||
| ------------ required by a bound in this
|
||||
| ------------ required by a bound in this trait
|
||||
LL | where
|
||||
LL | Ctx<()>: for<'a> BufferUdpStateContext<&'a ()>,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `StackContext`
|
||||
@ -37,7 +37,7 @@ note: required by a bound in `EthernetWorker`
|
||||
--> $DIR/issue-89118.rs:28:14
|
||||
|
|
||||
LL | struct EthernetWorker<C>(C)
|
||||
| -------------- required by a bound in this
|
||||
| -------------- required by a bound in this struct
|
||||
LL | where
|
||||
LL | Ctx<()>: for<'a> BufferUdpStateContext<&'a ()>;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `EthernetWorker`
|
||||
@ -59,7 +59,7 @@ note: required by a bound in `StackContext`
|
||||
--> $DIR/issue-89118.rs:9:14
|
||||
|
|
||||
LL | trait StackContext
|
||||
| ------------ required by a bound in this
|
||||
| ------------ required by a bound in this trait
|
||||
LL | where
|
||||
LL | Ctx<()>: for<'a> BufferUdpStateContext<&'a ()>,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `StackContext`
|
||||
|
@ -11,7 +11,7 @@ note: required by a bound in `upcast`
|
||||
--> $DIR/issue-90950.rs:27:42
|
||||
|
|
||||
LL | fn upcast<Y>(x: Yoke<Y>) -> Yoke<Box<dyn IsCovariant<'static> + 'static>> where
|
||||
| ------ required by a bound in this
|
||||
| ------ required by a bound in this function
|
||||
LL | Y: for<'a> Yokeable<'a>,
|
||||
LL | for<'a> <Y as Yokeable<'a>>::Output: IsCovariant<'a>
|
||||
| ^^^^^^^^^^^^^^^ required by this bound in `upcast`
|
||||
|
@ -8,7 +8,7 @@ note: required by a bound in `weird_bound`
|
||||
--> $DIR/norm-before-method-resolution.rs:18:40
|
||||
|
|
||||
LL | fn weird_bound<X>() -> X
|
||||
| ----------- required by a bound in this
|
||||
| ----------- required by a bound in this function
|
||||
...
|
||||
LL | for<'a> <X as Trait<'a>>::Out: Copy
|
||||
| ^^^^ required by this bound in `weird_bound`
|
||||
|
@ -12,7 +12,7 @@ note: required by a bound in `real_dispatch`
|
||||
--> $DIR/issue-100690.rs:9:8
|
||||
|
|
||||
LL | fn real_dispatch<T, F>(f: F) -> Result<(), io::Error>
|
||||
| ------------- required by a bound in this
|
||||
| ------------- required by a bound in this function
|
||||
...
|
||||
LL | F: FnOnce(&mut UIView<T>) -> Result<(), io::Error> + Send + 'static,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `real_dispatch`
|
||||
|
@ -10,7 +10,7 @@ note: required by a bound in `trigger_error`
|
||||
--> $DIR/issue-60218.rs:13:72
|
||||
|
|
||||
LL | pub fn trigger_error<I, F>(iterable: I, functor: F)
|
||||
| ------------- required by a bound in this
|
||||
| ------------- required by a bound in this function
|
||||
...
|
||||
LL | for<'t> <Map<<&'t I as IntoIterator>::IntoIter, F> as Iterator>::Item: Foo,
|
||||
| ^^^ required by this bound in `trigger_error`
|
||||
|
@ -31,7 +31,7 @@ LL | u8: Element<I>,
|
||||
| ^^^^^^^^^^ required by this bound in `Foo::foo`
|
||||
LL | {
|
||||
LL | fn foo(self, x: <u8 as Element<I>>::Array);
|
||||
| --- required by a bound in this
|
||||
| --- required by a bound in this associated function
|
||||
help: try using a fully qualified path to specify the expected types
|
||||
|
|
||||
LL | <u16 as Foo<I>>::foo(0u16, b);
|
||||
|
@ -27,7 +27,7 @@ note: required by a bound in `foo`
|
||||
--> $DIR/issue-47706.rs:22:8
|
||||
|
|
||||
LL | fn foo<F>(f: F)
|
||||
| --- required by a bound in this
|
||||
| --- required by a bound in this function
|
||||
LL | where
|
||||
LL | F: Fn(),
|
||||
| ^^^^ required by this bound in `foo`
|
||||
|
@ -12,7 +12,7 @@ note: required by a bound in `foo`
|
||||
--> $DIR/imm-ref-trait-object-literal-bound-regions.rs:11:20
|
||||
|
|
||||
LL | fn foo<X>(_: X)
|
||||
| --- required by a bound in this
|
||||
| --- required by a bound in this function
|
||||
LL | where
|
||||
LL | for<'b> &'b X: Trait,
|
||||
| ^^^^^ required by this bound in `foo`
|
||||
|
@ -13,7 +13,7 @@ LL | G: SomeTrait,
|
||||
| ^^^^^^^^^ required by this bound in `Other::<'a, G>::new`
|
||||
LL | {
|
||||
LL | pub fn new(g: G) -> Self {
|
||||
| --- required by a bound in this
|
||||
| --- required by a bound in this associated function
|
||||
help: consider borrowing here
|
||||
|
|
||||
LL | let o = Other::new(&f);
|
||||
|
@ -29,7 +29,7 @@ note: required by a bound in `test`
|
||||
--> $DIR/multidispatch-convert-ambig-dest.rs:21:11
|
||||
|
|
||||
LL | fn test<T,U>(_: T, _: U)
|
||||
| ---- required by a bound in this
|
||||
| ---- required by a bound in this function
|
||||
LL | where T : Convert<U>
|
||||
| ^^^^^^^^^^ required by this bound in `test`
|
||||
help: consider specifying the generic arguments
|
||||
|
@ -18,7 +18,7 @@ note: required by a bound in `foo`
|
||||
--> $DIR/bad-sized-cond.rs:6:15
|
||||
|
|
||||
LL | pub fn foo()
|
||||
| --- required by a bound in this
|
||||
| --- required by a bound in this function
|
||||
LL | where
|
||||
LL | for<V> V: Sized,
|
||||
| ^^^^^ required by this bound in `foo`
|
||||
@ -35,7 +35,7 @@ note: required by a bound in `bar`
|
||||
--> $DIR/bad-sized-cond.rs:12:15
|
||||
|
|
||||
LL | pub fn bar()
|
||||
| --- required by a bound in this
|
||||
| --- required by a bound in this function
|
||||
LL | where
|
||||
LL | for<V> V: IntoIterator,
|
||||
| ^^^^^^^^^^^^ required by this bound in `bar`
|
||||
@ -52,7 +52,7 @@ note: required by a bound in `bar`
|
||||
--> $DIR/bad-sized-cond.rs:12:15
|
||||
|
|
||||
LL | pub fn bar()
|
||||
| --- required by a bound in this
|
||||
| --- required by a bound in this function
|
||||
LL | where
|
||||
LL | for<V> V: IntoIterator,
|
||||
| ^^^^^^^^^^^^ required by this bound in `bar`
|
||||
|
@ -17,7 +17,7 @@ note: required by a bound in `fail`
|
||||
--> $DIR/fail.rs:10:15
|
||||
|
|
||||
LL | fn fail()
|
||||
| ---- required by a bound in this
|
||||
| ---- required by a bound in this function
|
||||
LL | where
|
||||
LL | for<T> T: Trait,
|
||||
| ^^^^^ required by this bound in `fail`
|
||||
@ -33,7 +33,7 @@ note: required by a bound in `auto_trait`
|
||||
--> $DIR/fail.rs:15:15
|
||||
|
|
||||
LL | fn auto_trait()
|
||||
| ---------- required by a bound in this
|
||||
| ---------- required by a bound in this function
|
||||
LL | where
|
||||
LL | for<T> T: Send,
|
||||
| ^^^^ required by this bound in `auto_trait`
|
||||
|
@ -0,0 +1,14 @@
|
||||
// edition:2021
|
||||
// check-pass
|
||||
|
||||
// Checks that test_type_match code doesn't ICE when predicates have late-bound types
|
||||
|
||||
#![feature(non_lifetime_binders)]
|
||||
//~^ WARN is incomplete and may not be safe to use
|
||||
|
||||
async fn walk2<'a, T: 'a>(_: T)
|
||||
where
|
||||
for<F> F: 'a,
|
||||
{}
|
||||
|
||||
fn main() {}
|
@ -0,0 +1,11 @@
|
||||
warning: the feature `non_lifetime_binders` is incomplete and may not be safe to use and/or cause compiler crashes
|
||||
--> $DIR/type-match-with-late-bound.rs:6:12
|
||||
|
|
||||
LL | #![feature(non_lifetime_binders)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #108185 <https://github.com/rust-lang/rust/issues/108185> for more information
|
||||
= note: `#[warn(incomplete_features)]` on by default
|
||||
|
||||
warning: 1 warning emitted
|
||||
|
@ -16,7 +16,7 @@ note: required by a bound in `foo`
|
||||
--> $DIR/enforce-supertrait-projection.rs:15:8
|
||||
|
|
||||
LL | fn foo<A, B, T: ?Sized>(x: T::A) -> B
|
||||
| --- required by a bound in this
|
||||
| --- required by a bound in this function
|
||||
LL | where
|
||||
LL | T: Trait<B = B>,
|
||||
| ^^^^^^^^^^^^ required by this bound in `foo`
|
||||
|
@ -9,7 +9,7 @@ note: required by a bound in `is_maybe_transmutable`
|
||||
--> $DIR/should_require_well_defined_layout.rs:13:14
|
||||
|
|
||||
LL | pub fn is_maybe_transmutable<Src, Dst>()
|
||||
| --------------------- required by a bound in this
|
||||
| --------------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context, {
|
||||
| ______________^
|
||||
@ -31,7 +31,7 @@ note: required by a bound in `is_maybe_transmutable`
|
||||
--> $DIR/should_require_well_defined_layout.rs:13:14
|
||||
|
|
||||
LL | pub fn is_maybe_transmutable<Src, Dst>()
|
||||
| --------------------- required by a bound in this
|
||||
| --------------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context, {
|
||||
| ______________^
|
||||
@ -53,7 +53,7 @@ note: required by a bound in `is_maybe_transmutable`
|
||||
--> $DIR/should_require_well_defined_layout.rs:13:14
|
||||
|
|
||||
LL | pub fn is_maybe_transmutable<Src, Dst>()
|
||||
| --------------------- required by a bound in this
|
||||
| --------------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context, {
|
||||
| ______________^
|
||||
@ -75,7 +75,7 @@ note: required by a bound in `is_maybe_transmutable`
|
||||
--> $DIR/should_require_well_defined_layout.rs:13:14
|
||||
|
|
||||
LL | pub fn is_maybe_transmutable<Src, Dst>()
|
||||
| --------------------- required by a bound in this
|
||||
| --------------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context, {
|
||||
| ______________^
|
||||
@ -97,7 +97,7 @@ note: required by a bound in `is_maybe_transmutable`
|
||||
--> $DIR/should_require_well_defined_layout.rs:13:14
|
||||
|
|
||||
LL | pub fn is_maybe_transmutable<Src, Dst>()
|
||||
| --------------------- required by a bound in this
|
||||
| --------------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context, {
|
||||
| ______________^
|
||||
@ -119,7 +119,7 @@ note: required by a bound in `is_maybe_transmutable`
|
||||
--> $DIR/should_require_well_defined_layout.rs:13:14
|
||||
|
|
||||
LL | pub fn is_maybe_transmutable<Src, Dst>()
|
||||
| --------------------- required by a bound in this
|
||||
| --------------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context, {
|
||||
| ______________^
|
||||
|
@ -9,7 +9,7 @@ note: required by a bound in `is_transmutable`
|
||||
--> $DIR/primitive_reprs_should_have_correct_length.rs:12:14
|
||||
|
|
||||
LL | pub fn is_transmutable<Src, Dst, Context>()
|
||||
| --------------- required by a bound in this
|
||||
| --------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context, {
|
||||
| ______________^
|
||||
@ -32,7 +32,7 @@ note: required by a bound in `is_transmutable`
|
||||
--> $DIR/primitive_reprs_should_have_correct_length.rs:12:14
|
||||
|
|
||||
LL | pub fn is_transmutable<Src, Dst, Context>()
|
||||
| --------------- required by a bound in this
|
||||
| --------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context, {
|
||||
| ______________^
|
||||
@ -55,7 +55,7 @@ note: required by a bound in `is_transmutable`
|
||||
--> $DIR/primitive_reprs_should_have_correct_length.rs:12:14
|
||||
|
|
||||
LL | pub fn is_transmutable<Src, Dst, Context>()
|
||||
| --------------- required by a bound in this
|
||||
| --------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context, {
|
||||
| ______________^
|
||||
@ -78,7 +78,7 @@ note: required by a bound in `is_transmutable`
|
||||
--> $DIR/primitive_reprs_should_have_correct_length.rs:12:14
|
||||
|
|
||||
LL | pub fn is_transmutable<Src, Dst, Context>()
|
||||
| --------------- required by a bound in this
|
||||
| --------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context, {
|
||||
| ______________^
|
||||
@ -101,7 +101,7 @@ note: required by a bound in `is_transmutable`
|
||||
--> $DIR/primitive_reprs_should_have_correct_length.rs:12:14
|
||||
|
|
||||
LL | pub fn is_transmutable<Src, Dst, Context>()
|
||||
| --------------- required by a bound in this
|
||||
| --------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context, {
|
||||
| ______________^
|
||||
@ -124,7 +124,7 @@ note: required by a bound in `is_transmutable`
|
||||
--> $DIR/primitive_reprs_should_have_correct_length.rs:12:14
|
||||
|
|
||||
LL | pub fn is_transmutable<Src, Dst, Context>()
|
||||
| --------------- required by a bound in this
|
||||
| --------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context, {
|
||||
| ______________^
|
||||
@ -147,7 +147,7 @@ note: required by a bound in `is_transmutable`
|
||||
--> $DIR/primitive_reprs_should_have_correct_length.rs:12:14
|
||||
|
|
||||
LL | pub fn is_transmutable<Src, Dst, Context>()
|
||||
| --------------- required by a bound in this
|
||||
| --------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context, {
|
||||
| ______________^
|
||||
@ -170,7 +170,7 @@ note: required by a bound in `is_transmutable`
|
||||
--> $DIR/primitive_reprs_should_have_correct_length.rs:12:14
|
||||
|
|
||||
LL | pub fn is_transmutable<Src, Dst, Context>()
|
||||
| --------------- required by a bound in this
|
||||
| --------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context, {
|
||||
| ______________^
|
||||
@ -193,7 +193,7 @@ note: required by a bound in `is_transmutable`
|
||||
--> $DIR/primitive_reprs_should_have_correct_length.rs:12:14
|
||||
|
|
||||
LL | pub fn is_transmutable<Src, Dst, Context>()
|
||||
| --------------- required by a bound in this
|
||||
| --------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context, {
|
||||
| ______________^
|
||||
@ -216,7 +216,7 @@ note: required by a bound in `is_transmutable`
|
||||
--> $DIR/primitive_reprs_should_have_correct_length.rs:12:14
|
||||
|
|
||||
LL | pub fn is_transmutable<Src, Dst, Context>()
|
||||
| --------------- required by a bound in this
|
||||
| --------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context, {
|
||||
| ______________^
|
||||
@ -239,7 +239,7 @@ note: required by a bound in `is_transmutable`
|
||||
--> $DIR/primitive_reprs_should_have_correct_length.rs:12:14
|
||||
|
|
||||
LL | pub fn is_transmutable<Src, Dst, Context>()
|
||||
| --------------- required by a bound in this
|
||||
| --------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context, {
|
||||
| ______________^
|
||||
@ -262,7 +262,7 @@ note: required by a bound in `is_transmutable`
|
||||
--> $DIR/primitive_reprs_should_have_correct_length.rs:12:14
|
||||
|
|
||||
LL | pub fn is_transmutable<Src, Dst, Context>()
|
||||
| --------------- required by a bound in this
|
||||
| --------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context, {
|
||||
| ______________^
|
||||
@ -285,7 +285,7 @@ note: required by a bound in `is_transmutable`
|
||||
--> $DIR/primitive_reprs_should_have_correct_length.rs:12:14
|
||||
|
|
||||
LL | pub fn is_transmutable<Src, Dst, Context>()
|
||||
| --------------- required by a bound in this
|
||||
| --------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context, {
|
||||
| ______________^
|
||||
@ -308,7 +308,7 @@ note: required by a bound in `is_transmutable`
|
||||
--> $DIR/primitive_reprs_should_have_correct_length.rs:12:14
|
||||
|
|
||||
LL | pub fn is_transmutable<Src, Dst, Context>()
|
||||
| --------------- required by a bound in this
|
||||
| --------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context, {
|
||||
| ______________^
|
||||
@ -331,7 +331,7 @@ note: required by a bound in `is_transmutable`
|
||||
--> $DIR/primitive_reprs_should_have_correct_length.rs:12:14
|
||||
|
|
||||
LL | pub fn is_transmutable<Src, Dst, Context>()
|
||||
| --------------- required by a bound in this
|
||||
| --------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context, {
|
||||
| ______________^
|
||||
@ -354,7 +354,7 @@ note: required by a bound in `is_transmutable`
|
||||
--> $DIR/primitive_reprs_should_have_correct_length.rs:12:14
|
||||
|
|
||||
LL | pub fn is_transmutable<Src, Dst, Context>()
|
||||
| --------------- required by a bound in this
|
||||
| --------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context, {
|
||||
| ______________^
|
||||
@ -377,7 +377,7 @@ note: required by a bound in `is_transmutable`
|
||||
--> $DIR/primitive_reprs_should_have_correct_length.rs:12:14
|
||||
|
|
||||
LL | pub fn is_transmutable<Src, Dst, Context>()
|
||||
| --------------- required by a bound in this
|
||||
| --------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context, {
|
||||
| ______________^
|
||||
@ -400,7 +400,7 @@ note: required by a bound in `is_transmutable`
|
||||
--> $DIR/primitive_reprs_should_have_correct_length.rs:12:14
|
||||
|
|
||||
LL | pub fn is_transmutable<Src, Dst, Context>()
|
||||
| --------------- required by a bound in this
|
||||
| --------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context, {
|
||||
| ______________^
|
||||
@ -423,7 +423,7 @@ note: required by a bound in `is_transmutable`
|
||||
--> $DIR/primitive_reprs_should_have_correct_length.rs:12:14
|
||||
|
|
||||
LL | pub fn is_transmutable<Src, Dst, Context>()
|
||||
| --------------- required by a bound in this
|
||||
| --------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context, {
|
||||
| ______________^
|
||||
@ -446,7 +446,7 @@ note: required by a bound in `is_transmutable`
|
||||
--> $DIR/primitive_reprs_should_have_correct_length.rs:12:14
|
||||
|
|
||||
LL | pub fn is_transmutable<Src, Dst, Context>()
|
||||
| --------------- required by a bound in this
|
||||
| --------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context, {
|
||||
| ______________^
|
||||
|
@ -9,7 +9,7 @@ note: required by a bound in `is_maybe_transmutable`
|
||||
--> $DIR/should_require_well_defined_layout.rs:14:14
|
||||
|
|
||||
LL | pub fn is_maybe_transmutable<Src, Dst>()
|
||||
| --------------------- required by a bound in this
|
||||
| --------------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context, {
|
||||
| ______________^
|
||||
@ -32,7 +32,7 @@ note: required by a bound in `is_maybe_transmutable`
|
||||
--> $DIR/should_require_well_defined_layout.rs:14:14
|
||||
|
|
||||
LL | pub fn is_maybe_transmutable<Src, Dst>()
|
||||
| --------------------- required by a bound in this
|
||||
| --------------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context, {
|
||||
| ______________^
|
||||
@ -55,7 +55,7 @@ note: required by a bound in `is_maybe_transmutable`
|
||||
--> $DIR/should_require_well_defined_layout.rs:14:14
|
||||
|
|
||||
LL | pub fn is_maybe_transmutable<Src, Dst>()
|
||||
| --------------------- required by a bound in this
|
||||
| --------------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context, {
|
||||
| ______________^
|
||||
@ -78,7 +78,7 @@ note: required by a bound in `is_maybe_transmutable`
|
||||
--> $DIR/should_require_well_defined_layout.rs:14:14
|
||||
|
|
||||
LL | pub fn is_maybe_transmutable<Src, Dst>()
|
||||
| --------------------- required by a bound in this
|
||||
| --------------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context, {
|
||||
| ______________^
|
||||
@ -101,7 +101,7 @@ note: required by a bound in `is_maybe_transmutable`
|
||||
--> $DIR/should_require_well_defined_layout.rs:14:14
|
||||
|
|
||||
LL | pub fn is_maybe_transmutable<Src, Dst>()
|
||||
| --------------------- required by a bound in this
|
||||
| --------------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context, {
|
||||
| ______________^
|
||||
@ -124,7 +124,7 @@ note: required by a bound in `is_maybe_transmutable`
|
||||
--> $DIR/should_require_well_defined_layout.rs:14:14
|
||||
|
|
||||
LL | pub fn is_maybe_transmutable<Src, Dst>()
|
||||
| --------------------- required by a bound in this
|
||||
| --------------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context, {
|
||||
| ______________^
|
||||
|
@ -9,7 +9,7 @@ note: required by a bound in `is_transmutable`
|
||||
--> $DIR/should_pad_variants.rs:13:14
|
||||
|
|
||||
LL | pub fn is_transmutable<Src, Dst, Context>()
|
||||
| --------------- required by a bound in this
|
||||
| --------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context, {
|
||||
| ______________^
|
||||
|
@ -9,7 +9,7 @@ note: required by a bound in `is_transmutable`
|
||||
--> $DIR/should_respect_endianness.rs:14:14
|
||||
|
|
||||
LL | pub fn is_transmutable<Src, Dst>()
|
||||
| --------------- required by a bound in this
|
||||
| --------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context, {
|
||||
| ______________^
|
||||
|
@ -9,7 +9,7 @@ note: required by a bound in `is_transmutable`
|
||||
--> $DIR/bool.rs:12:14
|
||||
|
|
||||
LL | pub fn is_transmutable<Src, Dst>()
|
||||
| --------------- required by a bound in this
|
||||
| --------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context, { Assume::SAFETY }>
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
|
||||
|
@ -9,7 +9,7 @@ note: required by a bound in `is_transmutable`
|
||||
--> $DIR/numbers.rs:12:14
|
||||
|
|
||||
LL | pub fn is_transmutable<Src, Dst>()
|
||||
| --------------- required by a bound in this
|
||||
| --------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context>
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
|
||||
@ -25,7 +25,7 @@ note: required by a bound in `is_transmutable`
|
||||
--> $DIR/numbers.rs:12:14
|
||||
|
|
||||
LL | pub fn is_transmutable<Src, Dst>()
|
||||
| --------------- required by a bound in this
|
||||
| --------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context>
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
|
||||
@ -41,7 +41,7 @@ note: required by a bound in `is_transmutable`
|
||||
--> $DIR/numbers.rs:12:14
|
||||
|
|
||||
LL | pub fn is_transmutable<Src, Dst>()
|
||||
| --------------- required by a bound in this
|
||||
| --------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context>
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
|
||||
@ -57,7 +57,7 @@ note: required by a bound in `is_transmutable`
|
||||
--> $DIR/numbers.rs:12:14
|
||||
|
|
||||
LL | pub fn is_transmutable<Src, Dst>()
|
||||
| --------------- required by a bound in this
|
||||
| --------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context>
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
|
||||
@ -73,7 +73,7 @@ note: required by a bound in `is_transmutable`
|
||||
--> $DIR/numbers.rs:12:14
|
||||
|
|
||||
LL | pub fn is_transmutable<Src, Dst>()
|
||||
| --------------- required by a bound in this
|
||||
| --------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context>
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
|
||||
@ -89,7 +89,7 @@ note: required by a bound in `is_transmutable`
|
||||
--> $DIR/numbers.rs:12:14
|
||||
|
|
||||
LL | pub fn is_transmutable<Src, Dst>()
|
||||
| --------------- required by a bound in this
|
||||
| --------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context>
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
|
||||
@ -105,7 +105,7 @@ note: required by a bound in `is_transmutable`
|
||||
--> $DIR/numbers.rs:12:14
|
||||
|
|
||||
LL | pub fn is_transmutable<Src, Dst>()
|
||||
| --------------- required by a bound in this
|
||||
| --------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context>
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
|
||||
@ -121,7 +121,7 @@ note: required by a bound in `is_transmutable`
|
||||
--> $DIR/numbers.rs:12:14
|
||||
|
|
||||
LL | pub fn is_transmutable<Src, Dst>()
|
||||
| --------------- required by a bound in this
|
||||
| --------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context>
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
|
||||
@ -137,7 +137,7 @@ note: required by a bound in `is_transmutable`
|
||||
--> $DIR/numbers.rs:12:14
|
||||
|
|
||||
LL | pub fn is_transmutable<Src, Dst>()
|
||||
| --------------- required by a bound in this
|
||||
| --------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context>
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
|
||||
@ -153,7 +153,7 @@ note: required by a bound in `is_transmutable`
|
||||
--> $DIR/numbers.rs:12:14
|
||||
|
|
||||
LL | pub fn is_transmutable<Src, Dst>()
|
||||
| --------------- required by a bound in this
|
||||
| --------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context>
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
|
||||
@ -169,7 +169,7 @@ note: required by a bound in `is_transmutable`
|
||||
--> $DIR/numbers.rs:12:14
|
||||
|
|
||||
LL | pub fn is_transmutable<Src, Dst>()
|
||||
| --------------- required by a bound in this
|
||||
| --------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context>
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
|
||||
@ -185,7 +185,7 @@ note: required by a bound in `is_transmutable`
|
||||
--> $DIR/numbers.rs:12:14
|
||||
|
|
||||
LL | pub fn is_transmutable<Src, Dst>()
|
||||
| --------------- required by a bound in this
|
||||
| --------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context>
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
|
||||
@ -201,7 +201,7 @@ note: required by a bound in `is_transmutable`
|
||||
--> $DIR/numbers.rs:12:14
|
||||
|
|
||||
LL | pub fn is_transmutable<Src, Dst>()
|
||||
| --------------- required by a bound in this
|
||||
| --------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context>
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
|
||||
@ -217,7 +217,7 @@ note: required by a bound in `is_transmutable`
|
||||
--> $DIR/numbers.rs:12:14
|
||||
|
|
||||
LL | pub fn is_transmutable<Src, Dst>()
|
||||
| --------------- required by a bound in this
|
||||
| --------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context>
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
|
||||
@ -233,7 +233,7 @@ note: required by a bound in `is_transmutable`
|
||||
--> $DIR/numbers.rs:12:14
|
||||
|
|
||||
LL | pub fn is_transmutable<Src, Dst>()
|
||||
| --------------- required by a bound in this
|
||||
| --------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context>
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
|
||||
@ -249,7 +249,7 @@ note: required by a bound in `is_transmutable`
|
||||
--> $DIR/numbers.rs:12:14
|
||||
|
|
||||
LL | pub fn is_transmutable<Src, Dst>()
|
||||
| --------------- required by a bound in this
|
||||
| --------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context>
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
|
||||
@ -265,7 +265,7 @@ note: required by a bound in `is_transmutable`
|
||||
--> $DIR/numbers.rs:12:14
|
||||
|
|
||||
LL | pub fn is_transmutable<Src, Dst>()
|
||||
| --------------- required by a bound in this
|
||||
| --------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context>
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
|
||||
@ -281,7 +281,7 @@ note: required by a bound in `is_transmutable`
|
||||
--> $DIR/numbers.rs:12:14
|
||||
|
|
||||
LL | pub fn is_transmutable<Src, Dst>()
|
||||
| --------------- required by a bound in this
|
||||
| --------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context>
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
|
||||
@ -297,7 +297,7 @@ note: required by a bound in `is_transmutable`
|
||||
--> $DIR/numbers.rs:12:14
|
||||
|
|
||||
LL | pub fn is_transmutable<Src, Dst>()
|
||||
| --------------- required by a bound in this
|
||||
| --------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context>
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
|
||||
@ -313,7 +313,7 @@ note: required by a bound in `is_transmutable`
|
||||
--> $DIR/numbers.rs:12:14
|
||||
|
|
||||
LL | pub fn is_transmutable<Src, Dst>()
|
||||
| --------------- required by a bound in this
|
||||
| --------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context>
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
|
||||
@ -329,7 +329,7 @@ note: required by a bound in `is_transmutable`
|
||||
--> $DIR/numbers.rs:12:14
|
||||
|
|
||||
LL | pub fn is_transmutable<Src, Dst>()
|
||||
| --------------- required by a bound in this
|
||||
| --------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context>
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
|
||||
@ -345,7 +345,7 @@ note: required by a bound in `is_transmutable`
|
||||
--> $DIR/numbers.rs:12:14
|
||||
|
|
||||
LL | pub fn is_transmutable<Src, Dst>()
|
||||
| --------------- required by a bound in this
|
||||
| --------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context>
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
|
||||
@ -361,7 +361,7 @@ note: required by a bound in `is_transmutable`
|
||||
--> $DIR/numbers.rs:12:14
|
||||
|
|
||||
LL | pub fn is_transmutable<Src, Dst>()
|
||||
| --------------- required by a bound in this
|
||||
| --------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context>
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
|
||||
@ -377,7 +377,7 @@ note: required by a bound in `is_transmutable`
|
||||
--> $DIR/numbers.rs:12:14
|
||||
|
|
||||
LL | pub fn is_transmutable<Src, Dst>()
|
||||
| --------------- required by a bound in this
|
||||
| --------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context>
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
|
||||
@ -393,7 +393,7 @@ note: required by a bound in `is_transmutable`
|
||||
--> $DIR/numbers.rs:12:14
|
||||
|
|
||||
LL | pub fn is_transmutable<Src, Dst>()
|
||||
| --------------- required by a bound in this
|
||||
| --------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context>
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
|
||||
@ -409,7 +409,7 @@ note: required by a bound in `is_transmutable`
|
||||
--> $DIR/numbers.rs:12:14
|
||||
|
|
||||
LL | pub fn is_transmutable<Src, Dst>()
|
||||
| --------------- required by a bound in this
|
||||
| --------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context>
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
|
||||
@ -425,7 +425,7 @@ note: required by a bound in `is_transmutable`
|
||||
--> $DIR/numbers.rs:12:14
|
||||
|
|
||||
LL | pub fn is_transmutable<Src, Dst>()
|
||||
| --------------- required by a bound in this
|
||||
| --------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context>
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
|
||||
@ -441,7 +441,7 @@ note: required by a bound in `is_transmutable`
|
||||
--> $DIR/numbers.rs:12:14
|
||||
|
|
||||
LL | pub fn is_transmutable<Src, Dst>()
|
||||
| --------------- required by a bound in this
|
||||
| --------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context>
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
|
||||
@ -457,7 +457,7 @@ note: required by a bound in `is_transmutable`
|
||||
--> $DIR/numbers.rs:12:14
|
||||
|
|
||||
LL | pub fn is_transmutable<Src, Dst>()
|
||||
| --------------- required by a bound in this
|
||||
| --------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context>
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
|
||||
@ -473,7 +473,7 @@ note: required by a bound in `is_transmutable`
|
||||
--> $DIR/numbers.rs:12:14
|
||||
|
|
||||
LL | pub fn is_transmutable<Src, Dst>()
|
||||
| --------------- required by a bound in this
|
||||
| --------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context>
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
|
||||
@ -489,7 +489,7 @@ note: required by a bound in `is_transmutable`
|
||||
--> $DIR/numbers.rs:12:14
|
||||
|
|
||||
LL | pub fn is_transmutable<Src, Dst>()
|
||||
| --------------- required by a bound in this
|
||||
| --------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context>
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
|
||||
@ -505,7 +505,7 @@ note: required by a bound in `is_transmutable`
|
||||
--> $DIR/numbers.rs:12:14
|
||||
|
|
||||
LL | pub fn is_transmutable<Src, Dst>()
|
||||
| --------------- required by a bound in this
|
||||
| --------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context>
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
|
||||
@ -521,7 +521,7 @@ note: required by a bound in `is_transmutable`
|
||||
--> $DIR/numbers.rs:12:14
|
||||
|
|
||||
LL | pub fn is_transmutable<Src, Dst>()
|
||||
| --------------- required by a bound in this
|
||||
| --------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context>
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
|
||||
@ -537,7 +537,7 @@ note: required by a bound in `is_transmutable`
|
||||
--> $DIR/numbers.rs:12:14
|
||||
|
|
||||
LL | pub fn is_transmutable<Src, Dst>()
|
||||
| --------------- required by a bound in this
|
||||
| --------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context>
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
|
||||
@ -553,7 +553,7 @@ note: required by a bound in `is_transmutable`
|
||||
--> $DIR/numbers.rs:12:14
|
||||
|
|
||||
LL | pub fn is_transmutable<Src, Dst>()
|
||||
| --------------- required by a bound in this
|
||||
| --------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context>
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
|
||||
@ -569,7 +569,7 @@ note: required by a bound in `is_transmutable`
|
||||
--> $DIR/numbers.rs:12:14
|
||||
|
|
||||
LL | pub fn is_transmutable<Src, Dst>()
|
||||
| --------------- required by a bound in this
|
||||
| --------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context>
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
|
||||
@ -585,7 +585,7 @@ note: required by a bound in `is_transmutable`
|
||||
--> $DIR/numbers.rs:12:14
|
||||
|
|
||||
LL | pub fn is_transmutable<Src, Dst>()
|
||||
| --------------- required by a bound in this
|
||||
| --------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context>
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
|
||||
@ -601,7 +601,7 @@ note: required by a bound in `is_transmutable`
|
||||
--> $DIR/numbers.rs:12:14
|
||||
|
|
||||
LL | pub fn is_transmutable<Src, Dst>()
|
||||
| --------------- required by a bound in this
|
||||
| --------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context>
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
|
||||
@ -617,7 +617,7 @@ note: required by a bound in `is_transmutable`
|
||||
--> $DIR/numbers.rs:12:14
|
||||
|
|
||||
LL | pub fn is_transmutable<Src, Dst>()
|
||||
| --------------- required by a bound in this
|
||||
| --------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context>
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
|
||||
@ -633,7 +633,7 @@ note: required by a bound in `is_transmutable`
|
||||
--> $DIR/numbers.rs:12:14
|
||||
|
|
||||
LL | pub fn is_transmutable<Src, Dst>()
|
||||
| --------------- required by a bound in this
|
||||
| --------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context>
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
|
||||
@ -649,7 +649,7 @@ note: required by a bound in `is_transmutable`
|
||||
--> $DIR/numbers.rs:12:14
|
||||
|
|
||||
LL | pub fn is_transmutable<Src, Dst>()
|
||||
| --------------- required by a bound in this
|
||||
| --------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context>
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
|
||||
@ -665,7 +665,7 @@ note: required by a bound in `is_transmutable`
|
||||
--> $DIR/numbers.rs:12:14
|
||||
|
|
||||
LL | pub fn is_transmutable<Src, Dst>()
|
||||
| --------------- required by a bound in this
|
||||
| --------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context>
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
|
||||
@ -681,7 +681,7 @@ note: required by a bound in `is_transmutable`
|
||||
--> $DIR/numbers.rs:12:14
|
||||
|
|
||||
LL | pub fn is_transmutable<Src, Dst>()
|
||||
| --------------- required by a bound in this
|
||||
| --------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context>
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
|
||||
@ -697,7 +697,7 @@ note: required by a bound in `is_transmutable`
|
||||
--> $DIR/numbers.rs:12:14
|
||||
|
|
||||
LL | pub fn is_transmutable<Src, Dst>()
|
||||
| --------------- required by a bound in this
|
||||
| --------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context>
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
|
||||
@ -713,7 +713,7 @@ note: required by a bound in `is_transmutable`
|
||||
--> $DIR/numbers.rs:12:14
|
||||
|
|
||||
LL | pub fn is_transmutable<Src, Dst>()
|
||||
| --------------- required by a bound in this
|
||||
| --------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context>
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
|
||||
@ -729,7 +729,7 @@ note: required by a bound in `is_transmutable`
|
||||
--> $DIR/numbers.rs:12:14
|
||||
|
|
||||
LL | pub fn is_transmutable<Src, Dst>()
|
||||
| --------------- required by a bound in this
|
||||
| --------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context>
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
|
||||
@ -745,7 +745,7 @@ note: required by a bound in `is_transmutable`
|
||||
--> $DIR/numbers.rs:12:14
|
||||
|
|
||||
LL | pub fn is_transmutable<Src, Dst>()
|
||||
| --------------- required by a bound in this
|
||||
| --------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context>
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
|
||||
@ -761,7 +761,7 @@ note: required by a bound in `is_transmutable`
|
||||
--> $DIR/numbers.rs:12:14
|
||||
|
|
||||
LL | pub fn is_transmutable<Src, Dst>()
|
||||
| --------------- required by a bound in this
|
||||
| --------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context>
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
|
||||
@ -777,7 +777,7 @@ note: required by a bound in `is_transmutable`
|
||||
--> $DIR/numbers.rs:12:14
|
||||
|
|
||||
LL | pub fn is_transmutable<Src, Dst>()
|
||||
| --------------- required by a bound in this
|
||||
| --------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context>
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
|
||||
@ -793,7 +793,7 @@ note: required by a bound in `is_transmutable`
|
||||
--> $DIR/numbers.rs:12:14
|
||||
|
|
||||
LL | pub fn is_transmutable<Src, Dst>()
|
||||
| --------------- required by a bound in this
|
||||
| --------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context>
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
|
||||
@ -809,7 +809,7 @@ note: required by a bound in `is_transmutable`
|
||||
--> $DIR/numbers.rs:12:14
|
||||
|
|
||||
LL | pub fn is_transmutable<Src, Dst>()
|
||||
| --------------- required by a bound in this
|
||||
| --------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context>
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
|
||||
@ -825,7 +825,7 @@ note: required by a bound in `is_transmutable`
|
||||
--> $DIR/numbers.rs:12:14
|
||||
|
|
||||
LL | pub fn is_transmutable<Src, Dst>()
|
||||
| --------------- required by a bound in this
|
||||
| --------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context>
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
|
||||
@ -841,7 +841,7 @@ note: required by a bound in `is_transmutable`
|
||||
--> $DIR/numbers.rs:12:14
|
||||
|
|
||||
LL | pub fn is_transmutable<Src, Dst>()
|
||||
| --------------- required by a bound in this
|
||||
| --------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context>
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
|
||||
@ -857,7 +857,7 @@ note: required by a bound in `is_transmutable`
|
||||
--> $DIR/numbers.rs:12:14
|
||||
|
|
||||
LL | pub fn is_transmutable<Src, Dst>()
|
||||
| --------------- required by a bound in this
|
||||
| --------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context>
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
|
||||
@ -873,7 +873,7 @@ note: required by a bound in `is_transmutable`
|
||||
--> $DIR/numbers.rs:12:14
|
||||
|
|
||||
LL | pub fn is_transmutable<Src, Dst>()
|
||||
| --------------- required by a bound in this
|
||||
| --------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context>
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
|
||||
@ -889,7 +889,7 @@ note: required by a bound in `is_transmutable`
|
||||
--> $DIR/numbers.rs:12:14
|
||||
|
|
||||
LL | pub fn is_transmutable<Src, Dst>()
|
||||
| --------------- required by a bound in this
|
||||
| --------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context>
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
|
||||
@ -905,7 +905,7 @@ note: required by a bound in `is_transmutable`
|
||||
--> $DIR/numbers.rs:12:14
|
||||
|
|
||||
LL | pub fn is_transmutable<Src, Dst>()
|
||||
| --------------- required by a bound in this
|
||||
| --------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context>
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
|
||||
|
@ -9,7 +9,7 @@ note: required by a bound in `is_transmutable`
|
||||
--> $DIR/unit.rs:12:14
|
||||
|
|
||||
LL | pub fn is_transmutable<Src, Dst, Context>()
|
||||
| --------------- required by a bound in this
|
||||
| --------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context, {
|
||||
| ______________^
|
||||
|
@ -9,7 +9,7 @@ note: required by a bound in `is_maybe_transmutable`
|
||||
--> $DIR/references.rs:13:14
|
||||
|
|
||||
LL | pub fn is_maybe_transmutable<Src, Dst>()
|
||||
| --------------------- required by a bound in this
|
||||
| --------------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context, {
|
||||
| ______________^
|
||||
|
@ -9,7 +9,7 @@ note: required by a bound in `is_maybe_transmutable`
|
||||
--> $DIR/should_require_well_defined_layout.rs:13:14
|
||||
|
|
||||
LL | pub fn is_maybe_transmutable<Src, Dst>()
|
||||
| --------------------- required by a bound in this
|
||||
| --------------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context, {
|
||||
| ______________^
|
||||
@ -32,7 +32,7 @@ note: required by a bound in `is_maybe_transmutable`
|
||||
--> $DIR/should_require_well_defined_layout.rs:13:14
|
||||
|
|
||||
LL | pub fn is_maybe_transmutable<Src, Dst>()
|
||||
| --------------------- required by a bound in this
|
||||
| --------------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context, {
|
||||
| ______________^
|
||||
@ -55,7 +55,7 @@ note: required by a bound in `is_maybe_transmutable`
|
||||
--> $DIR/should_require_well_defined_layout.rs:13:14
|
||||
|
|
||||
LL | pub fn is_maybe_transmutable<Src, Dst>()
|
||||
| --------------------- required by a bound in this
|
||||
| --------------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context, {
|
||||
| ______________^
|
||||
@ -78,7 +78,7 @@ note: required by a bound in `is_maybe_transmutable`
|
||||
--> $DIR/should_require_well_defined_layout.rs:13:14
|
||||
|
|
||||
LL | pub fn is_maybe_transmutable<Src, Dst>()
|
||||
| --------------------- required by a bound in this
|
||||
| --------------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context, {
|
||||
| ______________^
|
||||
@ -101,7 +101,7 @@ note: required by a bound in `is_maybe_transmutable`
|
||||
--> $DIR/should_require_well_defined_layout.rs:13:14
|
||||
|
|
||||
LL | pub fn is_maybe_transmutable<Src, Dst>()
|
||||
| --------------------- required by a bound in this
|
||||
| --------------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context, {
|
||||
| ______________^
|
||||
@ -124,7 +124,7 @@ note: required by a bound in `is_maybe_transmutable`
|
||||
--> $DIR/should_require_well_defined_layout.rs:13:14
|
||||
|
|
||||
LL | pub fn is_maybe_transmutable<Src, Dst>()
|
||||
| --------------------- required by a bound in this
|
||||
| --------------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context, {
|
||||
| ______________^
|
||||
@ -147,7 +147,7 @@ note: required by a bound in `is_maybe_transmutable`
|
||||
--> $DIR/should_require_well_defined_layout.rs:13:14
|
||||
|
|
||||
LL | pub fn is_maybe_transmutable<Src, Dst>()
|
||||
| --------------------- required by a bound in this
|
||||
| --------------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context, {
|
||||
| ______________^
|
||||
@ -170,7 +170,7 @@ note: required by a bound in `is_maybe_transmutable`
|
||||
--> $DIR/should_require_well_defined_layout.rs:13:14
|
||||
|
|
||||
LL | pub fn is_maybe_transmutable<Src, Dst>()
|
||||
| --------------------- required by a bound in this
|
||||
| --------------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context, {
|
||||
| ______________^
|
||||
@ -193,7 +193,7 @@ note: required by a bound in `is_maybe_transmutable`
|
||||
--> $DIR/should_require_well_defined_layout.rs:13:14
|
||||
|
|
||||
LL | pub fn is_maybe_transmutable<Src, Dst>()
|
||||
| --------------------- required by a bound in this
|
||||
| --------------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context, {
|
||||
| ______________^
|
||||
@ -216,7 +216,7 @@ note: required by a bound in `is_maybe_transmutable`
|
||||
--> $DIR/should_require_well_defined_layout.rs:13:14
|
||||
|
|
||||
LL | pub fn is_maybe_transmutable<Src, Dst>()
|
||||
| --------------------- required by a bound in this
|
||||
| --------------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context, {
|
||||
| ______________^
|
||||
@ -239,7 +239,7 @@ note: required by a bound in `is_maybe_transmutable`
|
||||
--> $DIR/should_require_well_defined_layout.rs:13:14
|
||||
|
|
||||
LL | pub fn is_maybe_transmutable<Src, Dst>()
|
||||
| --------------------- required by a bound in this
|
||||
| --------------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context, {
|
||||
| ______________^
|
||||
@ -262,7 +262,7 @@ note: required by a bound in `is_maybe_transmutable`
|
||||
--> $DIR/should_require_well_defined_layout.rs:13:14
|
||||
|
|
||||
LL | pub fn is_maybe_transmutable<Src, Dst>()
|
||||
| --------------------- required by a bound in this
|
||||
| --------------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context, {
|
||||
| ______________^
|
||||
|
@ -9,7 +9,7 @@ note: required by a bound in `is_maybe_transmutable`
|
||||
--> $DIR/should_require_well_defined_layout.rs:13:14
|
||||
|
|
||||
LL | pub fn is_maybe_transmutable<Src, Dst>()
|
||||
| --------------------- required by a bound in this
|
||||
| --------------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context, {
|
||||
| ______________^
|
||||
@ -32,7 +32,7 @@ note: required by a bound in `is_maybe_transmutable`
|
||||
--> $DIR/should_require_well_defined_layout.rs:13:14
|
||||
|
|
||||
LL | pub fn is_maybe_transmutable<Src, Dst>()
|
||||
| --------------------- required by a bound in this
|
||||
| --------------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context, {
|
||||
| ______________^
|
||||
|
@ -9,7 +9,7 @@ note: required by a bound in `is_transmutable`
|
||||
--> $DIR/should_pad_variants.rs:13:14
|
||||
|
|
||||
LL | pub fn is_transmutable<Src, Dst, Context>()
|
||||
| --------------- required by a bound in this
|
||||
| --------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context, {
|
||||
| ______________^
|
||||
|
@ -9,7 +9,7 @@ note: required by a bound in `is_transmutable`
|
||||
--> $DIR/should_reject_contraction.rs:13:14
|
||||
|
|
||||
LL | pub fn is_transmutable<Src, Dst>()
|
||||
| --------------- required by a bound in this
|
||||
| --------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context, { Assume::SAFETY }>
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
|
||||
|
@ -9,7 +9,7 @@ note: required by a bound in `is_maybe_transmutable`
|
||||
--> $DIR/should_reject_disjoint.rs:13:14
|
||||
|
|
||||
LL | pub fn is_maybe_transmutable<Src, Dst>()
|
||||
| --------------------- required by a bound in this
|
||||
| --------------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context, { Assume::SAFETY.and(Assume::VALIDITY) }>
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_maybe_transmutable`
|
||||
@ -25,7 +25,7 @@ note: required by a bound in `is_maybe_transmutable`
|
||||
--> $DIR/should_reject_disjoint.rs:13:14
|
||||
|
|
||||
LL | pub fn is_maybe_transmutable<Src, Dst>()
|
||||
| --------------------- required by a bound in this
|
||||
| --------------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context, { Assume::SAFETY.and(Assume::VALIDITY) }>
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_maybe_transmutable`
|
||||
|
@ -9,7 +9,7 @@ note: required by a bound in `is_transmutable`
|
||||
--> $DIR/should_reject_intersecting.rs:14:14
|
||||
|
|
||||
LL | pub fn is_transmutable<Src, Dst>()
|
||||
| --------------- required by a bound in this
|
||||
| --------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context, { Assume::SAFETY }>
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
|
||||
@ -25,7 +25,7 @@ note: required by a bound in `is_transmutable`
|
||||
--> $DIR/should_reject_intersecting.rs:14:14
|
||||
|
|
||||
LL | pub fn is_transmutable<Src, Dst>()
|
||||
| --------------- required by a bound in this
|
||||
| --------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context, { Assume::SAFETY }>
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
|
||||
|
@ -9,7 +9,7 @@ note: required by a bound in `is_transmutable`
|
||||
--> $DIR/should_reject_if_dst_has_private_field.rs:13:14
|
||||
|
|
||||
LL | pub fn is_transmutable<Src, Dst, Context>()
|
||||
| --------------- required by a bound in this
|
||||
| --------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context> // safety is NOT assumed
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
|
||||
|
@ -9,7 +9,7 @@ note: required by a bound in `is_transmutable`
|
||||
--> $DIR/should_reject_if_dst_has_private_variant.rs:13:14
|
||||
|
|
||||
LL | pub fn is_transmutable<Src, Dst, Context>()
|
||||
| --------------- required by a bound in this
|
||||
| --------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context> // safety is NOT assumed
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
|
||||
|
@ -9,7 +9,7 @@ note: required by a bound in `is_transmutable`
|
||||
--> $DIR/should_reject_if_dst_has_unreachable_field.rs:15:14
|
||||
|
|
||||
LL | pub fn is_transmutable<Src, Dst, Context>()
|
||||
| --------------- required by a bound in this
|
||||
| --------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context> // safety is NOT assumed
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
|
||||
|
@ -21,7 +21,7 @@ note: required by a bound in `is_transmutable`
|
||||
--> $DIR/should_reject_if_dst_has_unreachable_ty.rs:15:14
|
||||
|
|
||||
LL | pub fn is_transmutable<Src, Dst, Context>()
|
||||
| --------------- required by a bound in this
|
||||
| --------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context> // safety is NOT assumed
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable`
|
||||
|
@ -9,7 +9,7 @@ note: required by a bound in `is_maybe_transmutable`
|
||||
--> $DIR/transmute-padding-ice.rs:11:14
|
||||
|
|
||||
LL | pub fn is_maybe_transmutable<Src, Dst>()
|
||||
| --------------------- required by a bound in this
|
||||
| --------------------- required by a bound in this function
|
||||
LL | where
|
||||
LL | Dst: BikeshedIntrinsicFrom<
|
||||
| ______________^
|
||||
|
@ -14,7 +14,7 @@ note: required by a bound in `foo`
|
||||
--> $DIR/unboxed-closures-infer-fn-once-move-from-projection.rs:4:14
|
||||
|
|
||||
LL | fn foo<F>(f: F)
|
||||
| --- required by a bound in this
|
||||
| --- required by a bound in this function
|
||||
LL | where F: Fn()
|
||||
| ^^^^ required by this bound in `foo`
|
||||
|
||||
|
@ -8,7 +8,7 @@ note: required by a bound in `Cast::cast`
|
||||
--> $DIR/issue-71659.rs:19:15
|
||||
|
|
||||
LL | fn cast<T: ?Sized>(&self) -> &T
|
||||
| ---- required by a bound in this
|
||||
| ---- required by a bound in this associated function
|
||||
LL | where
|
||||
LL | Self: CastTo<T>,
|
||||
| ^^^^^^^^^ required by this bound in `Cast::cast`
|
||||
|
@ -8,7 +8,7 @@ note: required by a bound in `called`
|
||||
--> $DIR/higher-ranked-fn-type.rs:12:25
|
||||
|
|
||||
LL | fn called()
|
||||
| ------ required by a bound in this
|
||||
| ------ required by a bound in this function
|
||||
LL | where
|
||||
LL | for<'b> fn(&'b ()): Foo,
|
||||
| ^^^ required by this bound in `called`
|
||||
|
@ -8,7 +8,7 @@ note: required by a bound in `called`
|
||||
--> $DIR/higher-ranked-fn-type.rs:12:25
|
||||
|
|
||||
LL | fn called()
|
||||
| ------ required by a bound in this
|
||||
| ------ required by a bound in this function
|
||||
LL | where
|
||||
LL | for<'b> fn(&'b ()): Foo,
|
||||
| ^^^ required by this bound in `called`
|
||||
|
Loading…
Reference in New Issue
Block a user