Update changed ui tests

This commit is contained in:
Oliver Schneider 2018-01-16 17:06:27 +01:00
parent 3c4f5bfae2
commit 4f21b5b112
No known key found for this signature in database
GPG key ID: A69F8D225B3AD7D9
167 changed files with 335 additions and 1 deletions

View file

@ -46,7 +46,9 @@ fn config(dir: &'static str, mode: &'static str) -> compiletest::Config {
config.target_rustcflags = Some(format!("-L {0} -L {0}/deps -Dwarnings", host_libs().display()));
config.mode = cfg_mode;
config.build_base = {
config.build_base = if rustc_test_suite().is_some() {
PathBuf::from("/tmp/clippy_test_build_base")
} else {
let mut path = std::env::current_dir().unwrap();
path.push("target/debug/test_build_base");
path

View file

@ -143,3 +143,5 @@ error: <-comparison of unit values detected. This will always be false
|
= note: `-D unit-cmp` implied by `-D warnings`
error: aborting due to 18 previous errors

View file

@ -114,3 +114,5 @@ error: approximate value of `f{32, 64}::consts::SQRT_2` found. Consider using it
55 | let my_sq2 = 1.4142;
| ^^^^^^
error: aborting due to 19 previous errors

View file

@ -69,3 +69,5 @@ error: floating-point arithmetic detected
29 | -f;
| ^^
error: aborting due to 11 previous errors

View file

@ -116,3 +116,5 @@ error: range is out of bounds
44 | &empty[..4];
| ^^^^^^^^^^
error: aborting due to 19 previous errors

View file

@ -134,3 +134,5 @@ error: manual implementation of an assign operation
40 | s = s + "bla";
| ^^^^^^^^^^^^^ help: replace it with: `s += "bla"`
error: aborting due to 22 previous errors

View file

@ -48,3 +48,5 @@ error: variable appears on both sides of an assignment operation
15 | a &= a & 1;
| ^^^^^^^^^^ help: replace it with: `a &= 1`
error: aborting due to 8 previous errors

View file

@ -20,3 +20,5 @@ error: the since field must contain a semver-compliant version
30 | #[deprecated(since = "1")]
| ^^^^^^^^^^^
error: aborting due to 3 previous errors

View file

@ -106,3 +106,5 @@ error: ineffective bit mask: `x | 1` compared to `8`, is the same as x compared
55 | x | 1 >= 8;
| ^^^^^^^^^^
error: aborting due to 17 previous errors

View file

@ -84,3 +84,5 @@ error: use of a blacklisted/placeholder name `baz`
35 | if let Some(ref mut baz) = Some(42) {}
| ^^^
error: aborting due to 14 previous errors

View file

@ -50,3 +50,5 @@ error: this boolean expression can be simplified
|
= note: `-D nonminimal-bool` implied by `-D warnings`
error: aborting due to 5 previous errors

View file

@ -24,3 +24,5 @@ error: equality checks against false can be replaced by a negation
10 | if false == x { "yes" } else { "no" };
| ^^^^^^^^^^ help: try simplifying it as shown: `!x`
error: aborting due to 4 previous errors

View file

@ -175,3 +175,5 @@ error: this boolean expression can be simplified
58 | let _ = !c ^ c || !a.is_some();
| ^^^^^^^^^^^^^^^^^^^^^^ help: try: `!c ^ c || a.is_none()`
error: aborting due to 21 previous errors

View file

@ -28,3 +28,5 @@ error: you seem to be trying to use `&Box<T>`. Consider using just `&T`
22 | fn test4(a: &Box<bool>);
| ^^^^^^^^^^ help: try: `&bool`
error: aborting due to 4 previous errors

View file

@ -7,3 +7,5 @@ error: you seem to be trying to use `Box<Vec<T>>`. Consider using just `Vec<T>`
= note: `-D box-vec` implied by `-D warnings`
= help: `Vec<T>` is already on the heap, `Box<Vec<T>>` makes an extra allocation.
error: aborting due to previous error

View file

@ -17,3 +17,5 @@ error[E0308]: mismatched types
= note: expected type `u32`
found type `{integer}`
error: aborting due to 2 previous errors

View file

@ -22,3 +22,5 @@ error: You appear to be counting bytes the naive way
22 | let _ = x.iter().filter(|a| b + 1 == **a).count(); // naive byte count
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: Consider using the bytecount crate: `bytecount::count(x, b + 1)`
error: aborting due to 3 previous errors

View file

@ -178,3 +178,5 @@ error: casting to the same type is unnecessary (`bool` -> `bool`)
39 | false as bool;
| ^^^^^^^^^^^^^
error: aborting due to 28 previous errors

View file

@ -60,3 +60,5 @@ error: casting u32 to f64 may become silently lossy if types change
14 | 1u32 as f64;
| ^^^^^^^^^^^ help: try: `f64::from(1u32)`
error: aborting due to 10 previous errors

View file

@ -108,3 +108,5 @@ error: casting u32 to u64 may become silently lossy if types change
23 | 1u32 as u64;
| ^^^^^^^^^^^ help: try: `u64::from(1u32)`
error: aborting due to 18 previous errors

View file

@ -120,3 +120,5 @@ error: casting i32 to usize may lose the sign of the value
22 | 1i32 as usize;
| ^^^^^^^^^^^^^
error: aborting due to 19 previous errors

View file

@ -8,3 +8,5 @@ error: casting character literal to u8. `char`s are 4 bytes wide in rust, so cas
= help: Consider using a byte literal instead:
b'a'
error: aborting due to previous error

View file

@ -72,3 +72,5 @@ error: doomed comparison with NAN, use `std::{f32,f64}::is_nan()` instead
21 | y >= std::f64::NAN;
| ^^^^^^^^^^^^^^^^^^
error: aborting due to 12 previous errors

View file

@ -12,3 +12,5 @@ error: Comparing with null is better expressed by the .is_null() method
16 | if m == ptr::null_mut() {
| ^^^^^^^^^^^^^^^^^^^^
error: aborting due to 2 previous errors

View file

@ -36,3 +36,5 @@ error: this creates an owned instance just for comparison
30 | self.to_owned() == *other
| ^^^^^^^^^^^^^^^ try calling implementing the comparison without allocating
error: aborting due to 6 previous errors

View file

@ -240,3 +240,5 @@ help: try
112 | }
|
error: aborting due to 13 previous errors

View file

@ -90,3 +90,5 @@ error: very complex type used. Consider factoring parts into `type` definitions
40 | let _y: Vec<Vec<Box<(u32, u32, u32, u32)>>> = vec![];
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 15 previous errors

View file

@ -6,3 +6,5 @@ error[E0658]: compiler plugins are experimental and possibly buggy (see issue #2
|
= help: add #![feature(plugin)] to the crate attributes to enable
error: aborting due to previous error

View file

@ -6,3 +6,5 @@ error[E0658]: compiler plugins are experimental and possibly buggy (see issue #2
|
= help: add #![feature(plugin)] to the crate attributes to enable
error: aborting due to previous error

View file

@ -6,3 +6,5 @@ error[E0658]: compiler plugins are experimental and possibly buggy (see issue #2
|
= help: add #![feature(plugin)] to the crate attributes to enable
error: aborting due to previous error

View file

@ -6,3 +6,5 @@ error[E0658]: compiler plugins are experimental and possibly buggy (see issue #2
|
= help: add #![feature(plugin)] to the crate attributes to enable
error: aborting due to previous error

View file

@ -6,3 +6,5 @@ error[E0658]: compiler plugins are experimental and possibly buggy (see issue #2
|
= help: add #![feature(plugin)] to the crate attributes to enable
error: aborting due to previous error

View file

@ -6,3 +6,5 @@ error[E0658]: compiler plugins are experimental and possibly buggy (see issue #2
|
= help: add #![feature(plugin)] to the crate attributes to enable
error: aborting due to previous error

View file

@ -78,3 +78,5 @@ error: Constants have by default a `'static` lifetime
24 | const VAR_ARRAY: &'static [u8; 1] = b"T"; // ERROR Consider removing 'static.
| -^^^^^^^-------- help: consider removing `'static`: `&[u8; 1]`
error: aborting due to 13 previous errors

View file

@ -33,3 +33,5 @@ error: This else block is redundant.
}
error: aborting due to 2 previous errors

View file

@ -12,3 +12,5 @@ help: assign the `CString` to a variable to extend its lifetime
7 | CString::new("foo").unwrap().as_ptr();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to previous error

View file

@ -269,3 +269,5 @@ error: the function has a cyclomatic complexity of 8
|
= help: you could split it up into multiple smaller functions
error: aborting due to 20 previous errors

View file

@ -13,3 +13,5 @@ error: the function has a cyclomatic complexity of 3
= note: `-D cyclomatic-complexity` implied by `-D warnings`
= help: you could split it up into multiple smaller functions
error: aborting due to previous error

View file

@ -24,3 +24,5 @@ error: lint unstable_as_mut_slice has been removed: `Vec::as_mut_slice` has been
10 | #[warn(unstable_as_mut_slice)]
| ^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 4 previous errors

View file

@ -106,3 +106,5 @@ note: consider deriving `Clone` or removing `Copy`
87 | | }
| |_^
error: aborting due to 7 previous errors

View file

@ -36,3 +36,5 @@ error: sub-expression diverges
37 | _ => true || break,
| ^^^^^
error: aborting due to 6 previous errors

View file

@ -47,3 +47,5 @@ error: I see you're using a LinkedList! Perhaps you meant some other data struct
|
= help: a VecDeque might work
error: aborting due to 6 previous errors

View file

@ -180,3 +180,5 @@ error: you should put bare URLs between `<`/`>` or make a proper Markdown link
168 | /// Not ok: http://www.unicode.org/reports/tr9/#Reordering_Resolved_Levels
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 30 previous errors

View file

@ -6,3 +6,5 @@ error: `--x` could be misinterpreted as pre-decrement by C programmers, is usual
|
= note: `-D double-neg` implied by `-D warnings`
error: aborting due to previous error

View file

@ -30,3 +30,5 @@ error: Consider removing unnecessary double parentheses
32 | (())
| ^^^^
error: aborting due to 5 previous errors

View file

@ -72,3 +72,5 @@ note: argument has type SomeStruct
42 | forget(s4);
| ^^
error: aborting due to 6 previous errors

View file

@ -216,3 +216,5 @@ note: argument has type &SomeStruct
59 | std::mem::forget(&SomeStruct);
| ^^^^^^^^^^^
error: aborting due to 18 previous errors

View file

@ -6,3 +6,5 @@ error: `darth` already exists, having another argument having almost the same na
|
= note: `-D duplicate-underscore-argument` implied by `-D warnings`
error: aborting due to previous error

View file

@ -18,3 +18,5 @@ error: if expression with an `else if`, but without a final `else`
49 | | }
| |_____^ help: add an `else` block here
error: aborting due to 2 previous errors

View file

@ -11,3 +11,5 @@ help: consider using the uninhabited type `!` or a wrapper around it
7 | enum Empty {}
| ^^^^^^^^^^^^^
error: aborting due to previous error

View file

@ -42,3 +42,5 @@ error: usage of `contains_key` followed by `insert` on a `BTreeMap`
37 | if !m.contains_key(&k) { foo(); m.insert(k, v) } else { None };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `m.entry(k)`
error: aborting due to 7 previous errors

View file

@ -12,3 +12,5 @@ error: don't use glob imports for enum variants
12 | use self::Enum::*;
| ^^^^^^^^^^^^^^^^^^
error: aborting due to 2 previous errors

View file

@ -97,3 +97,5 @@ error: All variants have the same prefix: `With`
= note: `-D pub-enum-variant-names` implied by `-D warnings`
= help: remove the prefixes and use full paths to the variants instead of glob imports
error: aborting due to 10 previous errors

View file

@ -48,3 +48,5 @@ error: Clike enum variant discriminant is not portable to 32-bit targets
37 | A = 0x1_0000_0000,
| ^^^^^^^^^^^^^^^^^
error: aborting due to 8 previous errors

View file

@ -204,3 +204,5 @@ error: taken reference of right operand
|
= note: `-D op-ref` implied by `-D warnings`
error: aborting due to 33 previous errors

View file

@ -18,3 +18,5 @@ error: this operation will always return zero. This is likely not the intended o
11 | 0 / x;
| ^^^^^
error: aborting due to 3 previous errors

View file

@ -32,3 +32,5 @@ error: redundant closure found
18 | let e = Some(1u8).map(|a| generic(a));
| ^^^^^^^^^^^^^^ help: remove closure as shown: `generic`
error: aborting due to 5 previous errors

View file

@ -47,3 +47,5 @@ note: whether read occurs before this write depends on evaluation order
21 | x += { x = 20; 2 };
| ^^^^^^
error: aborting due to 4 previous errors

View file

@ -36,3 +36,5 @@ error: use of `stderr().write_fmt(...).unwrap()`. Consider using `eprint!` inste
21 | std::io::stderr().write_fmt(format_args!("test")).unwrap();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 6 previous errors

View file

@ -89,3 +89,5 @@ note: potential failure(s)
| ^^^^^^^^^^^^^^^^^^
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
error: aborting due to 4 previous errors

View file

@ -36,3 +36,5 @@ error: called `filter_map(p).map(q)` on an `Iterator`. This is more succinctly e
25 | | .map(|x| x.checked_mul(2))
| |__________________________________________________________^
error: aborting due to 4 previous errors

View file

@ -95,3 +95,5 @@ note: std::f32::EPSILON and std::f64::EPSILON are available.
57 | twice(x) != twice(ONE as f64);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 8 previous errors

View file

@ -83,3 +83,5 @@ note: std::f32::EPSILON and std::f64::EPSILON are available.
25 | v != ONE;
| ^^^^^^^^
error: aborting due to 7 previous errors

View file

@ -565,3 +565,5 @@ error: it looks like you're manually copying between slices
549 | | }
| |_____^ help: try replacing the loop by: `dst[..src.len()].clone_from_slice(&src[..])`
error: aborting due to 59 previous errors

View file

@ -6,3 +6,5 @@ error: useless use of `format!`
|
= note: `-D useless-format` implied by `-D warnings`
error: aborting due to previous error

View file

@ -86,3 +86,5 @@ error: possibly missing a comma here
|
= note: to remove this lint, add a comma or write the expr in a single line
error: aborting due to 10 previous errors

View file

@ -75,3 +75,5 @@ error: this public function dereferences a raw pointer but is not marked `unsafe
63 | unsafe { std::ptr::read(p) };
| ^
error: aborting due to 12 previous errors

View file

@ -60,3 +60,5 @@ error: called `.get_mut().unwrap()` on a VecDeque. Using `[]` is more clear and
40 | *some_vecdeque.get_mut(0).unwrap() = 1;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `&mut some_vecdeque[0]`
error: aborting due to 10 previous errors

View file

@ -40,3 +40,5 @@ error: identical conversion
39 | let _ = String::from("foo".to_string());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `"foo".to_string()`
error: aborting due to 6 previous errors

View file

@ -48,3 +48,5 @@ error: the operation is ineffective. Consider reducing it to `u`
32 | u & 255;
| ^^^^^^^
error: aborting due to 8 previous errors

View file

@ -24,3 +24,5 @@ error: redundant pattern matching, consider using `is_some()`
17 | if let Some(_) = Some(42) {
| -------^^^^^^^----------- help: try this: `if Some(42).is_some()`
error: aborting due to 4 previous errors

View file

@ -23,3 +23,5 @@ error: Unnecessary `!=` operation
|
= help: change to `==` and swap the blocks of the if/else
error: aborting due to 2 previous errors

View file

@ -133,3 +133,5 @@ help: consider adding a type parameter
78 | pub fn $name<S: ::std::hash::BuildHasher>(_map: &mut HashMap<i32, i32>, _set: &mut HashSet<i32, S>) {
|
error: aborting due to 10 previous errors

View file

@ -39,3 +39,5 @@ error: digits grouped inconsistently by underscores
|
= help: consider: 1.234_567_8_f32
error: aborting due to 5 previous errors

View file

@ -96,3 +96,5 @@ error: possible infinite iteration detected
30 | (0..).all(|x| x == 24); // maybe infinite iter
| ^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 14 previous errors

View file

@ -40,3 +40,5 @@ help: change `>= y + 1` to `> y` as shown
14 | y < x;
| ^^^^^
error: aborting due to 4 previous errors

View file

@ -47,3 +47,5 @@ error: reference to uninitialized memory
|
= help: Creation of a null reference is undefined behavior; see https://doc.rust-lang.org/reference/behavior-considered-undefined.html
error: aborting due to 6 previous errors

View file

@ -162,3 +162,5 @@ error: because of the numeric bounds on `u8` prior to casting, this expression i
78 | -5 >= (u8 as i32);
| ^^^^^^^^^^^^^^^^^
error: aborting due to 27 previous errors

View file

@ -69,3 +69,5 @@ error: This expression evaluates to the Unit type ()
78 | let x3 = match None { Some(_) => {}, None => {}, };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 6 previous errors

View file

@ -12,3 +12,5 @@ error: adding items after statements is confusing, since items exist from the st
17 | fn foo() { println!("foo"); }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 2 previous errors

View file

@ -47,3 +47,5 @@ error: digit groups should be smaller
|
= help: consider: 123_456.123_456_f32
error: aborting due to 6 previous errors

View file

@ -66,3 +66,5 @@ help: consider boxing the large fields to reduce the total size of the enum
49 | StructLikeLarge2 { x: Box<[i32; 8000]> },
| ^^^^^^^^^^^^^^^^
error: aborting due to 6 previous errors

View file

@ -94,3 +94,5 @@ error: trait `DependsOnFoo` has a `len` method but no (possibly inherited) `is_e
191 | | }
| |_^
error: aborting due to 12 previous errors

View file

@ -46,3 +46,5 @@ error: `if _ { .. } else { .. }` is an expression
|
= note: you might not need `mut` at all
error: aborting due to 4 previous errors

View file

@ -23,3 +23,5 @@ note: this expression can be directly returned
15 | let x = 5;
| ^
error: aborting due to 2 previous errors

View file

@ -12,3 +12,5 @@ error: this let-binding has unit value. Consider omitting `let _a =`
18 | let _a = ();
| ^^^^^^^^^^^^
error: aborting due to 2 previous errors

View file

@ -86,3 +86,5 @@ error: explicit lifetimes given in parameter types where they could be elided
120 | fn trait_bound_ok<'a, T: WithLifetime<'static>>(_: &'a u8, _: T) { unimplemented!() }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 14 previous errors

View file

@ -6,3 +6,5 @@ error: the lint `MISSING_LINT` is not added to any `LintPass`
|
= note: `-D lint-without-lint-pass` implied by `-D warnings`
error: aborting due to previous error

View file

@ -86,3 +86,5 @@ help: if you mean to use an octal constant, use `0o`
30 | let fail8 = 0o123;
| ^^^^^
error: aborting due to 11 previous errors

View file

@ -98,3 +98,5 @@ error: you seem to be using .map() to clone the contents of an Option, consider
= help: try
x.as_ref().cloned()
error: aborting due to 11 previous errors

View file

@ -448,3 +448,5 @@ error: use as_mut() instead
329 | | };
| |_____^ help: try this: `mut_owned.as_mut()`
error: aborting due to 37 previous errors

View file

@ -18,3 +18,5 @@ error: usage of mem::forget on Drop type
24 | forgetSomething(eight);
| ^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 3 previous errors

View file

@ -501,3 +501,5 @@ error: used unwrap() on an Option value. If you don't want to handle the None ca
|
= note: `-D option-unwrap-used` implied by `-D warnings`
error: aborting due to 66 previous errors

View file

@ -42,3 +42,5 @@ error: this min/max combination leads to constant result
30 | max(min(s, "Apple"), "Zoo");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 7 previous errors

View file

@ -264,3 +264,5 @@ error: missing documentation for a function
191 | fn also_undocumented2() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 39 previous errors

View file

@ -16,3 +16,5 @@ error: module has the same name as its containing module
14 | | }
| |_____^
error: aborting due to 2 previous errors

View file

@ -6,3 +6,5 @@ error: any number modulo 1 will be 0
|
= note: `-D modulo-one` implied by `-D warnings`
error: aborting due to previous error

View file

@ -59,3 +59,5 @@ note: immutable borrow here
32 | fn fail_double<'a, 'b>(x: &'a u32, y: &'a u32, z: &'b mut u32) -> &'a mut u32 {
| ^^^^^^^ ^^^^^^^
error: aborting due to 5 previous errors

View file

@ -57,3 +57,5 @@ error: generally you want to avoid `&mut &mut _` if possible
35 | let y : &mut &mut &mut u32 = &mut &mut &mut 2;
| ^^^^^^^^^^^^^
error: aborting due to 9 previous errors

View file

@ -30,3 +30,5 @@ error: attempt to mutate range bound within loop; note that the range of the loo
40 | let n = &mut m; // warning
| ^
error: aborting due to 5 previous errors

Some files were not shown because too many files have changed in this diff Show more