rust/tests/ui/const-generics/issues/issue-56445-1.rs
Barrett Ray c5598d6a9e fix(hir_analysis/wfcheck): don't leak {type error}
avoid `{type error}` being leaked in user-facing messages,
particularly when using the `adt_const_params` feature
2024-09-29 23:40:43 -05:00

13 lines
449 B
Rust

// Regression test for https://github.com/rust-lang/rust/issues/56445#issuecomment-518402995.
//@ revisions: full min
#![cfg_attr(full, feature(adt_const_params, unsized_const_params))]
#![cfg_attr(full, allow(incomplete_features))]
#![crate_type = "lib"]
use std::marker::PhantomData;
struct Bug<'a, const S: &'a str>(PhantomData<&'a ()>);
//~^ ERROR: the type of const parameters must not depend on other generic parameters
impl Bug<'_, ""> {}