1 // Copyright 2014-2018 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution.
4 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
5 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
6 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
7 // option. This file may not be copied, modified, or distributed
8 // except according to those terms.
15 #![warn(clippy::redundant_pattern_matching)]
19 if let Ok(_) = Ok::<i32, i32>(42) {}
21 if let Err(_) = Err::<i32, i32>(42) {
24 if let None = None::<()> {
27 if let Some(_) = Some(42) {
30 if Ok::<i32, i32>(42).is_ok() {
33 if Err::<i32, i32>(42).is_err() {
36 if None::<i32>.is_none() {
39 if Some(42).is_some() {
42 if let Ok(x) = Ok::<i32,i32>(42) {
46 match Ok::<i32, i32>(42) {
51 match Ok::<i32, i32>(42) {
56 match Err::<i32, i32>(42) {
61 match Err::<i32, i32>(42) {