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 7 pull requests #64754

Merged
merged 24 commits into from
Sep 25, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
df7789c
Made a thread local storage panic message more explanatory
tomtau Sep 14, 2019
68c3739
updated the panic message wording
tomtau Sep 16, 2019
2fd4c27
add is_async_fn query
csmoe Sep 19, 2019
9ffb1ce
append asyncness info to functions
csmoe Sep 19, 2019
a813cc1
rename is_async_fn to asyncness
csmoe Sep 21, 2019
726fe3b
add rustdoc test for async fn reexport
csmoe Sep 21, 2019
983e035
add long error explanation for E0524
GuillaumeGomez Sep 13, 2019
d2b873b
update ui tests
GuillaumeGomez Sep 13, 2019
5d531ae
rustc: Convert `dependency_formats` to a query
alexcrichton Sep 16, 2019
50c57d8
rustc: Fix mixing crates with different `share_generics`
alexcrichton Sep 11, 2019
f00c634
Allow using upstream generics in a dylib crate type
alexcrichton Sep 23, 2019
a744fd0
bug-out asyncness query on non-local funtions
csmoe Sep 23, 2019
5c5e3fa
Update cargo
alexcrichton Sep 24, 2019
d9ab4ff
Remove blanket silencing of "type annotation needed" errors
estebank Sep 24, 2019
affa038
clean up, push silencing logic to more relevant places
estebank Sep 24, 2019
b7ca1c5
fix rebase
estebank Sep 24, 2019
6d07874
Don't emit explain with json short messages.
ehuss Sep 24, 2019
40fae88
Rollup merge of #64324 - alexcrichton:share-generics-again, r=michael…
Centril Sep 25, 2019
0204f36
Rollup merge of #64428 - GuillaumeGomez:error-explanation-E0524, r=Ce…
Centril Sep 25, 2019
bc3afb7
Rollup merge of #64481 - tomtau:fix/tls-error-message, r=KodrAus
Centril Sep 25, 2019
34067ee
Rollup merge of #64599 - csmoe:doc_async_reexport, r=nikomatsakis
Centril Sep 25, 2019
66ca0eb
Rollup merge of #64743 - alexcrichton:update-cargo, r=nikomatsakis
Centril Sep 25, 2019
5ed746b
Rollup merge of #64746 - estebank:elide-impl-trait-obligations-on-err…
Centril Sep 25, 2019
fa6dfc9
Rollup merge of #64753 - ehuss:json-short-explain, r=Mark-Simulacrum
Centril Sep 25, 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
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