With min_specialization enabled, an incomplete impl for a non-static type will delegate method calls to a less-specific impl with a 'static bound #79457
Labels
A-specialization
Area: Trait impl specialization
A-trait-system
Area: Trait system
C-bug
Category: This is a bug.
E-needs-test
Call for participation: An issue has been fixed and does not reproduce, but no test has been added.
F-min_specialization
`#![feature(min_specialization)]`
I-unsound
Issue: A soundness hole (worst kind of bug), see: https://en.wikipedia.org/wiki/Soundness
requires-nightly
This issue requires a nightly compiler in some way.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Rustc version:
1.50.0-nightly (2020-11-25 b48cafd9eb658b5d7401)
, tested on the playground.This bug also occurs when:
method_0
andmethod_1
method_0
is overridden for&i32
method_1
on an&i32
I included the
promote_to_static_2
function to demonstrate that this seems to be unrelated to autoderef;Wrapper
does not implementDeref
.The text was updated successfully, but these errors were encountered: