diff --git a/compiler/rustc_middle/src/ty/print/pretty.rs b/compiler/rustc_middle/src/ty/print/pretty.rs index 4937fdd73144d..a8d9995bd0b2f 100644 --- a/compiler/rustc_middle/src/ty/print/pretty.rs +++ b/compiler/rustc_middle/src/ty/print/pretty.rs @@ -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); diff --git a/src/test/mir-opt/early_otherwise_branch_68867.try_sum.EarlyOtherwiseBranch.before-SimplifyBranches-final.after.diff b/src/test/mir-opt/early_otherwise_branch_68867.try_sum.EarlyOtherwiseBranch.before-SimplifyBranches-final.after.diff index f51a08ed73068..1b292cdd796e5 100644 --- a/src/test/mir-opt/early_otherwise_branch_68867.try_sum.EarlyOtherwiseBranch.before-SimplifyBranches-final.after.diff +++ b/src/test/mir-opt/early_otherwise_branch_68867.try_sum.EarlyOtherwiseBranch.before-SimplifyBranches-final.after.diff @@ -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 { + fn try_sum(_1: &ViewportPercentageLength, _2: &ViewportPercentageLength) -> Result { 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; // return place in scope 0 at $DIR/early_otherwise_branch_68867.rs:20:6: 20:42 diff --git a/src/test/mir-opt/early_otherwise_branch_68867.try_sum.EarlyOtherwiseBranch.diff b/src/test/mir-opt/early_otherwise_branch_68867.try_sum.EarlyOtherwiseBranch.diff index 05ef6721e6535..d20ee78459103 100644 --- a/src/test/mir-opt/early_otherwise_branch_68867.try_sum.EarlyOtherwiseBranch.diff +++ b/src/test/mir-opt/early_otherwise_branch_68867.try_sum.EarlyOtherwiseBranch.diff @@ -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 { + fn try_sum(_1: &ViewportPercentageLength, _2: &ViewportPercentageLength) -> Result { 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; // return place in scope 0 at $DIR/early_otherwise_branch_68867.rs:20:6: 20:42 diff --git a/src/test/mir-opt/funky_arms.float_to_exponential_common.ConstProp.diff b/src/test/mir-opt/funky_arms.float_to_exponential_common.ConstProp.diff index bb79cd80e51b6..caa02abf01936 100644 --- a/src/test/mir-opt/funky_arms.float_to_exponential_common.ConstProp.diff +++ b/src/test/mir-opt/funky_arms.float_to_exponential_common.ConstProp.diff @@ -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 diff --git a/src/test/mir-opt/issue_73223.main.PreCodegen.32bit.diff b/src/test/mir-opt/issue_73223.main.PreCodegen.32bit.diff index 435b2a1360a6b..aa4cff9d9d1b3 100644 --- a/src/test/mir-opt/issue_73223.main.PreCodegen.32bit.diff +++ b/src/test/mir-opt/issue_73223.main.PreCodegen.32bit.diff @@ -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()) } StorageLive(_22); // scope 7 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - _22 = transmute:: 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/macros/mod.rs:LL:COL + _22 = transmute:: 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/macros/mod.rs:LL:COL // mir::Constant // + span: $SRC_DIR/core/src/macros/mod.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:: 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()) } @@ -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()) } StorageLive(_25); // scope 9 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - _25 = transmute:: 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/macros/mod.rs:LL:COL + _25 = transmute:: 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/macros/mod.rs:LL:COL // mir::Constant // + span: $SRC_DIR/core/src/macros/mod.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:: 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()) } diff --git a/src/test/mir-opt/issue_73223.main.PreCodegen.64bit.diff b/src/test/mir-opt/issue_73223.main.PreCodegen.64bit.diff index 435b2a1360a6b..aa4cff9d9d1b3 100644 --- a/src/test/mir-opt/issue_73223.main.PreCodegen.64bit.diff +++ b/src/test/mir-opt/issue_73223.main.PreCodegen.64bit.diff @@ -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()) } StorageLive(_22); // scope 7 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - _22 = transmute:: 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/macros/mod.rs:LL:COL + _22 = transmute:: 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/macros/mod.rs:LL:COL // mir::Constant // + span: $SRC_DIR/core/src/macros/mod.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:: 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()) } @@ -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()) } StorageLive(_25); // scope 9 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - _25 = transmute:: 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/macros/mod.rs:LL:COL + _25 = transmute:: 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/macros/mod.rs:LL:COL // mir::Constant // + span: $SRC_DIR/core/src/macros/mod.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:: 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()) } diff --git a/src/test/mir-opt/issue_73223.main.SimplifyArmIdentity.32bit.diff b/src/test/mir-opt/issue_73223.main.SimplifyArmIdentity.32bit.diff index d87cb2af8baac..ad60b2c4edfa9 100644 --- a/src/test/mir-opt/issue_73223.main.SimplifyArmIdentity.32bit.diff +++ b/src/test/mir-opt/issue_73223.main.SimplifyArmIdentity.32bit.diff @@ -203,7 +203,7 @@ StorageLive(_44); // scope 7 at $SRC_DIR/core/src/macros/mod.rs:LL:COL StorageLive(_45); // scope 7 at $SRC_DIR/core/src/macros/mod.rs:LL:COL _45 = _38; // scope 7 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - _44 = transmute:: 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/macros/mod.rs:LL:COL + _44 = transmute:: 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/macros/mod.rs:LL:COL // mir::Constant // + span: $SRC_DIR/core/src/macros/mod.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:: 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()) } @@ -252,7 +252,7 @@ StorageLive(_48); // scope 9 at $SRC_DIR/core/src/macros/mod.rs:LL:COL StorageLive(_49); // scope 9 at $SRC_DIR/core/src/macros/mod.rs:LL:COL _49 = _41; // scope 9 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - _48 = transmute:: 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/macros/mod.rs:LL:COL + _48 = transmute:: 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/macros/mod.rs:LL:COL // mir::Constant // + span: $SRC_DIR/core/src/macros/mod.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:: 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()) } diff --git a/src/test/mir-opt/issue_73223.main.SimplifyArmIdentity.64bit.diff b/src/test/mir-opt/issue_73223.main.SimplifyArmIdentity.64bit.diff index d87cb2af8baac..ad60b2c4edfa9 100644 --- a/src/test/mir-opt/issue_73223.main.SimplifyArmIdentity.64bit.diff +++ b/src/test/mir-opt/issue_73223.main.SimplifyArmIdentity.64bit.diff @@ -203,7 +203,7 @@ StorageLive(_44); // scope 7 at $SRC_DIR/core/src/macros/mod.rs:LL:COL StorageLive(_45); // scope 7 at $SRC_DIR/core/src/macros/mod.rs:LL:COL _45 = _38; // scope 7 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - _44 = transmute:: 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/macros/mod.rs:LL:COL + _44 = transmute:: 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/macros/mod.rs:LL:COL // mir::Constant // + span: $SRC_DIR/core/src/macros/mod.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:: 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()) } @@ -252,7 +252,7 @@ StorageLive(_48); // scope 9 at $SRC_DIR/core/src/macros/mod.rs:LL:COL StorageLive(_49); // scope 9 at $SRC_DIR/core/src/macros/mod.rs:LL:COL _49 = _41; // scope 9 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - _48 = transmute:: 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/macros/mod.rs:LL:COL + _48 = transmute:: 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/macros/mod.rs:LL:COL // mir::Constant // + span: $SRC_DIR/core/src/macros/mod.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:: 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()) } diff --git a/src/test/mir-opt/simplify_arm.id_result.SimplifyArmIdentity.diff b/src/test/mir-opt/simplify_arm.id_result.SimplifyArmIdentity.diff index 253e3236ff7d1..40c18fb7282ec 100644 --- a/src/test/mir-opt/simplify_arm.id_result.SimplifyArmIdentity.diff +++ b/src/test/mir-opt/simplify_arm.id_result.SimplifyArmIdentity.diff @@ -1,7 +1,7 @@ - // MIR for `id_result` before SimplifyArmIdentity + // MIR for `id_result` after SimplifyArmIdentity - fn id_result(_1: std::result::Result) -> std::result::Result { + fn id_result(_1: Result) -> Result { debug r => _1; // in scope 0 at $DIR/simplify-arm.rs:16:14: 16:15 let mut _0: std::result::Result; // 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 diff --git a/src/test/mir-opt/simplify_arm.id_result.SimplifyBranchSame.diff b/src/test/mir-opt/simplify_arm.id_result.SimplifyBranchSame.diff index 23cf43c531973..596dbabead0bf 100644 --- a/src/test/mir-opt/simplify_arm.id_result.SimplifyBranchSame.diff +++ b/src/test/mir-opt/simplify_arm.id_result.SimplifyBranchSame.diff @@ -1,7 +1,7 @@ - // MIR for `id_result` before SimplifyBranchSame + // MIR for `id_result` after SimplifyBranchSame - fn id_result(_1: std::result::Result) -> std::result::Result { + fn id_result(_1: Result) -> Result { debug r => _1; // in scope 0 at $DIR/simplify-arm.rs:16:14: 16:15 let mut _0: std::result::Result; // 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 diff --git a/src/test/mir-opt/simplify_arm.id_try.SimplifyArmIdentity.diff b/src/test/mir-opt/simplify_arm.id_try.SimplifyArmIdentity.diff index 84d8214122ae1..ccb3b71817ff6 100644 --- a/src/test/mir-opt/simplify_arm.id_try.SimplifyArmIdentity.diff +++ b/src/test/mir-opt/simplify_arm.id_try.SimplifyArmIdentity.diff @@ -1,7 +1,7 @@ - // MIR for `id_try` before SimplifyArmIdentity + // MIR for `id_try` after SimplifyArmIdentity - fn id_try(_1: std::result::Result) -> std::result::Result { + fn id_try(_1: Result) -> Result { debug r => _1; // in scope 0 at $DIR/simplify-arm.rs:23:11: 23:12 let mut _0: std::result::Result; // 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 as Try>::from_error) { // at $DIR/simplify-arm.rs:24:13: 24:15 + scope 8 (inlined 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 as Try>::into_result) { // at $DIR/simplify-arm.rs:24:13: 24:15 + scope 6 (inlined 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 } diff --git a/src/test/mir-opt/simplify_arm.id_try.SimplifyBranchSame.diff b/src/test/mir-opt/simplify_arm.id_try.SimplifyBranchSame.diff index aa050655cdaa5..ec8ac30228e59 100644 --- a/src/test/mir-opt/simplify_arm.id_try.SimplifyBranchSame.diff +++ b/src/test/mir-opt/simplify_arm.id_try.SimplifyBranchSame.diff @@ -1,7 +1,7 @@ - // MIR for `id_try` before SimplifyBranchSame + // MIR for `id_try` after SimplifyBranchSame - fn id_try(_1: std::result::Result) -> std::result::Result { + fn id_try(_1: Result) -> Result { debug r => _1; // in scope 0 at $DIR/simplify-arm.rs:23:11: 23:12 let mut _0: std::result::Result; // 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 >::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 as Try>::from_error) { // at $DIR/simplify-arm.rs:24:13: 24:15 + scope 8 (inlined 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 as Try>::into_result) { // at $DIR/simplify-arm.rs:24:13: 24:15 + scope 6 (inlined 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 } diff --git a/src/test/mir-opt/simplify_try.try_identity.DestinationPropagation.diff b/src/test/mir-opt/simplify_try.try_identity.DestinationPropagation.diff index 3ba0af991f63b..b1bae447f9c65 100644 --- a/src/test/mir-opt/simplify_try.try_identity.DestinationPropagation.diff +++ b/src/test/mir-opt/simplify_try.try_identity.DestinationPropagation.diff @@ -1,7 +1,7 @@ - // MIR for `try_identity` before DestinationPropagation + // MIR for `try_identity` after DestinationPropagation - fn try_identity(_1: std::result::Result) -> std::result::Result { + fn try_identity(_1: Result) -> Result { debug x => _1; // in scope 0 at $DIR/simplify_try.rs:7:17: 7:18 let mut _0: std::result::Result; // 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 >::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 as Try>::from_error) { // at $DIR/simplify_try.rs:8:13: 8:15 + scope 8 (inlined 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 as Try>::into_result) { // at $DIR/simplify_try.rs:8:13: 8:15 + scope 6 (inlined 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 } diff --git a/src/test/mir-opt/simplify_try.try_identity.SimplifyArmIdentity.diff b/src/test/mir-opt/simplify_try.try_identity.SimplifyArmIdentity.diff index 9c91762eb4e15..df274852f6820 100644 --- a/src/test/mir-opt/simplify_try.try_identity.SimplifyArmIdentity.diff +++ b/src/test/mir-opt/simplify_try.try_identity.SimplifyArmIdentity.diff @@ -1,7 +1,7 @@ - // MIR for `try_identity` before SimplifyArmIdentity + // MIR for `try_identity` after SimplifyArmIdentity - fn try_identity(_1: std::result::Result) -> std::result::Result { + fn try_identity(_1: Result) -> Result { debug x => _1; // in scope 0 at $DIR/simplify_try.rs:7:17: 7:18 let mut _0: std::result::Result; // 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 as Try>::from_error) { // at $DIR/simplify_try.rs:8:13: 8:15 + scope 8 (inlined 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 as Try>::into_result) { // at $DIR/simplify_try.rs:8:13: 8:15 + scope 6 (inlined 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 } diff --git a/src/test/mir-opt/simplify_try.try_identity.SimplifyBranchSame.after.mir b/src/test/mir-opt/simplify_try.try_identity.SimplifyBranchSame.after.mir index cd8436a971ee8..37274691fb476 100644 --- a/src/test/mir-opt/simplify_try.try_identity.SimplifyBranchSame.after.mir +++ b/src/test/mir-opt/simplify_try.try_identity.SimplifyBranchSame.after.mir @@ -1,6 +1,6 @@ // MIR for `try_identity` after SimplifyBranchSame -fn try_identity(_1: std::result::Result) -> std::result::Result { +fn try_identity(_1: Result) -> Result { debug x => _1; // in scope 0 at $DIR/simplify_try.rs:7:17: 7:18 let mut _0: std::result::Result; // 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) -> std::result::Result>::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 as Try>::from_error) { // at $DIR/simplify_try.rs:8:13: 8:15 + scope 8 (inlined 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) -> std::result::Result as Try>::into_result) { // at $DIR/simplify_try.rs:8:13: 8:15 + scope 6 (inlined 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 } diff --git a/src/test/mir-opt/simplify_try.try_identity.SimplifyLocals.after.mir b/src/test/mir-opt/simplify_try.try_identity.SimplifyLocals.after.mir index 73f77f35a2b92..f8adcced4b306 100644 --- a/src/test/mir-opt/simplify_try.try_identity.SimplifyLocals.after.mir +++ b/src/test/mir-opt/simplify_try.try_identity.SimplifyLocals.after.mir @@ -1,6 +1,6 @@ // MIR for `try_identity` after SimplifyLocals -fn try_identity(_1: std::result::Result) -> std::result::Result { +fn try_identity(_1: Result) -> Result { debug x => _1; // in scope 0 at $DIR/simplify_try.rs:7:17: 7:18 let mut _0: std::result::Result; // 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) -> std::result::Result>::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 as Try>::from_error) { // at $DIR/simplify_try.rs:8:13: 8:15 + scope 8 (inlined 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) -> std::result::Result as Try>::into_result) { // at $DIR/simplify_try.rs:8:13: 8:15 + scope 6 (inlined 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 } diff --git a/src/test/run-make-fulldeps/coverage-spanview/Makefile b/src/test/run-make-fulldeps/coverage-spanview/Makefile index 84b5d0e522f8c..26cf09e0270e5 100644 --- a/src/test/run-make-fulldeps/coverage-spanview/Makefile +++ b/src/test/run-make-fulldeps/coverage-spanview/Makefile @@ -46,6 +46,7 @@ endif echo "--edition=2018" \ ) \ --crate-type rlib \ + -Ztrim-diagnostic-paths=no \ -Zinstrument-coverage \ -Zdump-mir=InstrumentCoverage \ -Zdump-mir-spanview \ @@ -77,6 +78,7 @@ endif echo "--edition=2018" \ ) \ -L "$(TMPDIR)" \ + -Ztrim-diagnostic-paths=no \ -Zinstrument-coverage \ -Zdump-mir=InstrumentCoverage \ -Zdump-mir-spanview \ diff --git a/src/test/ui/async-await/async-block-control-flow-static-semantics.stderr b/src/test/ui/async-await/async-block-control-flow-static-semantics.stderr index dbdfb2e71e0cd..919904ce3b6a2 100644 --- a/src/test/ui/async-await/async-block-control-flow-static-semantics.stderr +++ b/src/test/ui/async-await/async-block-control-flow-static-semantics.stderr @@ -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 { - | ---------------------------------- ^^^^^^^^^^^^^^^^^ 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` + = note: expected enum `Result` 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 { - | ---------------------------------------- ^^^^^^^^^^^^^^^^^ 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` + = note: expected enum `Result` found unit type `()` error: aborting due to 8 previous errors diff --git a/src/test/ui/async-await/issues/issue-67893.stderr b/src/test/ui/async-await/issues/issue-67893.stderr index af09f0a27bf21..aee2ae0e2e4a8 100644 --- a/src/test/ui/async-await/issues/issue-67893.stderr +++ b/src/test/ui/async-await/issues/issue-67893.stderr @@ -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>, &'r Mutex<()>, std::result::Result, PoisonError>>, &'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>, &'r Mutex<()>, std::result::Result, PoisonError>>, &'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>, &'r Mutex<()>, std::result::Result, PoisonError>>, &'t1 MutexGuard<'t2, ()>, MutexGuard<'t3, ()>, (), impl Future}]>` + = note: required because it appears within the type `for<'r, 's, 't0, 't1, 't2, 't3> {ResumeTy, Arc>, &'r Mutex<()>, Result, PoisonError>>, &'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>, &'r Mutex<()>, Result, PoisonError>>, &'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>, &'r Mutex<()>, Result, PoisonError>>, &'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` diff --git a/src/test/ui/coercion/coercion-missing-tail-expected-type.stderr b/src/test/ui/coercion/coercion-missing-tail-expected-type.stderr index da8db4331dffb..df1fb58e25a02 100644 --- a/src/test/ui/coercion/coercion-missing-tail-expected-type.stderr +++ b/src/test/ui/coercion/coercion-missing-tail-expected-type.stderr @@ -12,13 +12,13 @@ error[E0308]: mismatched types --> $DIR/coercion-missing-tail-expected-type.rs:8:13 | LL | fn foo() -> Result { - | --- ^^^^^^^^^^^^^^^ 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` + = note: expected enum `Result` found unit type `()` error: aborting due to 2 previous errors diff --git a/src/test/ui/feature-gates/feature-gate-exhaustive-patterns.stderr b/src/test/ui/feature-gates/feature-gate-exhaustive-patterns.stderr index 055475952340e..e079c2ddcee26 100644 --- a/src/test/ui/feature-gates/feature-gate-exhaustive-patterns.stderr +++ b/src/test/ui/feature-gates/feature-gate-exhaustive-patterns.stderr @@ -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` + = note: the matched value is of type `Result` help: you might want to use `if let` to ignore the variant that isn't matched | LL | if let Ok(_x) = foo() { /* */ } diff --git a/src/test/ui/generator/type-mismatch-signature-deduction.stderr b/src/test/ui/generator/type-mismatch-signature-deduction.stderr index 4abc0542c5142..30e23ea8f650c 100644 --- a/src/test/ui/generator/type-mismatch-signature-deduction.stderr +++ b/src/test/ui/generator/type-mismatch-signature-deduction.stderr @@ -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 { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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 diff --git a/src/test/ui/generics/wrong-number-of-args.rs b/src/test/ui/generics/wrong-number-of-args.rs index 6b99865202e54..2994ca3c7595c 100644 --- a/src/test/ui/generics/wrong-number-of-args.rs +++ b/src/test/ui/generics/wrong-number-of-args.rs @@ -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; diff --git a/src/test/ui/generics/wrong-number-of-args.stderr b/src/test/ui/generics/wrong-number-of-args.stderr index 2a34fba2c4875..73bd76aa5fad0 100644 --- a/src/test/ui/generics/wrong-number-of-args.stderr +++ b/src/test/ui/generics/wrong-number-of-args.stderr @@ -365,7 +365,7 @@ note: struct defined here, with at most 3 type parameters: `K`, `V`, `S` LL | pub struct HashMap { | ^^^^^^^ - - - -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; diff --git a/src/test/ui/impl-trait/trait_type.stderr b/src/test/ui/impl-trait/trait_type.stderr index e94f2c702150a..961bb7351181e 100644 --- a/src/test/ui/impl-trait/trait_type.stderr +++ b/src/test/ui/impl-trait/trait_type.stderr @@ -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 diff --git a/src/test/ui/inference/cannot-infer-closure-circular.stderr b/src/test/ui/inference/cannot-infer-closure-circular.stderr index 5efb400a4c7a5..211ae13e46df1 100644 --- a/src/test/ui/inference/cannot-infer-closure-circular.stderr +++ b/src/test/ui/inference/cannot-infer-closure-circular.stderr @@ -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 diff --git a/src/test/ui/inference/cannot-infer-closure.stderr b/src/test/ui/inference/cannot-infer-closure.stderr index 475ed00d10752..0dcce9e990b53 100644 --- a/src/test/ui/inference/cannot-infer-closure.stderr +++ b/src/test/ui/inference/cannot-infer-closure.stderr @@ -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 diff --git a/src/test/ui/inference/cannot-infer-partial-try-return.stderr b/src/test/ui/inference/cannot-infer-partial-try-return.stderr index a64503fa667c7..86e2126e1ae7b 100644 --- a/src/test/ui/inference/cannot-infer-partial-try-return.stderr +++ b/src/test/ui/inference/cannot-infer-partial-try-return.stderr @@ -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` 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 diff --git a/src/test/ui/inference/issue-72616.stderr b/src/test/ui/inference/issue-72616.stderr index d811988c9c1d0..3c9d864c42639 100644 --- a/src/test/ui/inference/issue-72616.stderr +++ b/src/test/ui/inference/issue-72616.stderr @@ -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>::Error>` + | ^^ -------------- this method call resolves to `Result>::Error>` | | | cannot infer type | diff --git a/src/test/ui/issue-74047.stderr b/src/test/ui/issue-74047.stderr index 8f7c91a78d8c0..28174825d8bce 100644 --- a/src/test/ui/issue-74047.stderr +++ b/src/test/ui/issue-74047.stderr @@ -5,7 +5,7 @@ LL | impl TryFrom 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>::Error> { todo!() }` + = help: implement the missing item: `fn try_from(_: T) -> Result>::Error> { todo!() }` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-11844.stderr b/src/test/ui/issues/issue-11844.stderr index 00eecbc9a98b6..9d7470e7af9aa 100644 --- a/src/test/ui/issues/issue-11844.stderr +++ b/src/test/ui/issues/issue-11844.stderr @@ -4,10 +4,10 @@ error[E0308]: mismatched types LL | match a { | - this expression has type `Option>` LL | Ok(a) => - | ^^^^^ 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 diff --git a/src/test/ui/issues/issue-12552.stderr b/src/test/ui/issues/issue-12552.stderr index 1594c9f503a18..3d8852ca748af 100644 --- a/src/test/ui/issues/issue-12552.stderr +++ b/src/test/ui/issues/issue-12552.stderr @@ -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 diff --git a/src/test/ui/issues/issue-13466.rs b/src/test/ui/issues/issue-13466.rs index 8048dae123994..a420c7704af51 100644 --- a/src/test/ui/issues/issue-13466.rs +++ b/src/test/ui/issues/issue-13466.rs @@ -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` }; } diff --git a/src/test/ui/issues/issue-13466.stderr b/src/test/ui/issues/issue-13466.stderr index 792cc398bb86b..c78466f4e8ce1 100644 --- a/src/test/ui/issues/issue-13466.stderr +++ b/src/test/ui/issues/issue-13466.stderr @@ -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 diff --git a/src/test/ui/issues/issue-21332.rs b/src/test/ui/issues/issue-21332.rs index 1b13f000b8c8c..6547f3a9b19ae 100644 --- a/src/test/ui/issues/issue-21332.rs +++ b/src/test/ui/issues/issue-21332.rs @@ -4,7 +4,7 @@ impl Iterator for S { type Item = i32; fn next(&mut self) -> Result { 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() {} diff --git a/src/test/ui/issues/issue-21332.stderr b/src/test/ui/issues/issue-21332.stderr index 1d6ddd2660ec2..35863fbebe315 100644 --- a/src/test/ui/issues/issue-21332.stderr +++ b/src/test/ui/issues/issue-21332.stderr @@ -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 { Ok(7) } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected enum `Option`, found enum `std::result::Result` + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected enum `Option`, found enum `Result` | = note: expected fn pointer `fn(&mut S) -> Option` - found fn pointer `fn(&mut S) -> std::result::Result` + found fn pointer `fn(&mut S) -> Result` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-3680.rs b/src/test/ui/issues/issue-3680.rs index 8912e7a18ac3b..37c9000c043da 100644 --- a/src/test/ui/issues/issue-3680.rs +++ b/src/test/ui/issues/issue-3680.rs @@ -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` } } diff --git a/src/test/ui/issues/issue-3680.stderr b/src/test/ui/issues/issue-3680.stderr index 479942b8e2c5f..e8fafa76b919b 100644 --- a/src/test/ui/issues/issue-3680.stderr +++ b/src/test/ui/issues/issue-3680.stderr @@ -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 diff --git a/src/test/ui/issues/issue-50264-inner-deref-trait/result-as_deref.stderr b/src/test/ui/issues/issue-50264-inner-deref-trait/result-as_deref.stderr index e41c04ee89e0f..9711e27d8a8a3 100644 --- a/src/test/ui/issues/issue-50264-inner-deref-trait/result-as_deref.stderr +++ b/src/test/ui/issues/issue-50264-inner-deref-trait/result-as_deref.stderr @@ -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(); diff --git a/src/test/ui/issues/issue-50264-inner-deref-trait/result-as_deref_mut.stderr b/src/test/ui/issues/issue-50264-inner-deref-trait/result-as_deref_mut.stderr index 372d056fc1908..ee7ea1e6a0229 100644 --- a/src/test/ui/issues/issue-50264-inner-deref-trait/result-as_deref_mut.stderr +++ b/src/test/ui/issues/issue-50264-inner-deref-trait/result-as_deref_mut.stderr @@ -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` diff --git a/src/test/ui/issues/issue-51632-try-desugar-incompatible-types.stderr b/src/test/ui/issues/issue-51632-try-desugar-incompatible-types.stderr index 9ca983df30af5..554ac7e7c75fc 100644 --- a/src/test/ui/issues/issue-51632-try-desugar-incompatible-types.stderr +++ b/src/test/ui/issues/issue-51632-try-desugar-incompatible-types.stderr @@ -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` + = note: expected enum `Result` found type `isize` help: try removing this `?` | diff --git a/src/test/ui/issues/issue-6458-4.stderr b/src/test/ui/issues/issue-6458-4.stderr index 00ebff9007ded..0cf82d37d5d0b 100644 --- a/src/test/ui/issues/issue-6458-4.stderr +++ b/src/test/ui/issues/issue-6458-4.stderr @@ -2,13 +2,13 @@ error[E0308]: mismatched types --> $DIR/issue-6458-4.rs:1:20 | LL | fn foo(b: bool) -> Result { - | --- ^^^^^^^^^^^^^^^^^^^ 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` + = note: expected enum `Result` found unit type `()` error: aborting due to previous error diff --git a/src/test/ui/lifetimes/lifetime-elision-return-type-trait.stderr b/src/test/ui/lifetimes/lifetime-elision-return-type-trait.stderr index c3d597bec2e40..ef1127c59ac4c 100644 --- a/src/test/ui/lifetimes/lifetime-elision-return-type-trait.stderr +++ b/src/test/ui/lifetimes/lifetime-elision-return-type-trait.stderr @@ -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> { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Future` is not implemented for `std::result::Result<(), _>` + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Future` is not implemented for `Result<(), _>` error: aborting due to previous error diff --git a/src/test/ui/lint/lint-ctypes-enum.stderr b/src/test/ui/lint/lint-ctypes-enum.stderr index 8917d309e6087..f3991ab417752 100644 --- a/src/test/ui/lint/lint-ctypes-enum.stderr +++ b/src/test/ui/lint/lint-ctypes-enum.stderr @@ -97,7 +97,7 @@ LL | fn repr_rust(x: Option>); = 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>); diff --git a/src/test/ui/lint/must_use-tuple.rs b/src/test/ui/lint/must_use-tuple.rs index f6b579a7f35cf..0f0aa20253c96 100644 --- a/src/test/ui/lint/must_use-tuple.rs +++ b/src/test/ui/lint/must_use-tuple.rs @@ -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` } diff --git a/src/test/ui/lint/must_use-tuple.stderr b/src/test/ui/lint/must_use-tuple.stderr index de3c6f46c6867..0532d89e039eb 100644 --- a/src/test/ui/lint/must_use-tuple.stderr +++ b/src/test/ui/lint/must_use-tuple.stderr @@ -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::<(), ()>(()), ()), ()); diff --git a/src/test/ui/macros/must-use-in-macro-55516.stderr b/src/test/ui/macros/must-use-in-macro-55516.stderr index a694c887085f0..b4072a1ad7e57 100644 --- a/src/test/ui/macros/must-use-in-macro-55516.stderr +++ b/src/test/ui/macros/must-use-in-macro-55516.stderr @@ -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); diff --git a/src/test/ui/mismatched_types/abridged.stderr b/src/test/ui/mismatched_types/abridged.stderr index b7564686cd52e..61994e5bfee2e 100644 --- a/src/test/ui/mismatched_types/abridged.stderr +++ b/src/test/ui/mismatched_types/abridged.stderr @@ -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` + found enum `Result` 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 { - | ---------------- expected `std::result::Result` because of return type + | ---------------- expected `Result` 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` + = note: expected enum `Result` found struct `Foo` error[E0308]: mismatched types diff --git a/src/test/ui/mismatched_types/binops.rs b/src/test/ui/mismatched_types/binops.rs index 4be7420e33c17..f359451dfb8f9 100644 --- a/src/test/ui/mismatched_types/binops.rs +++ b/src/test/ui/mismatched_types/binops.rs @@ -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}, _>` } diff --git a/src/test/ui/mismatched_types/binops.stderr b/src/test/ui/mismatched_types/binops.stderr index f2bfb12ee9c80..19e921dd04d73 100644 --- a/src/test/ui/mismatched_types/binops.stderr +++ b/src/test/ui/mismatched_types/binops.stderr @@ -38,13 +38,13 @@ LL | 5 < String::new(); | = help: the trait `PartialOrd` 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>` is not implemented for `{integer}` + = help: the trait `PartialEq>` is not implemented for `{integer}` error: aborting due to 6 previous errors diff --git a/src/test/ui/mismatched_types/method-help-unsatisfied-bound.stderr b/src/test/ui/mismatched_types/method-help-unsatisfied-bound.stderr index 92a88cbdb34a3..1030061b2d1fe 100644 --- a/src/test/ui/mismatched_types/method-help-unsatisfied-bound.stderr +++ b/src/test/ui/mismatched_types/method-help-unsatisfied-bound.stderr @@ -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` diff --git a/src/test/ui/nll/issue-54556-niconii.stderr b/src/test/ui/nll/issue-54556-niconii.stderr index b4791fd22b4ad..1bfebd755b4fc 100644 --- a/src/test/ui/nll/issue-54556-niconii.stderr +++ b/src/test/ui/nll/issue-54556-niconii.stderr @@ -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, ()>` + | ... and the borrow might be used here, when that temporary is dropped and runs the destructor for type `Result, ()>` | help: consider adding semicolon after the expression so its temporaries are dropped sooner, before the local variables declared by the block are dropped | diff --git a/src/test/ui/or-patterns/inconsistent-modes.stderr b/src/test/ui/or-patterns/inconsistent-modes.stderr index c5dcef36e0580..15790771043df 100644 --- a/src/test/ui/or-patterns/inconsistent-modes.stderr +++ b/src/test/ui/or-patterns/inconsistent-modes.stderr @@ -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 diff --git a/src/test/ui/parser/unclosed-delimiter-in-dep.stderr b/src/test/ui/parser/unclosed-delimiter-in-dep.stderr index d63a50034c58d..00861a5a3d49a 100644 --- a/src/test/ui/parser/unclosed-delimiter-in-dep.stderr +++ b/src/test/ui/parser/unclosed-delimiter-in-dep.stderr @@ -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` + found enum `Result` error: aborting due to 2 previous errors diff --git a/src/test/ui/pattern/bindings-after-at/borrowck-move-and-move.stderr b/src/test/ui/pattern/bindings-after-at/borrowck-move-and-move.stderr index bfb7b479731a6..ff8183e87635f 100644 --- a/src/test/ui/pattern/bindings-after-at/borrowck-move-and-move.stderr +++ b/src/test/ui/pattern/bindings-after-at/borrowck-move-and-move.stderr @@ -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`, which does not implement the `Copy` trait + | ----- move occurs because value has type `Result`, 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`, which does not implement the `Copy` trait + | ----- move occurs because value has type `Result`, which does not implement the `Copy` trait LL | a @ Ok(b) | a @ Err(b) => {} | --------^- | | | diff --git a/src/test/ui/pattern/bindings-after-at/borrowck-pat-ref-mut-and-ref.stderr b/src/test/ui/pattern/bindings-after-at/borrowck-pat-ref-mut-and-ref.stderr index 00136c2576423..13032c3838a92 100644 --- a/src/test/ui/pattern/bindings-after-at/borrowck-pat-ref-mut-and-ref.stderr +++ b/src/test/ui/pattern/bindings-after-at/borrowck-pat-ref-mut-and-ref.stderr @@ -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`, which does not implement the `Copy` trait + | ^ move occurs because `a` has type `&mut Result`, 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`, which does not implement the `Copy` trait + | ^ move occurs because `a` has type `&mut Result`, which does not implement the `Copy` trait | = note: variables bound in patterns cannot be moved from until after the end of the pattern guard diff --git a/src/test/ui/pattern/pat-struct-field-expr-has-type.stderr b/src/test/ui/pattern/pat-struct-field-expr-has-type.stderr index d57a8a0dbc181..3a61d4293b01d 100644 --- a/src/test/ui/pattern/pat-struct-field-expr-has-type.stderr +++ b/src/test/ui/pattern/pat-struct-field-expr-has-type.stderr @@ -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 diff --git a/src/test/ui/pattern/pat-type-err-let-stmt.stderr b/src/test/ui/pattern/pat-type-err-let-stmt.stderr index 42258cfc1aef5..4b4fb08928327 100644 --- a/src/test/ui/pattern/pat-type-err-let-stmt.stderr +++ b/src/test/ui/pattern/pat-type-err-let-stmt.stderr @@ -17,10 +17,10 @@ error[E0308]: mismatched types LL | let Ok(0): Option = 42u8; | ^^^^^ ---------- expected due to this | | - | 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[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; | ^^^^^ ---------- expected due to this | | - | 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[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 diff --git a/src/test/ui/pattern/usefulness/non-exhaustive-match-nested.stderr b/src/test/ui/pattern/usefulness/non-exhaustive-match-nested.stderr index d1cab75210296..928e9068266cd 100644 --- a/src/test/ui/pattern/usefulness/non-exhaustive-match-nested.stderr +++ b/src/test/ui/pattern/usefulness/non-exhaustive-match-nested.stderr @@ -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 diff --git a/src/test/ui/recursion/recursive-types-are-not-uninhabited.stderr b/src/test/ui/recursion/recursive-types-are-not-uninhabited.stderr index c6f500ec8cc78..dfb69a3cc1b42 100644 --- a/src/test/ui/recursion/recursive-types-are-not-uninhabited.stderr +++ b/src/test/ui/recursion/recursive-types-are-not-uninhabited.stderr @@ -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` + = note: the matched value is of type `Result` help: you might want to use `if let` to ignore the variant that isn't matched | LL | if let Ok(x) = res { /* */ } diff --git a/src/test/ui/rfc-1937-termination-trait/termination-trait-test-wrong-type.stderr b/src/test/ui/rfc-1937-termination-trait/termination-trait-test-wrong-type.stderr index d015b72c5cffe..4580620186197 100644 --- a/src/test/ui/rfc-1937-termination-trait/termination-trait-test-wrong-type.stderr +++ b/src/test/ui/rfc-1937-termination-trait/termination-trait-test-wrong-type.stderr @@ -1,4 +1,4 @@ -error[E0277]: `main` has invalid return type `std::result::Result` +error[E0277]: `main` has invalid return type `Result` --> $DIR/termination-trait-test-wrong-type.rs:6:1 | LL | / fn can_parse_zero_as_f32() -> Result { @@ -11,7 +11,7 @@ LL | | } LL | pub fn assert_test_result(result: T) { | ----------- required by this bound in `assert_test_result` | - = help: the trait `Termination` is not implemented for `std::result::Result` + = help: the trait `Termination` is not implemented for `Result` = 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 diff --git a/src/test/ui/rfc-2294-if-let-guard/typeck.stderr b/src/test/ui/rfc-2294-if-let-guard/typeck.stderr index 7ce93fe7348fd..6407128d8d877 100644 --- a/src/test/ui/rfc-2294-if-let-guard/typeck.stderr +++ b/src/test/ui/rfc-2294-if-let-guard/typeck.stderr @@ -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` - found enum `std::result::Result<_, _>` + found enum `Result<_, _>` error[E0308]: mismatched types --> $DIR/typeck.rs:12:22 diff --git a/src/test/ui/span/impl-wrong-item-for-trait.stderr b/src/test/ui/span/impl-wrong-item-for-trait.stderr index 9b0aad28b0a33..de200ca0721ca 100644 --- a/src/test/ui/span/impl-wrong-item-for-trait.stderr +++ b/src/test/ui/span/impl-wrong-item-for-trait.stderr @@ -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 diff --git a/src/test/ui/suggestions/as-ref.stderr b/src/test/ui/suggestions/as-ref.stderr index 4b5a9be7e5b4d..7e4d7fb3933d3 100644 --- a/src/test/ui/suggestions/as-ref.stderr +++ b/src/test/ui/suggestions/as-ref.stderr @@ -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` + = note: expected enum `Result<&usize, &usize>` + found reference `&Result` help: you can convert from `&Result` 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` + = note: expected enum `Result<&usize, usize>` + found reference `&Result` error: aborting due to 7 previous errors diff --git a/src/test/ui/suggestions/mut-ref-reassignment.stderr b/src/test/ui/suggestions/mut-ref-reassignment.stderr index e31c4dc66c805..327bbee1968bf 100644 --- a/src/test/ui/suggestions/mut-ref-reassignment.stderr +++ b/src/test/ui/suggestions/mut-ref-reassignment.stderr @@ -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` + = note: expected mutable reference `&mut Result` found enum `Option<_>` error[E0308]: mismatched types diff --git a/src/test/ui/suggestions/option-content-move.stderr b/src/test/ui/suggestions/option-content-move.stderr index 0f3dd346e856a..c00a0f1700bb4 100644 --- a/src/test/ui/suggestions/option-content-move.stderr +++ b/src/test/ui/suggestions/option-content-move.stderr @@ -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`, which does not implement the `Copy` trait + | move occurs because `selection.1` has type `Result`, 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 diff --git a/src/test/ui/suggestions/suggest-box.stderr b/src/test/ui/suggestions/suggest-box.stderr index 57c83baf4f831..8107fd862122a 100644 --- a/src/test/ui/suggestions/suggest-box.stderr +++ b/src/test/ui/suggestions/suggest-box.stderr @@ -10,7 +10,7 @@ LL | | Ok(()) LL | | }; | |_____^ expected struct `Box`, found closure | - = note: expected struct `Box std::result::Result<(), ()>>` + = note: expected struct `Box 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` diff --git a/src/test/ui/traits/self-without-lifetime-constraint.stderr b/src/test/ui/traits/self-without-lifetime-constraint.stderr index 6c7abe753e2bf..73b5aec022c60 100644 --- a/src/test/ui/traits/self-without-lifetime-constraint.stderr +++ b/src/test/ui/traits/self-without-lifetime-constraint.stderr @@ -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; - | -------------------------------------------------------------------- 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 | diff --git a/src/test/ui/try-block/try-block-bad-type.stderr b/src/test/ui/try-block/try-block-bad-type.stderr index cadf3a841c961..2d1313d7d0e31 100644 --- a/src/test/ui/try-block/try-block-bad-type.stderr +++ b/src/test/ui/try-block/try-block-bad-type.stderr @@ -13,13 +13,13 @@ LL | Err("")?; and 2 others = note: required by `from` -error[E0271]: type mismatch resolving ` as Try>::Ok == &str` +error[E0271]: type mismatch resolving ` as Try>::Ok == &str` --> $DIR/try-block-bad-type.rs:12:9 | LL | "" | ^^ expected `i32`, found `&str` -error[E0271]: type mismatch resolving ` as Try>::Ok == ()` +error[E0271]: type mismatch resolving ` as Try>::Ok == ()` --> $DIR/try-block-bad-type.rs:15:39 | LL | let res: Result = try { }; diff --git a/src/test/ui/uninhabited/uninhabited-matches-feature-gated.stderr b/src/test/ui/uninhabited/uninhabited-matches-feature-gated.stderr index 7b999f507739b..4f2f9e070fe52 100644 --- a/src/test/ui/uninhabited/uninhabited-matches-feature-gated.stderr +++ b/src/test/ui/uninhabited/uninhabited-matches-feature-gated.stderr @@ -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` + = note: the matched value is of type `Result` 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` + = note: the matched value is of type `Result` 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` + = note: the matched value is of type `Result` help: you might want to use `if let` to ignore the variant that isn't matched | LL | if let Ok(x) = x { /* */ }