rust/tests/ui/regions/issue-26448-2.rs
Rémy Rakic 00844be421 new solver: prefer trivial builtin impls over where-clauses
for now, only builtin `Sized` impls are tracked as being `Trivial`
2025-01-17 18:50:29 +00:00

25 lines
470 B
Rust

//@ revisions: current next
//@ [next] compile-flags: -Znext-solver
//@ ignore-compare-mode-next-solver (explicit revisions)
//@ check-pass
pub struct Bar<T> {
items: Vec<&'static str>,
inner: T,
}
pub trait IntoBar<T> {
fn into_bar(self) -> Bar<T>;
}
impl<'a, T> IntoBar<T> for &'a str where &'a str: Into<T> {
fn into_bar(self) -> Bar<T> {
Bar {
items: Vec::new(),
inner: self.into(),
}
}
}
fn main() {}