Issue tests numbered 1920, 3668, 5997, 23302, 32122, 40510, 57741, 71676, and 76077 were moved to relevant better-named subdirectories. ISSUES_ENTRY_LIMIT was adjusted to match new number of files and FIXME note was expanded.
18 lines
308 B
Rust
18 lines
308 B
Rust
// run-rustfix
|
|
use std::ops::Deref;
|
|
|
|
struct Foo(u8);
|
|
|
|
impl Deref for Foo {
|
|
type Target = u8;
|
|
fn deref(&self) -> &Self::Target {
|
|
&self.0
|
|
}
|
|
}
|
|
|
|
fn main() {
|
|
let a = Foo(0);
|
|
// Should suggest `&*` when coercing &ty to *const ty
|
|
let _: *const u8 = &*a; //~ ERROR mismatched types
|
|
}
|