about summary refs log tree commit diff
path: root/src/test/ui
diff options
context:
space:
mode:
authorDan Aloni <alonid@gmail.com>2021-01-28 18:01:36 +0200
committerDan Aloni <alonid@gmail.com>2021-02-06 12:03:48 +0200
commiteaefe4a230d7c32d7c99da437ee8b87860f28704 (patch)
tree72e1de33df6a231b3fe25c1aca7c137fa4a0d1fc /src/test/ui
parentcfba499271ba53190a1d3647ff8f7202ec9ed6f5 (diff)
downloadrust-eaefe4a230d7c32d7c99da437ee8b87860f28704.tar.gz
rust-eaefe4a230d7c32d7c99da437ee8b87860f28704.zip
path trimming: ignore type aliases
Diffstat (limited to 'src/test/ui')
-rw-r--r--src/test/ui/async-await/async-block-control-flow-static-semantics.stderr8
-rw-r--r--src/test/ui/async-await/issues/issue-67893.stderr6
-rw-r--r--src/test/ui/coercion/coercion-missing-tail-expected-type.stderr4
-rw-r--r--src/test/ui/feature-gates/feature-gate-exhaustive-patterns.stderr2
-rw-r--r--src/test/ui/generator/type-mismatch-signature-deduction.stderr10
-rw-r--r--src/test/ui/generics/wrong-number-of-args.rs2
-rw-r--r--src/test/ui/generics/wrong-number-of-args.stderr2
-rw-r--r--src/test/ui/impl-trait/trait_type.stderr8
-rw-r--r--src/test/ui/inference/cannot-infer-closure-circular.stderr4
-rw-r--r--src/test/ui/inference/cannot-infer-closure.stderr6
-rw-r--r--src/test/ui/inference/cannot-infer-partial-try-return.stderr6
-rw-r--r--src/test/ui/inference/issue-72616.stderr2
-rw-r--r--src/test/ui/issue-74047.stderr2
-rw-r--r--src/test/ui/issues/issue-11844.stderr4
-rw-r--r--src/test/ui/issues/issue-12552.stderr12
-rw-r--r--src/test/ui/issues/issue-13466.rs8
-rw-r--r--src/test/ui/issues/issue-13466.stderr8
-rw-r--r--src/test/ui/issues/issue-21332.rs2
-rw-r--r--src/test/ui/issues/issue-21332.stderr4
-rw-r--r--src/test/ui/issues/issue-3680.rs4
-rw-r--r--src/test/ui/issues/issue-3680.stderr4
-rw-r--r--src/test/ui/issues/issue-50264-inner-deref-trait/result-as_deref.stderr2
-rw-r--r--src/test/ui/issues/issue-50264-inner-deref-trait/result-as_deref_mut.stderr4
-rw-r--r--src/test/ui/issues/issue-51632-try-desugar-incompatible-types.stderr4
-rw-r--r--src/test/ui/issues/issue-6458-4.stderr4
-rw-r--r--src/test/ui/lifetimes/lifetime-elision-return-type-trait.stderr4
-rw-r--r--src/test/ui/lint/lint-ctypes-enum.stderr2
-rw-r--r--src/test/ui/lint/must_use-tuple.rs10
-rw-r--r--src/test/ui/lint/must_use-tuple.stderr10
-rw-r--r--src/test/ui/macros/must-use-in-macro-55516.stderr2
-rw-r--r--src/test/ui/mismatched_types/abridged.stderr10
-rw-r--r--src/test/ui/mismatched_types/binops.rs2
-rw-r--r--src/test/ui/mismatched_types/binops.stderr6
-rw-r--r--src/test/ui/mismatched_types/method-help-unsatisfied-bound.stderr4
-rw-r--r--src/test/ui/nll/issue-54556-niconii.stderr2
-rw-r--r--src/test/ui/or-patterns/inconsistent-modes.stderr2
-rw-r--r--src/test/ui/parser/unclosed-delimiter-in-dep.stderr4
-rw-r--r--src/test/ui/pattern/bindings-after-at/borrowck-move-and-move.stderr4
-rw-r--r--src/test/ui/pattern/bindings-after-at/borrowck-pat-ref-mut-and-ref.stderr4
-rw-r--r--src/test/ui/pattern/pat-struct-field-expr-has-type.stderr4
-rw-r--r--src/test/ui/pattern/pat-type-err-let-stmt.stderr12
-rw-r--r--src/test/ui/pattern/usefulness/non-exhaustive-match-nested.stderr2
-rw-r--r--src/test/ui/recursion/recursive-types-are-not-uninhabited.stderr2
-rw-r--r--src/test/ui/rfc-1937-termination-trait/termination-trait-test-wrong-type.stderr4
-rw-r--r--src/test/ui/rfc-2294-if-let-guard/typeck.stderr4
-rw-r--r--src/test/ui/span/impl-wrong-item-for-trait.stderr2
-rw-r--r--src/test/ui/suggestions/as-ref.stderr12
-rw-r--r--src/test/ui/suggestions/mut-ref-reassignment.stderr2
-rw-r--r--src/test/ui/suggestions/option-content-move.stderr2
-rw-r--r--src/test/ui/suggestions/suggest-box.stderr2
-rw-r--r--src/test/ui/traits/self-without-lifetime-constraint.stderr8
-rw-r--r--src/test/ui/try-block/try-block-bad-type.stderr4
-rw-r--r--src/test/ui/uninhabited/uninhabited-matches-feature-gated.stderr6
53 files changed, 127 insertions, 127 deletions
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 dbdfb2e71e0..919904ce3b6 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<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
diff --git a/src/test/ui/async-await/issues/issue-67893.stderr b/src/test/ui/async-await/issues/issue-67893.stderr
index af09f0a27bf..aee2ae0e2e4 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<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`
 
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 da8db4331df..df1fb58e25a 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<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
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 05547595234..e079c2ddcee 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<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() { /* */ }
diff --git a/src/test/ui/generator/type-mismatch-signature-deduction.stderr b/src/test/ui/generator/type-mismatch-signature-deduction.stderr
index 4abc0542c51..30e23ea8f65 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<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
diff --git a/src/test/ui/generics/wrong-number-of-args.rs b/src/test/ui/generics/wrong-number-of-args.rs
index 6b99865202e..2994ca3c759 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<String>;
diff --git a/src/test/ui/generics/wrong-number-of-args.stderr b/src/test/ui/generics/wrong-number-of-args.stderr
index 2a34fba2c48..73bd76aa5fa 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<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;
diff --git a/src/test/ui/impl-trait/trait_type.stderr b/src/test/ui/impl-trait/trait_type.stderr
index e94f2c70215..961bb735118 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 5efb400a4c7..211ae13e46d 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 475ed00d107..0dcce9e990b 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 a64503fa667..86e2126e1ae 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<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
 
diff --git a/src/test/ui/inference/issue-72616.stderr b/src/test/ui/inference/issue-72616.stderr
index d811988c9c1..3c9d864c426 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<T, <Self as TryInto<T>>::Error>`
+   |                              ^^ -------------- this method call resolves to `Result<T, <Self as TryInto<T>>::Error>`
    |                              |
    |                              cannot infer type
    |
