- Feature Name: eq_statement_warning
- Start Date: 2016-12-07
- RFC PR: (leave this empty)
- Rust Issue: (leave this empty)
Warn by default when encountering a statement which only consists of an equality comparison.
pub use self::{ | |
blend_mode::BlendMode, | |
circle_shape::CircleShape, | |
color::Color, | |
convex_shape::{ConvexShape, ConvexShapePoints}, | |
custom_shape::{CustomShape, CustomShapePoints}, | |
drawable::Drawable, | |
font::{Font, FontRef, Info as FontInfo}, | |
glyph::Glyph, | |
image::Image, |
#![feature(conservative_impl_trait)] | |
fn parse<'a>(input: &'a str) -> impl 'a + Iterator<Item = (u32, u32, u32)> { | |
input.lines().map(|l| { | |
let mut words = l.split_whitespace(); | |
let mut get = || words.next().unwrap().parse().unwrap(); | |
(get(), get(), get()) | |
}) | |
} |
extern crate sdl2; | |
use sdl2::event::Event; | |
use sdl2::keyboard::Keycode; | |
use sdl2::pixels::PixelFormatEnum::RGB24; | |
use sdl2::render::TextureAccess; | |
fn main() { | |
let sdl = sdl2::init().unwrap(); | |
let video = sdl.video().unwrap(); |
use std::fs::File; | |
use std::io::prelude::*; | |
fn main() { | |
let text = { | |
let mut f = File::open("test.txt").unwrap(); | |
let mut buf = String::new(); | |
f.read_to_string(&mut buf).unwrap(); | |
buf | |
}; |
diff --git a/client/CMakeLists.txt b/client/CMakeLists.txt | |
index b8105ea..5937c13 100644 | |
--- a/client/CMakeLists.txt | |
+++ b/client/CMakeLists.txt | |
@@ -17,9 +17,8 @@ FILE(GLOB NOLIFE_SOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.cpp) | |
list(REMOVE_ITEM NOLIFE_SOURCES | |
ClassicUI.cpp | |
physics.cpp | |
- player.cpp | |
- sound.cpp) |
stick = { | |
image = love.graphics.newImage("stick.png"), | |
x = 0, | |
y = 0 | |
} | |
guy = { | |
image = love.graphics.newImage("guy.png"), | |
x = 0, | |
y = 0, |
[ 5%] Building CXX object nx/CMakeFiles/NoLifeNx.dir/node.cpp.o | |
In file included from /home/snake/projects/extern/NoLifeStory/nx/node.cpp:20:0: | |
/home/snake/projects/extern/NoLifeStory/nx/file_impl.hpp:48:20: error: declaration of 'int nl::_file_data::file' [-fpermissive] | |
int file = 0; | |
^ | |
In file included from /home/snake/projects/extern/NoLifeStory/nx/file_impl.hpp:20:0, | |
from /home/snake/projects/extern/NoLifeStory/nx/node.cpp:20: | |
/home/snake/projects/extern/NoLifeStory/nx/file.hpp:26:11: error: changes meaning of 'file' from 'class nl::file' [-fpermissive] | |
class file { | |
^ |
16:45:39: Running steps for project NoLifeStory... | |
16:45:39: Starting: "/usr/bin/make" all | |
-- Configuring done | |
-- Generating done | |
-- Build files have been written to: /home/snake/projects/extern/NoLifeStory-build | |
Scanning dependencies of target NoLifeNx | |
[ 5%] Building CXX object nx/CMakeFiles/NoLifeNx.dir/bitmap.cpp.o | |
[ 11%] Building CXX object nx/CMakeFiles/NoLifeNx.dir/audio.cpp.o | |
[ 16%] Building CXX object nx/CMakeFiles/NoLifeNx.dir/file.cpp.o | |
/home/snake/projects/extern/NoLifeStory/nx/file.cpp: In member function 'void nl::file::open(std::string)': |
######################################## | |
## fbpanel configuration file ## | |
######################################## | |
Global { | |
edge = bottom | |
allign = center | |
margin = 0 | |
widthtype = percent | |
width = 100 |