path trimming: ignore type aliases

This commit is contained in:
Dan Aloni 2021-01-28 18:01:36 +02:00
parent cfba499271
commit eaefe4a230
79 changed files with 192 additions and 191 deletions

View File

@ -2143,6 +2143,7 @@ fn for_each_def(tcx: TyCtxt<'_>, mut collect_fn: impl for<'b> FnMut(&'b Ident, N
match child.res {
def::Res::Def(DefKind::AssocTy, _) => {}
def::Res::Def(DefKind::TyAlias, _) => {}
def::Res::Def(defkind, def_id) => {
if let Some(ns) = defkind.ns() {
collect_fn(&child.ident, ns, def_id);

View File

@ -1,7 +1,7 @@
- // MIR for `try_sum` before EarlyOtherwiseBranch
+ // MIR for `try_sum` after SimplifyBranches-final
fn try_sum(_1: &ViewportPercentageLength, _2: &ViewportPercentageLength) -> std::result::Result<ViewportPercentageLength, ()> {
fn try_sum(_1: &ViewportPercentageLength, _2: &ViewportPercentageLength) -> Result<ViewportPercentageLength, ()> {
debug x => _1; // in scope 0 at $DIR/early_otherwise_branch_68867.rs:18:5: 18:6
debug other => _2; // in scope 0 at $DIR/early_otherwise_branch_68867.rs:19:5: 19:10
let mut _0: std::result::Result<ViewportPercentageLength, ()>; // return place in scope 0 at $DIR/early_otherwise_branch_68867.rs:20:6: 20:42

View File

@ -1,7 +1,7 @@
- // MIR for `try_sum` before EarlyOtherwiseBranch
+ // MIR for `try_sum` after EarlyOtherwiseBranch
fn try_sum(_1: &ViewportPercentageLength, _2: &ViewportPercentageLength) -> std::result::Result<ViewportPercentageLength, ()> {
fn try_sum(_1: &ViewportPercentageLength, _2: &ViewportPercentageLength) -> Result<ViewportPercentageLength, ()> {
debug x => _1; // in scope 0 at $DIR/early_otherwise_branch_68867.rs:18:5: 18:6
debug other => _2; // in scope 0 at $DIR/early_otherwise_branch_68867.rs:19:5: 19:10
let mut _0: std::result::Result<ViewportPercentageLength, ()>; // return place in scope 0 at $DIR/early_otherwise_branch_68867.rs:20:6: 20:42

View File

@ -1,7 +1,7 @@
- // MIR for `float_to_exponential_common` before ConstProp
+ // MIR for `float_to_exponential_common` after ConstProp
fn float_to_exponential_common(_1: &mut Formatter, _2: &T, _3: bool) -> std::result::Result<(), std::fmt::Error> {
fn float_to_exponential_common(_1: &mut Formatter, _2: &T, _3: bool) -> Result<(), std::fmt::Error> {
debug fmt => _1; // in scope 0 at $DIR/funky_arms.rs:11:35: 11:38
debug num => _2; // in scope 0 at $DIR/funky_arms.rs:11:60: 11:63
debug upper => _3; // in scope 0 at $DIR/funky_arms.rs:11:69: 11:74

View File

@ -128,7 +128,7 @@
// + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL
// + literal: Const { ty: for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> {<&i32 as std::fmt::Debug>::fmt}, val: Value(Scalar(<ZST>)) }
StorageLive(_22); // scope 7 at $SRC_DIR/core/src/panic.rs:LL:COL
_22 = transmute::<for<'r, 's, 't0> fn(&'r &i32, &'s mut Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>, for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>>(move _23) -> bb3; // scope 7 at $SRC_DIR/core/src/panic.rs:LL:COL
_22 = transmute::<for<'r, 's, 't0> fn(&'r &i32, &'s mut Formatter<'t0>) -> Result<(), std::fmt::Error>, for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut Formatter<'t0>) -> Result<(), std::fmt::Error>>(move _23) -> bb3; // scope 7 at $SRC_DIR/core/src/panic.rs:LL:COL
// mir::Constant
// + span: $SRC_DIR/core/src/panic.rs:LL:COL
// + literal: Const { ty: unsafe extern "rust-intrinsic" fn(for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>) -> for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> {std::intrinsics::transmute::<for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>, for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>>}, val: Value(Scalar(<ZST>)) }
@ -158,7 +158,7 @@
// + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL
// + literal: Const { ty: for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> {<&i32 as std::fmt::Debug>::fmt}, val: Value(Scalar(<ZST>)) }
StorageLive(_25); // scope 9 at $SRC_DIR/core/src/panic.rs:LL:COL
_25 = transmute::<for<'r, 's, 't0> fn(&'r &i32, &'s mut Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>, for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>>(move _26) -> bb5; // scope 9 at $SRC_DIR/core/src/panic.rs:LL:COL
_25 = transmute::<for<'r, 's, 't0> fn(&'r &i32, &'s mut Formatter<'t0>) -> Result<(), std::fmt::Error>, for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut Formatter<'t0>) -> Result<(), std::fmt::Error>>(move _26) -> bb5; // scope 9 at $SRC_DIR/core/src/panic.rs:LL:COL
// mir::Constant
// + span: $SRC_DIR/core/src/panic.rs:LL:COL
// + literal: Const { ty: unsafe extern "rust-intrinsic" fn(for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>) -> for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> {std::intrinsics::transmute::<for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>, for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>>}, val: Value(Scalar(<ZST>)) }

View File

@ -128,7 +128,7 @@
// + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL
// + literal: Const { ty: for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> {<&i32 as std::fmt::Debug>::fmt}, val: Value(Scalar(<ZST>)) }
StorageLive(_22); // scope 7 at $SRC_DIR/core/src/panic.rs:LL:COL
_22 = transmute::<for<'r, 's, 't0> fn(&'r &i32, &'s mut Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>, for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>>(move _23) -> bb3; // scope 7 at $SRC_DIR/core/src/panic.rs:LL:COL
_22 = transmute::<for<'r, 's, 't0> fn(&'r &i32, &'s mut Formatter<'t0>) -> Result<(), std::fmt::Error>, for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut Formatter<'t0>) -> Result<(), std::fmt::Error>>(move _23) -> bb3; // scope 7 at $SRC_DIR/core/src/panic.rs:LL:COL
// mir::Constant
// + span: $SRC_DIR/core/src/panic.rs:LL:COL
// + literal: Const { ty: unsafe extern "rust-intrinsic" fn(for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>) -> for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> {std::intrinsics::transmute::<for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>, for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>>}, val: Value(Scalar(<ZST>)) }
@ -158,7 +158,7 @@
// + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL
// + literal: Const { ty: for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> {<&i32 as std::fmt::Debug>::fmt}, val: Value(Scalar(<ZST>)) }
StorageLive(_25); // scope 9 at $SRC_DIR/core/src/panic.rs:LL:COL
_25 = transmute::<for<'r, 's, 't0> fn(&'r &i32, &'s mut Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>, for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>>(move _26) -> bb5; // scope 9 at $SRC_DIR/core/src/panic.rs:LL:COL
_25 = transmute::<for<'r, 's, 't0> fn(&'r &i32, &'s mut Formatter<'t0>) -> Result<(), std::fmt::Error>, for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut Formatter<'t0>) -> Result<(), std::fmt::Error>>(move _26) -> bb5; // scope 9 at $SRC_DIR/core/src/panic.rs:LL:COL
// mir::Constant
// + span: $SRC_DIR/core/src/panic.rs:LL:COL
// + literal: Const { ty: unsafe extern "rust-intrinsic" fn(for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>) -> for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> {std::intrinsics::transmute::<for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>, for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>>}, val: Value(Scalar(<ZST>)) }

View File

@ -203,7 +203,7 @@
StorageLive(_44); // scope 7 at $SRC_DIR/core/src/panic.rs:LL:COL
StorageLive(_45); // scope 7 at $SRC_DIR/core/src/panic.rs:LL:COL
_45 = _38; // scope 7 at $SRC_DIR/core/src/panic.rs:LL:COL
_44 = transmute::<for<'r, 's, 't0> fn(&'r &i32, &'s mut Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>, for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>>(move _45) -> bb5; // scope 7 at $SRC_DIR/core/src/panic.rs:LL:COL
_44 = transmute::<for<'r, 's, 't0> fn(&'r &i32, &'s mut Formatter<'t0>) -> Result<(), std::fmt::Error>, for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut Formatter<'t0>) -> Result<(), std::fmt::Error>>(move _45) -> bb5; // scope 7 at $SRC_DIR/core/src/panic.rs:LL:COL
// mir::Constant
// + span: $SRC_DIR/core/src/panic.rs:LL:COL
// + literal: Const { ty: unsafe extern "rust-intrinsic" fn(for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>) -> for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> {std::intrinsics::transmute::<for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>, for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>>}, val: Value(Scalar(<ZST>)) }
@ -252,7 +252,7 @@
StorageLive(_48); // scope 9 at $SRC_DIR/core/src/panic.rs:LL:COL
StorageLive(_49); // scope 9 at $SRC_DIR/core/src/panic.rs:LL:COL
_49 = _41; // scope 9 at $SRC_DIR/core/src/panic.rs:LL:COL
_48 = transmute::<for<'r, 's, 't0> fn(&'r &i32, &'s mut Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>, for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>>(move _49) -> bb7; // scope 9 at $SRC_DIR/core/src/panic.rs:LL:COL
_48 = transmute::<for<'r, 's, 't0> fn(&'r &i32, &'s mut Formatter<'t0>) -> Result<(), std::fmt::Error>, for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut Formatter<'t0>) -> Result<(), std::fmt::Error>>(move _49) -> bb7; // scope 9 at $SRC_DIR/core/src/panic.rs:LL:COL
// mir::Constant
// + span: $SRC_DIR/core/src/panic.rs:LL:COL
// + literal: Const { ty: unsafe extern "rust-intrinsic" fn(for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>) -> for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> {std::intrinsics::transmute::<for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>, for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>>}, val: Value(Scalar(<ZST>)) }

View File

@ -203,7 +203,7 @@
StorageLive(_44); // scope 7 at $SRC_DIR/core/src/panic.rs:LL:COL
StorageLive(_45); // scope 7 at $SRC_DIR/core/src/panic.rs:LL:COL
_45 = _38; // scope 7 at $SRC_DIR/core/src/panic.rs:LL:COL
_44 = transmute::<for<'r, 's, 't0> fn(&'r &i32, &'s mut Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>, for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>>(move _45) -> bb5; // scope 7 at $SRC_DIR/core/src/panic.rs:LL:COL
_44 = transmute::<for<'r, 's, 't0> fn(&'r &i32, &'s mut Formatter<'t0>) -> Result<(), std::fmt::Error>, for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut Formatter<'t0>) -> Result<(), std::fmt::Error>>(move _45) -> bb5; // scope 7 at $SRC_DIR/core/src/panic.rs:LL:COL
// mir::Constant
// + span: $SRC_DIR/core/src/panic.rs:LL:COL
// + literal: Const { ty: unsafe extern "rust-intrinsic" fn(for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>) -> for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> {std::intrinsics::transmute::<for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>, for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>>}, val: Value(Scalar(<ZST>)) }
@ -252,7 +252,7 @@
StorageLive(_48); // scope 9 at $SRC_DIR/core/src/panic.rs:LL:COL
StorageLive(_49); // scope 9 at $SRC_DIR/core/src/panic.rs:LL:COL
_49 = _41; // scope 9 at $SRC_DIR/core/src/panic.rs:LL:COL
_48 = transmute::<for<'r, 's, 't0> fn(&'r &i32, &'s mut Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>, for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>>(move _49) -> bb7; // scope 9 at $SRC_DIR/core/src/panic.rs:LL:COL
_48 = transmute::<for<'r, 's, 't0> fn(&'r &i32, &'s mut Formatter<'t0>) -> Result<(), std::fmt::Error>, for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut Formatter<'t0>) -> Result<(), std::fmt::Error>>(move _49) -> bb7; // scope 9 at $SRC_DIR/core/src/panic.rs:LL:COL
// mir::Constant
// + span: $SRC_DIR/core/src/panic.rs:LL:COL
// + literal: Const { ty: unsafe extern "rust-intrinsic" fn(for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>) -> for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> {std::intrinsics::transmute::<for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>, for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>>}, val: Value(Scalar(<ZST>)) }

View File

@ -1,7 +1,7 @@
- // MIR for `id_result` before SimplifyArmIdentity
+ // MIR for `id_result` after SimplifyArmIdentity
fn id_result(_1: std::result::Result<u8, i32>) -> std::result::Result<u8, i32> {
fn id_result(_1: Result<u8, i32>) -> Result<u8, i32> {
debug r => _1; // in scope 0 at $DIR/simplify-arm.rs:16:14: 16:15
let mut _0: std::result::Result<u8, i32>; // return place in scope 0 at $DIR/simplify-arm.rs:16:37: 16:52
let mut _2: isize; // in scope 0 at $DIR/simplify-arm.rs:18:9: 18:14

View File

@ -1,7 +1,7 @@
- // MIR for `id_result` before SimplifyBranchSame
+ // MIR for `id_result` after SimplifyBranchSame
fn id_result(_1: std::result::Result<u8, i32>) -> std::result::Result<u8, i32> {
fn id_result(_1: Result<u8, i32>) -> Result<u8, i32> {
debug r => _1; // in scope 0 at $DIR/simplify-arm.rs:16:14: 16:15
let mut _0: std::result::Result<u8, i32>; // return place in scope 0 at $DIR/simplify-arm.rs:16:37: 16:52
let mut _2: isize; // in scope 0 at $DIR/simplify-arm.rs:18:9: 18:14

View File

@ -1,7 +1,7 @@
- // MIR for `id_try` before SimplifyArmIdentity
+ // MIR for `id_try` after SimplifyArmIdentity
fn id_try(_1: std::result::Result<u8, i32>) -> std::result::Result<u8, i32> {
fn id_try(_1: Result<u8, i32>) -> Result<u8, i32> {
debug r => _1; // in scope 0 at $DIR/simplify-arm.rs:23:11: 23:12
let mut _0: std::result::Result<u8, i32>; // return place in scope 0 at $DIR/simplify-arm.rs:23:34: 23:49
let _2: u8; // in scope 0 at $DIR/simplify-arm.rs:24:9: 24:10
@ -26,7 +26,7 @@
- debug t => _9; // in scope 7 at $DIR/simplify-arm.rs:24:14: 24:15
+ debug t => ((_0 as Err).0: i32); // in scope 7 at $DIR/simplify-arm.rs:24:14: 24:15
}
scope 8 (inlined <std::result::Result<u8, i32> as Try>::from_error) { // at $DIR/simplify-arm.rs:24:13: 24:15
scope 8 (inlined <Result<u8, i32> as Try>::from_error) { // at $DIR/simplify-arm.rs:24:13: 24:15
- debug v => _8; // in scope 8 at $DIR/simplify-arm.rs:24:13: 24:15
+ debug v => ((_0 as Err).0: i32); // in scope 8 at $DIR/simplify-arm.rs:24:13: 24:15
let mut _12: i32; // in scope 8 at $DIR/simplify-arm.rs:24:13: 24:15
@ -39,7 +39,7 @@
scope 5 {
}
}
scope 6 (inlined <std::result::Result<u8, i32> as Try>::into_result) { // at $DIR/simplify-arm.rs:24:13: 24:15
scope 6 (inlined <Result<u8, i32> as Try>::into_result) { // at $DIR/simplify-arm.rs:24:13: 24:15
debug self => _4; // in scope 6 at $DIR/simplify-arm.rs:24:13: 24:15
}

View File

@ -1,7 +1,7 @@
- // MIR for `id_try` before SimplifyBranchSame
+ // MIR for `id_try` after SimplifyBranchSame
fn id_try(_1: std::result::Result<u8, i32>) -> std::result::Result<u8, i32> {
fn id_try(_1: Result<u8, i32>) -> Result<u8, i32> {
debug r => _1; // in scope 0 at $DIR/simplify-arm.rs:23:11: 23:12
let mut _0: std::result::Result<u8, i32>; // return place in scope 0 at $DIR/simplify-arm.rs:23:34: 23:49
let _2: u8; // in scope 0 at $DIR/simplify-arm.rs:24:9: 24:10
@ -23,7 +23,7 @@
scope 7 (inlined <i32 as From<i32>>::from) { // at $DIR/simplify-arm.rs:24:14: 24:15
debug t => ((_0 as Err).0: i32); // in scope 7 at $DIR/simplify-arm.rs:24:14: 24:15
}
scope 8 (inlined <std::result::Result<u8, i32> as Try>::from_error) { // at $DIR/simplify-arm.rs:24:13: 24:15
scope 8 (inlined <Result<u8, i32> as Try>::from_error) { // at $DIR/simplify-arm.rs:24:13: 24:15
debug v => ((_0 as Err).0: i32); // in scope 8 at $DIR/simplify-arm.rs:24:13: 24:15
let mut _12: i32; // in scope 8 at $DIR/simplify-arm.rs:24:13: 24:15
}
@ -34,7 +34,7 @@
scope 5 {
}
}
scope 6 (inlined <std::result::Result<u8, i32> as Try>::into_result) { // at $DIR/simplify-arm.rs:24:13: 24:15
scope 6 (inlined <Result<u8, i32> as Try>::into_result) { // at $DIR/simplify-arm.rs:24:13: 24:15
debug self => _4; // in scope 6 at $DIR/simplify-arm.rs:24:13: 24:15
}

View File

@ -1,7 +1,7 @@
- // MIR for `try_identity` before DestinationPropagation
+ // MIR for `try_identity` after DestinationPropagation
fn try_identity(_1: std::result::Result<u32, i32>) -> std::result::Result<u32, i32> {
fn try_identity(_1: Result<u32, i32>) -> Result<u32, i32> {
debug x => _1; // in scope 0 at $DIR/simplify_try.rs:7:17: 7:18
let mut _0: std::result::Result<u32, i32>; // return place in scope 0 at $DIR/simplify_try.rs:7:41: 7:57
let _2: u32; // in scope 0 at $DIR/simplify_try.rs:8:9: 8:10
@ -23,7 +23,7 @@
scope 7 (inlined <i32 as From<i32>>::from) { // at $DIR/simplify_try.rs:8:14: 8:15
debug t => ((_0 as Err).0: i32); // in scope 7 at $DIR/simplify_try.rs:8:14: 8:15
}
scope 8 (inlined <std::result::Result<u32, i32> as Try>::from_error) { // at $DIR/simplify_try.rs:8:13: 8:15
scope 8 (inlined <Result<u32, i32> as Try>::from_error) { // at $DIR/simplify_try.rs:8:13: 8:15
debug v => ((_0 as Err).0: i32); // in scope 8 at $DIR/simplify_try.rs:8:13: 8:15
let mut _12: i32; // in scope 8 at $DIR/simplify_try.rs:8:13: 8:15
}
@ -34,7 +34,7 @@
scope 5 {
}
}
scope 6 (inlined <std::result::Result<u32, i32> as Try>::into_result) { // at $DIR/simplify_try.rs:8:13: 8:15
scope 6 (inlined <Result<u32, i32> as Try>::into_result) { // at $DIR/simplify_try.rs:8:13: 8:15
- debug self => _4; // in scope 6 at $DIR/simplify_try.rs:8:13: 8:15
+ debug self => _0; // in scope 6 at $DIR/simplify_try.rs:8:13: 8:15
}

View File

@ -1,7 +1,7 @@
- // MIR for `try_identity` before SimplifyArmIdentity
+ // MIR for `try_identity` after SimplifyArmIdentity
fn try_identity(_1: std::result::Result<u32, i32>) -> std::result::Result<u32, i32> {
fn try_identity(_1: Result<u32, i32>) -> Result<u32, i32> {
debug x => _1; // in scope 0 at $DIR/simplify_try.rs:7:17: 7:18
let mut _0: std::result::Result<u32, i32>; // return place in scope 0 at $DIR/simplify_try.rs:7:41: 7:57
let _2: u32; // in scope 0 at $DIR/simplify_try.rs:8:9: 8:10
@ -26,7 +26,7 @@
- debug t => _9; // in scope 7 at $DIR/simplify_try.rs:8:14: 8:15
+ debug t => ((_0 as Err).0: i32); // in scope 7 at $DIR/simplify_try.rs:8:14: 8:15
}
scope 8 (inlined <std::result::Result<u32, i32> as Try>::from_error) { // at $DIR/simplify_try.rs:8:13: 8:15
scope 8 (inlined <Result<u32, i32> as Try>::from_error) { // at $DIR/simplify_try.rs:8:13: 8:15
- debug v => _8; // in scope 8 at $DIR/simplify_try.rs:8:13: 8:15
+ debug v => ((_0 as Err).0: i32); // in scope 8 at $DIR/simplify_try.rs:8:13: 8:15
let mut _12: i32; // in scope 8 at $DIR/simplify_try.rs:8:13: 8:15
@ -39,7 +39,7 @@
scope 5 {
}
}
scope 6 (inlined <std::result::Result<u32, i32> as Try>::into_result) { // at $DIR/simplify_try.rs:8:13: 8:15
scope 6 (inlined <Result<u32, i32> as Try>::into_result) { // at $DIR/simplify_try.rs:8:13: 8:15
debug self => _4; // in scope 6 at $DIR/simplify_try.rs:8:13: 8:15
}

View File

@ -1,6 +1,6 @@
// MIR for `try_identity` after SimplifyBranchSame
fn try_identity(_1: std::result::Result<u32, i32>) -> std::result::Result<u32, i32> {
fn try_identity(_1: Result<u32, i32>) -> Result<u32, i32> {
debug x => _1; // in scope 0 at $DIR/simplify_try.rs:7:17: 7:18
let mut _0: std::result::Result<u32, i32>; // return place in scope 0 at $DIR/simplify_try.rs:7:41: 7:57
let _2: u32; // in scope 0 at $DIR/simplify_try.rs:8:9: 8:10
@ -22,7 +22,7 @@ fn try_identity(_1: std::result::Result<u32, i32>) -> std::result::Result<u32, i
scope 7 (inlined <i32 as From<i32>>::from) { // at $DIR/simplify_try.rs:8:14: 8:15
debug t => ((_0 as Err).0: i32); // in scope 7 at $DIR/simplify_try.rs:8:14: 8:15
}
scope 8 (inlined <std::result::Result<u32, i32> as Try>::from_error) { // at $DIR/simplify_try.rs:8:13: 8:15
scope 8 (inlined <Result<u32, i32> as Try>::from_error) { // at $DIR/simplify_try.rs:8:13: 8:15
debug v => ((_0 as Err).0: i32); // in scope 8 at $DIR/simplify_try.rs:8:13: 8:15
let mut _12: i32; // in scope 8 at $DIR/simplify_try.rs:8:13: 8:15
}
@ -33,7 +33,7 @@ fn try_identity(_1: std::result::Result<u32, i32>) -> std::result::Result<u32, i
scope 5 {
}
}
scope 6 (inlined <std::result::Result<u32, i32> as Try>::into_result) { // at $DIR/simplify_try.rs:8:13: 8:15
scope 6 (inlined <Result<u32, i32> as Try>::into_result) { // at $DIR/simplify_try.rs:8:13: 8:15
debug self => _4; // in scope 6 at $DIR/simplify_try.rs:8:13: 8:15
}

View File

@ -1,6 +1,6 @@
// MIR for `try_identity` after SimplifyLocals
fn try_identity(_1: std::result::Result<u32, i32>) -> std::result::Result<u32, i32> {
fn try_identity(_1: Result<u32, i32>) -> Result<u32, i32> {
debug x => _1; // in scope 0 at $DIR/simplify_try.rs:7:17: 7:18
let mut _0: std::result::Result<u32, i32>; // return place in scope 0 at $DIR/simplify_try.rs:7:41: 7:57
scope 1 {
@ -12,7 +12,7 @@ fn try_identity(_1: std::result::Result<u32, i32>) -> std::result::Result<u32, i
scope 7 (inlined <i32 as From<i32>>::from) { // at $DIR/simplify_try.rs:8:14: 8:15
debug t => ((_0 as Err).0: i32); // in scope 7 at $DIR/simplify_try.rs:8:14: 8:15
}
scope 8 (inlined <std::result::Result<u32, i32> as Try>::from_error) { // at $DIR/simplify_try.rs:8:13: 8:15
scope 8 (inlined <Result<u32, i32> as Try>::from_error) { // at $DIR/simplify_try.rs:8:13: 8:15
debug v => ((_0 as Err).0: i32); // in scope 8 at $DIR/simplify_try.rs:8:13: 8:15
}
}
@ -22,7 +22,7 @@ fn try_identity(_1: std::result::Result<u32, i32>) -> std::result::Result<u32, i
scope 5 {
}
}
scope 6 (inlined <std::result::Result<u32, i32> as Try>::into_result) { // at $DIR/simplify_try.rs:8:13: 8:15
scope 6 (inlined <Result<u32, i32> as Try>::into_result) { // at $DIR/simplify_try.rs:8:13: 8:15
debug self => _0; // in scope 6 at $DIR/simplify_try.rs:8:13: 8:15
}

View File

@ -97,10 +97,10 @@ For revisions in Pull Requests (PR):
26:9-26:23: @18[0]: _1 = move (_18.0: i32)"><span class="annotation">@17,18⦊</span>countdown -= 1<span class="annotation">⦉@17,18</span></span></span><span class="code" style="--layer: 0">;</span></span>
<span class="line"><span class="code" style="--layer: 0"> }</span></span>
<span class="line"><span class="code" style="--layer: 0"> </span><span><span class="code even" style="--layer: 1" title="28:8-28:10: @4[4]: _20 = ()
28:5-28:11: @4[5]: _0 = std::result::Result::&lt;(), u8&gt;::Ok(move _20)
28:5-28:11: @4[5]: _0 = Result::&lt;(), u8&gt;::Ok(move _20)
29:2-29:2: @4.Return: return"><span class="annotation">@4⦊</span>Ok(())</span></span>
<span class="line"><span class="code even" style="--layer: 1" title="28:8-28:10: @4[4]: _20 = ()
28:5-28:11: @4[5]: _0 = std::result::Result::&lt;(), u8&gt;::Ok(move _20)
28:5-28:11: @4[5]: _0 = Result::&lt;(), u8&gt;::Ok(move _20)
29:2-29:2: @4.Return: return">}<span class="annotation">⦉@4</span></span></span></span></div>
</body>
</html>

View File

@ -93,10 +93,10 @@ For revisions in Pull Requests (PR):
17:9-17:23: @14[0]: _1 = move (_13.0: i32)"><span class="annotation">@13,14⦊</span>countdown -= 1<span class="annotation">⦉@13,14</span></span></span><span class="code" style="--layer: 0">;</span></span>
<span class="line"><span class="code" style="--layer: 0"> }</span></span>
<span class="line"><span class="code" style="--layer: 0"> </span><span><span class="code even" style="--layer: 1" title="19:8-19:10: @4[4]: _15 = ()
19:5-19:11: @4[5]: _0 = std::result::Result::&lt;(), u8&gt;::Ok(move _15)
19:5-19:11: @4[5]: _0 = Result::&lt;(), u8&gt;::Ok(move _15)
20:2-20:2: @4.Return: return"><span class="annotation">@4⦊</span>Ok(())</span></span>
<span class="line"><span class="code even" style="--layer: 1" title="19:8-19:10: @4[4]: _15 = ()
19:5-19:11: @4[5]: _0 = std::result::Result::&lt;(), u8&gt;::Ok(move _15)
19:5-19:11: @4[5]: _0 = Result::&lt;(), u8&gt;::Ok(move _15)
20:2-20:2: @4.Return: return">}<span class="annotation">⦉@4</span></span></span></span></div>
</body>
</html>

View File

@ -112,7 +112,7 @@ For revisions in Pull Requests (PR):
20:9-20:43: @1.Call: _8 = Arguments::new_v1(move _9, move _13) -&gt; [return: bb3, unwind: bb11]
20:9-20:43: @3.Call: _7 = _print(move _8) -&gt; [return: bb4, unwind: bb11]
20:9-20:43: @4[5]: _6 = const ()
21:16-21:22: @4[7]: _0 = std::result::Result::&lt;(), u8&gt;::Err(const 1_u8)"><span class="annotation">@1,3,4,8,9⦊</span>println!("Exiting with error...");</span></span>
21:16-21:22: @4[7]: _0 = Result::&lt;(), u8&gt;::Err(const 1_u8)"><span class="annotation">@1,3,4,8,9⦊</span>println!("Exiting with error...");</span></span>
<span class="line"><span class="code odd" style="--layer: 1" title="20:18-20:41: @1[6]: _21 = const main::promoted[1]
20:18-20:41: @1[7]: _11 = &amp;(*_21)
20:18-20:41: @1[8]: _10 = &amp;(*_11)
@ -126,27 +126,27 @@ For revisions in Pull Requests (PR):
20:9-20:43: @1.Call: _8 = Arguments::new_v1(move _9, move _13) -&gt; [return: bb3, unwind: bb11]
20:9-20:43: @3.Call: _7 = _print(move _8) -&gt; [return: bb4, unwind: bb11]
20:9-20:43: @4[5]: _6 = const ()
21:16-21:22: @4[7]: _0 = std::result::Result::&lt;(), u8&gt;::Err(const 1_u8)"> return Err(1)<span class="annotation">⦉@1,3,4,8,9</span></span></span><span class="code" style="--layer: 0">;</span></span>
21:16-21:22: @4[7]: _0 = Result::&lt;(), u8&gt;::Err(const 1_u8)"> return Err(1)<span class="annotation">⦉@1,3,4,8,9</span></span></span><span class="code" style="--layer: 0">;</span></span>
<span class="line"><span class="code" style="--layer: 0"> }</span><span><span class="code even" style="--layer: 1" title="22:6-22:6: @2[0]: _3 = const ()
24:13-24:40: @2[4]: _18 = Firework { strength: const 1000_i32 }
26:8-26:10: @5[2]: _19 = ()
26:5-26:11: @5[3]: _0 = std::result::Result::&lt;(), u8&gt;::Ok(move _19)"><span class="annotation">@2,5,6,7⦊</span></span></span>
26:5-26:11: @5[3]: _0 = Result::&lt;(), u8&gt;::Ok(move _19)"><span class="annotation">@2,5,6,7⦊</span></span></span>
<span class="line"><span class="code even" style="--layer: 1" title="22:6-22:6: @2[0]: _3 = const ()
24:13-24:40: @2[4]: _18 = Firework { strength: const 1000_i32 }
26:8-26:10: @5[2]: _19 = ()
26:5-26:11: @5[3]: _0 = std::result::Result::&lt;(), u8&gt;::Ok(move _19)"></span></span>
26:5-26:11: @5[3]: _0 = Result::&lt;(), u8&gt;::Ok(move _19)"></span></span>
<span class="line"><span class="code even" style="--layer: 1" title="22:6-22:6: @2[0]: _3 = const ()
24:13-24:40: @2[4]: _18 = Firework { strength: const 1000_i32 }
26:8-26:10: @5[2]: _19 = ()
26:5-26:11: @5[3]: _0 = std::result::Result::&lt;(), u8&gt;::Ok(move _19)"> let _ = Firework { strength: 1000 };</span></span>
26:5-26:11: @5[3]: _0 = Result::&lt;(), u8&gt;::Ok(move _19)"> let _ = Firework { strength: 1000 };</span></span>
<span class="line"><span class="code even" style="--layer: 1" title="22:6-22:6: @2[0]: _3 = const ()
24:13-24:40: @2[4]: _18 = Firework { strength: const 1000_i32 }
26:8-26:10: @5[2]: _19 = ()
26:5-26:11: @5[3]: _0 = std::result::Result::&lt;(), u8&gt;::Ok(move _19)"></span></span>
26:5-26:11: @5[3]: _0 = Result::&lt;(), u8&gt;::Ok(move _19)"></span></span>
<span class="line"><span class="code even" style="--layer: 1" title="22:6-22:6: @2[0]: _3 = const ()
24:13-24:40: @2[4]: _18 = Firework { strength: const 1000_i32 }
26:8-26:10: @5[2]: _19 = ()
26:5-26:11: @5[3]: _0 = std::result::Result::&lt;(), u8&gt;::Ok(move _19)"> Ok(())<span class="annotation">⦉@2,5,6,7</span></span></span><span class="code" style="--layer: 0"></span></span>
26:5-26:11: @5[3]: _0 = Result::&lt;(), u8&gt;::Ok(move _19)"> Ok(())<span class="annotation">⦉@2,5,6,7</span></span></span><span class="code" style="--layer: 0"></span></span>
<span class="line"><span class="code" style="--layer: 0">}</span><span><span class="code odd" style="--layer: 1" title="27:2-27:2: @10.Return: return"><span class="annotation">@10⦊</span><span class="annotation">⦉@10</span></span></span></span></div>
</body>
</html>

View File

@ -181,7 +181,7 @@ For revisions in Pull Requests (PR):
31:9-31:43: @4.Call: _14 = Arguments::new_v1(move _15, move _19) -&gt; [return: bb6, unwind: bb14]
31:9-31:43: @6.Call: _13 = _print(move _14) -&gt; [return: bb7, unwind: bb14]
31:9-31:43: @7[5]: _12 = const ()
32:16-32:22: @7[7]: _0 = std::result::Result::&lt;(), u8&gt;::Err(const 1_u8)"><span class="annotation">@4,6,7,11,12⦊</span>println!("Exiting with error...");</span></span>
32:16-32:22: @7[7]: _0 = Result::&lt;(), u8&gt;::Err(const 1_u8)"><span class="annotation">@4,6,7,11,12⦊</span>println!("Exiting with error...");</span></span>
<span class="line"><span class="code odd" style="--layer: 1" title="31:18-31:41: @4[6]: _27 = const main::promoted[1]
31:18-31:41: @4[7]: _17 = &amp;(*_27)
31:18-31:41: @4[8]: _16 = &amp;(*_17)
@ -195,43 +195,43 @@ For revisions in Pull Requests (PR):
31:9-31:43: @4.Call: _14 = Arguments::new_v1(move _15, move _19) -&gt; [return: bb6, unwind: bb14]
31:9-31:43: @6.Call: _13 = _print(move _14) -&gt; [return: bb7, unwind: bb14]
31:9-31:43: @7[5]: _12 = const ()
32:16-32:22: @7[7]: _0 = std::result::Result::&lt;(), u8&gt;::Err(const 1_u8)"> return Err(1)<span class="annotation">⦉@4,6,7,11,12</span></span></span><span class="code" style="--layer: 0">;</span></span>
32:16-32:22: @7[7]: _0 = Result::&lt;(), u8&gt;::Err(const 1_u8)"> return Err(1)<span class="annotation">⦉@4,6,7,11,12</span></span></span><span class="code" style="--layer: 0">;</span></span>
<span class="line"><span class="code" style="--layer: 0"> }</span><span><span class="code even" style="--layer: 1" title="33:6-33:6: @5[0]: _9 = const ()
39:13-39:40: @5[4]: _24 = Firework::&lt;i32&gt; { strength: const 1000_i32 }
41:8-41:10: @8[2]: _25 = ()
41:5-41:11: @8[3]: _0 = std::result::Result::&lt;(), u8&gt;::Ok(move _25)"><span class="annotation">@5,8,9,10⦊</span> // The remaining lines below have no coverage because `if true` (with the constant literal</span></span>
41:5-41:11: @8[3]: _0 = Result::&lt;(), u8&gt;::Ok(move _25)"><span class="annotation">@5,8,9,10⦊</span> // The remaining lines below have no coverage because `if true` (with the constant literal</span></span>
<span class="line"><span class="code even" style="--layer: 1" title="33:6-33:6: @5[0]: _9 = const ()
39:13-39:40: @5[4]: _24 = Firework::&lt;i32&gt; { strength: const 1000_i32 }
41:8-41:10: @8[2]: _25 = ()
41:5-41:11: @8[3]: _0 = std::result::Result::&lt;(), u8&gt;::Ok(move _25)"> // `true`) is guaranteed to execute the `then` block, which is also guaranteed to `return`.</span></span>
41:5-41:11: @8[3]: _0 = Result::&lt;(), u8&gt;::Ok(move _25)"> // `true`) is guaranteed to execute the `then` block, which is also guaranteed to `return`.</span></span>
<span class="line"><span class="code even" style="--layer: 1" title="33:6-33:6: @5[0]: _9 = const ()
39:13-39:40: @5[4]: _24 = Firework::&lt;i32&gt; { strength: const 1000_i32 }
41:8-41:10: @8[2]: _25 = ()
41:5-41:11: @8[3]: _0 = std::result::Result::&lt;(), u8&gt;::Ok(move _25)"> // Thankfully, in the normal case, conditions are not guaranteed ahead of time, and as shown</span></span>
41:5-41:11: @8[3]: _0 = Result::&lt;(), u8&gt;::Ok(move _25)"> // Thankfully, in the normal case, conditions are not guaranteed ahead of time, and as shown</span></span>
<span class="line"><span class="code even" style="--layer: 1" title="33:6-33:6: @5[0]: _9 = const ()
39:13-39:40: @5[4]: _24 = Firework::&lt;i32&gt; { strength: const 1000_i32 }
41:8-41:10: @8[2]: _25 = ()
41:5-41:11: @8[3]: _0 = std::result::Result::&lt;(), u8&gt;::Ok(move _25)"> // in other tests, the lines below would have coverage (which would show they had `0`</span></span>
41:5-41:11: @8[3]: _0 = Result::&lt;(), u8&gt;::Ok(move _25)"> // in other tests, the lines below would have coverage (which would show they had `0`</span></span>
<span class="line"><span class="code even" style="--layer: 1" title="33:6-33:6: @5[0]: _9 = const ()
39:13-39:40: @5[4]: _24 = Firework::&lt;i32&gt; { strength: const 1000_i32 }
41:8-41:10: @8[2]: _25 = ()
41:5-41:11: @8[3]: _0 = std::result::Result::&lt;(), u8&gt;::Ok(move _25)"> // executions, assuming the condition still evaluated to `true`).</span></span>
41:5-41:11: @8[3]: _0 = Result::&lt;(), u8&gt;::Ok(move _25)"> // executions, assuming the condition still evaluated to `true`).</span></span>
<span class="line"><span class="code even" style="--layer: 1" title="33:6-33:6: @5[0]: _9 = const ()
39:13-39:40: @5[4]: _24 = Firework::&lt;i32&gt; { strength: const 1000_i32 }
41:8-41:10: @8[2]: _25 = ()
41:5-41:11: @8[3]: _0 = std::result::Result::&lt;(), u8&gt;::Ok(move _25)"></span></span>
41:5-41:11: @8[3]: _0 = Result::&lt;(), u8&gt;::Ok(move _25)"></span></span>
<span class="line"><span class="code even" style="--layer: 1" title="33:6-33:6: @5[0]: _9 = const ()
39:13-39:40: @5[4]: _24 = Firework::&lt;i32&gt; { strength: const 1000_i32 }
41:8-41:10: @8[2]: _25 = ()
41:5-41:11: @8[3]: _0 = std::result::Result::&lt;(), u8&gt;::Ok(move _25)"> let _ = Firework { strength: 1000 };</span></span>
41:5-41:11: @8[3]: _0 = Result::&lt;(), u8&gt;::Ok(move _25)"> let _ = Firework { strength: 1000 };</span></span>
<span class="line"><span class="code even" style="--layer: 1" title="33:6-33:6: @5[0]: _9 = const ()
39:13-39:40: @5[4]: _24 = Firework::&lt;i32&gt; { strength: const 1000_i32 }
41:8-41:10: @8[2]: _25 = ()
41:5-41:11: @8[3]: _0 = std::result::Result::&lt;(), u8&gt;::Ok(move _25)"></span></span>
41:5-41:11: @8[3]: _0 = Result::&lt;(), u8&gt;::Ok(move _25)"></span></span>
<span class="line"><span class="code even" style="--layer: 1" title="33:6-33:6: @5[0]: _9 = const ()
39:13-39:40: @5[4]: _24 = Firework::&lt;i32&gt; { strength: const 1000_i32 }
41:8-41:10: @8[2]: _25 = ()
41:5-41:11: @8[3]: _0 = std::result::Result::&lt;(), u8&gt;::Ok(move _25)"> Ok(())<span class="annotation">⦉@5,8,9,10</span></span></span><span class="code" style="--layer: 0"></span></span>
41:5-41:11: @8[3]: _0 = Result::&lt;(), u8&gt;::Ok(move _25)"> Ok(())<span class="annotation">⦉@5,8,9,10</span></span></span><span class="code" style="--layer: 0"></span></span>
<span class="line"><span class="code" style="--layer: 0">}</span><span><span class="code odd" style="--layer: 1" title="42:2-42:2: @13.Return: return"><span class="annotation">@13⦊</span><span class="annotation">⦉@13</span></span></span></span></div>
</body>
</html>

View File

@ -94,7 +94,7 @@ For revisions in Pull Requests (PR):
<span class="line"><span class="code" style="--layer: 0"> } else </span><span><span class="code odd" style="--layer: 1" title="16:16-17:10: @2[0]: _3 = const ()"><span class="annotation">@2⦊</span>{</span></span>
<span class="line"><span class="code odd" style="--layer: 1" title="16:16-17:10: @2[0]: _3 = const ()"> }<span class="annotation">⦉@2</span></span></span><span class="code" style="--layer: 0"></span></span>
<span class="line"><span class="code" style="--layer: 0"> </span><span><span class="code even" style="--layer: 1" title="18:12-18:14: @19[3]: _30 = ()
18:9-18:15: @19[4]: _0 = std::result::Result::&lt;(), std::fmt::Error&gt;::Ok(move _30)"><span class="annotation">@19⦊</span>Ok(())<span class="annotation">⦉@19</span></span></span><span class="code" style="--layer: 0"></span></span>
18:9-18:15: @19[4]: _0 = Result::&lt;(), std::fmt::Error&gt;::Ok(move _30)"><span class="annotation">@19⦊</span>Ok(())<span class="annotation">⦉@19</span></span></span><span class="code" style="--layer: 0"></span></span>
<span class="line"><span class="code" style="--layer: 0"> }</span><span><span class="code odd" style="--layer: 1" title="19:6-19:6: @20.Return: return"><span class="annotation">@20⦊</span><span class="annotation">⦉@20</span></span></span></span></div>
</body>
</html>

View File

@ -249,10 +249,10 @@ For revisions in Pull Requests (PR):
25:9-25:23: @20[0]: _1 = move (_47.0: i32)"><span class="annotation">@19,20⦊</span>countdown -= 1<span class="annotation">⦉@19,20</span></span></span><span class="code" style="--layer: 0">;</span></span>
<span class="line"><span class="code" style="--layer: 0"> }</span></span>
<span class="line"><span class="code" style="--layer: 0"> </span><span><span class="code even" style="--layer: 1" title="27:8-27:10: @4[4]: _49 = ()
27:5-27:11: @4[5]: _0 = std::result::Result::&lt;(), u8&gt;::Ok(move _49)
27:5-27:11: @4[5]: _0 = Result::&lt;(), u8&gt;::Ok(move _49)
28:2-28:2: @4.Return: return"><span class="annotation">@4⦊</span>Ok(())</span></span>
<span class="line"><span class="code even" style="--layer: 1" title="27:8-27:10: @4[4]: _49 = ()
27:5-27:11: @4[5]: _0 = std::result::Result::&lt;(), u8&gt;::Ok(move _49)
27:5-27:11: @4[5]: _0 = Result::&lt;(), u8&gt;::Ok(move _49)
28:2-28:2: @4.Return: return">}<span class="annotation">⦉@4</span></span></span></span></div>
</body>
</html>

View File

@ -93,10 +93,10 @@ For revisions in Pull Requests (PR):
21:9-21:23: @14[0]: _1 = move (_13.0: i32)"><span class="annotation">@13,14⦊</span>countdown -= 1<span class="annotation">⦉@13,14</span></span></span><span class="code" style="--layer: 0">;</span></span>
<span class="line"><span class="code" style="--layer: 0"> }</span></span>
<span class="line"><span class="code" style="--layer: 0"> </span><span><span class="code even" style="--layer: 1" title="23:8-23:10: @4[4]: _15 = ()
23:5-23:11: @4[5]: _0 = std::result::Result::&lt;(), u8&gt;::Ok(move _15)
23:5-23:11: @4[5]: _0 = Result::&lt;(), u8&gt;::Ok(move _15)
24:2-24:2: @4.Return: return"><span class="annotation">@4⦊</span>Ok(())</span></span>
<span class="line"><span class="code even" style="--layer: 1" title="23:8-23:10: @4[4]: _15 = ()
23:5-23:11: @4[5]: _0 = std::result::Result::&lt;(), u8&gt;::Ok(move _15)
23:5-23:11: @4[5]: _0 = Result::&lt;(), u8&gt;::Ok(move _15)
24:2-24:2: @4.Return: return">}<span class="annotation">⦉@4</span></span></span></span></div>
</body>
</html>

View File

@ -72,10 +72,10 @@ For revisions in Pull Requests (PR):
<div class="code" style="counter-reset: line 3"><span class="line"><span><span class="code even" style="--layer: 1" title="5:8-5:20: @0[1]: _2 = _1"><span class="annotation">@0⦊</span>fn call(return_error: bool) -&gt; Result&lt;(),()&gt; {</span></span>
<span class="line"><span class="code even" style="--layer: 1" title="5:8-5:20: @0[1]: _2 = _1"> if return_error<span class="annotation">⦉@0</span></span></span><span class="code" style="--layer: 0"> {</span></span>
<span class="line"><span class="code" style="--layer: 0"> </span><span><span class="code odd" style="--layer: 1" title="6:13-6:15: @1[1]: _3 = ()
6:9-6:16: @1[2]: _0 = std::result::Result::&lt;(), ()&gt;::Err(move _3)"><span class="annotation">@1⦊</span>Err(())<span class="annotation">⦉@1</span></span></span><span class="code" style="--layer: 0"></span></span>
6:9-6:16: @1[2]: _0 = Result::&lt;(), ()&gt;::Err(move _3)"><span class="annotation">@1⦊</span>Err(())<span class="annotation">⦉@1</span></span></span><span class="code" style="--layer: 0"></span></span>
<span class="line"><span class="code" style="--layer: 0"> } else {</span></span>
<span class="line"><span class="code" style="--layer: 0"> </span><span><span class="code even" style="--layer: 1" title="8:12-8:14: @2[1]: _4 = ()
8:9-8:15: @2[2]: _0 = std::result::Result::&lt;(), ()&gt;::Ok(move _4)"><span class="annotation">@2⦊</span>Ok(())<span class="annotation">⦉@2</span></span></span><span class="code" style="--layer: 0"></span></span>
8:9-8:15: @2[2]: _0 = Result::&lt;(), ()&gt;::Ok(move _4)"><span class="annotation">@2⦊</span>Ok(())<span class="annotation">⦉@2</span></span></span><span class="code" style="--layer: 0"></span></span>
<span class="line"><span class="code" style="--layer: 0"> }</span></span>
<span class="line"><span class="code" style="--layer: 0">}</span><span><span class="code odd" style="--layer: 1" title="10:2-10:2: @3.Return: return"><span class="annotation">@3⦊</span><span class="annotation">⦉@3</span></span></span></span></div>
</body>

View File

@ -123,7 +123,7 @@ For revisions in Pull Requests (PR):
<span class="line"><span class="code" style="--layer: 0"> }</span></span>
<span class="line"><span class="code" style="--layer: 0"> }</span></span>
<span class="line"><span class="code" style="--layer: 0"> </span><span><span class="code even" style="--layer: 1" title="35:8-35:10: @5[9]: _47 = ()
35:5-35:11: @5[10]: _0 = std::result::Result::&lt;(), ()&gt;::Ok(move _47)"><span class="annotation">@5⦊</span>Ok(())<span class="annotation">⦉@5</span></span></span><span class="code" style="--layer: 0"></span></span>
35:5-35:11: @5[10]: _0 = Result::&lt;(), ()&gt;::Ok(move _47)"><span class="annotation">@5⦊</span>Ok(())<span class="annotation">⦉@5</span></span></span><span class="code" style="--layer: 0"></span></span>
<span class="line"><span class="code" style="--layer: 0">}</span><span><span class="code odd" style="--layer: 1" title="36:2-36:2: @38.Return: return"><span class="annotation">@38⦊</span><span class="annotation">⦉@38</span></span></span></span></div>
</body>
</html>

View File

@ -102,11 +102,11 @@ For revisions in Pull Requests (PR):
18:21-20:22: @6[3]: _10 = Gt(move _11, const 8_i32)"> 8<span class="annotation">⦉@6</span></span></span><span class="code" style="--layer: 0"></span></span>
<span class="line"><span class="code" style="--layer: 0"> {</span></span>
<span class="line"><span class="code" style="--layer: 0"> </span><span><span class="code even" style="--layer: 1" title="22:24-22:26: @8[1]: _12 = ()
22:21-22:27: @8[2]: _0 = std::result::Result::&lt;(), u8&gt;::Ok(move _12)"><span class="annotation">@8⦊</span>Ok(())<span class="annotation">⦉@8</span></span></span><span class="code" style="--layer: 0"></span></span>
22:21-22:27: @8[2]: _0 = Result::&lt;(), u8&gt;::Ok(move _12)"><span class="annotation">@8⦊</span>Ok(())<span class="annotation">⦉@8</span></span></span><span class="code" style="--layer: 0"></span></span>
<span class="line"><span class="code" style="--layer: 0"> }</span></span>
<span class="line"><span class="code" style="--layer: 0"> else</span></span>
<span class="line"><span class="code" style="--layer: 0"> {</span></span>
<span class="line"><span class="code" style="--layer: 0"> </span><span><span class="code odd" style="--layer: 1" title="26:21-26:27: @9[0]: _0 = std::result::Result::&lt;(), u8&gt;::Err(const 1_u8)"><span class="annotation">@9⦊</span>Err(1)<span class="annotation">⦉@9</span></span></span><span class="code" style="--layer: 0"></span></span>
<span class="line"><span class="code" style="--layer: 0"> </span><span><span class="code odd" style="--layer: 1" title="26:21-26:27: @9[0]: _0 = Result::&lt;(), u8&gt;::Err(const 1_u8)"><span class="annotation">@9⦊</span>Err(1)<span class="annotation">⦉@9</span></span></span><span class="code" style="--layer: 0"></span></span>
<span class="line"><span class="code" style="--layer: 0"> }</span></span>
<span class="line"><span class="code" style="--layer: 0"> ;</span></span>
<span class="line"><span class="code" style="--layer: 0"> }</span><span><span class="code even" style="--layer: 1" title="29:10-29:10: @7[0]: _6 = const ()
@ -124,7 +124,7 @@ For revisions in Pull Requests (PR):
<span class="line"><span class="code" style="--layer: 0"> ;</span></span>
<span class="line"><span class="code" style="--layer: 0"> }</span></span>
<span class="line"><span class="code" style="--layer: 0"> </span><span><span class="code odd" style="--layer: 1" title="35:8-35:10: @4[4]: _15 = ()
35:5-35:11: @4[5]: _0 = std::result::Result::&lt;(), u8&gt;::Ok(move _15)"><span class="annotation">@4⦊</span>Ok(())<span class="annotation">⦉@4</span></span></span><span class="code" style="--layer: 0"></span></span>
35:5-35:11: @4[5]: _0 = Result::&lt;(), u8&gt;::Ok(move _15)"><span class="annotation">@4⦊</span>Ok(())<span class="annotation">⦉@4</span></span></span><span class="code" style="--layer: 0"></span></span>
<span class="line"><span class="code" style="--layer: 0">}</span><span><span class="code even" style="--layer: 1" title="36:2-36:2: @12.Return: return"><span class="annotation">@12⦊</span><span class="annotation">⦉@12</span></span></span></span></div>
</body>
</html>

View File

@ -59,22 +59,22 @@ error[E0308]: mismatched types
--> $DIR/async-block-control-flow-static-semantics.rs:47:44
|
LL | fn rethrow_targets_async_block_not_fn() -> Result<u8, MyErr> {
| ---------------------------------- ^^^^^^^^^^^^^^^^^ expected enum `std::result::Result`, found `()`
| ---------------------------------- ^^^^^^^^^^^^^^^^^ expected enum `Result`, found `()`
| |
| implicitly returns `()` as its body has no tail or `return` expression
|
= note: expected enum `std::result::Result<u8, MyErr>`
= note: expected enum `Result<u8, MyErr>`
found unit type `()`
error[E0308]: mismatched types
--> $DIR/async-block-control-flow-static-semantics.rs:56:50
|
LL | fn rethrow_targets_async_block_not_async_fn() -> Result<u8, MyErr> {
| ---------------------------------------- ^^^^^^^^^^^^^^^^^ expected enum `std::result::Result`, found `()`
| ---------------------------------------- ^^^^^^^^^^^^^^^^^ expected enum `Result`, found `()`
| |
| implicitly returns `()` as its body has no tail or `return` expression
|
= note: expected enum `std::result::Result<u8, MyErr>`
= note: expected enum `Result<u8, MyErr>`
found unit type `()`
error: aborting due to 8 previous errors

View File

@ -13,9 +13,9 @@ LL | pub async fn run() {
| - within this `impl Future`
|
= help: within `impl Future`, the trait `Send` is not implemented for `MutexGuard<'_, ()>`
= note: required because it appears within the type `for<'r, 's, 't0, 't1, 't2, 't3> {ResumeTy, Arc<Mutex<()>>, &'r Mutex<()>, std::result::Result<MutexGuard<'s, ()>, PoisonError<MutexGuard<'t0, ()>>>, &'t1 MutexGuard<'t2, ()>, MutexGuard<'t3, ()>, (), impl Future}`
= note: required because it appears within the type `[static generator@run::{closure#0} for<'r, 's, 't0, 't1, 't2, 't3> {ResumeTy, Arc<Mutex<()>>, &'r Mutex<()>, std::result::Result<MutexGuard<'s, ()>, PoisonError<MutexGuard<'t0, ()>>>, &'t1 MutexGuard<'t2, ()>, MutexGuard<'t3, ()>, (), impl Future}]`
= note: required because it appears within the type `from_generator::GenFuture<[static generator@run::{closure#0} for<'r, 's, 't0, 't1, 't2, 't3> {ResumeTy, Arc<Mutex<()>>, &'r Mutex<()>, std::result::Result<MutexGuard<'s, ()>, PoisonError<MutexGuard<'t0, ()>>>, &'t1 MutexGuard<'t2, ()>, MutexGuard<'t3, ()>, (), impl Future}]>`
= note: required because it appears within the type `for<'r, 's, 't0, 't1, 't2, 't3> {ResumeTy, Arc<Mutex<()>>, &'r Mutex<()>, Result<MutexGuard<'s, ()>, PoisonError<MutexGuard<'t0, ()>>>, &'t1 MutexGuard<'t2, ()>, MutexGuard<'t3, ()>, (), impl Future}`
= note: required because it appears within the type `[static generator@run::{closure#0} for<'r, 's, 't0, 't1, 't2, 't3> {ResumeTy, Arc<Mutex<()>>, &'r Mutex<()>, Result<MutexGuard<'s, ()>, PoisonError<MutexGuard<'t0, ()>>>, &'t1 MutexGuard<'t2, ()>, MutexGuard<'t3, ()>, (), impl Future}]`
= note: required because it appears within the type `from_generator::GenFuture<[static generator@run::{closure#0} for<'r, 's, 't0, 't1, 't2, 't3> {ResumeTy, Arc<Mutex<()>>, &'r Mutex<()>, Result<MutexGuard<'s, ()>, PoisonError<MutexGuard<'t0, ()>>>, &'t1 MutexGuard<'t2, ()>, MutexGuard<'t3, ()>, (), impl Future}]>`
= note: required because it appears within the type `impl Future`
= note: required because it appears within the type `impl Future`

View File

@ -12,13 +12,13 @@ error[E0308]: mismatched types
--> $DIR/coercion-missing-tail-expected-type.rs:8:13
|
LL | fn foo() -> Result<u8, u64> {
| --- ^^^^^^^^^^^^^^^ expected enum `std::result::Result`, found `()`
| --- ^^^^^^^^^^^^^^^ expected enum `Result`, found `()`
| |
| implicitly returns `()` as its body has no tail or `return` expression
LL | Ok(1);
| - help: consider removing this semicolon
|
= note: expected enum `std::result::Result<u8, u64>`
= note: expected enum `Result<u8, u64>`
found unit type `()`
error: aborting due to 2 previous errors

View File

@ -11,7 +11,7 @@ LL | Err(#[stable(feature = "rust1", since = "1.0.0")] E),
|
= note: `let` bindings require an "irrefutable pattern", like a `struct` or an `enum` with only one variant
= note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html
= note: the matched value is of type `std::result::Result<u32, !>`
= note: the matched value is of type `Result<u32, !>`
help: you might want to use `if let` to ignore the variant that isn't matched
|
LL | if let Ok(_x) = foo() { /* */ }

View File

@ -2,11 +2,11 @@ error[E0308]: mismatched types
--> $DIR/type-mismatch-signature-deduction.rs:13:9
|
LL | 5
| ^ expected enum `std::result::Result`, found integer
| ^ expected enum `Result`, found integer
|
= note: expected type `std::result::Result<{integer}, _>`
= note: expected type `Result<{integer}, _>`
found type `{integer}`
note: return type inferred to be `std::result::Result<{integer}, _>` here
note: return type inferred to be `Result<{integer}, _>` here
--> $DIR/type-mismatch-signature-deduction.rs:8:20
|
LL | return Ok(6);
@ -16,9 +16,9 @@ error[E0271]: type mismatch resolving `<[generator@$DIR/type-mismatch-signature-
--> $DIR/type-mismatch-signature-deduction.rs:5:13
|
LL | fn foo() -> impl Generator<Return = i32> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected enum `std::result::Result`, found `i32`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected enum `Result`, found `i32`
|
= note: expected enum `std::result::Result<{integer}, _>`
= note: expected enum `Result<{integer}, _>`
found type `i32`
error: aborting due to 2 previous errors

View File

@ -139,7 +139,7 @@ mod stdlib {
mod result {
type A = Result;
//~^ ERROR missing generics for enum `std::result::Result`
//~^ ERROR missing generics for enum `Result`
//~| HELP use angle brackets
type B = Result<String>;

View File

@ -365,7 +365,7 @@ note: struct defined here, with at most 3 type parameters: `K`, `V`, `S`
LL | pub struct HashMap<K, V, S = RandomState> {
| ^^^^^^^ - - -
error[E0107]: missing generics for enum `std::result::Result`
error[E0107]: missing generics for enum `Result`
--> $DIR/wrong-number-of-args.rs:141:18
|
LL | type A = Result;

View File

@ -4,7 +4,7 @@ error[E0053]: method `fmt` has an incompatible type for trait
LL | fn fmt(&self, x: &str) -> () { }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ types differ in mutability
|
= note: expected fn pointer `fn(&MyType, &mut Formatter<'_>) -> std::result::Result<(), std::fmt::Error>`
= note: expected fn pointer `fn(&MyType, &mut Formatter<'_>) -> Result<(), std::fmt::Error>`
found fn pointer `fn(&MyType, &str)`
error[E0050]: method `fmt` has 1 parameter but the declaration in trait `std::fmt::Display::fmt` has 2
@ -13,7 +13,7 @@ error[E0050]: method `fmt` has 1 parameter but the declaration in trait `std::fm
LL | fn fmt(&self) -> () { }
| ^^^^^ expected 2 parameters, found 1
|
= note: `fmt` from trait: `fn(&Self, &mut Formatter<'_>) -> std::result::Result<(), std::fmt::Error>`
= note: `fmt` from trait: `fn(&Self, &mut Formatter<'_>) -> Result<(), std::fmt::Error>`
error[E0186]: method `fmt` has a `&self` declaration in the trait, but not in the impl
--> $DIR/trait_type.rs:17:4
@ -21,7 +21,7 @@ error[E0186]: method `fmt` has a `&self` declaration in the trait, but not in th
LL | fn fmt() -> () { }
| ^^^^^^^^^^^^^^ expected `&self` in impl
|
= note: `fmt` from trait: `fn(&Self, &mut Formatter<'_>) -> std::result::Result<(), std::fmt::Error>`
= note: `fmt` from trait: `fn(&Self, &mut Formatter<'_>) -> Result<(), std::fmt::Error>`
error[E0046]: not all trait items implemented, missing: `fmt`
--> $DIR/trait_type.rs:21:1
@ -29,7 +29,7 @@ error[E0046]: not all trait items implemented, missing: `fmt`
LL | impl std::fmt::Display for MyType4 {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `fmt` in implementation
|
= help: implement the missing item: `fn fmt(&self, _: &mut Formatter<'_>) -> std::result::Result<(), std::fmt::Error> { todo!() }`
= help: implement the missing item: `fn fmt(&self, _: &mut Formatter<'_>) -> Result<(), std::fmt::Error> { todo!() }`
error: aborting due to 4 previous errors

View File

@ -1,8 +1,8 @@
error[E0282]: type annotations needed for `std::result::Result<(), E>`
error[E0282]: type annotations needed for `Result<(), E>`
--> $DIR/cannot-infer-closure-circular.rs:7:14
|
LL | let x = |r| {
| ^ consider giving this closure parameter the explicit type `std::result::Result<(), E>`, with the type parameters specified
| ^ consider giving this closure parameter the explicit type `Result<(), E>`, with the type parameters specified
error: aborting due to previous error

View File

@ -1,4 +1,4 @@
error[E0282]: type annotations needed for the closure `fn((), ()) -> std::result::Result<(), _>`
error[E0282]: type annotations needed for the closure `fn((), ()) -> Result<(), _>`
--> $DIR/cannot-infer-closure.rs:3:15
|
LL | Err(a)?;
@ -7,8 +7,8 @@ LL | Err(a)?;
= note: `?` implicitly converts the error value into a type implementing `From<()>`
help: give this closure an explicit return type without `_` placeholders
|
LL | let x = |a: (), b: ()| -> std::result::Result<(), _> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
LL | let x = |a: (), b: ()| -> Result<(), _> {
| ^^^^^^^^^^^^^^^^
error: aborting due to previous error

View File

@ -1,4 +1,4 @@
error[E0282]: type annotations needed for the closure `fn() -> std::result::Result<(), QualifiedError<_>>`
error[E0282]: type annotations needed for the closure `fn() -> Result<(), QualifiedError<_>>`
--> $DIR/cannot-infer-partial-try-return.rs:19:9
|
LL | infallible()?;
@ -7,8 +7,8 @@ LL | infallible()?;
= note: `?` implicitly converts the error value into `QualifiedError<_>` using its implementation of `From<Infallible>`
help: give this closure an explicit return type without `_` placeholders
|
LL | let x = || -> std::result::Result<(), QualifiedError<_>> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
LL | let x = || -> Result<(), QualifiedError<_>> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to previous error

View File

@ -2,7 +2,7 @@ error[E0283]: type annotations needed
--> $DIR/issue-72616.rs:20:30
|
LL | if String::from("a") == "a".try_into().unwrap() {}
| ^^ -------------- this method call resolves to `std::result::Result<T, <Self as TryInto<T>>::Error>`
| ^^ -------------- this method call resolves to `Result<T, <Self as TryInto<T>>::Error>`
| |
| cannot infer type
|

View File

@ -5,7 +5,7 @@ LL | impl TryFrom<OtherStream> for MyStream {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `Error`, `try_from` in implementation
|
= help: implement the missing item: `type Error = Type;`
= help: implement the missing item: `fn try_from(_: T) -> std::result::Result<Self, <Self as TryFrom<T>>::Error> { todo!() }`
= help: implement the missing item: `fn try_from(_: T) -> Result<Self, <Self as TryFrom<T>>::Error> { todo!() }`
error: aborting due to previous error

View File

@ -4,10 +4,10 @@ error[E0308]: mismatched types
LL | match a {
| - this expression has type `Option<Box<{integer}>>`
LL | Ok(a) =>
| ^^^^^ expected enum `Option`, found enum `std::result::Result`
| ^^^^^ expected enum `Option`, found enum `Result`
|
= note: expected enum `Option<Box<{integer}>>`
found enum `std::result::Result<_, _>`
found enum `Result<_, _>`
error: aborting due to previous error

View File

@ -2,23 +2,23 @@ error[E0308]: mismatched types
--> $DIR/issue-12552.rs:6:5
|
LL | match t {
| - this expression has type `std::result::Result<_, {integer}>`
| - this expression has type `Result<_, {integer}>`
LL | Some(k) => match k {
| ^^^^^^^ expected enum `std::result::Result`, found enum `Option`
| ^^^^^^^ expected enum `Result`, found enum `Option`
|
= note: expected enum `std::result::Result<_, {integer}>`
= note: expected enum `Result<_, {integer}>`
found enum `Option<_>`
error[E0308]: mismatched types
--> $DIR/issue-12552.rs:9:5
|
LL | match t {
| - this expression has type `std::result::Result<_, {integer}>`
| - this expression has type `Result<_, {integer}>`
...
LL | None => ()
| ^^^^ expected enum `std::result::Result`, found enum `Option`
| ^^^^ expected enum `Result`, found enum `Option`
|
= note: expected enum `std::result::Result<_, {integer}>`
= note: expected enum `Result<_, {integer}>`
found enum `Option<_>`
error: aborting due to 2 previous errors

View File

@ -8,13 +8,13 @@ pub fn main() {
Ok(u) => u,
//~^ ERROR mismatched types
//~| expected enum `Option<{integer}>`
//~| found enum `std::result::Result<_, _>`
//~| expected enum `Option`, found enum `std::result::Result`
//~| found enum `Result<_, _>`
//~| expected enum `Option`, found enum `Result`
Err(e) => panic!(e)
//~^ ERROR mismatched types
//~| expected enum `Option<{integer}>`
//~| found enum `std::result::Result<_, _>`
//~| expected enum `Option`, found enum `std::result::Result`
//~| found enum `Result<_, _>`
//~| expected enum `Option`, found enum `Result`
};
}

View File

@ -4,10 +4,10 @@ error[E0308]: mismatched types
LL | let _x: usize = match Some(1) {
| ------- this expression has type `Option<{integer}>`
LL | Ok(u) => u,
| ^^^^^ expected enum `Option`, found enum `std::result::Result`
| ^^^^^ expected enum `Option`, found enum `Result`
|
= note: expected enum `Option<{integer}>`
found enum `std::result::Result<_, _>`
found enum `Result<_, _>`
error[E0308]: mismatched types
--> $DIR/issue-13466.rs:14:9
@ -16,10 +16,10 @@ LL | let _x: usize = match Some(1) {
| ------- this expression has type `Option<{integer}>`
...
LL | Err(e) => panic!(e)
| ^^^^^^ expected enum `Option`, found enum `std::result::Result`
| ^^^^^^ expected enum `Option`, found enum `Result`
|
= note: expected enum `Option<{integer}>`
found enum `std::result::Result<_, _>`
found enum `Result<_, _>`
error: aborting due to 2 previous errors

View File

@ -4,7 +4,7 @@ impl Iterator for S {
type Item = i32;
fn next(&mut self) -> Result<i32, i32> { Ok(7) }
//~^ ERROR method `next` has an incompatible type for trait
//~| expected enum `Option`, found enum `std::result::Result`
//~| expected enum `Option`, found enum `Result`
}
fn main() {}

View File

@ -2,10 +2,10 @@ error[E0053]: method `next` has an incompatible type for trait
--> $DIR/issue-21332.rs:5:5
|
LL | fn next(&mut self) -> Result<i32, i32> { Ok(7) }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected enum `Option`, found enum `std::result::Result`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected enum `Option`, found enum `Result`
|
= note: expected fn pointer `fn(&mut S) -> Option<i32>`
found fn pointer `fn(&mut S) -> std::result::Result<i32, i32>`
found fn pointer `fn(&mut S) -> Result<i32, i32>`
error: aborting due to previous error

View File

@ -3,7 +3,7 @@ fn main() {
Err(_) => ()
//~^ ERROR mismatched types
//~| expected enum `Option<_>`
//~| found enum `std::result::Result<_, _>`
//~| expected enum `Option`, found enum `std::result::Result`
//~| found enum `Result<_, _>`
//~| expected enum `Option`, found enum `Result`
}
}

View File

@ -4,10 +4,10 @@ error[E0308]: mismatched types
LL | match None {
| ---- this expression has type `Option<_>`
LL | Err(_) => ()
| ^^^^^^ expected enum `Option`, found enum `std::result::Result`
| ^^^^^^ expected enum `Option`, found enum `Result`
|
= note: expected enum `Option<_>`
found enum `std::result::Result<_, _>`
found enum `Result<_, _>`
error: aborting due to previous error

View File

@ -1,4 +1,4 @@
error[E0599]: the method `as_deref` exists for enum `std::result::Result<{integer}, _>`, but its trait bounds were not satisfied
error[E0599]: the method `as_deref` exists for enum `Result<{integer}, _>`, but its trait bounds were not satisfied
--> $DIR/result-as_deref.rs:2:27
|
LL | let _result = &Ok(42).as_deref();

View File

@ -1,8 +1,8 @@
error[E0599]: the method `as_deref_mut` exists for enum `std::result::Result<{integer}, _>`, but its trait bounds were not satisfied
error[E0599]: the method `as_deref_mut` exists for enum `Result<{integer}, _>`, but its trait bounds were not satisfied
--> $DIR/result-as_deref_mut.rs:2:31
|
LL | let _result = &mut Ok(42).as_deref_mut();
| ^^^^^^^^^^^^ method cannot be called on `std::result::Result<{integer}, _>` due to unsatisfied trait bounds
| ^^^^^^^^^^^^ method cannot be called on `Result<{integer}, _>` due to unsatisfied trait bounds
|
= note: the following trait bounds were not satisfied:
`{integer}: DerefMut`

View File

@ -2,9 +2,9 @@ error[E0308]: try expression alternatives have incompatible types
--> $DIR/issue-51632-try-desugar-incompatible-types.rs:8:5
|
LL | missing_discourses()?
| ^^^^^^^^^^^^^^^^^^^^^ expected enum `std::result::Result`, found `isize`
| ^^^^^^^^^^^^^^^^^^^^^ expected enum `Result`, found `isize`
|
= note: expected enum `std::result::Result<isize, ()>`
= note: expected enum `Result<isize, ()>`
found type `isize`
help: try removing this `?`
|

View File

@ -2,13 +2,13 @@ error[E0308]: mismatched types
--> $DIR/issue-6458-4.rs:1:20
|
LL | fn foo(b: bool) -> Result<bool,String> {
| --- ^^^^^^^^^^^^^^^^^^^ expected enum `std::result::Result`, found `()`
| --- ^^^^^^^^^^^^^^^^^^^ expected enum `Result`, found `()`
| |
| implicitly returns `()` as its body has no tail or `return` expression
LL | Err("bar".to_string());
| - help: consider removing this semicolon
|
= note: expected enum `std::result::Result<bool, String>`
= note: expected enum `Result<bool, String>`
found unit type `()`
error: aborting due to previous error

View File

@ -1,8 +1,8 @@
error[E0277]: the trait bound `std::result::Result<(), _>: Future` is not satisfied
error[E0277]: the trait bound `Result<(), _>: Future` is not satisfied
--> $DIR/lifetime-elision-return-type-trait.rs:8:13
|
LL | fn foo() -> impl Future<Item=(), Error=Box<dyn Error>> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Future` is not implemented for `std::result::Result<(), _>`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Future` is not implemented for `Result<(), _>`
error: aborting due to previous error

View File

@ -97,7 +97,7 @@ LL | fn repr_rust(x: Option<Rust<num::NonZeroU8>>);
= help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum
= note: enum has no representation hint
error: `extern` block uses type `std::result::Result<(), NonZeroI32>`, which is not FFI-safe
error: `extern` block uses type `Result<(), NonZeroI32>`, which is not FFI-safe
--> $DIR/lint-ctypes-enum.rs:90:20
|
LL | fn no_result(x: Result<(), num::NonZeroI32>);

View File

@ -5,13 +5,13 @@ fn foo() -> (Result<(), ()>, ()) {
}
fn main() {
(Ok::<(), ()>(()),); //~ ERROR unused `std::result::Result`
(Ok::<(), ()>(()),); //~ ERROR unused `Result`
(Ok::<(), ()>(()), 0, Ok::<(), ()>(()), 5);
//~^ ERROR unused `std::result::Result`
//~^^ ERROR unused `std::result::Result`
//~^ ERROR unused `Result`
//~^^ ERROR unused `Result`
foo(); //~ ERROR unused `std::result::Result`
foo(); //~ ERROR unused `Result`
((Err::<(), ()>(()), ()), ()); //~ ERROR unused `std::result::Result`
((Err::<(), ()>(()), ()), ()); //~ ERROR unused `Result`
}

View File

@ -1,4 +1,4 @@
error: unused `std::result::Result` in tuple element 0 that must be used
error: unused `Result` in tuple element 0 that must be used
--> $DIR/must_use-tuple.rs:8:6
|
LL | (Ok::<(), ()>(()),);
@ -11,7 +11,7 @@ LL | #![deny(unused_must_use)]
| ^^^^^^^^^^^^^^^
= note: this `Result` may be an `Err` variant, which should be handled
error: unused `std::result::Result` in tuple element 0 that must be used
error: unused `Result` in tuple element 0 that must be used
--> $DIR/must_use-tuple.rs:10:6
|
LL | (Ok::<(), ()>(()), 0, Ok::<(), ()>(()), 5);
@ -19,7 +19,7 @@ LL | (Ok::<(), ()>(()), 0, Ok::<(), ()>(()), 5);
|
= note: this `Result` may be an `Err` variant, which should be handled
error: unused `std::result::Result` in tuple element 2 that must be used
error: unused `Result` in tuple element 2 that must be used
--> $DIR/must_use-tuple.rs:10:27
|
LL | (Ok::<(), ()>(()), 0, Ok::<(), ()>(()), 5);
@ -27,7 +27,7 @@ LL | (Ok::<(), ()>(()), 0, Ok::<(), ()>(()), 5);
|
= note: this `Result` may be an `Err` variant, which should be handled
error: unused `std::result::Result` in tuple element 0 that must be used
error: unused `Result` in tuple element 0 that must be used
--> $DIR/must_use-tuple.rs:14:5
|
LL | foo();
@ -35,7 +35,7 @@ LL | foo();
|
= note: this `Result` may be an `Err` variant, which should be handled
error: unused `std::result::Result` in tuple element 0 that must be used
error: unused `Result` in tuple element 0 that must be used
--> $DIR/must_use-tuple.rs:16:6
|
LL | ((Err::<(), ()>(()), ()), ());

View File

@ -1,4 +1,4 @@
warning: unused `std::result::Result` that must be used
warning: unused `Result` that must be used
--> $DIR/must-use-in-macro-55516.rs:9:5
|
LL | write!(&mut example, "{}", 42);

View File

@ -15,10 +15,10 @@ error[E0308]: mismatched types
LL | fn a2() -> Foo {
| --- expected `Foo` because of return type
LL | Ok(Foo { bar: 1})
| ^^^^^^^^^^^^^^^^^ expected struct `Foo`, found enum `std::result::Result`
| ^^^^^^^^^^^^^^^^^ expected struct `Foo`, found enum `Result`
|
= note: expected struct `Foo`
found enum `std::result::Result<Foo, _>`
found enum `Result<Foo, _>`
error[E0308]: mismatched types
--> $DIR/abridged.rs:24:5
@ -38,14 +38,14 @@ error[E0308]: mismatched types
--> $DIR/abridged.rs:28:5
|
LL | fn c() -> Result<Foo, Bar> {
| ---------------- expected `std::result::Result<Foo, Bar>` because of return type
| ---------------- expected `Result<Foo, Bar>` because of return type
LL | Foo { bar: 1 }
| ^^^^^^^^^^^^^^
| |
| expected enum `std::result::Result`, found struct `Foo`
| expected enum `Result`, found struct `Foo`
| help: try using a variant of the expected enum: `Ok(Foo { bar: 1 })`
|
= note: expected enum `std::result::Result<Foo, Bar>`
= note: expected enum `Result<Foo, Bar>`
found struct `Foo`
error[E0308]: mismatched types

View File

@ -4,5 +4,5 @@ fn main() {
3 * (); //~ ERROR cannot multiply `{integer}` by `()`
4 / ""; //~ ERROR cannot divide `{integer}` by `&str`
5 < String::new(); //~ ERROR can't compare `{integer}` with `String`
6 == Ok(1); //~ ERROR can't compare `{integer}` with `std::result::Result<{integer}, _>`
6 == Ok(1); //~ ERROR can't compare `{integer}` with `Result<{integer}, _>`
}

View File

@ -38,13 +38,13 @@ LL | 5 < String::new();
|
= help: the trait `PartialOrd<String>` is not implemented for `{integer}`
error[E0277]: can't compare `{integer}` with `std::result::Result<{integer}, _>`
error[E0277]: can't compare `{integer}` with `Result<{integer}, _>`
--> $DIR/binops.rs:7:7
|
LL | 6 == Ok(1);
| ^^ no implementation for `{integer} == std::result::Result<{integer}, _>`
| ^^ no implementation for `{integer} == Result<{integer}, _>`
|
= help: the trait `PartialEq<std::result::Result<{integer}, _>>` is not implemented for `{integer}`
= help: the trait `PartialEq<Result<{integer}, _>>` is not implemented for `{integer}`
error: aborting due to 6 previous errors

View File

@ -1,11 +1,11 @@
error[E0599]: the method `unwrap` exists for enum `std::result::Result<(), Foo>`, but its trait bounds were not satisfied
error[E0599]: the method `unwrap` exists for enum `Result<(), Foo>`, but its trait bounds were not satisfied
--> $DIR/method-help-unsatisfied-bound.rs:5:7
|
LL | struct Foo;
| ----------- doesn't satisfy `Foo: Debug`
...
LL | a.unwrap();
| ^^^^^^ method cannot be called on `std::result::Result<(), Foo>` due to unsatisfied trait bounds
| ^^^^^^ method cannot be called on `Result<(), Foo>` due to unsatisfied trait bounds
|
= note: the following trait bounds were not satisfied:
`Foo: Debug`

View File

@ -11,7 +11,7 @@ LL | }
| -
| |
| `counter` dropped here while still borrowed
| ... and the borrow might be used here, when that temporary is dropped and runs the destructor for type `std::result::Result<MutexGuard<'_>, ()>`
| ... and the borrow might be used here, when that temporary is dropped and runs the destructor for type `Result<MutexGuard<'_>, ()>`
|
help: consider adding semicolon after the expression so its temporaries are dropped sooner, before the local variables declared by the block are dropped
|

View File

@ -65,7 +65,7 @@ error[E0308]: mismatched types
--> $DIR/inconsistent-modes.rs:14:31
|
LL | let Ok((ref a, b)) | Err((ref mut a, ref b)) = Ok((0, &0));
| ----- ^^^^^^^^^ ----------- this expression has type `std::result::Result<({integer}, &{integer}), (_, _)>`
| ----- ^^^^^^^^^ ----------- this expression has type `Result<({integer}, &{integer}), (_, _)>`
| | |
| | types differ in mutability
| first introduced with type `&{integer}` here

View File

@ -13,12 +13,12 @@ error[E0308]: mismatched types
--> $DIR/unclosed-delimiter-in-dep.rs:4:20
|
LL | let _: usize = unclosed_delim_mod::new();
| ----- ^^^^^^^^^^^^^^^^^^^^^^^^^ expected `usize`, found enum `std::result::Result`
| ----- ^^^^^^^^^^^^^^^^^^^^^^^^^ expected `usize`, found enum `Result`
| |
| expected due to this
|
= note: expected type `usize`
found enum `std::result::Result<Value, ()>`
found enum `Result<Value, ()>`
error: aborting due to 2 previous errors

View File

@ -33,7 +33,7 @@ error[E0382]: use of moved value
--> $DIR/borrowck-move-and-move.rs:20:16
|
LL | match Ok(U) {
| ----- move occurs because value has type `std::result::Result<U, U>`, which does not implement the `Copy` trait
| ----- move occurs because value has type `Result<U, U>`, which does not implement the `Copy` trait
LL | a @ Ok(b) | a @ Err(b) => {}
| -------^-
| | |
@ -44,7 +44,7 @@ error[E0382]: use of moved value
--> $DIR/borrowck-move-and-move.rs:20:29
|
LL | match Ok(U) {
| ----- move occurs because value has type `std::result::Result<U, U>`, which does not implement the `Copy` trait
| ----- move occurs because value has type `Result<U, U>`, which does not implement the `Copy` trait
LL | a @ Ok(b) | a @ Err(b) => {}
| --------^-
| | |

View File

@ -390,7 +390,7 @@ error[E0507]: cannot move out of `a` in pattern guard
--> $DIR/borrowck-pat-ref-mut-and-ref.rs:111:66
|
LL | ref mut a @ Ok(ref b) | ref mut a @ Err(ref b) if { drop(a); false } => {}
| ^ move occurs because `a` has type `&mut std::result::Result<U, U>`, which does not implement the `Copy` trait
| ^ move occurs because `a` has type `&mut Result<U, U>`, which does not implement the `Copy` trait
|
= note: variables bound in patterns cannot be moved from until after the end of the pattern guard
@ -398,7 +398,7 @@ error[E0507]: cannot move out of `a` in pattern guard
--> $DIR/borrowck-pat-ref-mut-and-ref.rs:111:66
|
LL | ref mut a @ Ok(ref b) | ref mut a @ Err(ref b) if { drop(a); false } => {}
| ^ move occurs because `a` has type `&mut std::result::Result<U, U>`, which does not implement the `Copy` trait
| ^ move occurs because `a` has type `&mut Result<U, U>`, which does not implement the `Copy` trait
|
= note: variables bound in patterns cannot be moved from until after the end of the pattern guard

View File

@ -4,10 +4,10 @@ error[E0308]: mismatched types
LL | match (S { f: 42 }) {
| ------------- this expression has type `S`
LL | S { f: Ok(_) } => {}
| ^^^^^ expected `u8`, found enum `std::result::Result`
| ^^^^^ expected `u8`, found enum `Result`
|
= note: expected type `u8`
found enum `std::result::Result<_, _>`
found enum `Result<_, _>`
error: aborting due to previous error

View File

@ -17,10 +17,10 @@ error[E0308]: mismatched types
LL | let Ok(0): Option<u8> = 42u8;
| ^^^^^ ---------- expected due to this
| |
| expected enum `Option`, found enum `std::result::Result`
| expected enum `Option`, found enum `Result`
|
= note: expected enum `Option<u8>`
found enum `std::result::Result<_, _>`
found enum `Result<_, _>`
error[E0308]: mismatched types
--> $DIR/pat-type-err-let-stmt.rs:11:9
@ -28,10 +28,10 @@ error[E0308]: mismatched types
LL | let Ok(0): Option<u8>;
| ^^^^^ ---------- expected due to this
| |
| expected enum `Option`, found enum `std::result::Result`
| expected enum `Option`, found enum `Result`
|
= note: expected enum `Option<u8>`
found enum `std::result::Result<_, _>`
found enum `Result<_, _>`
error[E0308]: mismatched types
--> $DIR/pat-type-err-let-stmt.rs:15:9
@ -39,10 +39,10 @@ error[E0308]: mismatched types
LL | let Ok(0) = 42u8;
| ^^^^^ ---- this expression has type `u8`
| |
| expected `u8`, found enum `std::result::Result`
| expected `u8`, found enum `Result`
|
= note: expected type `u8`
found enum `std::result::Result<_, _>`
found enum `Result<_, _>`
error: aborting due to 4 previous errors

View File

@ -5,7 +5,7 @@ LL | match (l1, l2) {
| ^^^^^^^^ pattern `(Some(&[]), Err(_))` not covered
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
= note: the matched value is of type `(Option<&[T]>, std::result::Result<&[T], ()>)`
= note: the matched value is of type `(Option<&[T]>, Result<&[T], ()>)`
error[E0004]: non-exhaustive patterns: `A(C)` not covered
--> $DIR/non-exhaustive-match-nested.rs:15:11

View File

@ -11,7 +11,7 @@ LL | Err(#[stable(feature = "rust1", since = "1.0.0")] E),
|
= note: `let` bindings require an "irrefutable pattern", like a `struct` or an `enum` with only one variant
= note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html
= note: the matched value is of type `std::result::Result<u32, &R>`
= note: the matched value is of type `Result<u32, &R>`
help: you might want to use `if let` to ignore the variant that isn't matched
|
LL | if let Ok(x) = res { /* */ }

View File

@ -1,4 +1,4 @@
error[E0277]: `main` has invalid return type `std::result::Result<f32, ParseFloatError>`
error[E0277]: `main` has invalid return type `Result<f32, ParseFloatError>`
--> $DIR/termination-trait-test-wrong-type.rs:6:1
|
LL | / fn can_parse_zero_as_f32() -> Result<f32, ParseFloatError> {
@ -11,7 +11,7 @@ LL | | }
LL | pub fn assert_test_result<T: Termination>(result: T) {
| ----------- required by this bound in `assert_test_result`
|
= help: the trait `Termination` is not implemented for `std::result::Result<f32, ParseFloatError>`
= help: the trait `Termination` is not implemented for `Result<f32, ParseFloatError>`
= note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: aborting due to previous error

View File

@ -2,10 +2,10 @@ error[E0308]: mismatched types
--> $DIR/typeck.rs:10:22
|
LL | Ok(x) if let Err(_) = x => {},
| ^^^^^^ expected enum `Option`, found enum `std::result::Result`
| ^^^^^^ expected enum `Option`, found enum `Result`
|
= note: expected enum `Option<bool>`
found enum `std::result::Result<_, _>`
found enum `Result<_, _>`
error[E0308]: mismatched types
--> $DIR/typeck.rs:12:22

View File

@ -64,7 +64,7 @@ error[E0046]: not all trait items implemented, missing: `fmt`
LL | impl Debug for FooTypeForMethod {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `fmt` in implementation
|
= help: implement the missing item: `fn fmt(&self, _: &mut Formatter<'_>) -> std::result::Result<(), std::fmt::Error> { todo!() }`
= help: implement the missing item: `fn fmt(&self, _: &mut Formatter<'_>) -> Result<(), std::fmt::Error> { todo!() }`
error: aborting due to 8 previous errors

View File

@ -47,12 +47,12 @@ error[E0308]: mismatched types
--> $DIR/as-ref.rs:19:35
|
LL | let y: Result<&usize, &usize> = x;
| ---------------------- ^ expected enum `std::result::Result`, found reference
| ---------------------- ^ expected enum `Result`, found reference
| |
| expected due to this
|
= note: expected enum `std::result::Result<&usize, &usize>`
found reference `&std::result::Result<usize, usize>`
= note: expected enum `Result<&usize, &usize>`
found reference `&Result<usize, usize>`
help: you can convert from `&Result<T, E>` to `Result<&T, &E>` using `.as_ref()`
|
LL | let y: Result<&usize, &usize> = x.as_ref();
@ -62,12 +62,12 @@ error[E0308]: mismatched types
--> $DIR/as-ref.rs:23:34
|
LL | let y: Result<&usize, usize> = x;
| --------------------- ^ expected enum `std::result::Result`, found reference
| --------------------- ^ expected enum `Result`, found reference
| |
| expected due to this
|
= note: expected enum `std::result::Result<&usize, usize>`
found reference `&std::result::Result<usize, usize>`
= note: expected enum `Result<&usize, usize>`
found reference `&Result<usize, usize>`
error: aborting due to 7 previous errors

View File

@ -17,7 +17,7 @@ error[E0308]: mismatched types
LL | opt = None
| ^^^^ expected mutable reference, found enum `Option`
|
= note: expected mutable reference `&mut std::result::Result<String, ()>`
= note: expected mutable reference `&mut Result<String, ()>`
found enum `Option<_>`
error[E0308]: mismatched types

View File

@ -13,7 +13,7 @@ error[E0507]: cannot move out of `selection.1` which is behind a shared referenc
LL | if selection.1.unwrap().contains(selection.0) {
| ^^^^^^^^^^^
| |
| move occurs because `selection.1` has type `std::result::Result<String, String>`, which does not implement the `Copy` trait
| move occurs because `selection.1` has type `Result<String, String>`, which does not implement the `Copy` trait
| help: consider borrowing the `Result`'s content: `selection.1.as_ref()`
error: aborting due to 2 previous errors

View File

@ -10,7 +10,7 @@ LL | | Ok(())
LL | | };
| |_____^ expected struct `Box`, found closure
|
= note: expected struct `Box<dyn Fn() -> std::result::Result<(), ()>>`
= note: expected struct `Box<dyn Fn() -> Result<(), ()>>`
found closure `[closure@$DIR/suggest-box.rs:4:47: 7:6]`
= note: for more on the distinction between the stack and the heap, read https://doc.rust-lang.org/book/ch15-01-box.html, https://doc.rust-lang.org/rust-by-example/std/box.html, and https://doc.rust-lang.org/std/boxed/index.html
help: store this in the heap by calling `Box::new`

View File

@ -2,13 +2,13 @@ error: `impl` item signature doesn't match `trait` item signature
--> $DIR/self-without-lifetime-constraint.rs:45:5
|
LL | fn column_result(value: ValueRef<'_>) -> FromSqlResult<Self, &Self>;
| -------------------------------------------------------------------- expected `fn(ValueRef<'_>) -> std::result::Result<(&str, &&str), FromSqlError>`
| -------------------------------------------------------------------- expected `fn(ValueRef<'_>) -> Result<(&str, &&str), FromSqlError>`
...
LL | fn column_result(value: ValueRef<'_>) -> FromSqlResult<&str, &&str> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ found `fn(ValueRef<'_>) -> std::result::Result<(&str, &&str), FromSqlError>`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ found `fn(ValueRef<'_>) -> Result<(&str, &&str), FromSqlError>`
|
= note: expected `fn(ValueRef<'_>) -> std::result::Result<(&str, &&str), _>`
found `fn(ValueRef<'_>) -> std::result::Result<(&str, &&str), _>`
= note: expected `fn(ValueRef<'_>) -> Result<(&str, &&str), _>`
found `fn(ValueRef<'_>) -> Result<(&str, &&str), _>`
help: the lifetime requirements from the `impl` do not correspond to the requirements in the `trait`
--> $DIR/self-without-lifetime-constraint.rs:41:60
|

View File

@ -13,13 +13,13 @@ LL | Err("")?;
and 2 others
= note: required by `from`
error[E0271]: type mismatch resolving `<std::result::Result<i32, i32> as Try>::Ok == &str`
error[E0271]: type mismatch resolving `<Result<i32, i32> as Try>::Ok == &str`
--> $DIR/try-block-bad-type.rs:12:9
|
LL | ""
| ^^ expected `i32`, found `&str`
error[E0271]: type mismatch resolving `<std::result::Result<i32, i32> as Try>::Ok == ()`
error[E0271]: type mismatch resolving `<Result<i32, i32> as Try>::Ok == ()`
--> $DIR/try-block-bad-type.rs:15:39
|
LL | let res: Result<i32, i32> = try { };

View File

@ -10,7 +10,7 @@ LL | Err(#[stable(feature = "rust1", since = "1.0.0")] E),
| --- not covered
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
= note: the matched value is of type `std::result::Result<u32, &Void>`
= note: the matched value is of type `Result<u32, &Void>`
error[E0004]: non-exhaustive patterns: type `&Void` is non-empty
--> $DIR/uninhabited-matches-feature-gated.rs:15:19
@ -64,7 +64,7 @@ LL | Err(#[stable(feature = "rust1", since = "1.0.0")] E),
| --- not covered
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
= note: the matched value is of type `std::result::Result<u32, Void>`
= note: the matched value is of type `Result<u32, Void>`
error[E0005]: refutable pattern in local binding: `Err(_)` not covered
--> $DIR/uninhabited-matches-feature-gated.rs:37:9
@ -79,7 +79,7 @@ LL | Err(#[stable(feature = "rust1", since = "1.0.0")] E),
|
= note: `let` bindings require an "irrefutable pattern", like a `struct` or an `enum` with only one variant
= note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html
= note: the matched value is of type `std::result::Result<u32, Void>`
= note: the matched value is of type `Result<u32, Void>`
help: you might want to use `if let` to ignore the variant that isn't matched
|
LL | if let Ok(x) = x { /* */ }