update TypeFlags
to deal with missing ct substs
This commit is contained in:
parent
cc47998e28
commit
ab9108b70f
44 changed files with 305 additions and 166 deletions
|
@ -1656,7 +1656,7 @@ impl<'tcx> LateLintPass<'tcx> for TrivialConstraints {
|
|||
ConstEquate(..) |
|
||||
TypeWellFormedFromEnv(..) => continue,
|
||||
};
|
||||
if predicate.is_global() {
|
||||
if predicate.is_global(cx.tcx) {
|
||||
cx.struct_span_lint(TRIVIAL_BOUNDS, span, |lint| {
|
||||
lint.build(&format!(
|
||||
"{} bound {} does not depend on any type \
|
||||
|
|
|
@ -62,7 +62,7 @@ impl<'tcx> LateLintPass<'tcx> for NoopMethodCall {
|
|||
_ => return,
|
||||
};
|
||||
let substs = cx.typeck_results().node_substs(expr.hir_id);
|
||||
if substs.needs_subst() {
|
||||
if substs.needs_subst(cx.tcx) {
|
||||
// We can't resolve on types that require monomorphization, so we don't handle them if
|
||||
// we need to perfom substitution.
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue