-
Notifications
You must be signed in to change notification settings - Fork 13.8k
Migrate UnsizedConstParamTy
to unstable impl of ConstParamTy_
#145095
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
Conversation
This comment has been minimized.
This comment has been minimized.
Support using #[unstable_feature_bound] on trait This is needed to unblock rust-lang#145095 r? `@BoxyUwU`
Support using #[unstable_feature_bound] on trait This is needed to unblock rust-lang#145095 r? ``@BoxyUwU``
Support using #[unstable_feature_bound] on trait This is needed to unblock rust-lang#145095 r? ```@BoxyUwU```
Support using #[unstable_feature_bound] on trait This is needed to unblock rust-lang#145095 r? ````@BoxyUwU````
Support using #[unstable_feature_bound] on trait This is needed to unblock rust-lang#145095 r? `````@BoxyUwU`````
Support using #[unstable_feature_bound] on trait This is needed to unblock rust-lang#145095 r? ``````@BoxyUwU``````
Support using #[unstable_feature_bound] on trait This is needed to unblock rust-lang#145095 r? ```````@BoxyUwU```````
Support using #[unstable_feature_bound] on trait This is needed to unblock rust-lang/rust#145095 r? ```````@BoxyUwU```````
Support using #[unstable_feature_bound] on trait This is needed to unblock rust-lang/rust#145095 r? ```````@BoxyUwU```````
a4bd0a8
to
262cf11
Compare
Currently all tests in |
☔ The latest upstream changes (presumably #145773) made this pull request unmergeable. Please resolve the merge conflicts. |
tests/ui/const-generics/generic_const_parameter_types/check-type-in-mir.stderr
Show resolved
Hide resolved
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)] |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
8d88452
to
1f70531
Compare
This comment has been minimized.
This comment has been minimized.
…with #[unstable_feature_bound(unsized_const_params)]
379e7ea
to
1c30399
Compare
LL | struct A([u8]); | ||
| ---- this field does not implement `ConstParamTy_` | ||
| | ||
note: the `ConstParamTy_` impl for `[u8]` requires that `unstable feature: `unsized_const_params`` |
There was a problem hiding this comment.
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
@bors r+ thanks gamer :3 very cool |
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
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
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`
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
Now that we have
#[unstable_feature_bound]
, we can removeUnsizedConstParamTy
that was meant to be an unstable impl of stable type andConstParamTy_
trait.r? @BoxyUwU