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

Hang with ADT const param, self-mention in where clause #103770

Closed
jruderman opened this issue Oct 30, 2022 · 0 comments · Fixed by #127245
Closed

Hang with ADT const param, self-mention in where clause #103770

jruderman opened this issue Oct 30, 2022 · 0 comments · Fixed by #127245
Labels
A-const-generics Area: const generics (parameters and arguments) C-bug Category: This is a bug. F-adt_const_params `#![feature(adt_const_params)]` F-generic_const_exprs `#![feature(generic_const_exprs)]` I-hang Issue: The compiler never terminates, due to infinite loops, deadlock, livelock, etc. requires-incomplete-features This issue requires the use of incomplete features. requires-nightly This issue requires a nightly compiler in some way. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@jruderman
Copy link
Contributor

The compiler hangs on:

#![feature(generic_const_exprs)]
#![feature(adt_const_params)]
#![allow(incomplete_features)]
#![allow(dead_code)]

#[derive(PartialEq, Eq)]
struct U;

struct S<const N: U>()
where
    S<{ U }>:;

fn main() {}

Hang sample

Version

rustc 1.66.0-nightly (0da281b60 2022-10-27)
binary: rustc
commit-hash: 0da281b6068a7d889ae89a9bd8991284cc9b7535
commit-date: 2022-10-27
host: x86_64-apple-darwin
release: 1.66.0-nightly
LLVM version: 15.0.2

Regression

searched nightlies: from nightly-2022-06-16 to nightly-2022-10-28
regressed nightly: nightly-2022-06-30
searched commit range: 8308806...ddcbba0
regressed commit: 116edb6 (#98542)

@rustbot label +A-const-generics +F-generic_const_exprs +I-hang +T-compiler

@jruderman jruderman added the C-bug Category: This is a bug. label Oct 30, 2022
@rustbot rustbot added A-const-generics Area: const generics (parameters and arguments) F-generic_const_exprs `#![feature(generic_const_exprs)]` I-hang Issue: The compiler never terminates, due to infinite loops, deadlock, livelock, etc. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Oct 30, 2022
@BoxyUwU BoxyUwU added the F-adt_const_params `#![feature(adt_const_params)]` label Jan 17, 2023
@workingjubilee workingjubilee added requires-nightly This issue requires a nightly compiler in some way. requires-incomplete-features This issue requires the use of incomplete features. labels Mar 4, 2023
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Jul 2, 2024
Add a test for `generic_const_exprs`

Fixes rust-lang#103770

r? `@Nilstrieb`
@bors bors closed this as completed in 24eadb2 Jul 3, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Jul 3, 2024
Rollup merge of rust-lang#127245 - BoxyUwU:gce_hang_test, r=Nilstrieb

Add a test for `generic_const_exprs`

Fixes rust-lang#103770

r? ``@Nilstrieb``
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-const-generics Area: const generics (parameters and arguments) C-bug Category: This is a bug. F-adt_const_params `#![feature(adt_const_params)]` F-generic_const_exprs `#![feature(generic_const_exprs)]` I-hang Issue: The compiler never terminates, due to infinite loops, deadlock, livelock, etc. requires-incomplete-features This issue requires the use of incomplete features. requires-nightly This issue requires a nightly compiler in some way. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants