Skip to content

Conversation

@tiif
Copy link
Member

@tiif tiif commented Aug 8, 2025

Now that we have #[unstable_feature_bound], we can remove UnsizedConstParamTy that was meant to be an unstable impl of stable type and ConstParamTy_ trait.

r? @BoxyUwU

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Aug 8, 2025
@rust-log-analyzer

This comment has been minimized.

@tiif
Copy link
Member Author

tiif commented Aug 22, 2025

Currently all tests in tests/ui passed locally, but some test change feels suspicious, will take a closer look soon 🤔

@bors
Copy link
Collaborator

bors commented Aug 23, 2025

☔ The latest upstream changes (presumably #145773) made this pull request unmergeable. Please resolve the merge conflicts.

Comment on lines 1 to 10
error[E0741]: `Bar` must implement `ConstParamTy` to be used as the type of a const generic parameter
--> $DIR/feature-gate-unsized-const-params.rs:5:21
|
LL | struct Foo<const N: [u8]>;
| ^^^^
LL | struct Foo<const N: Bar>;
| ^^^
|
= note: the only supported types are integers, `bool`, and `char`
help: add `#![feature(adt_const_params)]` to the crate attributes to enable more complex and user defined types
help: add `#[derive(ConstParamTy, PartialEq, Eq)]` to the struct
|
LL + #![feature(adt_const_params)]
|
help: add `#![feature(unsized_const_params)]` to the crate attributes to enable references to implement the `ConstParamTy` trait
|
LL + #![feature(unsized_const_params)]
LL - struct Bar(u8);
LL + #[derive(ConstParamTy, PartialEq, Eq)]
Copy link
Member Author

@tiif tiif Sep 12, 2025

Choose a reason for hiding this comment

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

The suggestion here is a bit weird,

LL - struct Bar(u8);
LL + #[derive(ConstParamTy, PartialEq, Eq)]

but feels like a pre-existing issue, can take a look at this after tihs PR.

Copy link
Member

Choose a reason for hiding this comment

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

fascinating I wonder what's going on here

@rust-cloud-vms rust-cloud-vms bot force-pushed the unstable_const_param branch from 8d88452 to 1f70531 Compare September 13, 2025 14:31
@rust-log-analyzer

This comment has been minimized.

@rust-cloud-vms rust-cloud-vms bot force-pushed the unstable_const_param branch from 379e7ea to 1c30399 Compare September 15, 2025 09:02
@tiif tiif marked this pull request as ready for review September 15, 2025 09:14
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Sep 15, 2025
LL | struct A([u8]);
| ---- this field does not implement `ConstParamTy_`
|
note: the `ConstParamTy_` impl for `[u8]` requires that `unstable feature: `unsized_const_params``
Copy link
Member

Choose a reason for hiding this comment

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

we should probably make the diagnostic for unsatisfied UnstableFeature clauses be worded a bit nicer. different PR though

@BoxyUwU
Copy link
Member

BoxyUwU commented Sep 15, 2025

@bors r+

thanks gamer :3 very cool

@bors
Copy link
Collaborator

bors commented Sep 15, 2025

📌 Commit 7299e8f has been approved by BoxyUwU

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 Sep 15, 2025
@bors bors merged commit edd6721 into rust-lang:master Sep 16, 2025
10 checks passed
@rustbot rustbot added this to the 1.92.0 milestone Sep 16, 2025
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. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants