Skip to content

Commit a84c933

Browse files
authored
Rollup merge of rust-lang#58300 - taiki-e:librustc_typeck-2018, r=petrochenkov
librustc_typeck => 2018 Transitions `librustc_typeck` to Rust 2018; cc rust-lang#58099 TODO: elided_lifetimes_in_paths r? @Centril
2 parents b8fe6f9 + fe27623 commit a84c933

30 files changed

+98
-100
lines changed

src/librustc_typeck/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
authors = ["The Rust Project Developers"]
33
name = "rustc_typeck"
44
version = "0.0.0"
5+
edition = "2018"
56

67
[lib]
78
name = "rustc_typeck"
@@ -14,7 +15,7 @@ arena = { path = "../libarena" }
1415
log = "0.4"
1516
rustc = { path = "../librustc" }
1617
rustc_data_structures = { path = "../librustc_data_structures" }
17-
rustc_errors = { path = "../librustc_errors" }
18+
errors = { path = "../librustc_errors", package = "rustc_errors" }
1819
rustc_target = { path = "../librustc_target" }
1920
smallvec = { version = "0.6.7", features = ["union", "may_dangle"] }
2021
syntax = { path = "../libsyntax" }

src/librustc_typeck/astconv.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
//! instance of `AstConv`.
44
55
use errors::{Applicability, DiagnosticId};
6-
use hir::{self, GenericArg, GenericArgs};
7-
use hir::def::Def;
8-
use hir::def_id::DefId;
9-
use hir::HirVec;
10-
use lint;
11-
use middle::resolve_lifetime as rl;
12-
use namespace::Namespace;
6+
use crate::hir::{self, GenericArg, GenericArgs};
7+
use crate::hir::def::Def;
8+
use crate::hir::def_id::DefId;
9+
use crate::hir::HirVec;
10+
use crate::lint;
11+
use crate::middle::resolve_lifetime as rl;
12+
use crate::namespace::Namespace;
1313
use rustc::lint::builtin::AMBIGUOUS_ASSOCIATED_ITEMS;
1414
use rustc::traits;
1515
use rustc::ty::{self, Ty, TyCtxt, ToPredicate, TypeFoldable};
@@ -18,15 +18,15 @@ use rustc::ty::subst::{Kind, Subst, Substs};
1818
use rustc::ty::wf::object_region_bounds;
1919
use rustc_data_structures::sync::Lrc;
2020
use rustc_target::spec::abi;
21-
use require_c_abi_if_variadic;
21+
use crate::require_c_abi_if_variadic;
2222
use smallvec::SmallVec;
2323
use syntax::ast;
2424
use syntax::feature_gate::{GateIssue, emit_feature_err};
2525
use syntax::ptr::P;
2626
use syntax::util::lev_distance::find_best_match_for_name;
2727
use syntax_pos::{DUMMY_SP, Span, MultiSpan};
28-
use util::common::ErrorReported;
29-
use util::nodemap::FxHashMap;
28+
use crate::util::common::ErrorReported;
29+
use crate::util::nodemap::FxHashMap;
3030

3131
use std::collections::BTreeSet;
3232
use std::iter;

src/librustc_typeck/check/_match.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
use check::{FnCtxt, Expectation, Diverges, Needs};
2-
use check::coercion::CoerceMany;
1+
use crate::check::{FnCtxt, Expectation, Diverges, Needs};
2+
use crate::check::coercion::CoerceMany;
3+
use crate::util::nodemap::FxHashMap;
34
use errors::Applicability;
45
use rustc::hir::{self, PatKind};
56
use rustc::hir::def::{Def, CtorKind};
@@ -13,7 +14,6 @@ use syntax::source_map::Spanned;
1314
use syntax::ptr::P;
1415
use syntax::util::lev_distance::find_best_match_for_name;
1516
use syntax_pos::Span;
16-
use util::nodemap::FxHashMap;
1717

1818
use std::collections::hash_map::Entry::{Occupied, Vacant};
1919
use std::cmp;

src/librustc_typeck/check/cast.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@
3131
use super::FnCtxt;
3232

3333
use errors::{DiagnosticBuilder,Applicability};
34-
use hir::def_id::DefId;
35-
use lint;
34+
use crate::hir::def_id::DefId;
35+
use crate::lint;
3636
use rustc::hir;
3737
use rustc::session::Session;
3838
use rustc::traits;
@@ -43,7 +43,7 @@ use rustc::ty::subst::Substs;
4343
use rustc::middle::lang_items;
4444
use syntax::ast;
4545
use syntax_pos::Span;
46-
use util::common::ErrorReported;
46+
use crate::util::common::ErrorReported;
4747

4848
/// Reifies a cast check to be checked once we have full type information for
4949
/// a function context.
@@ -294,7 +294,7 @@ impl<'a, 'gcx, 'tcx> CastCheck<'tcx> {
294294
.emit();
295295
}
296296
CastError::SizedUnsizedCast => {
297-
use structured_errors::{SizedUnsizedCastError, StructuredDiagnostic};
297+
use crate::structured_errors::{SizedUnsizedCastError, StructuredDiagnostic};
298298
SizedUnsizedCastError::new(&fcx.tcx.sess,
299299
self.span,
300300
self.expr_ty,

src/librustc_typeck/check/closure.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
33
use super::{check_fn, Expectation, FnCtxt, GeneratorTypes};
44

5-
use astconv::AstConv;
6-
use middle::region;
5+
use crate::astconv::AstConv;
6+
use crate::middle::region;
77
use rustc::hir::def_id::DefId;
88
use rustc::infer::{InferOk, InferResult};
99
use rustc::infer::LateBoundRegionConversionTime;

src/librustc_typeck/check/coercion.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
//! sort of a minor point so I've opted to leave it for later---after all
5151
//! we may want to adjust precisely when coercions occur.
5252
53-
use check::{FnCtxt, Needs};
53+
use crate::check::{FnCtxt, Needs};
5454
use errors::DiagnosticBuilder;
5555
use rustc::hir;
5656
use rustc::hir::def_id::DefId;

src/librustc_typeck/check/demand.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use check::FnCtxt;
1+
use crate::check::FnCtxt;
22
use rustc::infer::InferOk;
33
use rustc::traits::{ObligationCause, ObligationCauseCode};
44

src/librustc_typeck/check/dropck.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
use check::regionck::RegionCtxt;
1+
use crate::check::regionck::RegionCtxt;
22

3-
use hir::def_id::DefId;
3+
use crate::hir::def_id::DefId;
44
use rustc::infer::outlives::env::OutlivesEnvironment;
55
use rustc::infer::{self, InferOk, SuppressRegionErrors};
66
use rustc::middle::region;
77
use rustc::traits::{ObligationCause, TraitEngine, TraitEngineExt};
88
use rustc::ty::subst::{Subst, Substs, UnpackedKind};
99
use rustc::ty::{self, Ty, TyCtxt};
10-
use util::common::ErrorReported;
10+
use crate::util::common::ErrorReported;
1111

1212
use syntax::ast;
1313
use syntax_pos::Span;

src/librustc_typeck/check/generator_interior.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use rustc::ty::{self, Ty};
1111
use rustc_data_structures::sync::Lrc;
1212
use syntax_pos::Span;
1313
use super::FnCtxt;
14-
use util::nodemap::FxHashMap;
14+
use crate::util::nodemap::FxHashMap;
1515

1616
struct InteriorVisitor<'a, 'gcx: 'a+'tcx, 'tcx: 'a> {
1717
fcx: &'a FnCtxt<'a, 'gcx, 'tcx>,

src/librustc_typeck/check/intrinsic.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
use rustc::traits::{ObligationCause, ObligationCauseCode};
55
use rustc::ty::{self, TyCtxt, Ty};
66
use rustc::ty::subst::Subst;
7-
use require_same_types;
7+
use crate::require_same_types;
88

99
use rustc_target::spec::abi::Abi;
1010
use syntax::symbol::Symbol;

0 commit comments

Comments
 (0)