Skip to content

Commit

Permalink
Auto merge of #64754 - Centril:rollup-iwtb5xd, r=Centril
Browse files Browse the repository at this point in the history
Rollup of 7 pull requests

Successful merges:

 - #64324 (rustc: Fix mixing crates with different `share_generics`)
 - #64428 (Error explanation e0524)
 - #64481 (A more explanatory thread local storage panic message)
 - #64599 (Rustdoc render async function re-export)
 - #64743 (Update cargo)
 - #64746 (Remove blanket silencing of "type annotation needed" errors)
 - #64753 (Don't emit explain with json short messages.)

Failed merges:

r? @ghost
  • Loading branch information
bors committed Sep 25, 2019
2 parents dcd473d + fa6dfc9 commit b7820b2
Show file tree
Hide file tree
Showing 93 changed files with 1,038 additions and 660 deletions.
47 changes: 34 additions & 13 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,7 @@ version = "0.40.0"
dependencies = [
"atty",
"bytesize",
"cargo-platform",
"cargo-test-macro",
"cargo-test-support",
"clap",
Expand All @@ -278,7 +279,7 @@ dependencies = [
"crypto-hash",
"curl",
"curl-sys",
"env_logger",
"env_logger 0.7.0",
"failure",
"filetime",
"flate2",
Expand Down Expand Up @@ -325,6 +326,13 @@ dependencies = [
"winapi 0.3.6",
]

[[package]]
name = "cargo-platform"
version = "0.1.0"
dependencies = [
"serde",
]

[[package]]
name = "cargo-test-macro"
version = "0.1.0"
Expand Down Expand Up @@ -526,7 +534,7 @@ name = "compiletest"
version = "0.0.0"
dependencies = [
"diff",
"env_logger",
"env_logger 0.6.2",
"getopts",
"lazy_static 1.3.0",
"libc",
Expand Down Expand Up @@ -938,6 +946,19 @@ dependencies = [
"termcolor",
]

[[package]]
name = "env_logger"
version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "39ecdb7dd54465526f0a56d666e3b2dd5f3a218665a030b6e4ad9e70fa95d8fa"
dependencies = [
"atty",
"humantime",
"log",
"regex",
"termcolor",
]

[[package]]
name = "error-chain"
version = "0.12.0"
Expand Down Expand Up @@ -1339,9 +1360,9 @@ checksum = "cd179ae861f0c2e53da70d892f5f3029f9594be0c41dc5269cd371691b1dc2f9"

[[package]]
name = "humantime"
version = "1.2.0"
version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3ca7e5f2e110db35f93b837c81797f3714500b81d517bf20c431b16d3ca4f114"
checksum = "df004cfca50ef23c36850aaaa59ad52cc70d0e90243c3c7737a4dd32dc7a3c4f"
dependencies = [
"quick-error",
]
Expand Down Expand Up @@ -1866,7 +1887,7 @@ dependencies = [
"chrono",
"clap",
"elasticlunr-rs",
"env_logger",
"env_logger 0.6.2",
"error-chain",
"handlebars",
"itertools 0.8.0",
Expand All @@ -1891,7 +1912,7 @@ version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "77d1f0ba4d1e6b86fa18e8853d026d7d76a97eb7eb5eb052ed80901e43b7fc10"
dependencies = [
"env_logger",
"env_logger 0.6.2",
"failure",
"log",
"mdbook",
Expand Down Expand Up @@ -2084,7 +2105,7 @@ dependencies = [
"colored",
"compiletest_rs",
"directories",
"env_logger",
"env_logger 0.6.2",
"getrandom",
"hex 0.3.2",
"log",
Expand Down Expand Up @@ -2493,7 +2514,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "df8b3f4e0475def7d9c2e5de8e5a1306949849761e107b360d03e98eafaffd61"
dependencies = [
"chrono",
"env_logger",
"env_logger 0.6.2",
"log",
]

Expand Down Expand Up @@ -2620,7 +2641,7 @@ dependencies = [
"bitflags",
"clap",
"derive_more",
"env_logger",
"env_logger 0.6.2",
"humantime",
"lazy_static 1.3.0",
"log",
Expand Down Expand Up @@ -2914,7 +2935,7 @@ dependencies = [
"clippy_lints",
"crossbeam-channel",
"difference",
"env_logger",
"env_logger 0.6.2",
"failure",
"futures",
"heck",
Expand Down Expand Up @@ -2998,7 +3019,7 @@ name = "rls-rustc"
version = "0.6.0"
dependencies = [
"clippy_lints",
"env_logger",
"env_logger 0.6.2",
"failure",
"futures",
"log",
Expand Down Expand Up @@ -3399,7 +3420,7 @@ dependencies = [
name = "rustc_driver"
version = "0.0.0"
dependencies = [
"env_logger",
"env_logger 0.6.2",
"graphviz",
"lazy_static 1.3.0",
"log",
Expand Down Expand Up @@ -3781,7 +3802,7 @@ dependencies = [
"derive-new",
"diff",
"dirs",
"env_logger",
"env_logger 0.6.2",
"failure",
"getopts",
"ignore",
Expand Down
4 changes: 1 addition & 3 deletions src/librustc/hir/lowering.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2184,9 +2184,7 @@ impl<'a> LoweringContext<'a> {
match decl.output {
FunctionRetTy::Ty(ref ty) => match in_band_ty_params {
Some((def_id, _)) if impl_trait_return_allow => {
hir::Return(self.lower_ty(ty,
ImplTraitContext::OpaqueTy(Some(def_id))
))
hir::Return(self.lower_ty(ty, ImplTraitContext::OpaqueTy(Some(def_id))))
}
_ => {
hir::Return(self.lower_ty(ty, ImplTraitContext::disallowed()))
Expand Down
13 changes: 12 additions & 1 deletion src/librustc/infer/opaque_types/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -988,7 +988,9 @@ impl<'a, 'tcx> Instantiator<'a, 'tcx> {
value.fold_with(&mut BottomUpFolder {
tcx,
ty_op: |ty| {
if let ty::Opaque(def_id, substs) = ty.sty {
if ty.references_error() {
return tcx.types.err;
} else if let ty::Opaque(def_id, substs) = ty.sty {
// Check that this is `impl Trait` type is
// declared by `parent_def_id` -- i.e., one whose
// value we are inferring. At present, this is
Expand Down Expand Up @@ -1155,6 +1157,15 @@ impl<'a, 'tcx> Instantiator<'a, 'tcx> {
);
debug!("instantiate_opaque_types: ty_var={:?}", ty_var);

for predicate in &bounds.predicates {
if let ty::Predicate::Projection(projection) = &predicate {
if projection.skip_binder().ty.references_error() {
// No point on adding these obligations since there's a type error involved.
return ty_var;
}
}
}

self.obligations.reserve(bounds.predicates.len());
for predicate in bounds.predicates {
// Change the predicate to refer to the type variable,
Expand Down
Loading

0 comments on commit b7820b2

Please sign in to comment.