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

Fix ICE #101739 #102613

Merged
merged 3 commits into from
Oct 3, 2022
Merged

Fix ICE #101739 #102613

merged 3 commits into from
Oct 3, 2022

Conversation

TaKO8Ki
Copy link
Member

@TaKO8Ki TaKO8Ki commented Oct 3, 2022

Fixes #101739

This cannot cover the following case. It causes too many args provided error and obligation does not have references error. I want your advice to solve the following cases as well in this pull request or a follow-up. completed

#![crate_type = "lib"]
#![feature(transmutability)]
#![allow(dead_code, incomplete_features, non_camel_case_types)]

mod assert {
    use std::mem::BikeshedIntrinsicFrom;

    pub fn is_transmutable<
        Src,
        Dst,
        Context,
        const ASSUME_ALIGNMENT: bool,
        const ASSUME_LIFETIMES: bool,
        const ASSUME_VALIDITY: bool,
        const ASSUME_VISIBILITY: bool,
    >()
    where
        Dst: BikeshedIntrinsicFrom<
            Src,
            Context,
            ASSUME_ALIGNMENT,
            ASSUME_LIFETIMES,
            ASSUME_VALIDITY,
            ASSUME_VISIBILITY,
        >,
    {}
}



fn via_const() {
    struct Context;
    #[repr(C)] struct Src;
    #[repr(C)] struct Dst;

    const FALSE: bool = false;

    assert::is_transmutable::<Src, Dst, Context, FALSE, FALSE, FALSE, FALSE>();
}

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Oct 3, 2022
@rust-highfive
Copy link
Collaborator

r? @compiler-errors

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 3, 2022
@rust-log-analyzer

This comment has been minimized.

@TaKO8Ki TaKO8Ki force-pushed the fix-part-of-101739 branch from 6131eaa to b8b30ae Compare October 3, 2022 06:04
@TaKO8Ki TaKO8Ki changed the title Fix a part of #101739 Fix #101739 Oct 3, 2022
@TaKO8Ki TaKO8Ki changed the title Fix #101739 Fix ICE #101739 Oct 3, 2022
@compiler-errors
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Oct 3, 2022

📌 Commit 0e615ca has been approved by compiler-errors

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

Rollup of 8 pull requests

Successful merges:

 - rust-lang#102439 (rustdoc: re-sugar more cross-crate trait bounds)
 - rust-lang#102569 (Improve `FromStr` example)
 - rust-lang#102597 (Avoid ICE in printing RPITIT type)
 - rust-lang#102607 (Improve documentation of `slice::{from_ptr_range, from_ptr_range_mut}`)
 - rust-lang#102613 (Fix ICE rust-lang#101739)
 - rust-lang#102615 (Cleanup some error code explanations)
 - rust-lang#102617 (`HirId` for `deferred_transmute_checks`)
 - rust-lang#102620 (Migrate `.stab` elements style to CSS variables)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit aa076d6 into rust-lang:master Oct 3, 2022
@rustbot rustbot added this to the 1.66.0 milestone Oct 3, 2022
@TaKO8Ki TaKO8Ki deleted the fix-part-of-101739 branch October 4, 2022 03:22
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.

ICE: -Zsave-analysis: The given Const must be an ADT
6 participants