Sign in
android
/
toolchain
/
rustc
/
refs/heads/main
/
.
/
tests
/
ui
/
wf
/
wf-in-fn-ret.rs
blob: 3e9b9787cc5770455529ade9ae8b20118ff4c778 [
file
] [
log
] [
blame
] [
edit
]
// Check that we enforce WF conditions also for return types in fn items.
#![
feature
(
rustc_attrs
)]
#![
allow
(
dead_code
)]
struct
MustBeCopy
<
T
:
Copy
>
{
t
:
T
,
}
fn
bar
<
T
>()
->
MustBeCopy
<
T
>
//~ ERROR E0277
//~^ ERROR mismatched types
{
}
fn
main
()
{}