Rollup merge of #93802 - lcnr:mcg-woops, r=BoxyUwU
fix oversight in the `min_const_generics` checks r? `@BoxyUwU`
This commit is contained in:
commit
f3f41d76ad
3 changed files with 51 additions and 3 deletions
|
|
@ -0,0 +1,15 @@
|
|||
trait AlwaysApplicable {
|
||||
type Assoc;
|
||||
}
|
||||
impl<T: ?Sized> AlwaysApplicable for T {
|
||||
type Assoc = usize;
|
||||
}
|
||||
|
||||
trait BindsParam<T> {
|
||||
type ArrayTy;
|
||||
}
|
||||
impl<T> BindsParam<T> for <T as AlwaysApplicable>::Assoc {
|
||||
type ArrayTy = [u8; Self::MAX]; //~ ERROR generic `Self` types
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
error: generic `Self` types are currently not permitted in anonymous constants
|
||||
--> $DIR/forbid-self-no-normalize.rs:12:25
|
||||
|
|
||||
LL | type ArrayTy = [u8; Self::MAX];
|
||||
| ^^^^
|
||||
|
|
||||
note: not a concrete type
|
||||
--> $DIR/forbid-self-no-normalize.rs:11:27
|
||||
|
|
||||
LL | impl<T> BindsParam<T> for <T as AlwaysApplicable>::Assoc {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue