Auto merge of #3743 - phansch:you_shall_not_pass, r=flip1995
Move run-pass tests to UI tests This should give us more UI coverage for free. It also removes the `run-pass` suite, so we now only have the `ui` suite.
This commit is contained in:
commit
450cacc5f4
@ -133,7 +133,6 @@ fn prepare_env() {
|
||||
#[test]
|
||||
fn compile_test() {
|
||||
prepare_env();
|
||||
run_mode("run-pass", "tests/run-pass".into());
|
||||
run_mode("ui", "tests/ui".into());
|
||||
run_ui_toml();
|
||||
}
|
||||
|
@ -1,5 +0,0 @@
|
||||
pub fn f(new: fn()) {
|
||||
new();
|
||||
}
|
||||
|
||||
fn main() {}
|
@ -1,7 +0,0 @@
|
||||
#![deny(clippy::all)]
|
||||
|
||||
fn core() {}
|
||||
|
||||
fn main() {
|
||||
core();
|
||||
}
|
@ -1,3 +1,5 @@
|
||||
/// Test for https://github.com/rust-lang/rust-clippy/issues/1698
|
||||
|
||||
pub trait Trait {
|
||||
const CONSTANT: u8;
|
||||
}
|
@ -1,4 +1,7 @@
|
||||
#[allow(dead_code)]
|
||||
|
||||
/// Test for https://github.com/rust-lang/rust-clippy/issues/478
|
||||
|
||||
enum Baz {
|
||||
One,
|
||||
Two,
|
@ -1,5 +1,7 @@
|
||||
#![allow(clippy::all)]
|
||||
|
||||
/// Test for https://github.com/rust-lang/rust-clippy/issues/1588
|
||||
|
||||
fn main() {
|
||||
match 1 {
|
||||
1 => {},
|
@ -1,5 +1,7 @@
|
||||
#![allow(clippy::all)]
|
||||
|
||||
/// Test for https://github.com/rust-lang/rust-clippy/issues/1969
|
||||
|
||||
fn main() {}
|
||||
|
||||
pub trait Convert {
|
7
tests/ui/crashes/ice-2727.rs
Normal file
7
tests/ui/crashes/ice-2727.rs
Normal file
@ -0,0 +1,7 @@
|
||||
/// Test for https://github.com/rust-lang/rust-clippy/issues/2727
|
||||
|
||||
pub fn f(new: fn()) {
|
||||
new();
|
||||
}
|
||||
|
||||
fn main() {}
|
@ -5,11 +5,11 @@
|
||||
dead_code
|
||||
)]
|
||||
|
||||
// This should not compile-fail with:
|
||||
//
|
||||
// error[E0277]: the trait bound `T: Foo` is not satisfied
|
||||
//
|
||||
// See https://github.com/rust-lang/rust-clippy/issues/2760
|
||||
/// This should not compile-fail with:
|
||||
///
|
||||
/// error[E0277]: the trait bound `T: Foo` is not satisfied
|
||||
///
|
||||
/// See https://github.com/rust-lang/rust-clippy/issues/2760
|
||||
|
||||
trait Foo {
|
||||
type Bar;
|
@ -1,6 +1,6 @@
|
||||
use std::collections::HashSet;
|
||||
|
||||
// See https://github.com/rust-lang/rust-clippy/issues/2774
|
||||
/// See https://github.com/rust-lang/rust-clippy/issues/2774
|
||||
|
||||
#[derive(Eq, PartialEq, Debug, Hash)]
|
||||
pub struct Bar {
|
@ -1,4 +1,7 @@
|
||||
#[allow(dead_code)]
|
||||
|
||||
/// Test for https://github.com/rust-lang/rust-clippy/issues/2865
|
||||
|
||||
struct Ice {
|
||||
size: String,
|
||||
}
|
@ -1,3 +1,5 @@
|
||||
/// Test for https://github.com/rust-lang/rust-clippy/issues/2865
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct HashMap<V, S> {
|
||||
hash_builder: S,
|
@ -2,6 +2,8 @@
|
||||
#![allow(clippy::blacklisted_name)]
|
||||
#![allow(unused)]
|
||||
|
||||
/// Test for https://github.com/rust-lang/rust-clippy/issues/3462
|
||||
|
||||
enum Foo {
|
||||
Bar,
|
||||
Baz,
|
9
tests/ui/crashes/ice-700.rs
Normal file
9
tests/ui/crashes/ice-700.rs
Normal file
@ -0,0 +1,9 @@
|
||||
#![deny(clippy::all)]
|
||||
|
||||
/// Test for https://github.com/rust-lang/rust-clippy/issues/700
|
||||
|
||||
fn core() {}
|
||||
|
||||
fn main() {
|
||||
core();
|
||||
}
|
@ -1,5 +1,7 @@
|
||||
#![deny(clippy::all)]
|
||||
|
||||
/// Test for https://github.com/rust-lang/rust-clippy/issues/1336
|
||||
|
||||
#[allow(dead_code)]
|
||||
struct Foo;
|
||||
|
@ -1,5 +1,7 @@
|
||||
#![deny(clippy::if_same_then_else)]
|
||||
|
||||
/// Test for https://github.com/rust-lang/rust-clippy/issues/2426
|
||||
|
||||
fn main() {}
|
||||
|
||||
pub fn foo(a: i32, b: i32) -> Option<&'static str> {
|
@ -1,3 +1,5 @@
|
||||
/// Test for https://github.com/rust-lang/rust-clippy/issues/2826
|
||||
|
||||
pub trait FooMap {
|
||||
fn map<B, F: Fn() -> B>(&self, f: F) -> B;
|
||||
}
|
@ -1,5 +1,7 @@
|
||||
#![allow(warnings)]
|
||||
|
||||
/// Test for https://github.com/rust-lang/rust-clippy/issues/825
|
||||
|
||||
// this should compile in a reasonable amount of time
|
||||
fn rust_type_id(name: &str) {
|
||||
if "bool" == &name[..]
|
@ -1,5 +1,7 @@
|
||||
#![deny(clippy::match_same_arms)]
|
||||
|
||||
/// Test for https://github.com/rust-lang/rust-clippy/issues/2427
|
||||
|
||||
const PRICE_OF_SWEETS: u32 = 5;
|
||||
const PRICE_OF_KINDNESS: u32 = 0;
|
||||
const PRICE_OF_DRINKS: u32 = 5;
|
@ -1,14 +1,16 @@
|
||||
#![deny(clippy::mut_mut, clippy::zero_ptr, clippy::cmp_nan)]
|
||||
#![allow(dead_code)]
|
||||
|
||||
// compiletest + extern crates doesn't work together
|
||||
//#[macro_use]
|
||||
//extern crate lazy_static;
|
||||
// FIXME: compiletest + extern crates doesn't work together. To make this test work, it would need
|
||||
// the following three lines and the lazy_static crate.
|
||||
//
|
||||
// #[macro_use]
|
||||
// extern crate lazy_static;
|
||||
// use std::collections::HashMap;
|
||||
|
||||
//use std::collections::HashMap;
|
||||
/// ensure that we don't suggest `is_nan` and `is_null` inside constants
|
||||
/// FIXME: once const fn is stable, suggest these functions again in constants
|
||||
|
||||
// ensure that we don't suggest `is_nan` and `is_null` inside constants
|
||||
// FIXME: once const fn is stable, suggest these functions again in constants
|
||||
const BAA: *const i32 = 0 as *const i32;
|
||||
static mut BAR: *const i32 = BAA;
|
||||
static mut FOO: *const i32 = 0 as *const i32;
|
@ -1,3 +1,5 @@
|
||||
/// Test for https://github.com/rust-lang/rust-clippy/issues/1346
|
||||
|
||||
#[deny(warnings)]
|
||||
fn cfg_return() -> i32 {
|
||||
#[cfg(unix)]
|
@ -1,5 +1,7 @@
|
||||
#![warn(clippy::single_match_else)]
|
||||
|
||||
//! Test for https://github.com/rust-lang/rust-clippy/issues/1588
|
||||
|
||||
fn main() {
|
||||
let n = match (42, 43) {
|
||||
(42, n) => n,
|
Loading…
Reference in New Issue
Block a user