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

Assert FnDef kind #123382

Merged
merged 2 commits into from
Apr 3, 2024
Merged

Assert FnDef kind #123382

merged 2 commits into from
Apr 3, 2024

Conversation

compiler-errors
Copy link
Member

Only found one bug, where we were using the variant def id rather than its ctor def id to make the FnDef for a type_of

r? fmease

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Apr 2, 2024
Copy link
Member

@fmease fmease left a comment

Choose a reason for hiding this comment

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

Sweet!

let args = ty::GenericArgs::identity_for_item(tcx, def_id);
Ty::new_fn_def(tcx, def_id.to_def_id(), args)
Ty::new_fn_def(tcx, ctor.to_def_id(), args)
Copy link
Member

Choose a reason for hiding this comment

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

I'm surprised that this didn't affect any tests. This surely has some semantic implications even if minor? Can't think of anything tho rn

@fmease
Copy link
Member

fmease commented Apr 3, 2024

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Apr 3, 2024

📌 Commit cc5105d has been approved by fmease

It is now in the queue for this repository.

@bors bors 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 Apr 3, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 3, 2024
…iaskrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#123209 (Add section to sanitizer doc for `-Zexternal-clangrt`)
 - rust-lang#123342 (x.py test: remove no-op --skip flag)
 - rust-lang#123382 (Assert `FnDef` kind)
 - rust-lang#123386 (Set `CARGO` instead of `PATH` for Rust Clippy)
 - rust-lang#123393 (rustc_ast: Update `P<T>` docs to reflect mutable status.)
 - rust-lang#123394 (Postfix match fixes)
 - rust-lang#123412 (Output URLs of CI artifacts to GitHub summary)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 94c4027 into rust-lang:master Apr 3, 2024
11 checks passed
@rustbot rustbot added this to the 1.79.0 milestone Apr 3, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Apr 3, 2024
Rollup merge of rust-lang#123382 - compiler-errors:assert-fndef-kind, r=fmease

Assert `FnDef` kind

Only found one bug, where we were using the variant def id rather than its ctor def id to make the `FnDef` for a `type_of`

r? fmease
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants