Skip to content

Rollup of 9 pull requests #91621

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

Closed
wants to merge 21 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
9e5939a
Remove a code path that is neither documented nor can I see the reaso…
oli-obk Aug 20, 2021
93564c3
Tweak "call this function" suggestion to have smaller span
estebank Dec 3, 2021
14c6193
Add test for evaluate_obligation: Ok(EvaluatedToOkModuloRegions) ICE
wesleywiser Nov 19, 2021
98e9b32
Add test with `#[rustc_evaluate_where_clauses]`
wesleywiser Nov 22, 2021
6fe13f6
Add test case that evals to `EvaluatedToOkModuloRegions`
wesleywiser Dec 4, 2021
aa3370c
doc: suggest try_reserve in try_reserve_exact
TennyZhuang Dec 5, 2021
a9f14c1
Add pretty printer test for async blocks
dtolnay Dec 5, 2021
33c29a3
Pretty print async block without redundant space
dtolnay Dec 5, 2021
fa054cf
Document all public items in `rustc_incremental`
pierwill Oct 29, 2021
a0fb992
Fix AnonConst ICE
terrarier2111 Nov 28, 2021
6a17ee6
Recommend fix `count()` -> `len()` on slices
notriddle Jul 30, 2021
880eb59
Update books
ehuss Dec 7, 2021
bdd6f8c
Rollup merge of #87614 - notriddle:notriddle-count2len, r=Mark-Simula…
matthiaskrgr Dec 7, 2021
3c9860b
Rollup merge of #90407 - pierwill:edit-rustc-incremental-docs, r=cjgi…
matthiaskrgr Dec 7, 2021
95fb5a6
Rollup merge of #91065 - wesleywiser:add_incr_test, r=jackh726
matthiaskrgr Dec 7, 2021
eac24b8
Rollup merge of #91312 - terrarier2111:anon-const-ice, r=jackh726
matthiaskrgr Dec 7, 2021
43e7c0c
Rollup merge of #91493 - oli-obk:cleanup, r=michaelwoerister
matthiaskrgr Dec 7, 2021
c65807d
Rollup merge of #91503 - estebank:call-fn-span, r=michaelwoerister
matthiaskrgr Dec 7, 2021
00c847a
Rollup merge of #91547 - TennyZhuang:suggest_try_reserve, r=scottmcm
matthiaskrgr Dec 7, 2021
2de2cae
Rollup merge of #91562 - dtolnay:asyncspace, r=Mark-Simulacrum
matthiaskrgr Dec 7, 2021
71e3343
Rollup merge of #91620 - ehuss:update-books, r=ehuss
matthiaskrgr Dec 7, 2021
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
Next Next commit
Remove a code path that is neither documented nor can I see the reaso…
…n it existed.

Also, no tests fail when turning that arm into an ICE
  • Loading branch information
oli-obk committed Dec 3, 2021
commit 9e5939ad92ae1096e3945bbfdfe81ec515ed0c69
13 changes: 8 additions & 5 deletions compiler/rustc_infer/src/infer/opaque_types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -461,10 +461,6 @@ impl<'a, 'tcx> Instantiator<'a, 'tcx> {
if let Some(def_id) = def_id.as_local() {
let opaque_hir_id = tcx.hir().local_def_id_to_hir_id(def_id);
let parent_def_id = self.infcx.defining_use_anchor;
let def_scope_default = || {
let opaque_parent_hir_id = tcx.hir().get_parent_item(opaque_hir_id);
parent_def_id == tcx.hir().local_def_id(opaque_parent_hir_id)
};
let (in_definition_scope, origin) = match tcx.hir().expect_item(def_id).kind
{
// Anonymous `impl Trait`
Expand All @@ -481,7 +477,14 @@ impl<'a, 'tcx> Instantiator<'a, 'tcx> {
}) => {
(may_define_opaque_type(tcx, parent_def_id, opaque_hir_id), origin)
}
_ => (def_scope_default(), hir::OpaqueTyOrigin::TyAlias),
ref itemkind => {
span_bug!(
self.value_span,
"weird opaque type: {:#?}, {:#?}",
ty.kind(),
itemkind
)
}
};
if in_definition_scope {
let opaque_type_key =
Expand Down