Open
Description
A variant of #98543 that has a different failure path and thus is not fixed by #99217. cc @lcnr
trait Trait {
type Type;
}
impl<T> Trait for T {
type Type = ();
}
trait Extend<'a, 'b> {
fn extend(self, s: &'a str) -> &'b str;
}
impl<'a, 'b> Extend<'a, 'b> for <&'b &'a () as Trait>::Type
where
for<'what, 'ever> &'what &'ever (): Trait,
{
fn extend(self, s: &'a str) -> &'b str {
s
}
}
fn main() {
let y = <() as Extend<'_, '_>>::extend((), &String::from("Hello World"));
println!("{}", y);
}
@rustbot label C-bug I-unsound T-types A-implied-bounds A-associated-items
Metadata
Metadata
Assignees
Labels
Area: Associated items (types, constants & functions)Area: Implied bounds / inferred outlives-boundsCategory: This is a bug.Issue: A soundness hole (worst kind of bug), see: https://en.wikipedia.org/wiki/SoundnessHigh priorityStatus: This bug is tracked inside the repo by a `known-bug` test.Relevant to the types team, which will review and decide on the PR/issue.The Rustc Trait System Refactor Initiative (-Znext-solver)
Type
Projects
Status
new solver everywhere