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.

fmease added a commit to fmease/rust that referenced this pull request Aug 11, 2025
Support using #[unstable_feature_bound] on trait

This is needed to unblock rust-lang#145095

r? `@BoxyUwU`
fmease added a commit to fmease/rust that referenced this pull request Aug 12, 2025
Support using #[unstable_feature_bound] on trait

This is needed to unblock rust-lang#145095

r? ``@BoxyUwU``
fmease added a commit to fmease/rust that referenced this pull request Aug 12, 2025
Support using #[unstable_feature_bound] on trait

This is needed to unblock rust-lang#145095

r? ```@BoxyUwU```
fmease added a commit to fmease/rust that referenced this pull request Aug 12, 2025
Support using #[unstable_feature_bound] on trait

This is needed to unblock rust-lang#145095

r? ````@BoxyUwU````
fmease added a commit to fmease/rust that referenced this pull request Aug 12, 2025
Support using #[unstable_feature_bound] on trait

This is needed to unblock rust-lang#145095

r? `````@BoxyUwU`````
Zalathar added a commit to Zalathar/rust that referenced this pull request Aug 12, 2025
Support using #[unstable_feature_bound] on trait

This is needed to unblock rust-lang#145095

r? ``````@BoxyUwU``````
Zalathar added a commit to Zalathar/rust that referenced this pull request Aug 12, 2025
Support using #[unstable_feature_bound] on trait

This is needed to unblock rust-lang#145095

r? ```````@BoxyUwU```````
rust-timer added a commit that referenced this pull request Aug 12, 2025
Rollup merge of #145251 - tiif:support_trait, r=BoxyUwU

Support using #[unstable_feature_bound] on trait

This is needed to unblock #145095

r? ```````@BoxyUwU```````
github-actions bot pushed a commit to rust-lang/miri that referenced this pull request Aug 13, 2025
Support using #[unstable_feature_bound] on trait

This is needed to unblock rust-lang/rust#145095

r? ```````@BoxyUwU```````
github-actions bot pushed a commit to rust-lang/rustc-dev-guide that referenced this pull request Aug 18, 2025
Support using #[unstable_feature_bound] on trait

This is needed to unblock rust-lang/rust#145095

r? ```````@BoxyUwU```````
@rust-cloud-vms rust-cloud-vms bot force-pushed the unstable_const_param branch from a4bd0a8 to 262cf11 Compare August 18, 2025 15:00
@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 added a commit that referenced this pull request Sep 16, 2025
Rollup of 9 pull requests

Successful merges:

 - #145095 (Migrate `UnsizedConstParamTy`  to unstable impl of `ConstParamTy_`)
 - #145960 (Split `FnCtxt::report_args_error` into subfunctions)
 - #146402 (interpret: fix overlapping aggregate initialization)
 - #146466 (llvm-wrapper: other cleanup)
 - #146574 (compiletest: Enable new-output-capture by default)
 - #146599 (replace some `#[const_trait]` with `const trait`)
 - #146601 (compiletest: Make `./x test --test-args ...` work again)
 - #146608 (improve internal bootstrap docs)
 - #146609 (bootstrap: lower verbosity of cargo to one less than bootstrap's)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit that referenced this pull request Sep 16, 2025
Rollup of 9 pull requests

Successful merges:

 - #145095 (Migrate `UnsizedConstParamTy`  to unstable impl of `ConstParamTy_`)
 - #145960 (Split `FnCtxt::report_args_error` into subfunctions)
 - #146402 (interpret: fix overlapping aggregate initialization)
 - #146466 (llvm-wrapper: other cleanup)
 - #146574 (compiletest: Enable new-output-capture by default)
 - #146599 (replace some `#[const_trait]` with `const trait`)
 - #146601 (compiletest: Make `./x test --test-args ...` work again)
 - #146608 (improve internal bootstrap docs)
 - #146609 (bootstrap: lower verbosity of cargo to one less than bootstrap's)

r? `@ghost`
`@rustbot` modify labels: rollup
@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
rust-timer added a commit that referenced this pull request Sep 16, 2025
Rollup merge of #145095 - tiif:unstable_const_param, r=BoxyUwU

Migrate `UnsizedConstParamTy`  to unstable impl of `ConstParamTy_`

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`
github-actions bot pushed a commit to rust-lang/miri that referenced this pull request Sep 17, 2025
Rollup of 9 pull requests

Successful merges:

 - rust-lang/rust#145095 (Migrate `UnsizedConstParamTy`  to unstable impl of `ConstParamTy_`)
 - rust-lang/rust#145960 (Split `FnCtxt::report_args_error` into subfunctions)
 - rust-lang/rust#146402 (interpret: fix overlapping aggregate initialization)
 - rust-lang/rust#146466 (llvm-wrapper: other cleanup)
 - rust-lang/rust#146574 (compiletest: Enable new-output-capture by default)
 - rust-lang/rust#146599 (replace some `#[const_trait]` with `const trait`)
 - rust-lang/rust#146601 (compiletest: Make `./x test --test-args ...` work again)
 - rust-lang/rust#146608 (improve internal bootstrap docs)
 - rust-lang/rust#146609 (bootstrap: lower verbosity of cargo to one less than bootstrap's)

r? `@ghost`
`@rustbot` modify labels: rollup
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