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

Rollup of 11 pull requests #58389

Merged
merged 24 commits into from
Feb 12, 2019
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
94c609c
Transition libserialize to 2018 edition
h-michael Feb 7, 2019
aa775a5
rustc-std-workspace-core => 2018
taiki-e Feb 8, 2019
36806b5
rustc-workspace-hack => 2018
taiki-e Feb 8, 2019
fe27623
librustc_typeck => 2018
taiki-e Feb 8, 2019
360e65d
Move some tests into the tests directory
taiki-e Feb 9, 2019
06b6304
Cleanup imports
taiki-e Feb 9, 2019
be71fcc
librustc_codegen_ssa => 2018
taiki-e Feb 9, 2019
0a16b87
Use ? in librustc macros
matthewjasper Feb 9, 2019
2be0993
Revert removed #![feature(nll)]
taiki-e Feb 10, 2019
c80466c
Remove two dead functions.
nnethercote Feb 11, 2019
34052a1
remove "experimental" wording from std::os::unix
euclio Feb 11, 2019
f996e2b
libarena => 2018
Centril Feb 2, 2019
0ce5129
libterm => 2018
Centril Feb 3, 2019
3dbb31e
Rollup merge of #58105 - Centril:libarena-trans-2018, r=oli-obk
Centril Feb 12, 2019
3ca1b70
Rollup merge of #58111 - Centril:libterm-2018, r=oli-obk
Centril Feb 12, 2019
95ffa78
Rollup merge of #58287 - taiki-e:rustc-std-workspace-core-2018, r=ale…
Centril Feb 12, 2019
b8fe6f9
Rollup merge of #58288 - taiki-e:rustc-workspace-hack-2018, r=alexcri…
Centril Feb 12, 2019
a84c933
Rollup merge of #58300 - taiki-e:librustc_typeck-2018, r=petrochenkov
Centril Feb 12, 2019
d943453
Rollup merge of #58313 - matthewjasper:use-question-in-macros, r=oli-obk
Centril Feb 12, 2019
308c07b
Rollup merge of #58318 - taiki-e:libserialize-2018, r=Centril
Centril Feb 12, 2019
4f2d0cf
Rollup merge of #58322 - taiki-e:librustc_codegen_ssa-2018, r=petroch…
Centril Feb 12, 2019
f04d085
Rollup merge of #58342 - taiki-e:nll, r=matthewjasper
Centril Feb 12, 2019
5dc5712
Rollup merge of #58367 - nnethercote:rm-two-dead-funcs, r=alexcrichton
Centril Feb 12, 2019
33d2c9f
Rollup merge of #58382 - euclio:unix-ext, r=dtolnay
Centril Feb 12, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/librustc_typeck/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
authors = ["The Rust Project Developers"]
name = "rustc_typeck"
version = "0.0.0"
edition = "2018"

[lib]
name = "rustc_typeck"
Expand All @@ -14,7 +15,7 @@ arena = { path = "../libarena" }
log = "0.4"
rustc = { path = "../librustc" }
rustc_data_structures = { path = "../librustc_data_structures" }
rustc_errors = { path = "../librustc_errors" }
errors = { path = "../librustc_errors", package = "rustc_errors" }
rustc_target = { path = "../librustc_target" }
smallvec = { version = "0.6.7", features = ["union", "may_dangle"] }
syntax = { path = "../libsyntax" }
Expand Down
20 changes: 10 additions & 10 deletions src/librustc_typeck/astconv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
//! instance of `AstConv`.

use errors::{Applicability, DiagnosticId};
use hir::{self, GenericArg, GenericArgs};
use hir::def::Def;
use hir::def_id::DefId;
use hir::HirVec;
use lint;
use middle::resolve_lifetime as rl;
use namespace::Namespace;
use crate::hir::{self, GenericArg, GenericArgs};
use crate::hir::def::Def;
use crate::hir::def_id::DefId;
use crate::hir::HirVec;
use crate::lint;
use crate::middle::resolve_lifetime as rl;
use crate::namespace::Namespace;
use rustc::lint::builtin::AMBIGUOUS_ASSOCIATED_ITEMS;
use rustc::traits;
use rustc::ty::{self, Ty, TyCtxt, ToPredicate, TypeFoldable};
Expand All @@ -18,15 +18,15 @@ use rustc::ty::subst::{Kind, Subst, Substs};
use rustc::ty::wf::object_region_bounds;
use rustc_data_structures::sync::Lrc;
use rustc_target::spec::abi;
use require_c_abi_if_variadic;
use crate::require_c_abi_if_variadic;
use smallvec::SmallVec;
use syntax::ast;
use syntax::feature_gate::{GateIssue, emit_feature_err};
use syntax::ptr::P;
use syntax::util::lev_distance::find_best_match_for_name;
use syntax_pos::{DUMMY_SP, Span, MultiSpan};
use util::common::ErrorReported;
use util::nodemap::FxHashMap;
use crate::util::common::ErrorReported;
use crate::util::nodemap::FxHashMap;

use std::collections::BTreeSet;
use std::iter;
Expand Down
6 changes: 3 additions & 3 deletions src/librustc_typeck/check/_match.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use check::{FnCtxt, Expectation, Diverges, Needs};
use check::coercion::CoerceMany;
use crate::check::{FnCtxt, Expectation, Diverges, Needs};
use crate::check::coercion::CoerceMany;
use crate::util::nodemap::FxHashMap;
use errors::Applicability;
use rustc::hir::{self, PatKind};
use rustc::hir::def::{Def, CtorKind};
Expand All @@ -13,7 +14,6 @@ use syntax::source_map::Spanned;
use syntax::ptr::P;
use syntax::util::lev_distance::find_best_match_for_name;
use syntax_pos::Span;
use util::nodemap::FxHashMap;

use std::collections::hash_map::Entry::{Occupied, Vacant};
use std::cmp;
Expand Down
8 changes: 4 additions & 4 deletions src/librustc_typeck/check/cast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
use super::FnCtxt;

use errors::{DiagnosticBuilder,Applicability};
use hir::def_id::DefId;
use lint;
use crate::hir::def_id::DefId;
use crate::lint;
use rustc::hir;
use rustc::session::Session;
use rustc::traits;
Expand All @@ -43,7 +43,7 @@ use rustc::ty::subst::Substs;
use rustc::middle::lang_items;
use syntax::ast;
use syntax_pos::Span;
use util::common::ErrorReported;
use crate::util::common::ErrorReported;

/// Reifies a cast check to be checked once we have full type information for
/// a function context.
Expand Down Expand Up @@ -294,7 +294,7 @@ impl<'a, 'gcx, 'tcx> CastCheck<'tcx> {
.emit();
}
CastError::SizedUnsizedCast => {
use structured_errors::{SizedUnsizedCastError, StructuredDiagnostic};
use crate::structured_errors::{SizedUnsizedCastError, StructuredDiagnostic};
SizedUnsizedCastError::new(&fcx.tcx.sess,
self.span,
self.expr_ty,
Expand Down
4 changes: 2 additions & 2 deletions src/librustc_typeck/check/closure.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

use super::{check_fn, Expectation, FnCtxt, GeneratorTypes};

use astconv::AstConv;
use middle::region;
use crate::astconv::AstConv;
use crate::middle::region;
use rustc::hir::def_id::DefId;
use rustc::infer::{InferOk, InferResult};
use rustc::infer::LateBoundRegionConversionTime;
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_typeck/check/coercion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
//! sort of a minor point so I've opted to leave it for later---after all
//! we may want to adjust precisely when coercions occur.

use check::{FnCtxt, Needs};
use crate::check::{FnCtxt, Needs};
use errors::DiagnosticBuilder;
use rustc::hir;
use rustc::hir::def_id::DefId;
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_typeck/check/demand.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use check::FnCtxt;
use crate::check::FnCtxt;
use rustc::infer::InferOk;
use rustc::traits::{ObligationCause, ObligationCauseCode};

Expand Down
6 changes: 3 additions & 3 deletions src/librustc_typeck/check/dropck.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
use check::regionck::RegionCtxt;
use crate::check::regionck::RegionCtxt;

use hir::def_id::DefId;
use crate::hir::def_id::DefId;
use rustc::infer::outlives::env::OutlivesEnvironment;
use rustc::infer::{self, InferOk, SuppressRegionErrors};
use rustc::middle::region;
use rustc::traits::{ObligationCause, TraitEngine, TraitEngineExt};
use rustc::ty::subst::{Subst, Substs, UnpackedKind};
use rustc::ty::{self, Ty, TyCtxt};
use util::common::ErrorReported;
use crate::util::common::ErrorReported;

use syntax::ast;
use syntax_pos::Span;
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_typeck/check/generator_interior.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use rustc::ty::{self, Ty};
use rustc_data_structures::sync::Lrc;
use syntax_pos::Span;
use super::FnCtxt;
use util::nodemap::FxHashMap;
use crate::util::nodemap::FxHashMap;

struct InteriorVisitor<'a, 'gcx: 'a+'tcx, 'tcx: 'a> {
fcx: &'a FnCtxt<'a, 'gcx, 'tcx>,
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_typeck/check/intrinsic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
use rustc::traits::{ObligationCause, ObligationCauseCode};
use rustc::ty::{self, TyCtxt, Ty};
use rustc::ty::subst::Subst;
use require_same_types;
use crate::require_same_types;

use rustc_target::spec::abi::Abi;
use syntax::symbol::Symbol;
Expand Down
8 changes: 4 additions & 4 deletions src/librustc_typeck/check/method/confirm.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
use super::{probe, MethodCallee};

use astconv::AstConv;
use check::{FnCtxt, PlaceOp, callee, Needs};
use hir::GenericArg;
use hir::def_id::DefId;
use crate::astconv::AstConv;
use crate::check::{FnCtxt, PlaceOp, callee, Needs};
use crate::hir::GenericArg;
use crate::hir::def_id::DefId;
use rustc::ty::subst::Substs;
use rustc::traits;
use rustc::ty::{self, Ty, GenericParamDefKind};
Expand Down
6 changes: 3 additions & 3 deletions src/librustc_typeck/check/method/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ pub use self::MethodError::*;
pub use self::CandidateSource::*;
pub use self::suggest::{SelfSource, TraitInfo};

use check::FnCtxt;
use crate::check::FnCtxt;
use crate::namespace::Namespace;
use errors::{Applicability, DiagnosticBuilder};
use namespace::Namespace;
use rustc_data_structures::sync::Lrc;
use rustc::hir;
use rustc::hir::def::Def;
Expand All @@ -29,7 +29,7 @@ use syntax_pos::Span;
use crate::{check_type_alias_enum_variants_enabled};
use self::probe::{IsSuggestion, ProbeScope};

pub fn provide(providers: &mut ty::query::Providers) {
pub fn provide(providers: &mut ty::query::Providers<'_>) {
suggest::provide(providers);
probe::provide(providers);
}
Expand Down
10 changes: 5 additions & 5 deletions src/librustc_typeck/check/method/probe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ use super::NoMatchData;
use super::{CandidateSource, ImplSource, TraitSource};
use super::suggest;

use check::autoderef::{self, Autoderef};
use check::FnCtxt;
use hir::def_id::DefId;
use hir::def::Def;
use namespace::Namespace;
use crate::check::autoderef::{self, Autoderef};
use crate::check::FnCtxt;
use crate::hir::def_id::DefId;
use crate::hir::def::Def;
use crate::namespace::Namespace;

use rustc_data_structures::sync::Lrc;
use rustc::hir;
Expand Down
8 changes: 4 additions & 4 deletions src/librustc_typeck/check/method/suggest.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
//! Give useful errors and suggestions to users when an item can't be
//! found or is otherwise invalid.

use check::FnCtxt;
use crate::check::FnCtxt;
use crate::middle::lang_items::FnOnceTraitLangItem;
use crate::namespace::Namespace;
use crate::util::nodemap::FxHashSet;
use errors::{Applicability, DiagnosticBuilder};
use middle::lang_items::FnOnceTraitLangItem;
use namespace::Namespace;
use rustc_data_structures::sync::Lrc;
use rustc::hir::{self, ExprKind, Node, QPath};
use rustc::hir::def::Def;
Expand All @@ -15,7 +16,6 @@ use rustc::infer::type_variable::TypeVariableOrigin;
use rustc::traits::Obligation;
use rustc::ty::{self, Adt, Ty, TyCtxt, ToPolyTraitRef, ToPredicate, TypeFoldable};
use rustc::ty::item_path::with_crate_prefix;
use util::nodemap::FxHashSet;
use syntax_pos::{Span, FileName};
use syntax::ast;
use syntax::util::lev_distance::find_best_match_for_name;
Expand Down
32 changes: 16 additions & 16 deletions src/librustc_typeck/check/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,15 @@ mod generator_interior;
pub mod intrinsic;
mod op;

use astconv::{AstConv, PathSeg};
use crate::astconv::{AstConv, PathSeg};
use errors::{Applicability, DiagnosticBuilder, DiagnosticId};
use rustc::hir::{self, ExprKind, GenericArg, ItemKind, Node, PatKind, QPath};
use rustc::hir::def::{CtorKind, Def};
use rustc::hir::def_id::{CrateNum, DefId, LOCAL_CRATE};
use rustc::hir::intravisit::{self, Visitor, NestedVisitorMap};
use rustc::hir::itemlikevisit::ItemLikeVisitor;
use middle::lang_items;
use namespace::Namespace;
use crate::middle::lang_items;
use crate::namespace::Namespace;
use rustc::infer::{self, InferCtxt, InferOk, InferResult, RegionVariableOrigin};
use rustc::infer::canonical::{Canonical, OriginalQueryValues, QueryResponse};
use rustc_data_structures::indexed_vec::Idx;
Expand Down Expand Up @@ -130,14 +130,14 @@ use std::mem::replace;
use std::ops::{self, Deref};
use std::slice;

use require_c_abi_if_variadic;
use session::{CompileIncomplete, Session};
use session::config::EntryFnType;
use TypeAndSubsts;
use lint;
use util::captures::Captures;
use util::common::{ErrorReported, indenter};
use util::nodemap::{DefIdMap, DefIdSet, FxHashMap, FxHashSet, NodeMap};
use crate::require_c_abi_if_variadic;
use crate::session::{CompileIncomplete, Session};
use crate::session::config::EntryFnType;
use crate::TypeAndSubsts;
use crate::lint;
use crate::util::captures::Captures;
use crate::util::common::{ErrorReported, indenter};
use crate::util::nodemap::{DefIdMap, DefIdSet, FxHashMap, FxHashSet, NodeMap};

pub use self::Expectation::*;
use self::autoderef::Autoderef;
Expand Down Expand Up @@ -3044,7 +3044,7 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
// arguments which we skipped above.
if variadic {
fn variadic_error<'tcx>(s: &Session, span: Span, t: Ty<'tcx>, cast_ty: &str) {
use structured_errors::{VariadicError, StructuredDiagnostic};
use crate::structured_errors::{VariadicError, StructuredDiagnostic};
VariadicError::new(s, span, t, cast_ty).diagnostic().emit();
}

Expand Down Expand Up @@ -3685,8 +3685,8 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
display
}

fn no_such_field_err<T: Display>(&self, span: Span, field: T, expr_t: &ty::TyS)
-> DiagnosticBuilder {
fn no_such_field_err<T: Display>(&self, span: Span, field: T, expr_t: &ty::TyS<'_>)
-> DiagnosticBuilder<'_> {
type_error_struct!(self.tcx().sess, span, expr_t, E0609,
"no field `{}` on type `{}`",
field, expr_t)
Expand Down Expand Up @@ -5257,7 +5257,7 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
&self,
blk: &'gcx hir::Block,
expected_ty: Ty<'tcx>,
err: &mut DiagnosticBuilder,
err: &mut DiagnosticBuilder<'_>,
) {
if let Some(span_semi) = self.could_remove_semicolon(blk, expected_ty) {
err.span_suggestion(
Expand Down Expand Up @@ -5725,7 +5725,7 @@ fn fatally_break_rust(sess: &Session) {
);
handler.note_without_error(&format!("rustc {} running on {}",
option_env!("CFG_VERSION").unwrap_or("unknown_version"),
::session::config::host_triple(),
crate::session::config::host_triple(),
));
}

Expand Down
10 changes: 5 additions & 5 deletions src/librustc_typeck/check/regionck.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,11 @@
//! relation, except that a borrowed pointer never owns its
//! contents.

use check::dropck;
use check::FnCtxt;
use middle::mem_categorization as mc;
use middle::mem_categorization::Categorization;
use middle::region;
use crate::check::dropck;
use crate::check::FnCtxt;
use crate::middle::mem_categorization as mc;
use crate::middle::mem_categorization::Categorization;
use crate::middle::region;
use rustc::hir::def_id::DefId;
use rustc::infer::outlives::env::OutlivesEnvironment;
use rustc::infer::{self, RegionObligation, SuppressRegionErrors};
Expand Down
6 changes: 3 additions & 3 deletions src/librustc_typeck/check/upvar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@

use super::FnCtxt;

use middle::expr_use_visitor as euv;
use middle::mem_categorization as mc;
use middle::mem_categorization::Categorization;
use crate::middle::expr_use_visitor as euv;
use crate::middle::mem_categorization as mc;
use crate::middle::mem_categorization::Categorization;
use rustc::hir;
use rustc::hir::def_id::DefId;
use rustc::hir::def_id::LocalDefId;
Expand Down
6 changes: 3 additions & 3 deletions src/librustc_typeck/check/wfcheck.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use check::{Inherited, FnCtxt};
use constrained_type_params::{identify_constrained_type_params, Parameter};
use crate::check::{Inherited, FnCtxt};
use crate::constrained_type_params::{identify_constrained_type_params, Parameter};

use hir::def_id::DefId;
use crate::hir::def_id::DefId;
use rustc::traits::{self, ObligationCauseCode};
use rustc::ty::{self, Lift, Ty, TyCtxt, TyKind, GenericParamDefKind, TypeFoldable, ToPredicate};
use rustc::ty::subst::{Subst, Substs};
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_typeck/check/writeback.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// unresolved type variables and replaces "ty_var" types with their
// substitutions.

use check::FnCtxt;
use crate::check::FnCtxt;
use errors::DiagnosticBuilder;
use rustc::hir;
use rustc::hir::def_id::{DefId, DefIndex};
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_typeck/check_unused.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use lint;
use crate::lint;
use rustc::ty::TyCtxt;

use errors::Applicability;
Expand Down
4 changes: 2 additions & 2 deletions src/librustc_typeck/coherence/inherent_impls_overlap.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
use namespace::Namespace;
use crate::namespace::Namespace;
use rustc::hir::def_id::{CrateNum, DefId, LOCAL_CRATE};
use rustc::hir;
use rustc::hir::itemlikevisit::ItemLikeVisitor;
use rustc::traits::{self, IntercrateMode};
use rustc::ty::TyCtxt;

use lint;
use crate::lint;

pub fn crate_inherent_impls_overlap_check<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
crate_num: CrateNum) {
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_typeck/coherence/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// done by the orphan and overlap modules. Then we build up various
// mappings. That mapping code resides here.

use hir::def_id::{DefId, LOCAL_CRATE};
use crate::hir::def_id::{DefId, LOCAL_CRATE};
use rustc::traits;
use rustc::ty::{self, TyCtxt, TypeFoldable};
use rustc::ty::query::Providers;
Expand Down
Loading