diff --git a/src/test/ui/issue-74047.stderr b/src/test/ui/issue-74047.stderr
index 8f7c91a78d8..28174825d8b 100644
--- a/src/test/ui/issue-74047.stderr
+++ b/src/test/ui/issue-74047.stderr
@@ -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
 
diff --git a/src/test/ui/issues/issue-11844.stderr b/src/test/ui/issues/issue-11844.stderr
index 00eecbc9a98..9d7470e7af9 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<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
 
diff --git a/src/test/ui/issues/issue-12552.stderr b/src/test/ui/issues/issue-12552.stderr
index 1594c9f503a..3d8852ca748 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 8048dae1239..a420c7704af 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 792cc398bb8..c78466f4e8c 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 1b13f000b8c..6547f3a9b19 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<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() {}
diff --git a/src/test/ui/issues/issue-21332.stderr b/src/test/ui/issues/issue-21332.stderr
index 1d6ddd2660e..35863fbebe3 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<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
 
diff --git a/src/test/ui/issues/issue-3680.rs b/src/test/ui/issues/issue-3680.rs
index 8912e7a18ac..37c9000c043 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 479942b8e2c..e8fafa76b91 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 e41c04ee89e..9711e27d8a8 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 372d056fc19..ee7ea1e6a02 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 9ca983df30a..554ac7e7c75 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<isize, ()>`
+   = note: expected enum `Result<isize, ()>`
               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 00ebff9007d..0cf82d37d5d 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<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
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 c3d597bec2e..ef1127c59ac 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<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
 
diff --git a/src/test/ui/lint/lint-ctypes-enum.stderr b/src/test/ui/lint/lint-ctypes-enum.stderr
index 8917d309e60..f3991ab4177 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<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>);
diff --git a/src/test/ui/lint/must_use-tuple.rs b/src/test/ui/lint/must_use-tuple.rs
index f6b579a7f35..0f0aa20253c 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 de3c6f46c68..0532d89e039 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 a694c887085..b4072a1ad7e 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 b7564686cd5..61994e5bfee 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<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
diff --git a/src/test/ui/mismatched_types/binops.rs b/src/test/ui/mismatched_types/binops.rs
index 4be7420e33c..f359451dfb8 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 f2bfb12ee9c..19e921dd04d 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<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
 
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 92a88cbdb34..1030061b2d1 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 b4791fd22b4..1bfebd755b4 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<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
    |
diff --git a/src/test/ui/or-patterns/inconsistent-modes.stderr b/src/test/ui/or-patterns/inconsistent-modes.stderr
index c5dcef36e05..15790771043 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 d63a50034c5..00861a5a3d4 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<Value, ()>`
+              found enum `Result<Value, ()>`
 
 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 bfb7b479731..ff8183e8763 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<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) => {}
    |                     --------^-
    |                     |       |
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 00136c25764..13032c3838a 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<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
 
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 d57a8a0dbc1..3a61d4293b0 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 42258cfc1ae..4b4fb089283 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<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
 
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 d1cab752102..928e9068266 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 c6f500ec8cc..dfb69a3cc1b 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<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 { /* */ }
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 d015b72c5cf..45806201861 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<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
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 7ce93fe7348..6407128d8d8 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<bool>`
-              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 9b0aad28b0a..de200ca0721 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 4b5a9be7e5b..7e4d7fb3933 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<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
 
diff --git a/src/test/ui/suggestions/mut-ref-reassignment.stderr b/src/test/ui/suggestions/mut-ref-reassignment.stderr
index e31c4dc66c8..327bbee1968 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<String, ()>`
+   = note: expected mutable reference `&mut Result<String, ()>`
                            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 0f3dd346e85..c00a0f1700b 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<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
diff --git a/src/test/ui/suggestions/suggest-box.stderr b/src/test/ui/suggestions/suggest-box.stderr
index 57c83baf4f8..8107fd86212 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<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`
diff --git a/src/test/ui/traits/self-without-lifetime-constraint.stderr b/src/test/ui/traits/self-without-lifetime-constraint.stderr
index 6c7abe753e2..73b5aec022c 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<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
    |
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 cadf3a841c9..2d1313d7d0e 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 `<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 { };
diff --git a/src/test/ui/uninhabited/uninhabited-matches-feature-gated.stderr b/src/test/ui/uninhabited/uninhabited-matches-feature-gated.stderr
index 7b999f50773..4f2f9e070fe 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<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 { /* */ }