Skip to content

adt_const_params allows impls of ConstParamTy with non-ConstParamTy pointees  #112124

Closed
@BoxyUwU

Description

@BoxyUwU

I tried this code:

#![feature(adt_const_params)]

use core::marker::ConstParamTy;

struct Foo;

impl ConstParamTy for &'static Foo {}

I expected to see this happen: it should error

Instead, this happened: it compilers

Meta

playground version:

Nightly channel

Build using the Nightly version: 1.72.0-nightly

(2023-05-29 498553fc04f6a3fdc534)
Backtrace

<backtrace>

Metadata

Metadata

Assignees

Labels

A-const-genericsArea: const generics (parameters and arguments)C-bugCategory: This is a bug.F-adt_const_params`#![feature(adt_const_params)]`T-typesRelevant to the types team, which will review and decide on the PR/issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions