Sign in
rust
/
rust-lang
/
rust
/
refs/heads/lcnr/rustc-dev-guide
/
.
/
tests
/
ui
/
issues
/
issue-25901.rs
blob: 0ca34da95f55df06ad26452fd11da8d432d0718d [
file
] [
log
] [
blame
]
struct
A
;
struct
B
;
static
S
:
&
'
static
B
=
&
A
;
//~^ ERROR cannot perform non-const deref coercion
use
std
::
ops
::
Deref
;
impl
Deref
for
A
{
type
Target
=
B
;
fn
deref
(&
self
)->&
B
{
static
B_
:
B
=
B
;
&
B_
}
}
fn
main
(){}