Sign in
fuchsia
/
third_party
/
github.com
/
rust-lang
/
rust
/
refs/heads/revert-82057-cstr
/
.
/
src
/
test
/
rustdoc-ui
/
deref-recursive-cycle.rs
blob: 4cb518cbbbd5c14fd0057c91a03a71b0ffe0f582 [
file
] [
log
] [
blame
] [
edit
]
// check-pass
// #26207: Ensure `Deref` cycles are properly handled without errors.
#[
derive
(
Copy
,
Clone
)]
struct
S
;
impl
std
::
ops
::
Deref
for
S
{
type
Target
=
S
;
fn
deref
(&
self
)
->
&
S
{
self
}
}
fn
main
()
{
let
s
:
S
=
*******
S
;
}