2023-05-23 17:23:25 +00:00
|
|
|
// revisions: current next
|
2023-07-04 18:49:13 +00:00
|
|
|
// Need `-Zdeduplicate-diagnostics=yes` because the number of cycle errors
|
|
|
|
// emitted is for some horrible reason platform-specific.
|
|
|
|
//[next] compile-flags: -Ztrait-solver=next -Zdeduplicate-diagnostics=yes
|
2023-05-23 17:23:25 +00:00
|
|
|
// incremental
|
|
|
|
|
2023-06-27 21:13:50 +00:00
|
|
|
// checks that we don't ICE if there are region inference variables in the environment
|
|
|
|
// when computing `PointerLike` builtin candidates.
|
|
|
|
|
2023-05-23 17:23:25 +00:00
|
|
|
#![feature(dyn_star, pointer_like_trait)]
|
2023-06-27 21:13:50 +00:00
|
|
|
#![allow(incomplete_features)]
|
2023-05-23 17:23:25 +00:00
|
|
|
|
|
|
|
use std::fmt::Debug;
|
|
|
|
use std::marker::PointerLike;
|
|
|
|
|
|
|
|
fn make_dyn_star<'a, T: PointerLike + Debug + 'a>(t: T) -> impl PointerLike + Debug + 'a {
|
2023-07-04 18:49:13 +00:00
|
|
|
//[next]~^ ERROR cycle detected when computing
|
2023-05-23 17:23:25 +00:00
|
|
|
t as _
|
2023-05-22 23:48:06 +00:00
|
|
|
//[current]~^ ERROR type annotations needed
|
2023-05-23 17:23:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|