Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rustup rust-lang/rust#58321 #3827

merged 1 commit into from Feb 27, 2019
Changes from all commits
File filter
Filter file types
Failed to load comments.
Jump to
Jump to file
Failed to load files.


Just for now

@@ -5,7 +5,7 @@ use if_chain::if_chain;
use rustc::hir::def::Def;
use rustc::hir::*;
use rustc::lint::LateContext;
use rustc::ty::subst::{Subst, Substs};
use rustc::ty::subst::{Subst, SubstsRef};
use rustc::ty::{self, Instance, Ty, TyCtxt};
use rustc::{bug, span_bug};
use rustc_data_structures::sync::Lrc;
@@ -209,7 +209,7 @@ pub struct ConstEvalLateContext<'a, 'tcx: 'a> {
tables: &'a ty::TypeckTables<'tcx>,
param_env: ty::ParamEnv<'tcx>,
needed_resolution: bool,
substs: &'tcx Substs<'tcx>,
substs: SubstsRef<'tcx>,

impl<'c, 'cc> ConstEvalLateContext<'c, 'cc> {
@@ -7,7 +7,7 @@ use rustc::hir::*;
use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass};
use rustc::mir::interpret::GlobalId;
use rustc::ty;
use rustc::ty::subst::Substs;
use rustc::ty::subst::InternalSubsts;
use rustc::ty::util::IntTypeExt;
use rustc::{declare_tool_lint, lint_array};
use syntax::ast::{IntTy, UintTy};
@@ -58,7 +58,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnportableVariant {
if let Some(ref anon_const) = variant.disr_expr {
let param_env = ty::ParamEnv::empty();
let def_id = cx.tcx.hir().body_owner_def_id(anon_const.body);
let substs = Substs::identity_for_item(cx.tcx.global_tcx(), def_id);
let substs = InternalSubsts::identity_for_item(cx.tcx.global_tcx(), def_id);
let instance = ty::Instance::new(def_id, substs);
let c_id = GlobalId {