Skip to content

const_generics: Fix incorrect ty::ParamEnv::empty() usage - #82067

Merged
bors merged 4 commits into
rust-lang:masterfrom
BoxyUwU:hahaicantthinkofabadpun
Feb 16, 2021
Merged

const_generics: Fix incorrect ty::ParamEnv::empty() usage#82067
bors merged 4 commits into
rust-lang:masterfrom
BoxyUwU:hahaicantthinkofabadpun

Conversation

@BoxyUwU

Copy link
Copy Markdown
Member

Fixes#80561

Not sure if I should keep the debug!(..)s or not but its the second time I've needed them so they sure seem useful lol

cc @lcnr
r? @oli-obk

@rust-highfiverust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 13, 2021
Comment threadcompiler/rustc_infer/src/infer/combine.rs Outdated
Comment threadcompiler/rustc_middle/src/ty/instance.rs Outdated
Comment threadcompiler/rustc_middle/src/ty/relate.rs Outdated
@BoxyUwU
BoxyUwUforce-pushed the hahaicantthinkofabadpun branch from b3d8781 to a419e11CompareFebruary 13, 2021 19:10

@oli-obkoli-obk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just lots of tracing changes, the actual changes lgtm

Comment threadcompiler/rustc_infer/src/infer/combine.rs Outdated
Comment threadcompiler/rustc_middle/src/mir/interpret/queries.rs Outdated
Comment threadcompiler/rustc_middle/src/ty/instance.rs Outdated
Comment threadcompiler/rustc_ty_utils/src/instance.rs Outdated
Comment on lines +96 to +100
debug!("resolve(def.did={:?}, substs={:?}) = {:?}", def.did, substs, result);
debug!(
"inner_resolve_instance: resolve(def.did={:?}, substs={:?}) = {:?}",
def.did, substs, result
);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

after that change, you can just print the result here (though I think there's also a way to tell #[instrument] to do that

Comment threadcompiler/rustc_ty_utils/src/instance.rs Outdated
@oli-obk

Copy link
Copy Markdown
Contributor

@bors r+

@bors

bors commented Feb 14, 2021

Copy link
Copy Markdown
Collaborator

📌 Commit 7bd7126 has been approved by oli-obk

@borsbors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 14, 2021
This was referenced Feb 15, 2021
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 16, 2021
…as-schievink
Rollup of 19 pull requests
Successful merges:
- rust-lang#81503 (Suggest to create a new `const` item if the `fn` in the array is a `const fn`)
- rust-lang#81897 (Add match pattern diagnostics regression test)
- rust-lang#81975 (Seal the CommandExt, OsStrExt and OsStringExt traits)
- rust-lang#82009 (const_generics: Dont evaluate array length const when handling errors)
- rust-lang#82060 (Fix typos in BTreeSet::{first, last} docs)
- rust-lang#82061 (CTFE validation: catch ReadPointerAsBytes and better error)
- rust-lang#82063 (Fixed minor typo in catch_unwind docs)
- rust-lang#82067 (const_generics: Fix incorrect ty::ParamEnv::empty() usage)
- rust-lang#82077 (Edit `rustc_arena::DropArena` docs)
- rust-lang#82096 (Fix a typo)
- rust-lang#82106 (Remove unnecessary `Option` in `default_doc`)
- rust-lang#82107 (expand: Some cleanup)
- rust-lang#82118 (Add missing env!-decl variant)
- rust-lang#82119 (Fix typo in link to CreateSymbolicLinkW documentation.)
- rust-lang#82120 (Stabilize Arguments::as_str)
- rust-lang#82129 (Remove redundant bool_to_option feature gate)
- rust-lang#82133 (Update link for extern prelude.)
- rust-lang#82141 (32-bit ARM: Emit `lr` instead of `r14` when specified as an `asm!` output register.)
- rust-lang#82147 (:arrow_up: rust-analyzer)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
@bors
bors merged commit 665bf9e into rust-lang:masterFeb 16, 2021
@rustbotrustbot added this to the 1.52.0 milestone Feb 16, 2021
@lcnrlcnr added the A-const-generics Area: const generics (parameters and arguments) label Dec 11, 2021
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-const-genericsArea: const generics (parameters and arguments)S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ICE when calling member function of const generic struct with associated constant as const parameter

6 participants

@BoxyUwU@oli-obk@bors@lcnr@rust-highfive@rustbot