Sign in
◑
Theme
rust
/
rust
/
c1d608bb7e862c8d8b74ce7cfc042fa98e9d4792
/
.
/
tests
/
ui
/
type-inference
/
type-inference-none-in-generic-ref.rs
blob: 9c1b7c19e3da325495e5929ec6306a2064171b19 [
file
]
//! Checks that unconstrained `None` is rejected through references and generics
struct
S
<
'a, T: '
a
>
{
o
:
&
'
a
Option
<
T
>,
}
fn
main
()
{
S
{
o
:
&
None
};
//~ ERROR type annotations needed [E0282]
}