You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This will probably need a rustc->clippy sync in order to be reproducible in the clippy repo.
File was added in rust-lang/rust#107772
./tests/ui/dyn-star/llvm-old-style-ptrs.rs
// run-pass// compile-flags: -Copt-level=0 -Cllvm-args=-opaque-pointers=0// (opaque-pointers flag is called force-opaque-pointers in LLVM 13...)// min-llvm-version: 14.0// This test can be removed once non-opaque pointers are gone from LLVM, maybe.#![feature(dyn_star, pointer_like_trait)]#![allow(incomplete_features)]use std::fmt::Debug;use std::marker::PointerLike;fnmake_dyn_star<'a>(t:implPointerLike + Debug + 'a) -> dyn*Debug + 'a{
t as_}fnmain(){println!("{:?}", make_dyn_star(Box::new(1i32)));println!("{:?}", make_dyn_star(2usize));println!("{:?}", make_dyn_star((3usize,)));}
I'm not sure if that's a clippy bug. The obligation it's failing on is valid and shouldn't crash. Unless we set the ParamEnv wrong somehow.
The ParamEnv is set correctly.
Somehow a RegionKind::ReVar(_) is ending up in the query. Only way I can see that happening is through the predicates contained in the ParamEnv. Current code has an obligation of the form &'erased T: std::marker::PointerLike which evaluates a second obligation T: Sized. Not sure where the stray region variable comes from.
Summary
This will probably need a rustc->clippy sync in order to be reproducible in the clippy repo.
File was added in rust-lang/rust#107772
./tests/ui/dyn-star/llvm-old-style-ptrs.rs
Version
Error output
Backtrace
The text was updated successfully, but these errors were encountered: