-// Copyright 2014-2018 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-
-
-
#![feature(box_syntax)]
-
-
#![warn(clippy::no_effect)]
#![allow(dead_code)]
#![allow(path_statements)]
struct Unit;
struct Tuple(i32);
struct Struct {
- field: i32
+ field: i32,
}
enum Enum {
Tuple(i32),
fn drop(&mut self) {}
}
struct DropStruct {
- field: i32
+ field: i32,
}
impl Drop for DropStruct {
fn drop(&mut self) {}
b: f64,
}
-fn get_number() -> i32 { 0 }
-fn get_struct() -> Struct { Struct { field: 0 } }
-fn get_drop_struct() -> DropStruct { DropStruct { field: 0 } }
+fn get_number() -> i32 {
+ 0
+}
+fn get_struct() -> Struct {
+ Struct { field: 0 }
+}
+fn get_drop_struct() -> DropStruct {
+ DropStruct { field: 0 }
+}
-unsafe fn unsafe_fn() -> i32 { 0 }
+unsafe fn unsafe_fn() -> i32 {
+ 0
+}
fn main() {
let s = get_struct();