This website requires JavaScript.
Explore
Help
Sign in
bjoernager
/
rust
Watch
1
Fork
You've already forked rust
0
Code
Activity
58e901b6fd
rust
/
tests
/
ui
/
structs-enums
/
uninstantiable-struct.rs
5 lines
93 B
Rust
Raw
Normal View
History
Unescape
Escape
Add `// run-pass` annotations to all the tests under `ui/run-pass/`. (I may have accidentally added it to some auxilliary crates as well; my emacs-macro-based methodology was pretty crude.)
2018-08-30 14:18:55 +02:00
// run-pass
Warn about dead tuple struct fields
2022-07-25 22:36:03 +02:00
pub
struct
Z
(
#[
allow(unused_tuple_struct_fields)
]
&
'static
Z
)
;
register snapshots
2013-10-23 04:49:18 -04:00
Allow writing types which "can't" be instantiated. The borrow checker doesn't allow constructing such a type at runtime using safe code, but there isn't any reason to ban them in the type checker. Included in this commit is an example of a neat static doubly-linked list. Feature-gated under the static_recursion gate to be on the safe side, but there are unlikely to be any reasons this shouldn't be turned on by default.
2015-06-28 10:38:28 -07:00
pub
fn
main
(
)
{
}
Copy permalink