about summary refs log tree commit diff
diff options
context:
space:
mode:
authorBram van den Heuvel <bram@vandenheuvel.online>2021-02-08 23:15:45 +0100
committerBram van den Heuvel <bram@vandenheuvel.online>2021-02-09 14:19:35 +0100
commit0d96a79fb875a38df6d8f7216f094959c4de3761 (patch)
tree738a5dada0e1322599f272abf31a371ae414a126
parent921ec4b3fca17cc777766c240038d7d50ba98e0d (diff)
downloadrust-0d96a79fb875a38df6d8f7216f094959c4de3761.tar.gz
rust-0d96a79fb875a38df6d8f7216f094959c4de3761.zip
Organize trait test files
-rw-r--r--src/test/ui/traits/alias/ambiguous.rs (renamed from src/test/ui/traits/trait-alias-ambiguous.rs)0
-rw-r--r--src/test/ui/traits/alias/ambiguous.stderr (renamed from src/test/ui/traits/trait-alias-ambiguous.stderr)6
-rw-r--r--src/test/ui/traits/alias/auxiliary/greeter.rs (renamed from src/test/ui/traits/auxiliary/trait_alias.rs)0
-rw-r--r--src/test/ui/traits/alias/auxiliary/send_sync.rs (renamed from src/test/ui/traits/trait-alias/auxiliary/trait_alias.rs)0
-rw-r--r--src/test/ui/traits/alias/basic.rs (renamed from src/test/ui/traits/trait-alias/trait-alias.rs)0
-rw-r--r--src/test/ui/traits/alias/bounds.rs (renamed from src/test/ui/traits/trait-alias/trait-alias-bounds.rs)0
-rw-r--r--src/test/ui/traits/alias/cross-crate.rs (renamed from src/test/ui/traits/trait-alias/trait-alias-cross-crate.rs)6
-rw-r--r--src/test/ui/traits/alias/cross-crate.stderr (renamed from src/test/ui/traits/trait-alias/trait-alias-cross-crate.stderr)4
-rw-r--r--src/test/ui/traits/alias/impl.rs (renamed from src/test/ui/traits/trait-alias/trait-alias-impl.rs)0
-rw-r--r--src/test/ui/traits/alias/impl.stderr (renamed from src/test/ui/traits/trait-alias/trait-alias-impl.stderr)2
-rw-r--r--src/test/ui/traits/alias/import-cross-crate.rs (renamed from src/test/ui/traits/trait-alias-import-cross-crate.rs)6
-rw-r--r--src/test/ui/traits/alias/import.rs (renamed from src/test/ui/traits/trait-alias-import.rs)0
-rw-r--r--src/test/ui/traits/alias/issue-60021-assoc-method-resolve.rs (renamed from src/test/ui/traits/trait-alias/issue-60021-assoc-method-resolve.rs)0
-rw-r--r--src/test/ui/traits/alias/issue-72415-assoc-const-resolve.rs (renamed from src/test/ui/traits/trait-alias/issue-72415-assoc-const-resolve.rs)0
-rw-r--r--src/test/ui/traits/alias/issue-75983.rs (renamed from src/test/ui/traits/trait-alias/issue-75983.rs)0
-rw-r--r--src/test/ui/traits/alias/maybe-bound.rs (renamed from src/test/ui/traits/trait-alias/trait-alias-maybe-bound.rs)0
-rw-r--r--src/test/ui/traits/alias/no-duplicates.rs (renamed from src/test/ui/traits/trait-alias/trait-alias-no-duplicates.rs)0
-rw-r--r--src/test/ui/traits/alias/no-duplicates.stderr (renamed from src/test/ui/traits/trait-alias/trait-alias-no-duplicates.stderr)54
-rw-r--r--src/test/ui/traits/alias/no-extra-traits.rs (renamed from src/test/ui/traits/trait-alias/trait-alias-no-extra-traits.rs)0
-rw-r--r--src/test/ui/traits/alias/no-extra-traits.stderr (renamed from src/test/ui/traits/trait-alias/trait-alias-no-extra-traits.stderr)56
-rw-r--r--src/test/ui/traits/alias/object-fail.rs (renamed from src/test/ui/traits/trait-alias/trait-alias-object-fail.rs)0
-rw-r--r--src/test/ui/traits/alias/object-fail.stderr (renamed from src/test/ui/traits/trait-alias/trait-alias-object-fail.stderr)4
-rw-r--r--src/test/ui/traits/alias/object-wf.rs (renamed from src/test/ui/traits/trait-alias/trait-alias-object-wf.rs)0
-rw-r--r--src/test/ui/traits/alias/object.rs (renamed from src/test/ui/traits/trait-alias/trait-alias-object.rs)0
-rw-r--r--src/test/ui/traits/alias/only-maybe-bound.rs (renamed from src/test/ui/traits/trait-alias/trait-alias-only-maybe-bound.rs)0
-rw-r--r--src/test/ui/traits/alias/only-maybe-bound.stderr (renamed from src/test/ui/traits/trait-alias/trait-alias-only-maybe-bound.stderr)4
-rw-r--r--src/test/ui/traits/alias/syntax-fail.rs (renamed from src/test/ui/traits/trait-alias/trait-alias-syntax-fail.rs)0
-rw-r--r--src/test/ui/traits/alias/syntax-fail.stderr (renamed from src/test/ui/traits/trait-alias/trait-alias-syntax-fail.stderr)8
-rw-r--r--src/test/ui/traits/alias/syntax.rs (renamed from src/test/ui/traits/trait-alias/trait-alias-syntax.rs)0
-rw-r--r--src/test/ui/traits/alias/wf.rs (renamed from src/test/ui/traits/trait-alias/trait-alias-wf.rs)0
-rw-r--r--src/test/ui/traits/alias/wf.stderr (renamed from src/test/ui/traits/trait-alias/trait-alias-wf.stderr)2
-rw-r--r--src/test/ui/traits/anon-static-method.rs (renamed from src/test/ui/traits/anon-trait-static-method.rs)0
-rw-r--r--src/test/ui/traits/as-struct-constructor.rs (renamed from src/test/ui/traits/trait-as-struct-constructor.rs)0
-rw-r--r--src/test/ui/traits/as-struct-constructor.stderr (renamed from src/test/ui/traits/trait-as-struct-constructor.stderr)2
-rw-r--r--src/test/ui/traits/assoc-type-in-superbad.rs (renamed from src/test/ui/traits/traits-assoc-type-in-supertrait-bad.rs)0
-rw-r--r--src/test/ui/traits/assoc-type-in-superbad.stderr (renamed from src/test/ui/traits/traits-assoc-type-in-supertrait-bad.stderr)2
-rw-r--r--src/test/ui/traits/assoc-type-in-supertrait.rs (renamed from src/test/ui/traits/traits-assoc-type-in-supertrait.rs)0
-rw-r--r--src/test/ui/traits/associated_type_bound/assoc_type_bound_with_struct.rs (renamed from src/test/ui/traits/assoc_type_bound_with_struct.rs)0
-rw-r--r--src/test/ui/traits/associated_type_bound/assoc_type_bound_with_struct.stderr (renamed from src/test/ui/traits/assoc_type_bound_with_struct.stderr)0
-rw-r--r--src/test/ui/traits/associated_type_bound/check-trait-object-bounds-1.rs (renamed from src/test/ui/traits/check-trait-object-bounds-1.rs)0
-rw-r--r--src/test/ui/traits/associated_type_bound/check-trait-object-bounds-1.stderr (renamed from src/test/ui/traits/check-trait-object-bounds-1.stderr)0
-rw-r--r--src/test/ui/traits/associated_type_bound/check-trait-object-bounds-2-ok.rs (renamed from src/test/ui/traits/check-trait-object-bounds-2-ok.rs)0
-rw-r--r--src/test/ui/traits/associated_type_bound/check-trait-object-bounds-2.rs (renamed from src/test/ui/traits/check-trait-object-bounds-2.rs)0
-rw-r--r--src/test/ui/traits/associated_type_bound/check-trait-object-bounds-2.stderr (renamed from src/test/ui/traits/check-trait-object-bounds-2.stderr)0
-rw-r--r--src/test/ui/traits/associated_type_bound/check-trait-object-bounds-3.rs (renamed from src/test/ui/traits/check-trait-object-bounds-3.rs)0
-rw-r--r--src/test/ui/traits/associated_type_bound/check-trait-object-bounds-3.stderr (renamed from src/test/ui/traits/check-trait-object-bounds-3.stderr)0
-rw-r--r--src/test/ui/traits/associated_type_bound/check-trait-object-bounds-4.rs (renamed from src/test/ui/traits/check-trait-object-bounds-4.rs)0
-rw-r--r--src/test/ui/traits/associated_type_bound/check-trait-object-bounds-4.stderr (renamed from src/test/ui/traits/check-trait-object-bounds-4.stderr)0
-rw-r--r--src/test/ui/traits/associated_type_bound/check-trait-object-bounds-5.rs (renamed from src/test/ui/traits/check-trait-object-bounds-5.rs)0
-rw-r--r--src/test/ui/traits/associated_type_bound/check-trait-object-bounds-5.stderr (renamed from src/test/ui/traits/check-trait-object-bounds-5.stderr)0
-rw-r--r--src/test/ui/traits/associated_type_bound/check-trait-object-bounds-6.rs (renamed from src/test/ui/traits/check-trait-object-bounds-6.rs)0
-rw-r--r--src/test/ui/traits/associated_type_bound/check-trait-object-bounds-6.stderr (renamed from src/test/ui/traits/check-trait-object-bounds-6.stderr)0
-rw-r--r--src/test/ui/traits/astconv-cycle-between-and-type.rs (renamed from src/test/ui/traits/astconv-cycle-between-trait-and-type.rs)0
-rw-r--r--src/test/ui/traits/bound/auxiliary/crate_a1.rs (renamed from src/test/ui/traits/auxiliary/crate_a1.rs)0
-rw-r--r--src/test/ui/traits/bound/auxiliary/crate_a2.rs (renamed from src/test/ui/traits/auxiliary/crate_a2.rs)0
-rw-r--r--src/test/ui/traits/bound/auxiliary/on_structs_and_enums_xc.rs (renamed from src/test/ui/traits/auxiliary/trait_bounds_on_structs_and_enums_xc.rs)0
-rw-r--r--src/test/ui/traits/bound/basic.rs (renamed from src/test/ui/traits/trait-bounds-basic.rs)0
-rw-r--r--src/test/ui/traits/bound/generic_trait.rs (renamed from src/test/ui/traits/trait-bounds.rs)0
-rw-r--r--src/test/ui/traits/bound/impl-comparison-duplicates.rs (renamed from src/test/ui/traits/trait-bounds-impl-comparison-duplicates.rs)0
-rw-r--r--src/test/ui/traits/bound/in-arc.rs (renamed from src/test/ui/traits/trait-bounds-in-arc.rs)0
-rw-r--r--src/test/ui/traits/bound/multiple.rs (renamed from src/test/ui/traits/multiple-trait-bounds.rs)0
-rw-r--r--src/test/ui/traits/bound/not-on-bare-trait.rs (renamed from src/test/ui/traits/trait-bounds-not-on-bare-trait.rs)0
-rw-r--r--src/test/ui/traits/bound/not-on-bare-trait.stderr (renamed from src/test/ui/traits/trait-bounds-not-on-bare-trait.stderr)4
-rw-r--r--src/test/ui/traits/bound/not-on-struct.rs (renamed from src/test/ui/traits/trait-bounds-not-on-struct.rs)0
-rw-r--r--src/test/ui/traits/bound/not-on-struct.stderr (renamed from src/test/ui/traits/trait-bounds-not-on-struct.stderr)38
-rw-r--r--src/test/ui/traits/bound/on-structs-and-enums-in-fns.rs (renamed from src/test/ui/traits/trait-bounds-on-structs-and-enums-in-fns.rs)0
-rw-r--r--src/test/ui/traits/bound/on-structs-and-enums-in-fns.stderr (renamed from src/test/ui/traits/trait-bounds-on-structs-and-enums-in-fns.stderr)4
-rw-r--r--src/test/ui/traits/bound/on-structs-and-enums-in-impls.rs (renamed from src/test/ui/traits/trait-bounds-on-structs-and-enums-in-impls.rs)0
-rw-r--r--src/test/ui/traits/bound/on-structs-and-enums-in-impls.stderr (renamed from src/test/ui/traits/trait-bounds-on-structs-and-enums-in-impls.stderr)2
-rw-r--r--src/test/ui/traits/bound/on-structs-and-enums-locals.rs (renamed from src/test/ui/traits/trait-bounds-on-structs-and-enums-locals.rs)0
-rw-r--r--src/test/ui/traits/bound/on-structs-and-enums-locals.stderr (renamed from src/test/ui/traits/trait-bounds-on-structs-and-enums-locals.stderr)4
-rw-r--r--src/test/ui/traits/bound/on-structs-and-enums-rpass.rs (renamed from src/test/ui/traits/trait-bounds-on-structs-and-enums-rpass.rs)0
-rw-r--r--src/test/ui/traits/bound/on-structs-and-enums-static.rs (renamed from src/test/ui/traits/trait-bounds-on-structs-and-enums-static.rs)0
-rw-r--r--src/test/ui/traits/bound/on-structs-and-enums-static.stderr (renamed from src/test/ui/traits/trait-bounds-on-structs-and-enums-static.stderr)2
-rw-r--r--src/test/ui/traits/bound/on-structs-and-enums-xc.rs14
-rw-r--r--src/test/ui/traits/bound/on-structs-and-enums-xc.stderr (renamed from src/test/ui/traits/trait-bounds-on-structs-and-enums-xc.stderr)8
-rw-r--r--src/test/ui/traits/bound/on-structs-and-enums-xc1.rs15
-rw-r--r--src/test/ui/traits/bound/on-structs-and-enums-xc1.stderr (renamed from src/test/ui/traits/trait-bounds-on-structs-and-enums-xc1.stderr)6
-rw-r--r--src/test/ui/traits/bound/on-structs-and-enums.rs (renamed from src/test/ui/traits/trait-bounds-on-structs-and-enums.rs)0
-rw-r--r--src/test/ui/traits/bound/on-structs-and-enums.stderr (renamed from src/test/ui/traits/trait-bounds-on-structs-and-enums.stderr)14
-rw-r--r--src/test/ui/traits/bound/recursion.rs (renamed from src/test/ui/traits/trait-bounds-recursion.rs)0
-rw-r--r--src/test/ui/traits/bound/same-crate-name.rs (renamed from src/test/ui/traits/trait-bounds-same-crate-name.rs)0
-rw-r--r--src/test/ui/traits/bound/same-crate-name.stderr (renamed from src/test/ui/traits/trait-bounds-same-crate-name.stderr)8
-rw-r--r--src/test/ui/traits/bound/sugar.rs (renamed from src/test/ui/traits/trait-bounds-sugar.rs)0
-rw-r--r--src/test/ui/traits/bound/sugar.stderr (renamed from src/test/ui/traits/trait-bounds-sugar.stderr)2
-rw-r--r--src/test/ui/traits/cache-issue-18209.rs (renamed from src/test/ui/traits/trait-cache-issue-18209.rs)0
-rw-r--r--src/test/ui/traits/coercion-generic-bad.rs (renamed from src/test/ui/traits/trait-coercion-generic-bad.rs)0
-rw-r--r--src/test/ui/traits/coercion-generic-bad.stderr (renamed from src/test/ui/traits/trait-coercion-generic-bad.stderr)2
-rw-r--r--src/test/ui/traits/coercion-generic-regions.rs (renamed from src/test/ui/traits/trait-coercion-generic-regions.rs)0
-rw-r--r--src/test/ui/traits/coercion-generic-regions.stderr (renamed from src/test/ui/traits/trait-coercion-generic-regions.stderr)2
-rw-r--r--src/test/ui/traits/coercion-generic.rs (renamed from src/test/ui/traits/trait-coercion-generic.rs)0
-rw-r--r--src/test/ui/traits/coercion.rs (renamed from src/test/ui/traits/trait-coercion.rs)0
-rw-r--r--src/test/ui/traits/composition-trivial.rs (renamed from src/test/ui/traits/trait-composition-trivial.rs)0
-rw-r--r--src/test/ui/traits/conditional-dispatch.rs (renamed from src/test/ui/traits/traits-conditional-dispatch.rs)0
-rw-r--r--src/test/ui/traits/conditional-model-fn.rs (renamed from src/test/ui/traits/traits-conditional-model-fn.rs)0
-rw-r--r--src/test/ui/traits/copy-guessing.rs (renamed from src/test/ui/traits/trait-copy-guessing.rs)0
-rw-r--r--src/test/ui/traits/cycle-type-trait.rs (renamed from src/test/ui/traits/cycle-trait-type-trait.rs)0
-rw-r--r--src/test/ui/traits/default-method/auxiliary/xc.rs (renamed from src/test/ui/traits/auxiliary/trait_default_method_xc_aux.rs)0
-rw-r--r--src/test/ui/traits/default-method/auxiliary/xc_2.rs (renamed from src/test/ui/traits/auxiliary/trait_default_method_xc_aux_2.rs)4
-rw-r--r--src/test/ui/traits/default-method/bound-subst.rs (renamed from src/test/ui/traits/trait-default-method-bound-subst.rs)0
-rw-r--r--src/test/ui/traits/default-method/bound-subst2.rs (renamed from src/test/ui/traits/trait-default-method-bound-subst2.rs)0
-rw-r--r--src/test/ui/traits/default-method/bound-subst3.rs (renamed from src/test/ui/traits/trait-default-method-bound-subst3.rs)0
-rw-r--r--src/test/ui/traits/default-method/bound-subst4.rs (renamed from src/test/ui/traits/trait-default-method-bound-subst4.rs)0
-rw-r--r--src/test/ui/traits/default-method/bound.rs (renamed from src/test/ui/traits/trait-default-method-bound.rs)0
-rw-r--r--src/test/ui/traits/default-method/macro.rs (renamed from src/test/ui/traits/traits-default-method-macro.rs)0
-rw-r--r--src/test/ui/traits/default-method/mut.rs (renamed from src/test/ui/traits/traits-default-method-mut.rs)0
-rw-r--r--src/test/ui/traits/default-method/self.rs (renamed from src/test/ui/traits/traits-default-method-self.rs)0
-rw-r--r--src/test/ui/traits/default-method/supervtable.rs (renamed from src/test/ui/traits/default-method-supertrait-vtable.rs)0
-rw-r--r--src/test/ui/traits/default-method/trivial.rs (renamed from src/test/ui/traits/traits-default-method-trivial.rs)0
-rw-r--r--src/test/ui/traits/default-method/xc-2.rs (renamed from src/test/ui/traits/trait-default-method-xc-2.rs)8
-rw-r--r--src/test/ui/traits/default-method/xc.rs (renamed from src/test/ui/traits/trait-default-method-xc.rs)4
-rw-r--r--src/test/ui/traits/duplicate-methods.rs (renamed from src/test/ui/traits/trait-duplicate-methods.rs)0
-rw-r--r--src/test/ui/traits/duplicate-methods.stderr (renamed from src/test/ui/traits/trait-duplicate-methods.stderr)2
-rw-r--r--src/test/ui/traits/elaborate-type-region.rs (renamed from src/test/ui/traits/traits-elaborate-type-region.rs)0
-rw-r--r--src/test/ui/traits/false-ambiguity-where-clause-builtin-bound.rs (renamed from src/test/ui/traits/trait-false-ambiguity-where-clause-builtin-bound.rs)0
-rw-r--r--src/test/ui/traits/generic.rs (renamed from src/test/ui/traits/trait-generic.rs)0
-rw-r--r--src/test/ui/traits/impl-1.rs (renamed from src/test/ui/traits/trait-impl-1.rs)0
-rw-r--r--src/test/ui/traits/impl-1.stderr (renamed from src/test/ui/traits/trait-impl-1.stderr)2
-rw-r--r--src/test/ui/traits/impl-2.rs (renamed from src/test/ui/traits/trait-impl-2.rs)0
-rw-r--r--src/test/ui/traits/impl-can-not-have-untraitful-items.rs (renamed from src/test/ui/traits/trait-impl-can-not-have-untraitful-items.rs)0
-rw-r--r--src/test/ui/traits/impl-can-not-have-untraitful-items.stderr (renamed from src/test/ui/traits/trait-impl-can-not-have-untraitful-items.stderr)6
-rw-r--r--src/test/ui/traits/impl-different-num-params.rs (renamed from src/test/ui/traits/trait-impl-different-num-params.rs)0
-rw-r--r--src/test/ui/traits/impl-different-num-params.stderr (renamed from src/test/ui/traits/trait-impl-different-num-params.stderr)2
-rw-r--r--src/test/ui/traits/impl-for-module.rs (renamed from src/test/ui/traits/trait-impl-for-module.rs)0
-rw-r--r--src/test/ui/traits/impl-for-module.stderr (renamed from src/test/ui/traits/trait-impl-for-module.stderr)2
-rw-r--r--src/test/ui/traits/impl-method-mismatch.rs (renamed from src/test/ui/traits/trait-impl-method-mismatch.rs)0
-rw-r--r--src/test/ui/traits/impl-method-mismatch.stderr (renamed from src/test/ui/traits/trait-impl-method-mismatch.stderr)2
-rw-r--r--src/test/ui/traits/impl-object-overlap-issue-23853.rs (renamed from src/test/ui/traits/traits-impl-object-overlap-issue-23853.rs)0
-rw-r--r--src/test/ui/traits/impl-of-supertrait-has-wrong-lifetime-parameters.rs (renamed from src/test/ui/traits/trait-impl-of-supertrait-has-wrong-lifetime-parameters.rs)0
-rw-r--r--src/test/ui/traits/impl-of-supertrait-has-wrong-lifetime-parameters.stderr (renamed from src/test/ui/traits/trait-impl-of-supertrait-has-wrong-lifetime-parameters.stderr)8
-rw-r--r--src/test/ui/traits/impl.rs (renamed from src/test/ui/traits/trait-impl.rs)0
-rw-r--r--src/test/ui/traits/inductive-overflow/lifetime.rs (renamed from src/test/ui/traits/traits-inductive-overflow-lifetime.rs)0
-rw-r--r--src/test/ui/traits/inductive-overflow/lifetime.stderr (renamed from src/test/ui/traits/traits-inductive-overflow-lifetime.stderr)2
-rw-r--r--src/test/ui/traits/inductive-overflow/simultaneous.rs (renamed from src/test/ui/traits/traits-inductive-overflow-simultaneous.rs)0
-rw-r--r--src/test/ui/traits/inductive-overflow/simultaneous.stderr (renamed from src/test/ui/traits/traits-inductive-overflow-simultaneous.stderr)2
-rw-r--r--src/test/ui/traits/inductive-overflow/supertrait-auto-trait.rs (renamed from src/test/ui/traits/traits-inductive-overflow-supertrait-auto-trait.rs)0
-rw-r--r--src/test/ui/traits/inductive-overflow/supertrait-auto-trait.stderr (renamed from src/test/ui/traits/traits-inductive-overflow-supertrait-auto-trait.stderr)4
-rw-r--r--src/test/ui/traits/inductive-overflow/supertrait.rs (renamed from src/test/ui/traits/traits-inductive-overflow-supertrait.rs)0
-rw-r--r--src/test/ui/traits/inductive-overflow/supertrait.stderr (renamed from src/test/ui/traits/traits-inductive-overflow-supertrait.stderr)2
-rw-r--r--src/test/ui/traits/inductive-overflow/two-traits.rs (renamed from src/test/ui/traits/traits-inductive-overflow-two-traits.rs)0
-rw-r--r--src/test/ui/traits/inductive-overflow/two-traits.stderr (renamed from src/test/ui/traits/traits-inductive-overflow-two-traits.stderr)4
-rw-r--r--src/test/ui/traits/infer-from-object-issue-26952.rs (renamed from src/test/ui/traits/infer-from-object-trait-issue-26952.rs)0
-rw-r--r--src/test/ui/traits/inherent-method-order.rs (renamed from src/test/ui/traits/inherent-trait-method-order.rs)0
-rw-r--r--src/test/ui/traits/inheritance/auto-xc-2.rs (renamed from src/test/ui/traits/trait-inheritance-auto-xc-2.rs)4
-rw-r--r--src/test/ui/traits/inheritance/auto-xc.rs (renamed from src/test/ui/traits/trait-inheritance-auto-xc.rs)4
-rw-r--r--src/test/ui/traits/inheritance/auto.rs (renamed from src/test/ui/traits/trait-inheritance-auto.rs)0
-rw-r--r--src/test/ui/traits/inheritance/auxiliary/auto_xc.rs (renamed from src/test/ui/traits/auxiliary/trait_inheritance_auto_xc_aux.rs)0
-rw-r--r--src/test/ui/traits/inheritance/auxiliary/auto_xc_2.rs (renamed from src/test/ui/traits/auxiliary/trait_inheritance_auto_xc_2_aux.rs)0
-rw-r--r--src/test/ui/traits/inheritance/auxiliary/overloading_xc.rs (renamed from src/test/ui/traits/auxiliary/trait_inheritance_overloading_xc.rs)0
-rw-r--r--src/test/ui/traits/inheritance/auxiliary/xc_call.rs (renamed from src/test/ui/traits/auxiliary/trait_xc_call_aux.rs)0
-rw-r--r--src/test/ui/traits/inheritance/basic.rs (renamed from src/test/ui/traits/trait-inheritance2.rs)0
-rw-r--r--src/test/ui/traits/inheritance/call-bound-inherited.rs (renamed from src/test/ui/traits/trait-inheritance-call-bound-inherited.rs)0
-rw-r--r--src/test/ui/traits/inheritance/call-bound-inherited2.rs (renamed from src/test/ui/traits/trait-inheritance-call-bound-inherited2.rs)0
-rw-r--r--src/test/ui/traits/inheritance/cast-without-call-to-supertrait.rs (renamed from src/test/ui/traits/trait-inheritance-cast-without-call-to-supertrait.rs)0
-rw-r--r--src/test/ui/traits/inheritance/cast.rs (renamed from src/test/ui/traits/trait-inheritance-cast.rs)0
-rw-r--r--src/test/ui/traits/inheritance/cross-trait-call-xc.rs (renamed from src/test/ui/traits/trait-inheritance-cross-trait-call-xc.rs)4
-rw-r--r--src/test/ui/traits/inheritance/cross-trait-call.rs (renamed from src/test/ui/traits/trait-inheritance-cross-trait-call.rs)0
-rw-r--r--src/test/ui/traits/inheritance/diamond.rs (renamed from src/test/ui/traits/trait-inheritance-diamond.rs)0
-rw-r--r--src/test/ui/traits/inheritance/multiple-inheritors.rs (renamed from src/test/ui/traits/trait-inheritance-multiple-inheritors.rs)0
-rw-r--r--src/test/ui/traits/inheritance/multiple-params.rs (renamed from src/test/ui/traits/trait-inheritance-multiple-params.rs)0
-rw-r--r--src/test/ui/traits/inheritance/num.rs (renamed from src/test/ui/traits/trait-inheritance-num.rs)0
-rw-r--r--src/test/ui/traits/inheritance/num0.rs (renamed from src/test/ui/traits/trait-inheritance-num0.rs)0
-rw-r--r--src/test/ui/traits/inheritance/num1.rs (renamed from src/test/ui/traits/trait-inheritance-num1.rs)0
-rw-r--r--src/test/ui/traits/inheritance/num2.rs (renamed from src/test/ui/traits/trait-inheritance-num2.rs)0
-rw-r--r--src/test/ui/traits/inheritance/num3.rs (renamed from src/test/ui/traits/trait-inheritance-num3.rs)0
-rw-r--r--src/test/ui/traits/inheritance/num5.rs (renamed from src/test/ui/traits/trait-inheritance-num5.rs)0
-rw-r--r--src/test/ui/traits/inheritance/overloading-simple.rs (renamed from src/test/ui/traits/trait-inheritance-overloading-simple.rs)0
-rw-r--r--src/test/ui/traits/inheritance/overloading-xc-exe.rs (renamed from src/test/ui/traits/trait-inheritance-overloading-xc-exe.rs)6
-rw-r--r--src/test/ui/traits/inheritance/overloading.rs (renamed from src/test/ui/traits/trait-inheritance-overloading.rs)0
-rw-r--r--src/test/ui/traits/inheritance/repeated-supertrait-ambig.rs (renamed from src/test/ui/traits/traits-repeated-supertrait-ambig.rs)0
-rw-r--r--src/test/ui/traits/inheritance/repeated-supertrait-ambig.stderr (renamed from src/test/ui/traits/traits-repeated-supertrait-ambig.stderr)10
-rw-r--r--src/test/ui/traits/inheritance/repeated-supertrait.rs (renamed from src/test/ui/traits/traits-repeated-supertrait.rs)0
-rw-r--r--src/test/ui/traits/inheritance/self-in-supertype.rs (renamed from src/test/ui/traits/trait-inheritance-self-in-supertype.rs)0
-rw-r--r--src/test/ui/traits/inheritance/self.rs (renamed from src/test/ui/traits/trait-inheritance-self.rs)0
-rw-r--r--src/test/ui/traits/inheritance/simple.rs (renamed from src/test/ui/traits/trait-inheritance-simple.rs)0
-rw-r--r--src/test/ui/traits/inheritance/static.rs (renamed from src/test/ui/traits/trait-inheritance-static.rs)0
-rw-r--r--src/test/ui/traits/inheritance/static2.rs (renamed from src/test/ui/traits/trait-inheritance-static2.rs)0
-rw-r--r--src/test/ui/traits/inheritance/subst.rs (renamed from src/test/ui/traits/trait-inheritance-subst.rs)0
-rw-r--r--src/test/ui/traits/inheritance/subst2.rs (renamed from src/test/ui/traits/trait-inheritance-subst2.rs)0
-rw-r--r--src/test/ui/traits/inheritance/visibility.rs (renamed from src/test/ui/traits/trait-inheritance-visibility.rs)0
-rw-r--r--src/test/ui/traits/issue-22019.rs (renamed from src/test/ui/traits/traits-issue-22019.rs)0
-rw-r--r--src/test/ui/traits/issue-22110.rs (renamed from src/test/ui/traits/traits-issue-22110.rs)0
-rw-r--r--src/test/ui/traits/issue-22655.rs (renamed from src/test/ui/traits/traits-issue-22655.rs)0
-rw-r--r--src/test/ui/traits/issue-23003-overflow.rs (renamed from src/test/ui/traits/traits-issue-23003-overflow.rs)0
-rw-r--r--src/test/ui/traits/issue-23003.rs (renamed from src/test/ui/traits/traits-issue-23003.rs)0
-rw-r--r--src/test/ui/traits/issue-26339.rs (renamed from src/test/ui/traits/traits-issue-26339.rs)0
-rw-r--r--src/test/ui/traits/issue-71136.rs (renamed from src/test/ui/traits/traits-issue-71136.rs)0
-rw-r--r--src/test/ui/traits/issue-71136.stderr (renamed from src/test/ui/traits/traits-issue-71136.stderr)2
-rw-r--r--src/test/ui/traits/issue-9394-inherited-calls.rs (renamed from src/test/ui/traits/issue-9394-inherited-trait-calls.rs)0
-rw-r--r--src/test/ui/traits/item-inside-macro.rs (renamed from src/test/ui/traits/trait-item-inside-macro.rs)0
-rw-r--r--src/test/ui/traits/item-privacy.rs (renamed from src/test/ui/traits/trait-item-privacy.rs)0
-rw-r--r--src/test/ui/traits/item-privacy.stderr (renamed from src/test/ui/traits/trait-item-privacy.stderr)38
-rw-r--r--src/test/ui/traits/kindck-owned-contains-1.rs (renamed from src/test/ui/traits/kindck-owned-trait-contains-1.rs)0
-rw-r--r--src/test/ui/traits/matching-lifetimes.rs (renamed from src/test/ui/traits/trait-matching-lifetimes.rs)0
-rw-r--r--src/test/ui/traits/matching-lifetimes.stderr (renamed from src/test/ui/traits/trait-matching-lifetimes.stderr)12
-rw-r--r--src/test/ui/traits/method-private.rs (renamed from src/test/ui/traits/trait-method-private.rs)0
-rw-r--r--src/test/ui/traits/method-private.stderr (renamed from src/test/ui/traits/trait-method-private.stderr)2
-rw-r--r--src/test/ui/traits/multidispatch-bad.rs (renamed from src/test/ui/traits/traits-multidispatch-bad.rs)0
-rw-r--r--src/test/ui/traits/multidispatch-bad.stderr (renamed from src/test/ui/traits/traits-multidispatch-bad.stderr)2
-rw-r--r--src/test/ui/traits/multidispatch-convert-ambig-dest.rs (renamed from src/test/ui/traits/traits-multidispatch-convert-ambig-dest.rs)0
-rw-r--r--src/test/ui/traits/multidispatch-convert-ambig-dest.stderr (renamed from src/test/ui/traits/traits-multidispatch-convert-ambig-dest.stderr)2
-rw-r--r--src/test/ui/traits/multidispatch-infer-convert-target.rs (renamed from src/test/ui/traits/traits-multidispatch-infer-convert-target.rs)0
-rw-r--r--src/test/ui/traits/object/auto-dedup-in-impl.rs (renamed from src/test/ui/traits/trait-object-auto-dedup-in-impl.rs)0
-rw-r--r--src/test/ui/traits/object/auto-dedup-in-impl.stderr (renamed from src/test/ui/traits/trait-object-auto-dedup-in-impl.stderr)2
-rw-r--r--src/test/ui/traits/object/auto-dedup.rs (renamed from src/test/ui/traits/trait-object-auto-dedup.rs)0
-rw-r--r--src/test/ui/traits/object/bounds-cycle-1.rs (renamed from src/test/ui/traits/trait-object-bounds-cycle-1.rs)0
-rw-r--r--src/test/ui/traits/object/bounds-cycle-2.rs (renamed from src/test/ui/traits/trait-object-bounds-cycle-2.rs)0
-rw-r--r--src/test/ui/traits/object/bounds-cycle-3.rs (renamed from src/test/ui/traits/trait-object-bounds-cycle-3.rs)0
-rw-r--r--src/test/ui/traits/object/bounds-cycle-4.rs (renamed from src/test/ui/traits/trait-object-bounds-cycle-4.rs)0
-rw-r--r--src/test/ui/traits/object/exclusion.rs (renamed from src/test/ui/traits/trait-object-exclusion.rs)0
-rw-r--r--src/test/ui/traits/object/generics.rs (renamed from src/test/ui/traits/trait-object-generics.rs)0
-rw-r--r--src/test/ui/traits/object/lifetime-first.rs (renamed from src/test/ui/traits/trait-object-lifetime-first.rs)0
-rw-r--r--src/test/ui/traits/object/macro-matcher.rs (renamed from src/test/ui/traits/trait-object-macro-matcher.rs)0
-rw-r--r--src/test/ui/traits/object/macro-matcher.stderr (renamed from src/test/ui/traits/trait-object-macro-matcher.stderr)4
-rw-r--r--src/test/ui/traits/object/safety.rs (renamed from src/test/ui/traits/trait-object-safety.rs)0
-rw-r--r--src/test/ui/traits/object/safety.stderr (renamed from src/test/ui/traits/trait-object-safety.stderr)8
-rw-r--r--src/test/ui/traits/object/supertrait-lifetime-bound.rs (renamed from src/test/ui/traits/trait-object-supertrait-lifetime-bound.rs)0
-rw-r--r--src/test/ui/traits/object/vs-lifetime-2.rs (renamed from src/test/ui/traits/trait-object-vs-lifetime-2.rs)0
-rw-r--r--src/test/ui/traits/object/vs-lifetime-2.stderr (renamed from src/test/ui/traits/trait-object-vs-lifetime-2.stderr)2
-rw-r--r--src/test/ui/traits/object/vs-lifetime.rs (renamed from src/test/ui/traits/trait-object-vs-lifetime.rs)0
-rw-r--r--src/test/ui/traits/object/vs-lifetime.stderr (renamed from src/test/ui/traits/trait-object-vs-lifetime.stderr)14
-rw-r--r--src/test/ui/traits/object/with-lifetime-bound.rs (renamed from src/test/ui/traits/trait-object-with-lifetime-bound.rs)0
-rw-r--r--src/test/ui/traits/object/with-self-in-projection-output-bad.rs (renamed from src/test/ui/traits/trait-object-with-self-in-projection-output-bad.rs)0
-rw-r--r--src/test/ui/traits/object/with-self-in-projection-output-bad.stderr (renamed from src/test/ui/traits/trait-object-with-self-in-projection-output-bad.stderr)4
-rw-r--r--src/test/ui/traits/object/with-self-in-projection-output-good.rs (renamed from src/test/ui/traits/trait-object-with-self-in-projection-output-good.rs)0
-rw-r--r--src/test/ui/traits/object/with-self-in-projection-output-repeated-supertrait.rs (renamed from src/test/ui/traits/trait-object-with-self-in-projection-output-repeated-supertrait.rs)0
-rw-r--r--src/test/ui/traits/param-without-lifetime-constraint.rs (renamed from src/test/ui/traits/trait-param-without-lifetime-constraint.rs)0
-rw-r--r--src/test/ui/traits/param-without-lifetime-constraint.stderr (renamed from src/test/ui/traits/trait-param-without-lifetime-constraint.stderr)4
-rw-r--r--src/test/ui/traits/parameterized-with-bounds.rs (renamed from src/test/ui/traits/parameterized-trait-with-bounds.rs)0
-rw-r--r--src/test/ui/traits/principal-less-objects.rs (renamed from src/test/ui/traits/principal-less-trait-objects.rs)0
-rw-r--r--src/test/ui/traits/privacy.rs (renamed from src/test/ui/traits/trait-privacy.rs)0
-rw-r--r--src/test/ui/traits/region-pointer-simple.rs (renamed from src/test/ui/traits/trait-region-pointer-simple.rs)0
-rw-r--r--src/test/ui/traits/reservation-impl/coherence-conflict.rs (renamed from src/test/ui/traits/reservation-impls/reservation-impl-coherence-conflict.rs)0
-rw-r--r--src/test/ui/traits/reservation-impl/coherence-conflict.stderr (renamed from src/test/ui/traits/reservation-impls/reservation-impl-coherence-conflict.stderr)2
-rw-r--r--src/test/ui/traits/reservation-impl/no-use.rs (renamed from src/test/ui/traits/reservation-impls/reservation-impl-no-use.rs)0
-rw-r--r--src/test/ui/traits/reservation-impl/no-use.stderr (renamed from src/test/ui/traits/reservation-impls/reservation-impl-no-use.stderr)2
-rw-r--r--src/test/ui/traits/reservation-impl/non-lattice-ok.rs (renamed from src/test/ui/traits/reservation-impls/reservation-impl-non-lattice-ok.rs)0
-rw-r--r--src/test/ui/traits/reservation-impl/ok.rs (renamed from src/test/ui/traits/reservation-impls/reservation-impl-ok.rs)0
-rw-r--r--src/test/ui/traits/resolution-in-overloaded-op.rs (renamed from src/test/ui/traits/trait-resolution-in-overloaded-op.rs)0
-rw-r--r--src/test/ui/traits/resolution-in-overloaded-op.stderr (renamed from src/test/ui/traits/trait-resolution-in-overloaded-op.stderr)2
-rw-r--r--src/test/ui/traits/safety-fn-body.rs (renamed from src/test/ui/traits/trait-safety-fn-body.rs)0
-rw-r--r--src/test/ui/traits/safety-fn-body.stderr (renamed from src/test/ui/traits/trait-safety-fn-body.stderr)2
-rw-r--r--src/test/ui/traits/safety-inherent-impl.rs (renamed from src/test/ui/traits/trait-safety-inherent-impl.rs)0
-rw-r--r--src/test/ui/traits/safety-inherent-impl.stderr (renamed from src/test/ui/traits/trait-safety-inherent-impl.stderr)2
-rw-r--r--src/test/ui/traits/safety-ok-cc.rs (renamed from src/test/ui/traits/trait-safety-ok-cc.rs)0
-rw-r--r--src/test/ui/traits/safety-ok.rs (renamed from src/test/ui/traits/trait-safety-ok.rs)0
-rw-r--r--src/test/ui/traits/safety-trait-impl-cc.rs (renamed from src/test/ui/traits/trait-safety-trait-impl-cc.rs)0
-rw-r--r--src/test/ui/traits/safety-trait-impl-cc.stderr (renamed from src/test/ui/traits/trait-safety-trait-impl-cc.stderr)2
-rw-r--r--src/test/ui/traits/safety-trait-impl.rs (renamed from src/test/ui/traits/trait-safety-trait-impl.rs)0
-rw-r--r--src/test/ui/traits/safety-trait-impl.stderr (renamed from src/test/ui/traits/trait-safety-trait-impl.stderr)4
-rw-r--r--src/test/ui/traits/static-method-generic-inference.rs (renamed from src/test/ui/traits/trait-static-method-generic-inference.rs)0
-rw-r--r--src/test/ui/traits/static-method-generic-inference.stderr (renamed from src/test/ui/traits/trait-static-method-generic-inference.stderr)2
-rw-r--r--src/test/ui/traits/static-method-overwriting.rs (renamed from src/test/ui/traits/trait-static-method-overwriting.rs)0
-rw-r--r--src/test/ui/traits/static-outlives-a-where-clause.rs (renamed from src/test/ui/traits/traits-static-outlives-a-where-clause.rs)0
-rw-r--r--src/test/ui/traits/suggest-deferences/issue-39029.fixed (renamed from src/test/ui/traits/trait-suggest-deferences-issue-39029.fixed)0
-rw-r--r--src/test/ui/traits/suggest-deferences/issue-39029.rs (renamed from src/test/ui/traits/trait-suggest-deferences-issue-39029.rs)0
-rw-r--r--src/test/ui/traits/suggest-deferences/issue-39029.stderr (renamed from src/test/ui/traits/trait-suggest-deferences-issue-39029.stderr)2
-rw-r--r--src/test/ui/traits/suggest-deferences/issue-62530.fixed (renamed from src/test/ui/traits/trait-suggest-deferences-issue-62530.fixed)0
-rw-r--r--src/test/ui/traits/suggest-deferences/issue-62530.rs (renamed from src/test/ui/traits/trait-suggest-deferences-issue-62530.rs)0
-rw-r--r--src/test/ui/traits/suggest-deferences/issue-62530.stderr (renamed from src/test/ui/traits/trait-suggest-deferences-issue-62530.stderr)2
-rw-r--r--src/test/ui/traits/suggest-deferences/multiple-0.fixed (renamed from src/test/ui/traits/trait-suggest-deferences-multiple-0.fixed)0
-rw-r--r--src/test/ui/traits/suggest-deferences/multiple-0.rs (renamed from src/test/ui/traits/trait-suggest-deferences-multiple-0.rs)0
-rw-r--r--src/test/ui/traits/suggest-deferences/multiple-0.stderr (renamed from src/test/ui/traits/trait-suggest-deferences-multiple-0.stderr)2
-rw-r--r--src/test/ui/traits/suggest-deferences/multiple-1.rs (renamed from src/test/ui/traits/trait-suggest-deferences-multiple-1.rs)0
-rw-r--r--src/test/ui/traits/suggest-deferences/multiple-1.stderr (renamed from src/test/ui/traits/trait-suggest-deferences-multiple-1.stderr)2
-rw-r--r--src/test/ui/traits/suggest-where-clause.rs (renamed from src/test/ui/traits/trait-suggest-where-clause.rs)0
-rw-r--r--src/test/ui/traits/suggest-where-clause.stderr (renamed from src/test/ui/traits/trait-suggest-where-clause.stderr)14
-rw-r--r--src/test/ui/traits/superdefault-generics.rs (renamed from src/test/ui/traits/supertrait-default-generics.rs)0
-rw-r--r--src/test/ui/traits/syntax-polarity.rs (renamed from src/test/ui/traits/syntax-trait-polarity.rs)0
-rw-r--r--src/test/ui/traits/test-2.rs (renamed from src/test/ui/traits/trait-test-2.rs)0
-rw-r--r--src/test/ui/traits/test-2.stderr (renamed from src/test/ui/traits/trait-test-2.stderr)16
-rw-r--r--src/test/ui/traits/test.rs (renamed from src/test/ui/traits/trait-test.rs)0
-rw-r--r--src/test/ui/traits/test.stderr (renamed from src/test/ui/traits/trait-test.stderr)2
-rw-r--r--src/test/ui/traits/to-str.rs (renamed from src/test/ui/traits/trait-to-str.rs)0
-rw-r--r--src/test/ui/traits/trait-bounds-on-structs-and-enums-xc.rs14
-rw-r--r--src/test/ui/traits/trait-bounds-on-structs-and-enums-xc1.rs15
-rw-r--r--src/test/ui/traits/ufcs-object.rs (renamed from src/test/ui/traits/ufcs-trait-object.rs)0
-rw-r--r--src/test/ui/traits/use-before-def.rs (renamed from src/test/ui/traits/use-trait-before-def.rs)0
-rw-r--r--src/test/ui/traits/wf-object/maybe-bound.rs (renamed from src/test/ui/traits/wf-trait-object-maybe-bound.rs)0
-rw-r--r--src/test/ui/traits/wf-object/maybe-bound.stderr (renamed from src/test/ui/traits/wf-trait-object-maybe-bound.stderr)10
-rw-r--r--src/test/ui/traits/wf-object/no-duplicates.rs (renamed from src/test/ui/traits/wf-trait-object-no-duplicates.rs)0
-rw-r--r--src/test/ui/traits/wf-object/no-duplicates.stderr (renamed from src/test/ui/traits/wf-trait-object-no-duplicates.stderr)10
-rw-r--r--src/test/ui/traits/wf-object/only-maybe-bound.rs (renamed from src/test/ui/traits/wf-trait-object-only-maybe-bound.rs)0
-rw-r--r--src/test/ui/traits/wf-object/only-maybe-bound.stderr (renamed from src/test/ui/traits/wf-trait-object-only-maybe-bound.stderr)4
-rw-r--r--src/test/ui/traits/wf-object/reverse-order.rs (renamed from src/test/ui/traits/wf-trait-object-reverse-order.rs)0
-rw-r--r--src/test/ui/traits/where-clause-vs-impl.rs (renamed from src/test/ui/traits/trait-where-clause-vs-impl.rs)0
-rw-r--r--src/test/ui/traits/with-bounds-default.rs (renamed from src/test/ui/traits/trait-with-bounds-default.rs)0
-rw-r--r--src/test/ui/traits/with-dst.rs (renamed from src/test/ui/traits/trait-with-dst.rs)0
288 files changed, 285 insertions, 285 deletions
diff --git a/src/test/ui/traits/trait-alias-ambiguous.rs b/src/test/ui/traits/alias/ambiguous.rs
index 28409e0c662..28409e0c662 100644
--- a/src/test/ui/traits/trait-alias-ambiguous.rs
+++ b/src/test/ui/traits/alias/ambiguous.rs
diff --git a/src/test/ui/traits/trait-alias-ambiguous.stderr b/src/test/ui/traits/alias/ambiguous.stderr
index f692e92d861..649ce72604e 100644
--- a/src/test/ui/traits/trait-alias-ambiguous.stderr
+++ b/src/test/ui/traits/alias/ambiguous.stderr
@@ -1,16 +1,16 @@
 error[E0034]: multiple applicable items in scope
-  --> $DIR/trait-alias-ambiguous.rs:21:7
+  --> $DIR/ambiguous.rs:21:7
    |
 LL |     t.foo();
    |       ^^^ multiple `foo` found
    |
 note: candidate #1 is defined in an impl of the trait `A` for the type `u8`
-  --> $DIR/trait-alias-ambiguous.rs:8:9
+  --> $DIR/ambiguous.rs:8:9
    |
 LL |         fn foo(&self) {}
    |         ^^^^^^^^^^^^^
 note: candidate #2 is defined in an impl of the trait `B` for the type `u8`
-  --> $DIR/trait-alias-ambiguous.rs:11:9
+  --> $DIR/ambiguous.rs:11:9
    |
 LL |         fn foo(&self) {}
    |         ^^^^^^^^^^^^^
diff --git a/src/test/ui/traits/auxiliary/trait_alias.rs b/src/test/ui/traits/alias/auxiliary/greeter.rs
index 9e412215512..9e412215512 100644
--- a/src/test/ui/traits/auxiliary/trait_alias.rs
+++ b/src/test/ui/traits/alias/auxiliary/greeter.rs
diff --git a/src/test/ui/traits/trait-alias/auxiliary/trait_alias.rs b/src/test/ui/traits/alias/auxiliary/send_sync.rs
index 9e56b87e088..9e56b87e088 100644
--- a/src/test/ui/traits/trait-alias/auxiliary/trait_alias.rs
+++ b/src/test/ui/traits/alias/auxiliary/send_sync.rs
diff --git a/src/test/ui/traits/trait-alias/trait-alias.rs b/src/test/ui/traits/alias/basic.rs
index d8168f2990c..d8168f2990c 100644
--- a/src/test/ui/traits/trait-alias/trait-alias.rs
+++ b/src/test/ui/traits/alias/basic.rs
diff --git a/src/test/ui/traits/trait-alias/trait-alias-bounds.rs b/src/test/ui/traits/alias/bounds.rs
index b97eb38c5af..b97eb38c5af 100644
--- a/src/test/ui/traits/trait-alias/trait-alias-bounds.rs
+++ b/src/test/ui/traits/alias/bounds.rs
diff --git a/src/test/ui/traits/trait-alias/trait-alias-cross-crate.rs b/src/test/ui/traits/alias/cross-crate.rs
index 14edfdd7a3d..8919c643400 100644
--- a/src/test/ui/traits/trait-alias/trait-alias-cross-crate.rs
+++ b/src/test/ui/traits/alias/cross-crate.rs
@@ -1,11 +1,11 @@
-// aux-build:trait_alias.rs
+// aux-build:send_sync.rs
 
 #![feature(trait_alias)]
 
-extern crate trait_alias;
+extern crate send_sync;
 
 use std::rc::Rc;
-use trait_alias::SendSync;
+use send_sync::SendSync;
 
 fn use_alias<T: SendSync>() {}
 
diff --git a/src/test/ui/traits/trait-alias/trait-alias-cross-crate.stderr b/src/test/ui/traits/alias/cross-crate.stderr
index 60a4a46a055..3b8fee8e8df 100644
--- a/src/test/ui/traits/trait-alias/trait-alias-cross-crate.stderr
+++ b/src/test/ui/traits/alias/cross-crate.stderr
@@ -1,5 +1,5 @@
 error[E0277]: `Rc<u32>` cannot be sent between threads safely
-  --> $DIR/trait-alias-cross-crate.rs:14:17
+  --> $DIR/cross-crate.rs:14:17
    |
 LL | fn use_alias<T: SendSync>() {}
    |                 -------- required by this bound in `use_alias`
@@ -10,7 +10,7 @@ LL |     use_alias::<Rc<u32>>();
    = help: the trait `Send` is not implemented for `Rc<u32>`
 
 error[E0277]: `Rc<u32>` cannot be shared between threads safely
-  --> $DIR/trait-alias-cross-crate.rs:14:17
+  --> $DIR/cross-crate.rs:14:17
    |
 LL | fn use_alias<T: SendSync>() {}
    |                 -------- required by this bound in `use_alias`
diff --git a/src/test/ui/traits/trait-alias/trait-alias-impl.rs b/src/test/ui/traits/alias/impl.rs
index 6e35793a066..6e35793a066 100644
--- a/src/test/ui/traits/trait-alias/trait-alias-impl.rs
+++ b/src/test/ui/traits/alias/impl.rs
diff --git a/src/test/ui/traits/trait-alias/trait-alias-impl.stderr b/src/test/ui/traits/alias/impl.stderr
index 301db4fb71c..cedcd10213d 100644
--- a/src/test/ui/traits/trait-alias/trait-alias-impl.stderr
+++ b/src/test/ui/traits/alias/impl.stderr
@@ -1,5 +1,5 @@
 error[E0404]: expected trait, found trait alias `DefaultAlias`
-  --> $DIR/trait-alias-impl.rs:5:6
+  --> $DIR/impl.rs:5:6
    |
 LL | impl DefaultAlias for () {}
    |      ^^^^^^^^^^^^ not a trait
diff --git a/src/test/ui/traits/trait-alias-import-cross-crate.rs b/src/test/ui/traits/alias/import-cross-crate.rs
index 975542ab49b..868585cd097 100644
--- a/src/test/ui/traits/trait-alias-import-cross-crate.rs
+++ b/src/test/ui/traits/alias/import-cross-crate.rs
@@ -1,12 +1,12 @@
 // run-pass
-// aux-build:trait_alias.rs
+// aux-build:greeter.rs
 
 #![feature(trait_alias)]
 
-extern crate trait_alias;
+extern crate greeter;
 
 // Import only the alias, not the real trait.
-use trait_alias::{Greet, Hi};
+use greeter::{Greet, Hi};
 
 fn main() {
     let hi = Hi;
diff --git a/src/test/ui/traits/trait-alias-import.rs b/src/test/ui/traits/alias/import.rs
index 802a8f15698..802a8f15698 100644
--- a/src/test/ui/traits/trait-alias-import.rs
+++ b/src/test/ui/traits/alias/import.rs
diff --git a/src/test/ui/traits/trait-alias/issue-60021-assoc-method-resolve.rs b/src/test/ui/traits/alias/issue-60021-assoc-method-resolve.rs
index 5e27ed3c646..5e27ed3c646 100644
--- a/src/test/ui/traits/trait-alias/issue-60021-assoc-method-resolve.rs
+++ b/src/test/ui/traits/alias/issue-60021-assoc-method-resolve.rs
diff --git a/src/test/ui/traits/trait-alias/issue-72415-assoc-const-resolve.rs b/src/test/ui/traits/alias/issue-72415-assoc-const-resolve.rs
index e49125d1024..e49125d1024 100644
--- a/src/test/ui/traits/trait-alias/issue-72415-assoc-const-resolve.rs
+++ b/src/test/ui/traits/alias/issue-72415-assoc-const-resolve.rs
diff --git a/src/test/ui/traits/trait-alias/issue-75983.rs b/src/test/ui/traits/alias/issue-75983.rs
index f9a7f36de43..f9a7f36de43 100644
--- a/src/test/ui/traits/trait-alias/issue-75983.rs
+++ b/src/test/ui/traits/alias/issue-75983.rs
diff --git a/src/test/ui/traits/trait-alias/trait-alias-maybe-bound.rs b/src/test/ui/traits/alias/maybe-bound.rs
index 284baa48149..284baa48149 100644
--- a/src/test/ui/traits/trait-alias/trait-alias-maybe-bound.rs
+++ b/src/test/ui/traits/alias/maybe-bound.rs
diff --git a/src/test/ui/traits/trait-alias/trait-alias-no-duplicates.rs b/src/test/ui/traits/alias/no-duplicates.rs
index 88feb89170d..88feb89170d 100644
--- a/src/test/ui/traits/trait-alias/trait-alias-no-duplicates.rs
+++ b/src/test/ui/traits/alias/no-duplicates.rs
diff --git a/src/test/ui/traits/trait-alias/trait-alias-no-duplicates.stderr b/src/test/ui/traits/alias/no-duplicates.stderr
index b297d54375c..9f38dd40c3a 100644
--- a/src/test/ui/traits/trait-alias/trait-alias-no-duplicates.stderr
+++ b/src/test/ui/traits/alias/no-duplicates.stderr
@@ -1,5 +1,5 @@
 error[E0225]: only auto traits can be used as additional traits in a trait object
-  --> $DIR/trait-alias-no-duplicates.rs:16:22
+  --> $DIR/no-duplicates.rs:16:22
    |
 LL | trait _0 = Obj;
    |            ---
@@ -16,7 +16,7 @@ LL | type _T00 = dyn _0 + _0;
    = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
 
 error[E0225]: only auto traits can be used as additional traits in a trait object
-  --> $DIR/trait-alias-no-duplicates.rs:19:22
+  --> $DIR/no-duplicates.rs:19:22
    |
 LL | trait _0 = Obj;
    |            ---
@@ -35,7 +35,7 @@ LL | type _T01 = dyn _1 + _0;
    = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
 
 error[E0225]: only auto traits can be used as additional traits in a trait object
-  --> $DIR/trait-alias-no-duplicates.rs:22:22
+  --> $DIR/no-duplicates.rs:22:22
    |
 LL | trait _0 = Obj;
    |            ---
@@ -57,7 +57,7 @@ LL | type _T02 = dyn _1 + _1;
    = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
 
 error[E0225]: only auto traits can be used as additional traits in a trait object
-  --> $DIR/trait-alias-no-duplicates.rs:25:23
+  --> $DIR/no-duplicates.rs:25:23
    |
 LL | trait _0 = Obj;
    |            --- additional non-auto trait
@@ -73,7 +73,7 @@ LL | type _T03 = dyn Obj + _1;
    = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
 
 error[E0225]: only auto traits can be used as additional traits in a trait object
-  --> $DIR/trait-alias-no-duplicates.rs:28:22
+  --> $DIR/no-duplicates.rs:28:22
    |
 LL | trait _0 = Obj;
    |            --- first non-auto trait
@@ -89,7 +89,7 @@ LL | type _T04 = dyn _1 + Obj;
    = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
 
 error[E0225]: only auto traits can be used as additional traits in a trait object
-  --> $DIR/trait-alias-no-duplicates.rs:37:17
+  --> $DIR/no-duplicates.rs:37:17
    |
 LL | trait _0 = Obj;
    |            ---
@@ -114,7 +114,7 @@ LL | type _T10 = dyn _2 + _3;
    = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
 
 error[E0225]: only auto traits can be used as additional traits in a trait object
-  --> $DIR/trait-alias-no-duplicates.rs:40:22
+  --> $DIR/no-duplicates.rs:40:22
    |
 LL | trait _0 = Obj;
    |            --- additional non-auto trait
@@ -133,7 +133,7 @@ LL | type _T11 = dyn _3 + _2;
    = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
 
 error[E0225]: only auto traits can be used as additional traits in a trait object
-  --> $DIR/trait-alias-no-duplicates.rs:43:23
+  --> $DIR/no-duplicates.rs:43:23
    |
 LL | trait _0 = Obj;
    |            --- additional non-auto trait
@@ -150,7 +150,7 @@ LL | type _T12 = dyn Obj + _2;
    = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
 
 error[E0225]: only auto traits can be used as additional traits in a trait object
-  --> $DIR/trait-alias-no-duplicates.rs:46:17
+  --> $DIR/no-duplicates.rs:46:17
    |
 LL | trait _0 = Obj;
    |            ---
@@ -175,7 +175,7 @@ LL | type _T13 = dyn _2 + Obj;
    = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
 
 error[E0225]: only auto traits can be used as additional traits in a trait object
-  --> $DIR/trait-alias-no-duplicates.rs:49:22
+  --> $DIR/no-duplicates.rs:49:22
    |
 LL | trait _0 = Obj;
    |            --- first non-auto trait
@@ -194,7 +194,7 @@ LL | type _T14 = dyn _1 + _3;
    = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
 
 error[E0225]: only auto traits can be used as additional traits in a trait object
-  --> $DIR/trait-alias-no-duplicates.rs:52:22
+  --> $DIR/no-duplicates.rs:52:22
    |
 LL | trait _0 = Obj;
    |            --- additional non-auto trait
@@ -213,7 +213,7 @@ LL | type _T15 = dyn _3 + _1;
    = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
 
 error[E0225]: only auto traits can be used as additional traits in a trait object
-  --> $DIR/trait-alias-no-duplicates.rs:55:22
+  --> $DIR/no-duplicates.rs:55:22
    |
 LL | trait _0 = Obj;
    |            --- first non-auto trait
@@ -234,7 +234,7 @@ LL | type _T16 = dyn _1 + _4;
    = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
 
 error[E0225]: only auto traits can be used as additional traits in a trait object
-  --> $DIR/trait-alias-no-duplicates.rs:58:22
+  --> $DIR/no-duplicates.rs:58:22
    |
 LL | trait _0 = Obj;
    |            --- additional non-auto trait
@@ -255,7 +255,7 @@ LL | type _T17 = dyn _4 + _1;
    = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
 
 error[E0225]: only auto traits can be used as additional traits in a trait object
-  --> $DIR/trait-alias-no-duplicates.rs:65:22
+  --> $DIR/no-duplicates.rs:65:22
    |
 LL | trait _5 = Obj + Send;
    |            ---
@@ -272,7 +272,7 @@ LL | type _T20 = dyn _5 + _5;
    = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
 
 error[E0225]: only auto traits can be used as additional traits in a trait object
-  --> $DIR/trait-alias-no-duplicates.rs:68:23
+  --> $DIR/no-duplicates.rs:68:23
    |
 LL | trait _5 = Obj + Send;
    |            --- additional non-auto trait
@@ -286,7 +286,7 @@ LL | type _T21 = dyn Obj + _5;
    = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
 
 error[E0225]: only auto traits can be used as additional traits in a trait object
-  --> $DIR/trait-alias-no-duplicates.rs:71:22
+  --> $DIR/no-duplicates.rs:71:22
    |
 LL | trait _5 = Obj + Send;
    |            --- first non-auto trait
@@ -300,7 +300,7 @@ LL | type _T22 = dyn _5 + Obj;
    = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
 
 error[E0225]: only auto traits can be used as additional traits in a trait object
-  --> $DIR/trait-alias-no-duplicates.rs:74:36
+  --> $DIR/no-duplicates.rs:74:36
    |
 LL | trait _5 = Obj + Send;
    |            --- first non-auto trait
@@ -314,7 +314,7 @@ LL | type _T23 = dyn _5 + Send + Sync + Obj;
    = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
 
 error[E0225]: only auto traits can be used as additional traits in a trait object
-  --> $DIR/trait-alias-no-duplicates.rs:81:17
+  --> $DIR/no-duplicates.rs:81:17
    |
 LL | trait _5 = Obj + Send;
    |            ---
@@ -337,7 +337,7 @@ LL | type _T30 = dyn _6;
    = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
 
 error[E0225]: only auto traits can be used as additional traits in a trait object
-  --> $DIR/trait-alias-no-duplicates.rs:84:17
+  --> $DIR/no-duplicates.rs:84:17
    |
 LL | trait _5 = Obj + Send;
    |            ---
@@ -360,7 +360,7 @@ LL | type _T31 = dyn _6 + Send;
    = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
 
 error[E0225]: only auto traits can be used as additional traits in a trait object
-  --> $DIR/trait-alias-no-duplicates.rs:87:24
+  --> $DIR/no-duplicates.rs:87:24
    |
 LL | trait _5 = Obj + Send;
    |            ---
@@ -383,7 +383,7 @@ LL | type _T32 = dyn Send + _6;
    = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
 
 error[E0225]: only auto traits can be used as additional traits in a trait object
-  --> $DIR/trait-alias-no-duplicates.rs:95:22
+  --> $DIR/no-duplicates.rs:95:22
    |
 LL | trait _5 = Obj + Send;
    |            --- first non-auto trait
@@ -402,7 +402,7 @@ LL | type _T40 = dyn _8 + Obj;
    = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
 
 error[E0225]: only auto traits can be used as additional traits in a trait object
-  --> $DIR/trait-alias-no-duplicates.rs:98:23
+  --> $DIR/no-duplicates.rs:98:23
    |
 LL | trait _5 = Obj + Send;
    |            --- additional non-auto trait
@@ -421,7 +421,7 @@ LL | type _T41 = dyn Obj + _8;
    = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
 
 error[E0225]: only auto traits can be used as additional traits in a trait object
-  --> $DIR/trait-alias-no-duplicates.rs:101:22
+  --> $DIR/no-duplicates.rs:101:22
    |
 LL | trait _3 = Obj;
    |            --- additional non-auto trait
@@ -445,7 +445,7 @@ LL | type _T42 = dyn _8 + _4;
    = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
 
 error[E0225]: only auto traits can be used as additional traits in a trait object
-  --> $DIR/trait-alias-no-duplicates.rs:104:22
+  --> $DIR/no-duplicates.rs:104:22
    |
 LL | trait _3 = Obj;
    |            --- first non-auto trait
@@ -469,7 +469,7 @@ LL | type _T43 = dyn _4 + _8;
    = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
 
 error[E0225]: only auto traits can be used as additional traits in a trait object
-  --> $DIR/trait-alias-no-duplicates.rs:107:36
+  --> $DIR/no-duplicates.rs:107:36
    |
 LL | trait _3 = Obj;
    |            --- first non-auto trait
@@ -493,7 +493,7 @@ LL | type _T44 = dyn _4 + Send + Sync + _8;
    = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
 
 error[E0225]: only auto traits can be used as additional traits in a trait object
-  --> $DIR/trait-alias-no-duplicates.rs:117:22
+  --> $DIR/no-duplicates.rs:117:22
    |
 LL | trait _9 = for<'a> ObjL<'a>;
    |            ---------------- first non-auto trait
@@ -508,7 +508,7 @@ LL | type _T50 = dyn _9 + _10;
    = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
 
 error[E0225]: only auto traits can be used as additional traits in a trait object
-  --> $DIR/trait-alias-no-duplicates.rs:123:23
+  --> $DIR/no-duplicates.rs:123:23
    |
 LL | trait _11 = ObjT<for<'a> fn(&'a u8)>;
    |             ------------------------ first non-auto trait
diff --git a/src/test/ui/traits/trait-alias/trait-alias-no-extra-traits.rs b/src/test/ui/traits/alias/no-extra-traits.rs
index 4dad8c0f873..4dad8c0f873 100644
--- a/src/test/ui/traits/trait-alias/trait-alias-no-extra-traits.rs
+++ b/src/test/ui/traits/alias/no-extra-traits.rs
diff --git a/src/test/ui/traits/trait-alias/trait-alias-no-extra-traits.stderr b/src/test/ui/traits/alias/no-extra-traits.stderr
index 1d7b3fa112b..cdb5cd90b85 100644
--- a/src/test/ui/traits/trait-alias/trait-alias-no-extra-traits.stderr
+++ b/src/test/ui/traits/alias/no-extra-traits.stderr
@@ -1,5 +1,5 @@
 error[E0225]: only auto traits can be used as additional traits in a trait object
-  --> $DIR/trait-alias-no-extra-traits.rs:16:22
+  --> $DIR/no-extra-traits.rs:16:22
    |
 LL | trait _0 = ObjA;
    |            ---- first non-auto trait
@@ -13,7 +13,7 @@ LL | type _T00 = dyn _0 + ObjB;
    = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
 
 error[E0225]: only auto traits can be used as additional traits in a trait object
-  --> $DIR/trait-alias-no-extra-traits.rs:19:24
+  --> $DIR/no-extra-traits.rs:19:24
    |
 LL | trait _0 = ObjA;
    |            ---- additional non-auto trait
@@ -27,7 +27,7 @@ LL | type _T01 = dyn ObjB + _0;
    = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
 
 error[E0225]: only auto traits can be used as additional traits in a trait object
-  --> $DIR/trait-alias-no-extra-traits.rs:22:24
+  --> $DIR/no-extra-traits.rs:22:24
    |
 LL | trait _0 = ObjA;
    |            ---- additional non-auto trait
@@ -43,7 +43,7 @@ LL | type _T02 = dyn ObjB + _1;
    = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
 
 error[E0225]: only auto traits can be used as additional traits in a trait object
-  --> $DIR/trait-alias-no-extra-traits.rs:25:22
+  --> $DIR/no-extra-traits.rs:25:22
    |
 LL | trait _0 = ObjA;
    |            ---- first non-auto trait
@@ -59,7 +59,7 @@ LL | type _T03 = dyn _1 + ObjB;
    = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
 
 error[E0225]: only auto traits can be used as additional traits in a trait object
-  --> $DIR/trait-alias-no-extra-traits.rs:34:22
+  --> $DIR/no-extra-traits.rs:34:22
    |
 LL | trait _2 = ObjB;
    |            ----
@@ -78,7 +78,7 @@ LL | type _T10 = dyn _2 + _3;
    = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
 
 error[E0225]: only auto traits can be used as additional traits in a trait object
-  --> $DIR/trait-alias-no-extra-traits.rs:37:22
+  --> $DIR/no-extra-traits.rs:37:22
    |
 LL | trait _2 = ObjB;
    |            ----
@@ -97,7 +97,7 @@ LL | type _T11 = dyn _3 + _2;
    = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
 
 error[E0225]: only auto traits can be used as additional traits in a trait object
-  --> $DIR/trait-alias-no-extra-traits.rs:40:22
+  --> $DIR/no-extra-traits.rs:40:22
    |
 LL | trait _2 = ObjB;
    |            ----
@@ -118,7 +118,7 @@ LL | type _T12 = dyn _2 + _4;
    = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
 
 error[E0225]: only auto traits can be used as additional traits in a trait object
-  --> $DIR/trait-alias-no-extra-traits.rs:43:22
+  --> $DIR/no-extra-traits.rs:43:22
    |
 LL | trait _2 = ObjB;
    |            ----
@@ -139,7 +139,7 @@ LL | type _T13 = dyn _4 + _2;
    = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
 
 error[E0225]: only auto traits can be used as additional traits in a trait object
-  --> $DIR/trait-alias-no-extra-traits.rs:50:22
+  --> $DIR/no-extra-traits.rs:50:22
    |
 LL | trait _0 = ObjA;
    |            ---- additional non-auto trait
@@ -158,7 +158,7 @@ LL | type _T20 = dyn _5 + _1;
    = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
 
 error[E0225]: only auto traits can be used as additional traits in a trait object
-  --> $DIR/trait-alias-no-extra-traits.rs:53:22
+  --> $DIR/no-extra-traits.rs:53:22
    |
 LL | trait _0 = ObjA;
    |            ---- first non-auto trait
@@ -177,7 +177,7 @@ LL | type _T21 = dyn _1 + _5;
    = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
 
 error[E0225]: only auto traits can be used as additional traits in a trait object
-  --> $DIR/trait-alias-no-extra-traits.rs:56:22
+  --> $DIR/no-extra-traits.rs:56:22
    |
 LL | trait _5 = Sync + ObjB + Send;
    |                   ---- first non-auto trait
@@ -191,7 +191,7 @@ LL | type _T22 = dyn _5 + ObjA;
    = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
 
 error[E0225]: only auto traits can be used as additional traits in a trait object
-  --> $DIR/trait-alias-no-extra-traits.rs:59:24
+  --> $DIR/no-extra-traits.rs:59:24
    |
 LL | trait _5 = Sync + ObjB + Send;
    |                   ---- additional non-auto trait
@@ -205,7 +205,7 @@ LL | type _T23 = dyn ObjA + _5;
    = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
 
 error[E0225]: only auto traits can be used as additional traits in a trait object
-  --> $DIR/trait-alias-no-extra-traits.rs:62:29
+  --> $DIR/no-extra-traits.rs:62:29
    |
 LL | trait _0 = ObjA;
    |            ---- additional non-auto trait
@@ -224,7 +224,7 @@ LL | type _T24 = dyn Send + _5 + _1 + Sync;
    = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
 
 error[E0225]: only auto traits can be used as additional traits in a trait object
-  --> $DIR/trait-alias-no-extra-traits.rs:65:29
+  --> $DIR/no-extra-traits.rs:65:29
    |
 LL | trait _0 = ObjA;
    |            ---- first non-auto trait
@@ -243,7 +243,7 @@ LL | type _T25 = dyn _1 + Sync + _5 + Send;
    = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
 
 error[E0225]: only auto traits can be used as additional traits in a trait object
-  --> $DIR/trait-alias-no-extra-traits.rs:68:36
+  --> $DIR/no-extra-traits.rs:68:36
    |
 LL | trait _5 = Sync + ObjB + Send;
    |                   ---- first non-auto trait
@@ -257,7 +257,7 @@ LL | type _T26 = dyn Sync + Send + _5 + ObjA;
    = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
 
 error[E0225]: only auto traits can be used as additional traits in a trait object
-  --> $DIR/trait-alias-no-extra-traits.rs:71:38
+  --> $DIR/no-extra-traits.rs:71:38
    |
 LL | trait _5 = Sync + ObjB + Send;
    |                   ---- additional non-auto trait
@@ -271,7 +271,7 @@ LL | type _T27 = dyn Send + Sync + ObjA + _5;
    = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
 
 error[E0225]: only auto traits can be used as additional traits in a trait object
-  --> $DIR/trait-alias-no-extra-traits.rs:80:17
+  --> $DIR/no-extra-traits.rs:80:17
    |
 LL | trait _0 = ObjA;
    |            ---- first non-auto trait
@@ -296,7 +296,7 @@ LL | type _T30 = dyn _6;
    = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
 
 error[E0225]: only auto traits can be used as additional traits in a trait object
-  --> $DIR/trait-alias-no-extra-traits.rs:83:17
+  --> $DIR/no-extra-traits.rs:83:17
    |
 LL | trait _0 = ObjA;
    |            ---- first non-auto trait
@@ -321,7 +321,7 @@ LL | type _T31 = dyn _6 + Send;
    = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
 
 error[E0225]: only auto traits can be used as additional traits in a trait object
-  --> $DIR/trait-alias-no-extra-traits.rs:86:24
+  --> $DIR/no-extra-traits.rs:86:24
    |
 LL | trait _0 = ObjA;
    |            ---- first non-auto trait
@@ -346,7 +346,7 @@ LL | type _T32 = dyn Send + _6;
    = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
 
 error[E0225]: only auto traits can be used as additional traits in a trait object
-  --> $DIR/trait-alias-no-extra-traits.rs:89:17
+  --> $DIR/no-extra-traits.rs:89:17
    |
 LL | trait _0 = ObjA;
    |            ---- first non-auto trait
@@ -381,7 +381,7 @@ LL | type _T33 = dyn _8;
    = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
 
 error[E0225]: only auto traits can be used as additional traits in a trait object
-  --> $DIR/trait-alias-no-extra-traits.rs:92:17
+  --> $DIR/no-extra-traits.rs:92:17
    |
 LL | trait _0 = ObjA;
    |            ---- first non-auto trait
@@ -416,7 +416,7 @@ LL | type _T34 = dyn _8 + Send;
    = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
 
 error[E0225]: only auto traits can be used as additional traits in a trait object
-  --> $DIR/trait-alias-no-extra-traits.rs:95:24
+  --> $DIR/no-extra-traits.rs:95:24
    |
 LL | trait _0 = ObjA;
    |            ---- first non-auto trait
@@ -451,7 +451,7 @@ LL | type _T35 = dyn Send + _8;
    = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
 
 error[E0225]: only auto traits can be used as additional traits in a trait object
-  --> $DIR/trait-alias-no-extra-traits.rs:103:23
+  --> $DIR/no-extra-traits.rs:103:23
    |
 LL | trait _5 = Sync + ObjB + Send;
    |                   ---- first non-auto trait
@@ -470,7 +470,7 @@ LL | type _T40 = dyn _10 + ObjA;
    = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
 
 error[E0225]: only auto traits can be used as additional traits in a trait object
-  --> $DIR/trait-alias-no-extra-traits.rs:106:24
+  --> $DIR/no-extra-traits.rs:106:24
    |
 LL | trait _5 = Sync + ObjB + Send;
    |                   ---- additional non-auto trait
@@ -489,7 +489,7 @@ LL | type _T41 = dyn ObjA + _10;
    = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
 
 error[E0225]: only auto traits can be used as additional traits in a trait object
-  --> $DIR/trait-alias-no-extra-traits.rs:109:23
+  --> $DIR/no-extra-traits.rs:109:23
    |
 LL | trait _0 = ObjA;
    |            ---- additional non-auto trait
@@ -513,7 +513,7 @@ LL | type _T42 = dyn _10 + _1;
    = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
 
 error[E0225]: only auto traits can be used as additional traits in a trait object
-  --> $DIR/trait-alias-no-extra-traits.rs:112:37
+  --> $DIR/no-extra-traits.rs:112:37
    |
 LL | trait _5 = Sync + ObjB + Send;
    |                   ---- first non-auto trait
@@ -532,7 +532,7 @@ LL | type _T43 = dyn Send + _10 + Sync + ObjA;
    = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
 
 error[E0225]: only auto traits can be used as additional traits in a trait object
-  --> $DIR/trait-alias-no-extra-traits.rs:115:24
+  --> $DIR/no-extra-traits.rs:115:24
    |
 LL | trait _5 = Sync + ObjB + Send;
    |                   ---- additional non-auto trait
@@ -551,7 +551,7 @@ LL | type _T44 = dyn ObjA + _10 + Send + Sync;
    = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
 
 error[E0225]: only auto traits can be used as additional traits in a trait object
-  --> $DIR/trait-alias-no-extra-traits.rs:118:37
+  --> $DIR/no-extra-traits.rs:118:37
    |
 LL | trait _0 = ObjA;
    |            ---- additional non-auto trait
diff --git a/src/test/ui/traits/trait-alias/trait-alias-object-fail.rs b/src/test/ui/traits/alias/object-fail.rs
index 5c753ff207c..5c753ff207c 100644
--- a/src/test/ui/traits/trait-alias/trait-alias-object-fail.rs
+++ b/src/test/ui/traits/alias/object-fail.rs
diff --git a/src/test/ui/traits/trait-alias/trait-alias-object-fail.stderr b/src/test/ui/traits/alias/object-fail.stderr
index 1118a75e085..325bc6d2808 100644
--- a/src/test/ui/traits/trait-alias/trait-alias-object-fail.stderr
+++ b/src/test/ui/traits/alias/object-fail.stderr
@@ -1,5 +1,5 @@
 error[E0038]: the trait `Eq` cannot be made into an object
-  --> $DIR/trait-alias-object-fail.rs:7:13
+  --> $DIR/object-fail.rs:7:13
    |
 LL |     let _: &dyn EqAlias = &123;
    |             ^^^^^^^^^^^ `Eq` cannot be made into an object
@@ -11,7 +11,7 @@ LL | pub trait Eq: PartialEq<Self> {
    |               ^^^^^^^^^^^^^^^ the trait cannot be made into an object because it uses `Self` as a type parameter
 
 error[E0191]: the value of the associated type `Item` (from trait `Iterator`) must be specified
-  --> $DIR/trait-alias-object-fail.rs:9:17
+  --> $DIR/object-fail.rs:9:17
    |
 LL |     let _: &dyn IteratorAlias = &vec![123].into_iter();
    |                 ^^^^^^^^^^^^^ help: specify the associated type: `IteratorAlias<Item = Type>`
diff --git a/src/test/ui/traits/trait-alias/trait-alias-object-wf.rs b/src/test/ui/traits/alias/object-wf.rs
index 1440f02df1d..1440f02df1d 100644
--- a/src/test/ui/traits/trait-alias/trait-alias-object-wf.rs
+++ b/src/test/ui/traits/alias/object-wf.rs
diff --git a/src/test/ui/traits/trait-alias/trait-alias-object.rs b/src/test/ui/traits/alias/object.rs
index 12177cd827f..12177cd827f 100644
--- a/src/test/ui/traits/trait-alias/trait-alias-object.rs
+++ b/src/test/ui/traits/alias/object.rs
diff --git a/src/test/ui/traits/trait-alias/trait-alias-only-maybe-bound.rs b/src/test/ui/traits/alias/only-maybe-bound.rs
index e4abf314e0a..e4abf314e0a 100644
--- a/src/test/ui/traits/trait-alias/trait-alias-only-maybe-bound.rs
+++ b/src/test/ui/traits/alias/only-maybe-bound.rs
diff --git a/src/test/ui/traits/trait-alias/trait-alias-only-maybe-bound.stderr b/src/test/ui/traits/alias/only-maybe-bound.stderr
index 594115d980c..99589edb535 100644
--- a/src/test/ui/traits/trait-alias/trait-alias-only-maybe-bound.stderr
+++ b/src/test/ui/traits/alias/only-maybe-bound.stderr
@@ -1,11 +1,11 @@
 error[E0224]: at least one trait is required for an object type
-  --> $DIR/trait-alias-only-maybe-bound.rs:13:12
+  --> $DIR/only-maybe-bound.rs:13:12
    |
 LL | type _T0 = dyn _1;
    |            ^^^^^^
 
 error[E0224]: at least one trait is required for an object type
-  --> $DIR/trait-alias-only-maybe-bound.rs:19:12
+  --> $DIR/only-maybe-bound.rs:19:12
    |
 LL | type _T1 = dyn _2;
    |            ^^^^^^
diff --git a/src/test/ui/traits/trait-alias/trait-alias-syntax-fail.rs b/src/test/ui/traits/alias/syntax-fail.rs
index 039bbce8c1e..039bbce8c1e 100644
--- a/src/test/ui/traits/trait-alias/trait-alias-syntax-fail.rs
+++ b/src/test/ui/traits/alias/syntax-fail.rs
diff --git a/src/test/ui/traits/trait-alias/trait-alias-syntax-fail.stderr b/src/test/ui/traits/alias/syntax-fail.stderr
index 18c22133bc7..748b92056d1 100644
--- a/src/test/ui/traits/trait-alias/trait-alias-syntax-fail.stderr
+++ b/src/test/ui/traits/alias/syntax-fail.stderr
@@ -1,23 +1,23 @@
 error: trait aliases cannot be `auto`
-  --> $DIR/trait-alias-syntax-fail.rs:4:1
+  --> $DIR/syntax-fail.rs:4:1
    |
 LL | auto trait A = Foo;
    | ^^^^^^^^^^^^^^^^^^^ trait aliases cannot be `auto`
 
 error: trait aliases cannot be `unsafe`
-  --> $DIR/trait-alias-syntax-fail.rs:5:1
+  --> $DIR/syntax-fail.rs:5:1
    |
 LL | unsafe trait B = Foo;
    | ^^^^^^^^^^^^^^^^^^^^^ trait aliases cannot be `unsafe`
 
 error: bounds are not allowed on trait aliases
-  --> $DIR/trait-alias-syntax-fail.rs:7:8
+  --> $DIR/syntax-fail.rs:7:8
    |
 LL | trait C: Ord = Eq;
    |        ^^^^^
 
 error: bounds are not allowed on trait aliases
-  --> $DIR/trait-alias-syntax-fail.rs:8:8
+  --> $DIR/syntax-fail.rs:8:8
    |
 LL | trait D: = Eq;
    |        ^
diff --git a/src/test/ui/traits/trait-alias/trait-alias-syntax.rs b/src/test/ui/traits/alias/syntax.rs
index 17557a51aa7..17557a51aa7 100644
--- a/src/test/ui/traits/trait-alias/trait-alias-syntax.rs
+++ b/src/test/ui/traits/alias/syntax.rs
diff --git a/src/test/ui/traits/trait-alias/trait-alias-wf.rs b/src/test/ui/traits/alias/wf.rs
index d10e2abb0e1..d10e2abb0e1 100644
--- a/src/test/ui/traits/trait-alias/trait-alias-wf.rs
+++ b/src/test/ui/traits/alias/wf.rs
diff --git a/src/test/ui/traits/trait-alias/trait-alias-wf.stderr b/src/test/ui/traits/alias/wf.stderr
index e0df76381e0..b07145f4d38 100644
--- a/src/test/ui/traits/trait-alias/trait-alias-wf.stderr
+++ b/src/test/ui/traits/alias/wf.stderr
@@ -1,5 +1,5 @@
 error[E0277]: the trait bound `T: Foo` is not satisfied
-  --> $DIR/trait-alias-wf.rs:5:14
+  --> $DIR/wf.rs:5:14
    |
 LL | trait A<T: Foo> {}
    |            --- required by this bound in `A`
diff --git a/src/test/ui/traits/anon-trait-static-method.rs b/src/test/ui/traits/anon-static-method.rs
index ede01afae02..ede01afae02 100644
--- a/src/test/ui/traits/anon-trait-static-method.rs
+++ b/src/test/ui/traits/anon-static-method.rs
diff --git a/src/test/ui/traits/trait-as-struct-constructor.rs b/src/test/ui/traits/as-struct-constructor.rs
index 13ebf9d8d66..13ebf9d8d66 100644
--- a/src/test/ui/traits/trait-as-struct-constructor.rs
+++ b/src/test/ui/traits/as-struct-constructor.rs
diff --git a/src/test/ui/traits/trait-as-struct-constructor.stderr b/src/test/ui/traits/as-struct-constructor.stderr
index e1d54fbf8aa..d06e85f3a20 100644
--- a/src/test/ui/traits/trait-as-struct-constructor.stderr
+++ b/src/test/ui/traits/as-struct-constructor.stderr
@@ -1,5 +1,5 @@
 error[E0574]: expected struct, variant or union type, found trait `TraitNotAStruct`
-  --> $DIR/trait-as-struct-constructor.rs:4:5
+  --> $DIR/as-struct-constructor.rs:4:5
    |
 LL |     TraitNotAStruct{ value: 0 };
    |     ^^^^^^^^^^^^^^^ not a struct, variant or union type
diff --git a/src/test/ui/traits/traits-assoc-type-in-supertrait-bad.rs b/src/test/ui/traits/assoc-type-in-superbad.rs
index 579ce7cf706..579ce7cf706 100644
--- a/src/test/ui/traits/traits-assoc-type-in-supertrait-bad.rs
+++ b/src/test/ui/traits/assoc-type-in-superbad.rs
diff --git a/src/test/ui/traits/traits-assoc-type-in-supertrait-bad.stderr b/src/test/ui/traits/assoc-type-in-superbad.stderr
index 5ac7b08e52f..cbdb6b96f46 100644
--- a/src/test/ui/traits/traits-assoc-type-in-supertrait-bad.stderr
+++ b/src/test/ui/traits/assoc-type-in-superbad.stderr
@@ -1,5 +1,5 @@
 error[E0271]: type mismatch resolving `<std::vec::IntoIter<i32> as Iterator>::Item == u32`
-  --> $DIR/traits-assoc-type-in-supertrait-bad.rs:12:16
+  --> $DIR/assoc-type-in-superbad.rs:12:16
    |
 LL |     type Key = u32;
    |                ^^^ expected `i32`, found `u32`
diff --git a/src/test/ui/traits/traits-assoc-type-in-supertrait.rs b/src/test/ui/traits/assoc-type-in-supertrait.rs
index 7d6a754cc5a..7d6a754cc5a 100644
--- a/src/test/ui/traits/traits-assoc-type-in-supertrait.rs
+++ b/src/test/ui/traits/assoc-type-in-supertrait.rs
diff --git a/src/test/ui/traits/assoc_type_bound_with_struct.rs b/src/test/ui/traits/associated_type_bound/assoc_type_bound_with_struct.rs
index c66009fe24c..c66009fe24c 100644
--- a/src/test/ui/traits/assoc_type_bound_with_struct.rs
+++ b/src/test/ui/traits/associated_type_bound/assoc_type_bound_with_struct.rs
diff --git a/src/test/ui/traits/assoc_type_bound_with_struct.stderr b/src/test/ui/traits/associated_type_bound/assoc_type_bound_with_struct.stderr
index 7cf872eb6ac..7cf872eb6ac 100644
--- a/src/test/ui/traits/assoc_type_bound_with_struct.stderr
+++ b/src/test/ui/traits/associated_type_bound/assoc_type_bound_with_struct.stderr
diff --git a/src/test/ui/traits/check-trait-object-bounds-1.rs b/src/test/ui/traits/associated_type_bound/check-trait-object-bounds-1.rs
index b1f124c7ea2..b1f124c7ea2 100644
--- a/src/test/ui/traits/check-trait-object-bounds-1.rs
+++ b/src/test/ui/traits/associated_type_bound/check-trait-object-bounds-1.rs
diff --git a/src/test/ui/traits/check-trait-object-bounds-1.stderr b/src/test/ui/traits/associated_type_bound/check-trait-object-bounds-1.stderr
index 170ed6eacfd..170ed6eacfd 100644
--- a/src/test/ui/traits/check-trait-object-bounds-1.stderr
+++ b/src/test/ui/traits/associated_type_bound/check-trait-object-bounds-1.stderr
diff --git a/src/test/ui/traits/check-trait-object-bounds-2-ok.rs b/src/test/ui/traits/associated_type_bound/check-trait-object-bounds-2-ok.rs
index 1422dda276b..1422dda276b 100644
--- a/src/test/ui/traits/check-trait-object-bounds-2-ok.rs
+++ b/src/test/ui/traits/associated_type_bound/check-trait-object-bounds-2-ok.rs
diff --git a/src/test/ui/traits/check-trait-object-bounds-2.rs b/src/test/ui/traits/associated_type_bound/check-trait-object-bounds-2.rs
index eb2fb6e841b..eb2fb6e841b 100644
--- a/src/test/ui/traits/check-trait-object-bounds-2.rs
+++ b/src/test/ui/traits/associated_type_bound/check-trait-object-bounds-2.rs
diff --git a/src/test/ui/traits/check-trait-object-bounds-2.stderr b/src/test/ui/traits/associated_type_bound/check-trait-object-bounds-2.stderr
index 04e2348634e..04e2348634e 100644
--- a/src/test/ui/traits/check-trait-object-bounds-2.stderr
+++ b/src/test/ui/traits/associated_type_bound/check-trait-object-bounds-2.stderr
diff --git a/src/test/ui/traits/check-trait-object-bounds-3.rs b/src/test/ui/traits/associated_type_bound/check-trait-object-bounds-3.rs
index ba04fd93acc..ba04fd93acc 100644
--- a/src/test/ui/traits/check-trait-object-bounds-3.rs
+++ b/src/test/ui/traits/associated_type_bound/check-trait-object-bounds-3.rs
diff --git a/src/test/ui/traits/check-trait-object-bounds-3.stderr b/src/test/ui/traits/associated_type_bound/check-trait-object-bounds-3.stderr
index ade552c4bab..ade552c4bab 100644
--- a/src/test/ui/traits/check-trait-object-bounds-3.stderr
+++ b/src/test/ui/traits/associated_type_bound/check-trait-object-bounds-3.stderr
diff --git a/src/test/ui/traits/check-trait-object-bounds-4.rs b/src/test/ui/traits/associated_type_bound/check-trait-object-bounds-4.rs
index e9ca1563f3b..e9ca1563f3b 100644
--- a/src/test/ui/traits/check-trait-object-bounds-4.rs
+++ b/src/test/ui/traits/associated_type_bound/check-trait-object-bounds-4.rs
diff --git a/src/test/ui/traits/check-trait-object-bounds-4.stderr b/src/test/ui/traits/associated_type_bound/check-trait-object-bounds-4.stderr
index fc9f31c5ebc..fc9f31c5ebc 100644
--- a/src/test/ui/traits/check-trait-object-bounds-4.stderr
+++ b/src/test/ui/traits/associated_type_bound/check-trait-object-bounds-4.stderr
diff --git a/src/test/ui/traits/check-trait-object-bounds-5.rs b/src/test/ui/traits/associated_type_bound/check-trait-object-bounds-5.rs
index 7d733ad26b7..7d733ad26b7 100644
--- a/src/test/ui/traits/check-trait-object-bounds-5.rs
+++ b/src/test/ui/traits/associated_type_bound/check-trait-object-bounds-5.rs
diff --git a/src/test/ui/traits/check-trait-object-bounds-5.stderr b/src/test/ui/traits/associated_type_bound/check-trait-object-bounds-5.stderr
index bd2b789cd99..bd2b789cd99 100644
--- a/src/test/ui/traits/check-trait-object-bounds-5.stderr
+++ b/src/test/ui/traits/associated_type_bound/check-trait-object-bounds-5.stderr
diff --git a/src/test/ui/traits/check-trait-object-bounds-6.rs b/src/test/ui/traits/associated_type_bound/check-trait-object-bounds-6.rs
index cb196d67f67..cb196d67f67 100644
--- a/src/test/ui/traits/check-trait-object-bounds-6.rs
+++ b/src/test/ui/traits/associated_type_bound/check-trait-object-bounds-6.rs
diff --git a/src/test/ui/traits/check-trait-object-bounds-6.stderr b/src/test/ui/traits/associated_type_bound/check-trait-object-bounds-6.stderr
index ea1fdaf46f6..ea1fdaf46f6 100644
--- a/src/test/ui/traits/check-trait-object-bounds-6.stderr
+++ b/src/test/ui/traits/associated_type_bound/check-trait-object-bounds-6.stderr
diff --git a/src/test/ui/traits/astconv-cycle-between-trait-and-type.rs b/src/test/ui/traits/astconv-cycle-between-and-type.rs
index cc8f9dc5190..cc8f9dc5190 100644
--- a/src/test/ui/traits/astconv-cycle-between-trait-and-type.rs
+++ b/src/test/ui/traits/astconv-cycle-between-and-type.rs
diff --git a/src/test/ui/traits/auxiliary/crate_a1.rs b/src/test/ui/traits/bound/auxiliary/crate_a1.rs
index 6aa010258eb..6aa010258eb 100644
--- a/src/test/ui/traits/auxiliary/crate_a1.rs
+++ b/src/test/ui/traits/bound/auxiliary/crate_a1.rs
diff --git a/src/test/ui/traits/auxiliary/crate_a2.rs b/src/test/ui/traits/bound/auxiliary/crate_a2.rs
index d6057db5e63..d6057db5e63 100644
--- a/src/test/ui/traits/auxiliary/crate_a2.rs
+++ b/src/test/ui/traits/bound/auxiliary/crate_a2.rs
diff --git a/src/test/ui/traits/auxiliary/trait_bounds_on_structs_and_enums_xc.rs b/src/test/ui/traits/bound/auxiliary/on_structs_and_enums_xc.rs
index 7e9592eee2c..7e9592eee2c 100644
--- a/src/test/ui/traits/auxiliary/trait_bounds_on_structs_and_enums_xc.rs
+++ b/src/test/ui/traits/bound/auxiliary/on_structs_and_enums_xc.rs
diff --git a/src/test/ui/traits/trait-bounds-basic.rs b/src/test/ui/traits/bound/basic.rs
index 8c8a7eb7d9d..8c8a7eb7d9d 100644
--- a/src/test/ui/traits/trait-bounds-basic.rs
+++ b/src/test/ui/traits/bound/basic.rs
diff --git a/src/test/ui/traits/trait-bounds.rs b/src/test/ui/traits/bound/generic_trait.rs
index 18382bb59a4..18382bb59a4 100644
--- a/src/test/ui/traits/trait-bounds.rs
+++ b/src/test/ui/traits/bound/generic_trait.rs
diff --git a/src/test/ui/traits/trait-bounds-impl-comparison-duplicates.rs b/src/test/ui/traits/bound/impl-comparison-duplicates.rs
index de6c2afa2bb..de6c2afa2bb 100644
--- a/src/test/ui/traits/trait-bounds-impl-comparison-duplicates.rs
+++ b/src/test/ui/traits/bound/impl-comparison-duplicates.rs
diff --git a/src/test/ui/traits/trait-bounds-in-arc.rs b/src/test/ui/traits/bound/in-arc.rs
index 941f66c0561..941f66c0561 100644
--- a/src/test/ui/traits/trait-bounds-in-arc.rs
+++ b/src/test/ui/traits/bound/in-arc.rs
diff --git a/src/test/ui/traits/multiple-trait-bounds.rs b/src/test/ui/traits/bound/multiple.rs
index 868b334070b..868b334070b 100644
--- a/src/test/ui/traits/multiple-trait-bounds.rs
+++ b/src/test/ui/traits/bound/multiple.rs
diff --git a/src/test/ui/traits/trait-bounds-not-on-bare-trait.rs b/src/test/ui/traits/bound/not-on-bare-trait.rs
index 33c9f2f00cf..33c9f2f00cf 100644
--- a/src/test/ui/traits/trait-bounds-not-on-bare-trait.rs
+++ b/src/test/ui/traits/bound/not-on-bare-trait.rs
diff --git a/src/test/ui/traits/trait-bounds-not-on-bare-trait.stderr b/src/test/ui/traits/bound/not-on-bare-trait.stderr
index 48eedc0b0ea..e7fc0fa5ec0 100644
--- a/src/test/ui/traits/trait-bounds-not-on-bare-trait.stderr
+++ b/src/test/ui/traits/bound/not-on-bare-trait.stderr
@@ -1,5 +1,5 @@
 warning: trait objects without an explicit `dyn` are deprecated
-  --> $DIR/trait-bounds-not-on-bare-trait.rs:7:12
+  --> $DIR/not-on-bare-trait.rs:7:12
    |
 LL | fn foo(_x: Foo + Send) {
    |            ^^^^^^^^^^ help: use `dyn`: `dyn Foo + Send`
@@ -7,7 +7,7 @@ LL | fn foo(_x: Foo + Send) {
    = note: `#[warn(bare_trait_objects)]` on by default
 
 error[E0277]: the size for values of type `(dyn Foo + Send + 'static)` cannot be known at compilation time
-  --> $DIR/trait-bounds-not-on-bare-trait.rs:7:8
+  --> $DIR/not-on-bare-trait.rs:7:8
    |
 LL | fn foo(_x: Foo + Send) {
    |        ^^ doesn't have a size known at compile-time
diff --git a/src/test/ui/traits/trait-bounds-not-on-struct.rs b/src/test/ui/traits/bound/not-on-struct.rs
index 8633e9d7a4c..8633e9d7a4c 100644
--- a/src/test/ui/traits/trait-bounds-not-on-struct.rs
+++ b/src/test/ui/traits/bound/not-on-struct.rs
diff --git a/src/test/ui/traits/trait-bounds-not-on-struct.stderr b/src/test/ui/traits/bound/not-on-struct.stderr
index 0f97e3bdf18..951e974ad26 100644
--- a/src/test/ui/traits/trait-bounds-not-on-struct.stderr
+++ b/src/test/ui/traits/bound/not-on-struct.stderr
@@ -1,23 +1,23 @@
 error[E0226]: only a single explicit lifetime bound is permitted
-  --> $DIR/trait-bounds-not-on-struct.rs:25:25
+  --> $DIR/not-on-struct.rs:25:25
    |
 LL | fn e() -> 'static + A + 'static {
    |                         ^^^^^^^
 
 error[E0226]: only a single explicit lifetime bound is permitted
-  --> $DIR/trait-bounds-not-on-struct.rs:29:53
+  --> $DIR/not-on-struct.rs:29:53
    |
 LL | fn f<'a,T,E>(iter: Iterator<Item='a + Result<T,E> + 'a>) {
    |                                                     ^^
 
 error[E0404]: expected trait, found struct `Foo`
-  --> $DIR/trait-bounds-not-on-struct.rs:8:16
+  --> $DIR/not-on-struct.rs:8:16
    |
 LL | fn foo(_x: Box<Foo + Send>) { }
    |                ^^^ not a trait
    |
 help: `+` is used to constrain a "trait object" type with lifetimes or auto-traits; structs and enums can't be bound in that way
-  --> $DIR/trait-bounds-not-on-struct.rs:8:22
+  --> $DIR/not-on-struct.rs:8:22
    |
 LL | fn foo(_x: Box<Foo + Send>) { }
    |                ---   ^^^^ ...because of this bound
@@ -25,19 +25,19 @@ LL | fn foo(_x: Box<Foo + Send>) { }
    |                expected this type to be a trait...
 
 error[E0404]: expected trait, found struct `Vec`
-  --> $DIR/trait-bounds-not-on-struct.rs:10:29
+  --> $DIR/not-on-struct.rs:10:29
    |
 LL | type TypeAlias<T> = Box<dyn Vec<T>>;
    |                             ^^^^^^ not a trait
 
 error[E0404]: expected trait, found struct `A`
-  --> $DIR/trait-bounds-not-on-struct.rs:13:11
+  --> $DIR/not-on-struct.rs:13:11
    |
 LL | fn a() -> A + 'static {
    |           ^ not a trait
    |
 help: `+` is used to constrain a "trait object" type with lifetimes or auto-traits; structs and enums can't be bound in that way
-  --> $DIR/trait-bounds-not-on-struct.rs:13:15
+  --> $DIR/not-on-struct.rs:13:15
    |
 LL | fn a() -> A + 'static {
    |           -   ^^^^^^^ ...because of this bound
@@ -49,13 +49,13 @@ LL | fn a() -> A {
    |           --
 
 error[E0404]: expected trait, found enum `Result`
-  --> $DIR/trait-bounds-not-on-struct.rs:16:34
+  --> $DIR/not-on-struct.rs:16:34
    |
 LL | fn b<'a,T,E>(iter: Iterator<Item=Result<T,E> + 'a>) {
    |                                  ^^^^^^^^^^^ not a trait
    |
 help: `+` is used to constrain a "trait object" type with lifetimes or auto-traits; structs and enums can't be bound in that way
-  --> $DIR/trait-bounds-not-on-struct.rs:16:48
+  --> $DIR/not-on-struct.rs:16:48
    |
 LL | fn b<'a,T,E>(iter: Iterator<Item=Result<T,E> + 'a>) {
    |                                  -----------   ^^ ...because of this bound
@@ -67,13 +67,13 @@ LL | fn b<'a,T,E>(iter: Iterator<Item=Result<T,E>>) {
    |                                            --
 
 error[E0404]: expected trait, found struct `A`
-  --> $DIR/trait-bounds-not-on-struct.rs:19:21
+  --> $DIR/not-on-struct.rs:19:21
    |
 LL | fn c() -> 'static + A {
    |                     ^ not a trait
    |
 help: `+` is used to constrain a "trait object" type with lifetimes or auto-traits; structs and enums can't be bound in that way
-  --> $DIR/trait-bounds-not-on-struct.rs:19:11
+  --> $DIR/not-on-struct.rs:19:11
    |
 LL | fn c() -> 'static + A {
    |           ^^^^^^^   - expected this type to be a trait...
@@ -85,13 +85,13 @@ LL | fn c() -> A {
    |          --
 
 error[E0404]: expected trait, found enum `Result`
-  --> $DIR/trait-bounds-not-on-struct.rs:22:39
+  --> $DIR/not-on-struct.rs:22:39
    |
 LL | fn d<'a,T,E>(iter: Iterator<Item='a + Result<T,E>>) {
    |                                       ^^^^^^^^^^^ not a trait
    |
 help: `+` is used to constrain a "trait object" type with lifetimes or auto-traits; structs and enums can't be bound in that way
-  --> $DIR/trait-bounds-not-on-struct.rs:22:34
+  --> $DIR/not-on-struct.rs:22:34
    |
 LL | fn d<'a,T,E>(iter: Iterator<Item='a + Result<T,E>>) {
    |                                  ^^   ----------- expected this type to be a trait...
@@ -103,13 +103,13 @@ LL | fn d<'a,T,E>(iter: Iterator<Item=Result<T,E>>) {
    |                                 --
 
 error[E0404]: expected trait, found struct `A`
-  --> $DIR/trait-bounds-not-on-struct.rs:25:21
+  --> $DIR/not-on-struct.rs:25:21
    |
 LL | fn e() -> 'static + A + 'static {
    |                     ^ not a trait
    |
 help: `+` is used to constrain a "trait object" type with lifetimes or auto-traits; structs and enums can't be bound in that way
-  --> $DIR/trait-bounds-not-on-struct.rs:25:11
+  --> $DIR/not-on-struct.rs:25:11
    |
 LL | fn e() -> 'static + A + 'static {
    |           ^^^^^^^   -   ^^^^^^^ ...because of these bounds
@@ -121,13 +121,13 @@ LL | fn e() -> A {
    |          ---
 
 error[E0404]: expected trait, found enum `Result`
-  --> $DIR/trait-bounds-not-on-struct.rs:29:39
+  --> $DIR/not-on-struct.rs:29:39
    |
 LL | fn f<'a,T,E>(iter: Iterator<Item='a + Result<T,E> + 'a>) {
    |                                       ^^^^^^^^^^^ not a trait
    |
 help: `+` is used to constrain a "trait object" type with lifetimes or auto-traits; structs and enums can't be bound in that way
-  --> $DIR/trait-bounds-not-on-struct.rs:29:34
+  --> $DIR/not-on-struct.rs:29:34
    |
 LL | fn f<'a,T,E>(iter: Iterator<Item='a + Result<T,E> + 'a>) {
    |                                  ^^   -----------   ^^ ...because of these bounds
@@ -139,7 +139,7 @@ LL | fn f<'a,T,E>(iter: Iterator<Item=Result<T,E>>) {
    |                                 --         --
 
 error[E0404]: expected trait, found struct `Traitor`
-  --> $DIR/trait-bounds-not-on-struct.rs:35:11
+  --> $DIR/not-on-struct.rs:35:11
    |
 LL | trait Trait {}
    | ----------- similarly named trait `Trait` defined here
@@ -147,7 +147,7 @@ LL | fn g() -> Traitor + 'static {
    |           ^^^^^^^ not a trait
    |
 help: `+` is used to constrain a "trait object" type with lifetimes or auto-traits; structs and enums can't be bound in that way
-  --> $DIR/trait-bounds-not-on-struct.rs:35:21
+  --> $DIR/not-on-struct.rs:35:21
    |
 LL | fn g() -> Traitor + 'static {
    |           -------   ^^^^^^^ ...because of this bound
diff --git a/src/test/ui/traits/trait-bounds-on-structs-and-enums-in-fns.rs b/src/test/ui/traits/bound/on-structs-and-enums-in-fns.rs
index 6a6fcf5301d..6a6fcf5301d 100644
--- a/src/test/ui/traits/trait-bounds-on-structs-and-enums-in-fns.rs
+++ b/src/test/ui/traits/bound/on-structs-and-enums-in-fns.rs
diff --git a/src/test/ui/traits/trait-bounds-on-structs-and-enums-in-fns.stderr b/src/test/ui/traits/bound/on-structs-and-enums-in-fns.stderr
index 6ca8ce0707f..346b690d441 100644
--- a/src/test/ui/traits/trait-bounds-on-structs-and-enums-in-fns.stderr
+++ b/src/test/ui/traits/bound/on-structs-and-enums-in-fns.stderr
@@ -1,5 +1,5 @@
 error[E0277]: the trait bound `u32: Trait` is not satisfied
-  --> $DIR/trait-bounds-on-structs-and-enums-in-fns.rs:13:15
+  --> $DIR/on-structs-and-enums-in-fns.rs:13:15
    |
 LL | struct Foo<T:Trait> {
    |              ----- required by this bound in `Foo`
@@ -8,7 +8,7 @@ LL | fn explode(x: Foo<u32>) {}
    |               ^^^^^^^^ the trait `Trait` is not implemented for `u32`
 
 error[E0277]: the trait bound `f32: Trait` is not satisfied
-  --> $DIR/trait-bounds-on-structs-and-enums-in-fns.rs:16:14
+  --> $DIR/on-structs-and-enums-in-fns.rs:16:14
    |
 LL | enum Bar<T:Trait> {
    |            ----- required by this bound in `Bar`
diff --git a/src/test/ui/traits/trait-bounds-on-structs-and-enums-in-impls.rs b/src/test/ui/traits/bound/on-structs-and-enums-in-impls.rs
index d379499521c..d379499521c 100644
--- a/src/test/ui/traits/trait-bounds-on-structs-and-enums-in-impls.rs
+++ b/src/test/ui/traits/bound/on-structs-and-enums-in-impls.rs
diff --git a/src/test/ui/traits/trait-bounds-on-structs-and-enums-in-impls.stderr b/src/test/ui/traits/bound/on-structs-and-enums-in-impls.stderr
index 87271e7f1ee..47bab6c375f 100644
--- a/src/test/ui/traits/trait-bounds-on-structs-and-enums-in-impls.stderr
+++ b/src/test/ui/traits/bound/on-structs-and-enums-in-impls.stderr
@@ -1,5 +1,5 @@
 error[E0277]: the trait bound `u16: Trait` is not satisfied
-  --> $DIR/trait-bounds-on-structs-and-enums-in-impls.rs:20:6
+  --> $DIR/on-structs-and-enums-in-impls.rs:20:6
    |
 LL | struct Foo<T:Trait> {
    |              ----- required by this bound in `Foo`
diff --git a/src/test/ui/traits/trait-bounds-on-structs-and-enums-locals.rs b/src/test/ui/traits/bound/on-structs-and-enums-locals.rs
index 21c0ce80f8a..21c0ce80f8a 100644
--- a/src/test/ui/traits/trait-bounds-on-structs-and-enums-locals.rs
+++ b/src/test/ui/traits/bound/on-structs-and-enums-locals.rs
diff --git a/src/test/ui/traits/trait-bounds-on-structs-and-enums-locals.stderr b/src/test/ui/traits/bound/on-structs-and-enums-locals.stderr
index df016a77274..967b7320ab6 100644
--- a/src/test/ui/traits/trait-bounds-on-structs-and-enums-locals.stderr
+++ b/src/test/ui/traits/bound/on-structs-and-enums-locals.stderr
@@ -1,5 +1,5 @@
 error[E0277]: the trait bound `usize: Trait` is not satisfied
-  --> $DIR/trait-bounds-on-structs-and-enums-locals.rs:15:14
+  --> $DIR/on-structs-and-enums-locals.rs:15:14
    |
 LL | struct Foo<T:Trait> {
    |              ----- required by this bound in `Foo`
@@ -8,7 +8,7 @@ LL |     let baz: Foo<usize> = loop { };
    |              ^^^^^^^^^^ the trait `Trait` is not implemented for `usize`
 
 error[E0277]: the trait bound `{integer}: Trait` is not satisfied
-  --> $DIR/trait-bounds-on-structs-and-enums-locals.rs:10:15
+  --> $DIR/on-structs-and-enums-locals.rs:10:15
    |
 LL | struct Foo<T:Trait> {
    | ------------------- required by `Foo`
diff --git a/src/test/ui/traits/trait-bounds-on-structs-and-enums-rpass.rs b/src/test/ui/traits/bound/on-structs-and-enums-rpass.rs
index 4dc4fecc91f..4dc4fecc91f 100644
--- a/src/test/ui/traits/trait-bounds-on-structs-and-enums-rpass.rs
+++ b/src/test/ui/traits/bound/on-structs-and-enums-rpass.rs
diff --git a/src/test/ui/traits/trait-bounds-on-structs-and-enums-static.rs b/src/test/ui/traits/bound/on-structs-and-enums-static.rs
index df3f8b8a599..df3f8b8a599 100644
--- a/src/test/ui/traits/trait-bounds-on-structs-and-enums-static.rs
+++ b/src/test/ui/traits/bound/on-structs-and-enums-static.rs
diff --git a/src/test/ui/traits/trait-bounds-on-structs-and-enums-static.stderr b/src/test/ui/traits/bound/on-structs-and-enums-static.stderr
index 4b650e78bad..2cf8a623b3f 100644
--- a/src/test/ui/traits/trait-bounds-on-structs-and-enums-static.stderr
+++ b/src/test/ui/traits/bound/on-structs-and-enums-static.stderr
@@ -1,5 +1,5 @@
 error[E0277]: the trait bound `usize: Trait` is not satisfied
-  --> $DIR/trait-bounds-on-structs-and-enums-static.rs:9:11
+  --> $DIR/on-structs-and-enums-static.rs:9:11
    |
 LL | struct Foo<T:Trait> {
    |              ----- required by this bound in `Foo`
diff --git a/src/test/ui/traits/bound/on-structs-and-enums-xc.rs b/src/test/ui/traits/bound/on-structs-and-enums-xc.rs
new file mode 100644
index 00000000000..94316d24040
--- /dev/null
+++ b/src/test/ui/traits/bound/on-structs-and-enums-xc.rs
@@ -0,0 +1,14 @@
+// aux-build:on_structs_and_enums_xc.rs
+
+extern crate on_structs_and_enums_xc;
+
+use on_structs_and_enums_xc::{Bar, Foo, Trait};
+
+fn explode(x: Foo<usize>) {}
+//~^ ERROR E0277
+
+fn kaboom(y: Bar<f32>) {}
+//~^ ERROR E0277
+
+fn main() {
+}
diff --git a/src/test/ui/traits/trait-bounds-on-structs-and-enums-xc.stderr b/src/test/ui/traits/bound/on-structs-and-enums-xc.stderr
index 3e8c727dda0..0adb20d4828 100644
--- a/src/test/ui/traits/trait-bounds-on-structs-and-enums-xc.stderr
+++ b/src/test/ui/traits/bound/on-structs-and-enums-xc.stderr
@@ -1,21 +1,21 @@
 error[E0277]: the trait bound `usize: Trait` is not satisfied
-  --> $DIR/trait-bounds-on-structs-and-enums-xc.rs:7:15
+  --> $DIR/on-structs-and-enums-xc.rs:7:15
    |
 LL | fn explode(x: Foo<usize>) {}
    |               ^^^^^^^^^^ the trait `Trait` is not implemented for `usize`
    | 
-  ::: $DIR/auxiliary/trait_bounds_on_structs_and_enums_xc.rs:5:18
+  ::: $DIR/auxiliary/on_structs_and_enums_xc.rs:5:18
    |
 LL | pub struct Foo<T:Trait> {
    |                  ----- required by this bound in `Foo`
 
 error[E0277]: the trait bound `f32: Trait` is not satisfied
-  --> $DIR/trait-bounds-on-structs-and-enums-xc.rs:10:14
+  --> $DIR/on-structs-and-enums-xc.rs:10:14
    |
 LL | fn kaboom(y: Bar<f32>) {}
    |              ^^^^^^^^ the trait `Trait` is not implemented for `f32`
    | 
-  ::: $DIR/auxiliary/trait_bounds_on_structs_and_enums_xc.rs:9:16
+  ::: $DIR/auxiliary/on_structs_and_enums_xc.rs:9:16
    |
 LL | pub enum Bar<T:Trait> {
    |                ----- required by this bound in `Bar`
diff --git a/src/test/ui/traits/bound/on-structs-and-enums-xc1.rs b/src/test/ui/traits/bound/on-structs-and-enums-xc1.rs
new file mode 100644
index 00000000000..8156868e048
--- /dev/null
+++ b/src/test/ui/traits/bound/on-structs-and-enums-xc1.rs
@@ -0,0 +1,15 @@
+// aux-build:on_structs_and_enums_xc.rs
+
+extern crate on_structs_and_enums_xc;
+
+use on_structs_and_enums_xc::{Bar, Foo, Trait};
+
+fn main() {
+    let foo = Foo {
+    //~^ ERROR E0277
+        x: 3
+    };
+    let bar: Bar<f64> = return;
+    //~^ ERROR E0277
+    let _ = bar;
+}
diff --git a/src/test/ui/traits/trait-bounds-on-structs-and-enums-xc1.stderr b/src/test/ui/traits/bound/on-structs-and-enums-xc1.stderr
index 899e9941995..08f0f20e748 100644
--- a/src/test/ui/traits/trait-bounds-on-structs-and-enums-xc1.stderr
+++ b/src/test/ui/traits/bound/on-structs-and-enums-xc1.stderr
@@ -1,16 +1,16 @@
 error[E0277]: the trait bound `f64: Trait` is not satisfied
-  --> $DIR/trait-bounds-on-structs-and-enums-xc1.rs:12:14
+  --> $DIR/on-structs-and-enums-xc1.rs:12:14
    |
 LL |     let bar: Bar<f64> = return;
    |              ^^^^^^^^ the trait `Trait` is not implemented for `f64`
    | 
-  ::: $DIR/auxiliary/trait_bounds_on_structs_and_enums_xc.rs:9:16
+  ::: $DIR/auxiliary/on_structs_and_enums_xc.rs:9:16
    |
 LL | pub enum Bar<T:Trait> {
    |                ----- required by this bound in `Bar`
 
 error[E0277]: the trait bound `{integer}: Trait` is not satisfied
-  --> $DIR/trait-bounds-on-structs-and-enums-xc1.rs:8:15
+  --> $DIR/on-structs-and-enums-xc1.rs:8:15
    |
 LL |     let foo = Foo {
    |               ^^^ the trait `Trait` is not implemented for `{integer}`
diff --git a/src/test/ui/traits/trait-bounds-on-structs-and-enums.rs b/src/test/ui/traits/bound/on-structs-and-enums.rs
index 024084fa724..024084fa724 100644
--- a/src/test/ui/traits/trait-bounds-on-structs-and-enums.rs
+++ b/src/test/ui/traits/bound/on-structs-and-enums.rs
diff --git a/src/test/ui/traits/trait-bounds-on-structs-and-enums.stderr b/src/test/ui/traits/bound/on-structs-and-enums.stderr
index d7549835a09..0c69e7b6fee 100644
--- a/src/test/ui/traits/trait-bounds-on-structs-and-enums.stderr
+++ b/src/test/ui/traits/bound/on-structs-and-enums.stderr
@@ -1,5 +1,5 @@
 error[E0277]: the trait bound `T: Trait` is not satisfied
-  --> $DIR/trait-bounds-on-structs-and-enums.rs:13:9
+  --> $DIR/on-structs-and-enums.rs:13:9
    |
 LL | struct Foo<T:Trait> {
    |              ----- required by this bound in `Foo`
@@ -13,7 +13,7 @@ LL | impl<T: Trait> Foo<T> {
    |       ^^^^^^^
 
 error[E0277]: the trait bound `isize: Trait` is not satisfied
-  --> $DIR/trait-bounds-on-structs-and-enums.rs:19:8
+  --> $DIR/on-structs-and-enums.rs:19:8
    |
 LL | struct Foo<T:Trait> {
    |              ----- required by this bound in `Foo`
@@ -22,7 +22,7 @@ LL |     a: Foo<isize>,
    |        ^^^^^^^^^^ the trait `Trait` is not implemented for `isize`
 
 error[E0277]: the trait bound `usize: Trait` is not satisfied
-  --> $DIR/trait-bounds-on-structs-and-enums.rs:23:10
+  --> $DIR/on-structs-and-enums.rs:23:10
    |
 LL | enum Bar<T:Trait> {
    |            ----- required by this bound in `Bar`
@@ -31,7 +31,7 @@ LL |     Quux(Bar<usize>),
    |          ^^^^^^^^^^ the trait `Trait` is not implemented for `usize`
 
 error[E0277]: the trait bound `U: Trait` is not satisfied
-  --> $DIR/trait-bounds-on-structs-and-enums.rs:27:8
+  --> $DIR/on-structs-and-enums.rs:27:8
    |
 LL | struct Foo<T:Trait> {
    |              ----- required by this bound in `Foo`
@@ -45,7 +45,7 @@ LL | struct Badness<U: Trait> {
    |                 ^^^^^^^
 
 error[E0277]: the trait bound `V: Trait` is not satisfied
-  --> $DIR/trait-bounds-on-structs-and-enums.rs:31:21
+  --> $DIR/on-structs-and-enums.rs:31:21
    |
 LL | enum Bar<T:Trait> {
    |            ----- required by this bound in `Bar`
@@ -59,7 +59,7 @@ LL | enum MoreBadness<V: Trait> {
    |                   ^^^^^^^
 
 error[E0277]: the trait bound `i32: Trait` is not satisfied
-  --> $DIR/trait-bounds-on-structs-and-enums.rs:35:5
+  --> $DIR/on-structs-and-enums.rs:35:5
    |
 LL | struct Foo<T:Trait> {
    |              ----- required by this bound in `Foo`
@@ -68,7 +68,7 @@ LL |     Foo<i32>,
    |     ^^^^^^^^ the trait `Trait` is not implemented for `i32`
 
 error[E0277]: the trait bound `u8: Trait` is not satisfied
-  --> $DIR/trait-bounds-on-structs-and-enums.rs:39:29
+  --> $DIR/on-structs-and-enums.rs:39:29
    |
 LL | enum Bar<T:Trait> {
    |            ----- required by this bound in `Bar`
diff --git a/src/test/ui/traits/trait-bounds-recursion.rs b/src/test/ui/traits/bound/recursion.rs
index 0023ff654e8..0023ff654e8 100644
--- a/src/test/ui/traits/trait-bounds-recursion.rs
+++ b/src/test/ui/traits/bound/recursion.rs
diff --git a/src/test/ui/traits/trait-bounds-same-crate-name.rs b/src/test/ui/traits/bound/same-crate-name.rs
index 1012edb1093..1012edb1093 100644
--- a/src/test/ui/traits/trait-bounds-same-crate-name.rs
+++ b/src/test/ui/traits/bound/same-crate-name.rs
diff --git a/src/test/ui/traits/trait-bounds-same-crate-name.stderr b/src/test/ui/traits/bound/same-crate-name.stderr
index af5ba8808ff..c48f2f0efcf 100644
--- a/src/test/ui/traits/trait-bounds-same-crate-name.stderr
+++ b/src/test/ui/traits/bound/same-crate-name.stderr
@@ -1,5 +1,5 @@
 error[E0277]: the trait bound `Foo: main::a::Bar` is not satisfied
-  --> $DIR/trait-bounds-same-crate-name.rs:31:20
+  --> $DIR/same-crate-name.rs:31:20
    |
 LL |         a::try_foo(foo);
    |                    ^^^ the trait `main::a::Bar` is not implemented for `Foo`
@@ -17,7 +17,7 @@ LL | impl Bar for Foo {}
    = note: perhaps two different versions of crate `crate_a2` are being used?
 
 error[E0277]: the trait bound `DoesNotImplementTrait: main::a::Bar` is not satisfied
-  --> $DIR/trait-bounds-same-crate-name.rs:38:20
+  --> $DIR/same-crate-name.rs:38:20
    |
 LL |         a::try_foo(implements_no_traits);
    |                    ^^^^^^^^^^^^^^^^^^^^ the trait `main::a::Bar` is not implemented for `DoesNotImplementTrait`
@@ -28,7 +28,7 @@ LL | pub fn try_foo(x: impl Bar) {}
    |                        --- required by this bound in `try_foo`
 
 error[E0277]: the trait bound `ImplementsWrongTraitConditionally<isize>: main::a::Bar` is not satisfied
-  --> $DIR/trait-bounds-same-crate-name.rs:45:20
+  --> $DIR/same-crate-name.rs:45:20
    |
 LL |         a::try_foo(other_variant_implements_mismatched_trait);
    |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `main::a::Bar` is not implemented for `ImplementsWrongTraitConditionally<isize>`
@@ -46,7 +46,7 @@ LL | impl Bar for ImplementsWrongTraitConditionally<isize> {}
    = note: perhaps two different versions of crate `crate_a2` are being used?
 
 error[E0277]: the trait bound `ImplementsTraitForUsize<isize>: main::a::Bar` is not satisfied
-  --> $DIR/trait-bounds-same-crate-name.rs:51:20
+  --> $DIR/same-crate-name.rs:51:20
    |
 LL |         a::try_foo(other_variant_implements_correct_trait);
    |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `main::a::Bar` is not implemented for `ImplementsTraitForUsize<isize>`
diff --git a/src/test/ui/traits/trait-bounds-sugar.rs b/src/test/ui/traits/bound/sugar.rs
index 65b6f6faa42..65b6f6faa42 100644
--- a/src/test/ui/traits/trait-bounds-sugar.rs
+++ b/src/test/ui/traits/bound/sugar.rs
diff --git a/src/test/ui/traits/trait-bounds-sugar.stderr b/src/test/ui/traits/bound/sugar.stderr
index 6bd335fe473..feb0c73a09d 100644
--- a/src/test/ui/traits/trait-bounds-sugar.stderr
+++ b/src/test/ui/traits/bound/sugar.stderr
@@ -1,5 +1,5 @@
 error[E0308]: mismatched types
-  --> $DIR/trait-bounds-sugar.rs:12:7
+  --> $DIR/sugar.rs:12:7
    |
 LL |     a(x);
    |       ^ expected trait `Foo + Send`, found trait `Foo + Sync`
diff --git a/src/test/ui/traits/trait-cache-issue-18209.rs b/src/test/ui/traits/cache-issue-18209.rs
index 15676e4554a..15676e4554a 100644
--- a/src/test/ui/traits/trait-cache-issue-18209.rs
+++ b/src/test/ui/traits/cache-issue-18209.rs
diff --git a/src/test/ui/traits/trait-coercion-generic-bad.rs b/src/test/ui/traits/coercion-generic-bad.rs
index 2e115c732b9..2e115c732b9 100644
--- a/src/test/ui/traits/trait-coercion-generic-bad.rs
+++ b/src/test/ui/traits/coercion-generic-bad.rs
diff --git a/src/test/ui/traits/trait-coercion-generic-bad.stderr b/src/test/ui/traits/coercion-generic-bad.stderr
index f2710dea095..f367d396da0 100644
--- a/src/test/ui/traits/trait-coercion-generic-bad.stderr
+++ b/src/test/ui/traits/coercion-generic-bad.stderr
@@ -1,5 +1,5 @@
 error[E0277]: the trait bound `Struct: Trait<isize>` is not satisfied
-  --> $DIR/trait-coercion-generic-bad.rs:16:36
+  --> $DIR/coercion-generic-bad.rs:16:36
    |
 LL |     let s: Box<dyn Trait<isize>> = Box::new(Struct { person: "Fred" });
    |                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Trait<isize>` is not implemented for `Struct`
diff --git a/src/test/ui/traits/trait-coercion-generic-regions.rs b/src/test/ui/traits/coercion-generic-regions.rs
index af478df6dfa..af478df6dfa 100644
--- a/src/test/ui/traits/trait-coercion-generic-regions.rs
+++ b/src/test/ui/traits/coercion-generic-regions.rs
diff --git a/src/test/ui/traits/trait-coercion-generic-regions.stderr b/src/test/ui/traits/coercion-generic-regions.stderr
index d21b48e571d..5cfb6490123 100644
--- a/src/test/ui/traits/trait-coercion-generic-regions.stderr
+++ b/src/test/ui/traits/coercion-generic-regions.stderr
@@ -1,5 +1,5 @@
 error[E0597]: `person` does not live long enough
-  --> $DIR/trait-coercion-generic-regions.rs:17:24
+  --> $DIR/coercion-generic-regions.rs:17:24
    |
 LL |     let person: &str = &person;
    |                        ^^^^^^^
diff --git a/src/test/ui/traits/trait-coercion-generic.rs b/src/test/ui/traits/coercion-generic.rs
index bf4dda49519..bf4dda49519 100644
--- a/src/test/ui/traits/trait-coercion-generic.rs
+++ b/src/test/ui/traits/coercion-generic.rs
diff --git a/src/test/ui/traits/trait-coercion.rs b/src/test/ui/traits/coercion.rs
index cba33af1f1a..cba33af1f1a 100644
--- a/src/test/ui/traits/trait-coercion.rs
+++ b/src/test/ui/traits/coercion.rs
diff --git a/src/test/ui/traits/trait-composition-trivial.rs b/src/test/ui/traits/composition-trivial.rs
index 90e5dcd68e8..90e5dcd68e8 100644
--- a/src/test/ui/traits/trait-composition-trivial.rs
+++ b/src/test/ui/traits/composition-trivial.rs
diff --git a/src/test/ui/traits/traits-conditional-dispatch.rs b/src/test/ui/traits/conditional-dispatch.rs
index a9c194486fe..a9c194486fe 100644
--- a/src/test/ui/traits/traits-conditional-dispatch.rs
+++ b/src/test/ui/traits/conditional-dispatch.rs
diff --git a/src/test/ui/traits/traits-conditional-model-fn.rs b/src/test/ui/traits/conditional-model-fn.rs
index ba88670032c..ba88670032c 100644
--- a/src/test/ui/traits/traits-conditional-model-fn.rs
+++ b/src/test/ui/traits/conditional-model-fn.rs
diff --git a/src/test/ui/traits/trait-copy-guessing.rs b/src/test/ui/traits/copy-guessing.rs
index f031dd9ca48..f031dd9ca48 100644
--- a/src/test/ui/traits/trait-copy-guessing.rs
+++ b/src/test/ui/traits/copy-guessing.rs
diff --git a/src/test/ui/traits/cycle-trait-type-trait.rs b/src/test/ui/traits/cycle-type-trait.rs
index c62d01403c7..c62d01403c7 100644
--- a/src/test/ui/traits/cycle-trait-type-trait.rs
+++ b/src/test/ui/traits/cycle-type-trait.rs
diff --git a/src/test/ui/traits/auxiliary/trait_default_method_xc_aux.rs b/src/test/ui/traits/default-method/auxiliary/xc.rs
index 0fb26af80c7..0fb26af80c7 100644
--- a/src/test/ui/traits/auxiliary/trait_default_method_xc_aux.rs
+++ b/src/test/ui/traits/default-method/auxiliary/xc.rs
diff --git a/src/test/ui/traits/auxiliary/trait_default_method_xc_aux_2.rs b/src/test/ui/traits/default-method/auxiliary/xc_2.rs
index 15480132a23..9792338204c 100644
--- a/src/test/ui/traits/auxiliary/trait_default_method_xc_aux_2.rs
+++ b/src/test/ui/traits/default-method/auxiliary/xc_2.rs
@@ -1,6 +1,6 @@
-// aux-build:trait_default_method_xc_aux.rs
+// aux-build:xc.rs
 
-extern crate trait_default_method_xc_aux as aux;
+extern crate xc as aux;
 use aux::A;
 
 pub struct a_struct { pub x: isize }
diff --git a/src/test/ui/traits/trait-default-method-bound-subst.rs b/src/test/ui/traits/default-method/bound-subst.rs
index 6a5d5c8ba2d..6a5d5c8ba2d 100644
--- a/src/test/ui/traits/trait-default-method-bound-subst.rs
+++ b/src/test/ui/traits/default-method/bound-subst.rs
diff --git a/src/test/ui/traits/trait-default-method-bound-subst2.rs b/src/test/ui/traits/default-method/bound-subst2.rs
index 78eabba2d23..78eabba2d23 100644
--- a/src/test/ui/traits/trait-default-method-bound-subst2.rs
+++ b/src/test/ui/traits/default-method/bound-subst2.rs
diff --git a/src/test/ui/traits/trait-default-method-bound-subst3.rs b/src/test/ui/traits/default-method/bound-subst3.rs
index dd39dec4b63..dd39dec4b63 100644
--- a/src/test/ui/traits/trait-default-method-bound-subst3.rs
+++ b/src/test/ui/traits/default-method/bound-subst3.rs
diff --git a/src/test/ui/traits/trait-default-method-bound-subst4.rs b/src/test/ui/traits/default-method/bound-subst4.rs
index ef133064582..ef133064582 100644
--- a/src/test/ui/traits/trait-default-method-bound-subst4.rs
+++ b/src/test/ui/traits/default-method/bound-subst4.rs
diff --git a/src/test/ui/traits/trait-default-method-bound.rs b/src/test/ui/traits/default-method/bound.rs
index 0855a9db851..0855a9db851 100644
--- a/src/test/ui/traits/trait-default-method-bound.rs
+++ b/src/test/ui/traits/default-method/bound.rs
diff --git a/src/test/ui/traits/traits-default-method-macro.rs b/src/test/ui/traits/default-method/macro.rs
index 2b50ee9b422..2b50ee9b422 100644
--- a/src/test/ui/traits/traits-default-method-macro.rs
+++ b/src/test/ui/traits/default-method/macro.rs
diff --git a/src/test/ui/traits/traits-default-method-mut.rs b/src/test/ui/traits/default-method/mut.rs
index 5f8e983b09c..5f8e983b09c 100644
--- a/src/test/ui/traits/traits-default-method-mut.rs
+++ b/src/test/ui/traits/default-method/mut.rs
diff --git a/src/test/ui/traits/traits-default-method-self.rs b/src/test/ui/traits/default-method/self.rs
index cdf4d1e148c..cdf4d1e148c 100644
--- a/src/test/ui/traits/traits-default-method-self.rs
+++ b/src/test/ui/traits/default-method/self.rs
diff --git a/src/test/ui/traits/default-method-supertrait-vtable.rs b/src/test/ui/traits/default-method/supervtable.rs
index 939ad51355e..939ad51355e 100644
--- a/src/test/ui/traits/default-method-supertrait-vtable.rs
+++ b/src/test/ui/traits/default-method/supervtable.rs
diff --git a/src/test/ui/traits/traits-default-method-trivial.rs b/src/test/ui/traits/default-method/trivial.rs
index dc41938ec89..dc41938ec89 100644
--- a/src/test/ui/traits/traits-default-method-trivial.rs
+++ b/src/test/ui/traits/default-method/trivial.rs
diff --git a/src/test/ui/traits/trait-default-method-xc-2.rs b/src/test/ui/traits/default-method/xc-2.rs
index 5fa1a6cba72..1de61dcf896 100644
--- a/src/test/ui/traits/trait-default-method-xc-2.rs
+++ b/src/test/ui/traits/default-method/xc-2.rs
@@ -1,11 +1,11 @@
 // run-pass
-// aux-build:trait_default_method_xc_aux.rs
-// aux-build:trait_default_method_xc_aux_2.rs
+// aux-build:xc.rs
+// aux-build:xc_2.rs
 
 
 
-extern crate trait_default_method_xc_aux as aux;
-extern crate trait_default_method_xc_aux_2 as aux2;
+extern crate xc as aux;
+extern crate xc_2 as aux2;
 use aux::A;
 use aux2::{a_struct, welp};
 
diff --git a/src/test/ui/traits/trait-default-method-xc.rs b/src/test/ui/traits/default-method/xc.rs
index 3c20a649613..76a1573d6c7 100644
--- a/src/test/ui/traits/trait-default-method-xc.rs
+++ b/src/test/ui/traits/default-method/xc.rs
@@ -2,10 +2,10 @@
 #![allow(dead_code)]
 #![allow(non_camel_case_types)]
 
-// aux-build:trait_default_method_xc_aux.rs
+// aux-build:xc.rs
 
 
-extern crate trait_default_method_xc_aux as aux;
+extern crate xc as aux;
 use aux::{A, TestEquality, Something};
 use aux::B;
 
diff --git a/src/test/ui/traits/trait-duplicate-methods.rs b/src/test/ui/traits/duplicate-methods.rs
index 1f9bdf56f10..1f9bdf56f10 100644
--- a/src/test/ui/traits/trait-duplicate-methods.rs
+++ b/src/test/ui/traits/duplicate-methods.rs
diff --git a/src/test/ui/traits/trait-duplicate-methods.stderr b/src/test/ui/traits/duplicate-methods.stderr
index 7cba4cb63e6..6aa88d0dff4 100644
--- a/src/test/ui/traits/trait-duplicate-methods.stderr
+++ b/src/test/ui/traits/duplicate-methods.stderr
@@ -1,5 +1,5 @@
 error[E0428]: the name `orange` is defined multiple times
-  --> $DIR/trait-duplicate-methods.rs:3:5
+  --> $DIR/duplicate-methods.rs:3:5
    |
 LL |     fn orange(&self);
    |     ----------------- previous definition of the value `orange` here
diff --git a/src/test/ui/traits/traits-elaborate-type-region.rs b/src/test/ui/traits/elaborate-type-region.rs
index 03aef0184ba..03aef0184ba 100644
--- a/src/test/ui/traits/traits-elaborate-type-region.rs
+++ b/src/test/ui/traits/elaborate-type-region.rs
diff --git a/src/test/ui/traits/trait-false-ambiguity-where-clause-builtin-bound.rs b/src/test/ui/traits/false-ambiguity-where-clause-builtin-bound.rs
index 3413db6a684..3413db6a684 100644
--- a/src/test/ui/traits/trait-false-ambiguity-where-clause-builtin-bound.rs
+++ b/src/test/ui/traits/false-ambiguity-where-clause-builtin-bound.rs
diff --git a/src/test/ui/traits/trait-generic.rs b/src/test/ui/traits/generic.rs
index 80efe1c9375..80efe1c9375 100644
--- a/src/test/ui/traits/trait-generic.rs
+++ b/src/test/ui/traits/generic.rs
diff --git a/src/test/ui/traits/trait-impl-1.rs b/src/test/ui/traits/impl-1.rs
index d22ac72d1cc..d22ac72d1cc 100644
--- a/src/test/ui/traits/trait-impl-1.rs
+++ b/src/test/ui/traits/impl-1.rs
diff --git a/src/test/ui/traits/trait-impl-1.stderr b/src/test/ui/traits/impl-1.stderr
index da0936e8eeb..7694e3f5cfa 100644
--- a/src/test/ui/traits/trait-impl-1.stderr
+++ b/src/test/ui/traits/impl-1.stderr
@@ -1,5 +1,5 @@
 error[E0599]: no method named `foo` found for reference `&i32` in the current scope
-  --> $DIR/trait-impl-1.rs:15:7
+  --> $DIR/impl-1.rs:15:7
    |
 LL |     x.foo();
    |       ^^^ method not found in `&i32`
diff --git a/src/test/ui/traits/trait-impl-2.rs b/src/test/ui/traits/impl-2.rs
index 804ffec12c2..804ffec12c2 100644
--- a/src/test/ui/traits/trait-impl-2.rs
+++ b/src/test/ui/traits/impl-2.rs
diff --git a/src/test/ui/traits/trait-impl-can-not-have-untraitful-items.rs b/src/test/ui/traits/impl-can-not-have-untraitful-items.rs
index 0c885447bb0..0c885447bb0 100644
--- a/src/test/ui/traits/trait-impl-can-not-have-untraitful-items.rs
+++ b/src/test/ui/traits/impl-can-not-have-untraitful-items.rs
diff --git a/src/test/ui/traits/trait-impl-can-not-have-untraitful-items.stderr b/src/test/ui/traits/impl-can-not-have-untraitful-items.stderr
index 0abed79d384..7f56f34ea15 100644
--- a/src/test/ui/traits/trait-impl-can-not-have-untraitful-items.stderr
+++ b/src/test/ui/traits/impl-can-not-have-untraitful-items.stderr
@@ -1,17 +1,17 @@
 error[E0438]: const `BAR` is not a member of trait `A`
-  --> $DIR/trait-impl-can-not-have-untraitful-items.rs:4:5
+  --> $DIR/impl-can-not-have-untraitful-items.rs:4:5
    |
 LL |     const BAR: () = ();
    |     ^^^^^^^^^^^^^^^^^^^ not a member of trait `A`
 
 error[E0437]: type `Baz` is not a member of trait `A`
-  --> $DIR/trait-impl-can-not-have-untraitful-items.rs:5:5
+  --> $DIR/impl-can-not-have-untraitful-items.rs:5:5
    |
 LL |     type Baz = ();
    |     ^^^^^^^^^^^^^^ not a member of trait `A`
 
 error[E0407]: method `foo` is not a member of trait `A`
-  --> $DIR/trait-impl-can-not-have-untraitful-items.rs:6:5
+  --> $DIR/impl-can-not-have-untraitful-items.rs:6:5
    |
 LL |     fn foo(&self) { }
    |     ^^^^^^^^^^^^^^^^^ not a member of trait `A`
diff --git a/src/test/ui/traits/trait-impl-different-num-params.rs b/src/test/ui/traits/impl-different-num-params.rs
index 53400622d7c..53400622d7c 100644
--- a/src/test/ui/traits/trait-impl-different-num-params.rs
+++ b/src/test/ui/traits/impl-different-num-params.rs
diff --git a/src/test/ui/traits/trait-impl-different-num-params.stderr b/src/test/ui/traits/impl-different-num-params.stderr
index 5ab93614f24..910ba351064 100644
--- a/src/test/ui/traits/trait-impl-different-num-params.stderr
+++ b/src/test/ui/traits/impl-different-num-params.stderr
@@ -1,5 +1,5 @@
 error[E0050]: method `bar` has 1 parameter but the declaration in trait `Foo::bar` has 2
-  --> $DIR/trait-impl-different-num-params.rs:5:12
+  --> $DIR/impl-different-num-params.rs:5:12
    |
 LL |     fn bar(&self, x: usize) -> Self;
    |            --------------- trait requires 2 parameters
diff --git a/src/test/ui/traits/trait-impl-for-module.rs b/src/test/ui/traits/impl-for-module.rs
index 9004627c523..9004627c523 100644
--- a/src/test/ui/traits/trait-impl-for-module.rs
+++ b/src/test/ui/traits/impl-for-module.rs
diff --git a/src/test/ui/traits/trait-impl-for-module.stderr b/src/test/ui/traits/impl-for-module.stderr
index cd2713a5bd5..6ec4083b513 100644
--- a/src/test/ui/traits/trait-impl-for-module.stderr
+++ b/src/test/ui/traits/impl-for-module.stderr
@@ -1,5 +1,5 @@
 error[E0573]: expected type, found module `a`
-  --> $DIR/trait-impl-for-module.rs:7:12
+  --> $DIR/impl-for-module.rs:7:12
    |
 LL | trait A {
    | ------- similarly named trait `A` defined here
diff --git a/src/test/ui/traits/trait-impl-method-mismatch.rs b/src/test/ui/traits/impl-method-mismatch.rs
index 683b1c1aa43..683b1c1aa43 100644
--- a/src/test/ui/traits/trait-impl-method-mismatch.rs
+++ b/src/test/ui/traits/impl-method-mismatch.rs
diff --git a/src/test/ui/traits/trait-impl-method-mismatch.stderr b/src/test/ui/traits/impl-method-mismatch.stderr
index 52e49186241..c909446d9dc 100644
--- a/src/test/ui/traits/trait-impl-method-mismatch.stderr
+++ b/src/test/ui/traits/impl-method-mismatch.stderr
@@ -1,5 +1,5 @@
 error[E0053]: method `jumbo` has an incompatible type for trait
-  --> $DIR/trait-impl-method-mismatch.rs:7:5
+  --> $DIR/impl-method-mismatch.rs:7:5
    |
 LL |     fn jumbo(&self, x: &usize) -> usize;
    |     ------------------------------------ type in trait
diff --git a/src/test/ui/traits/traits-impl-object-overlap-issue-23853.rs b/src/test/ui/traits/impl-object-overlap-issue-23853.rs
index e490967b690..e490967b690 100644
--- a/src/test/ui/traits/traits-impl-object-overlap-issue-23853.rs
+++ b/src/test/ui/traits/impl-object-overlap-issue-23853.rs
diff --git a/src/test/ui/traits/trait-impl-of-supertrait-has-wrong-lifetime-parameters.rs b/src/test/ui/traits/impl-of-supertrait-has-wrong-lifetime-parameters.rs
index 05b9db9724b..05b9db9724b 100644
--- a/src/test/ui/traits/trait-impl-of-supertrait-has-wrong-lifetime-parameters.rs
+++ b/src/test/ui/traits/impl-of-supertrait-has-wrong-lifetime-parameters.rs
diff --git a/src/test/ui/traits/trait-impl-of-supertrait-has-wrong-lifetime-parameters.stderr b/src/test/ui/traits/impl-of-supertrait-has-wrong-lifetime-parameters.stderr
index 46aa7db967a..539a56f010a 100644
--- a/src/test/ui/traits/trait-impl-of-supertrait-has-wrong-lifetime-parameters.stderr
+++ b/src/test/ui/traits/impl-of-supertrait-has-wrong-lifetime-parameters.stderr
@@ -1,21 +1,21 @@
 error[E0495]: cannot infer an appropriate lifetime for lifetime parameter `'b` due to conflicting requirements
-  --> $DIR/trait-impl-of-supertrait-has-wrong-lifetime-parameters.rs:24:13
+  --> $DIR/impl-of-supertrait-has-wrong-lifetime-parameters.rs:24:13
    |
 LL | impl<'a,'b> T2<'a, 'b> for S<'a, 'b> {
    |             ^^^^^^^^^^
    |
 note: first, the lifetime cannot outlive the lifetime `'a` as defined on the impl at 24:6...
-  --> $DIR/trait-impl-of-supertrait-has-wrong-lifetime-parameters.rs:24:6
+  --> $DIR/impl-of-supertrait-has-wrong-lifetime-parameters.rs:24:6
    |
 LL | impl<'a,'b> T2<'a, 'b> for S<'a, 'b> {
    |      ^^
 note: ...but the lifetime must also be valid for the lifetime `'b` as defined on the impl at 24:9...
-  --> $DIR/trait-impl-of-supertrait-has-wrong-lifetime-parameters.rs:24:9
+  --> $DIR/impl-of-supertrait-has-wrong-lifetime-parameters.rs:24:9
    |
 LL | impl<'a,'b> T2<'a, 'b> for S<'a, 'b> {
    |         ^^
 note: ...so that the types are compatible
-  --> $DIR/trait-impl-of-supertrait-has-wrong-lifetime-parameters.rs:24:13
+  --> $DIR/impl-of-supertrait-has-wrong-lifetime-parameters.rs:24:13
    |
 LL | impl<'a,'b> T2<'a, 'b> for S<'a, 'b> {
    |             ^^^^^^^^^^
diff --git a/src/test/ui/traits/trait-impl.rs b/src/test/ui/traits/impl.rs
index 14796ce19c8..14796ce19c8 100644
--- a/src/test/ui/traits/trait-impl.rs
+++ b/src/test/ui/traits/impl.rs
diff --git a/src/test/ui/traits/traits-inductive-overflow-lifetime.rs b/src/test/ui/traits/inductive-overflow/lifetime.rs
index 205d50a2ed9..205d50a2ed9 100644
--- a/src/test/ui/traits/traits-inductive-overflow-lifetime.rs
+++ b/src/test/ui/traits/inductive-overflow/lifetime.rs
diff --git a/src/test/ui/traits/traits-inductive-overflow-lifetime.stderr b/src/test/ui/traits/inductive-overflow/lifetime.stderr
index b904826081f..659f9e26e3e 100644
--- a/src/test/ui/traits/traits-inductive-overflow-lifetime.stderr
+++ b/src/test/ui/traits/inductive-overflow/lifetime.stderr
@@ -1,5 +1,5 @@
 error[E0275]: overflow evaluating the requirement `Box<X<C<'_>>>: NotAuto`
-  --> $DIR/traits-inductive-overflow-lifetime.rs:27:5
+  --> $DIR/lifetime.rs:27:5
    |
 LL | fn is_send<S: NotAuto>() {}
    |               ------- required by this bound in `is_send`
diff --git a/src/test/ui/traits/traits-inductive-overflow-simultaneous.rs b/src/test/ui/traits/inductive-overflow/simultaneous.rs
index 40ac9214674..40ac9214674 100644
--- a/src/test/ui/traits/traits-inductive-overflow-simultaneous.rs
+++ b/src/test/ui/traits/inductive-overflow/simultaneous.rs
diff --git a/src/test/ui/traits/traits-inductive-overflow-simultaneous.stderr b/src/test/ui/traits/inductive-overflow/simultaneous.stderr
index a0d2d13fbf3..484ac851179 100644
--- a/src/test/ui/traits/traits-inductive-overflow-simultaneous.stderr
+++ b/src/test/ui/traits/inductive-overflow/simultaneous.stderr
@@ -1,5 +1,5 @@
 error[E0275]: overflow evaluating the requirement `{integer}: Tweedledum`
-  --> $DIR/traits-inductive-overflow-simultaneous.rs:18:5
+  --> $DIR/simultaneous.rs:18:5
    |
 LL | fn is_ee<T: Combo>(t: T) {
    |             ----- required by this bound in `is_ee`
diff --git a/src/test/ui/traits/traits-inductive-overflow-supertrait-auto-trait.rs b/src/test/ui/traits/inductive-overflow/supertrait-auto-trait.rs
index 5fea47a1be8..5fea47a1be8 100644
--- a/src/test/ui/traits/traits-inductive-overflow-supertrait-auto-trait.rs
+++ b/src/test/ui/traits/inductive-overflow/supertrait-auto-trait.rs
diff --git a/src/test/ui/traits/traits-inductive-overflow-supertrait-auto-trait.stderr b/src/test/ui/traits/inductive-overflow/supertrait-auto-trait.stderr
index 140ffa4b079..6a0f7398cf1 100644
--- a/src/test/ui/traits/traits-inductive-overflow-supertrait-auto-trait.stderr
+++ b/src/test/ui/traits/inductive-overflow/supertrait-auto-trait.stderr
@@ -1,5 +1,5 @@
 error[E0568]: auto traits cannot have super traits
-  --> $DIR/traits-inductive-overflow-supertrait-auto-trait.rs:8:19
+  --> $DIR/supertrait-auto-trait.rs:8:19
    |
 LL | auto trait Magic: Copy {}
    |            -----  ^^^^ help: remove the super traits
@@ -7,7 +7,7 @@ LL | auto trait Magic: Copy {}
    |            auto trait cannot have super traits
 
 error[E0277]: the trait bound `NoClone: Copy` is not satisfied
-  --> $DIR/traits-inductive-overflow-supertrait-auto-trait.rs:16:23
+  --> $DIR/supertrait-auto-trait.rs:16:23
    |
 LL | fn copy<T: Magic>(x: T) -> (T, T) { (x, x) }
    |            ----- required by this bound in `copy`
diff --git a/src/test/ui/traits/traits-inductive-overflow-supertrait.rs b/src/test/ui/traits/inductive-overflow/supertrait.rs
index c7aa4d90f58..c7aa4d90f58 100644
--- a/src/test/ui/traits/traits-inductive-overflow-supertrait.rs
+++ b/src/test/ui/traits/inductive-overflow/supertrait.rs
diff --git a/src/test/ui/traits/traits-inductive-overflow-supertrait.stderr b/src/test/ui/traits/inductive-overflow/supertrait.stderr
index a86648d9a17..dfb967601e9 100644
--- a/src/test/ui/traits/traits-inductive-overflow-supertrait.stderr
+++ b/src/test/ui/traits/inductive-overflow/supertrait.stderr
@@ -1,5 +1,5 @@
 error[E0275]: overflow evaluating the requirement `NoClone: Magic`
-  --> $DIR/traits-inductive-overflow-supertrait.rs:13:18
+  --> $DIR/supertrait.rs:13:18
    |
 LL | fn copy<T: Magic>(x: T) -> (T, T) { (x, x) }
    |            ----- required by this bound in `copy`
diff --git a/src/test/ui/traits/traits-inductive-overflow-two-traits.rs b/src/test/ui/traits/inductive-overflow/two-traits.rs
index 463b55d8581..463b55d8581 100644
--- a/src/test/ui/traits/traits-inductive-overflow-two-traits.rs
+++ b/src/test/ui/traits/inductive-overflow/two-traits.rs
diff --git a/src/test/ui/traits/traits-inductive-overflow-two-traits.stderr b/src/test/ui/traits/inductive-overflow/two-traits.stderr
index 996544ae516..d3f2931f25d 100644
--- a/src/test/ui/traits/traits-inductive-overflow-two-traits.stderr
+++ b/src/test/ui/traits/inductive-overflow/two-traits.stderr
@@ -1,5 +1,5 @@
 error[E0277]: `T` cannot be shared between threads safely
-  --> $DIR/traits-inductive-overflow-two-traits.rs:11:5
+  --> $DIR/two-traits.rs:11:5
    |
 LL |     type X: Trait;
    |             ----- required by this bound in `Magic::X`
@@ -13,7 +13,7 @@ LL | impl<T: Magic + Sync> Magic for T {
    |               ^^^^^^
 
 error[E0275]: overflow evaluating the requirement `*mut (): Magic`
-  --> $DIR/traits-inductive-overflow-two-traits.rs:20:5
+  --> $DIR/two-traits.rs:20:5
    |
 LL | fn wizard<T: Magic>() { check::<<T as Magic>::X>(); }
    |              ----- required by this bound in `wizard`
diff --git a/src/test/ui/traits/infer-from-object-trait-issue-26952.rs b/src/test/ui/traits/infer-from-object-issue-26952.rs
index ed258dbb24c..ed258dbb24c 100644
--- a/src/test/ui/traits/infer-from-object-trait-issue-26952.rs
+++ b/src/test/ui/traits/infer-from-object-issue-26952.rs
diff --git a/src/test/ui/traits/inherent-trait-method-order.rs b/src/test/ui/traits/inherent-method-order.rs
index f632ae8a9ac..f632ae8a9ac 100644
--- a/src/test/ui/traits/inherent-trait-method-order.rs
+++ b/src/test/ui/traits/inherent-method-order.rs
diff --git a/src/test/ui/traits/trait-inheritance-auto-xc-2.rs b/src/test/ui/traits/inheritance/auto-xc-2.rs
index 62c3ce8030c..f2130228d51 100644
--- a/src/test/ui/traits/trait-inheritance-auto-xc-2.rs
+++ b/src/test/ui/traits/inheritance/auto-xc-2.rs
@@ -1,8 +1,8 @@
 // run-pass
-// aux-build:trait_inheritance_auto_xc_2_aux.rs
+// aux-build:auto_xc_2.rs
 
 
-extern crate trait_inheritance_auto_xc_2_aux as aux;
+extern crate auto_xc_2 as aux;
 
 // aux defines impls of Foo, Bar and Baz for A
 use aux::{Foo, Bar, Baz, A};
diff --git a/src/test/ui/traits/trait-inheritance-auto-xc.rs b/src/test/ui/traits/inheritance/auto-xc.rs
index e8e651091ad..3d5ae182af1 100644
--- a/src/test/ui/traits/trait-inheritance-auto-xc.rs
+++ b/src/test/ui/traits/inheritance/auto-xc.rs
@@ -1,9 +1,9 @@
 // run-pass
 #![allow(dead_code)]
-// aux-build:trait_inheritance_auto_xc_aux.rs
+// aux-build:auto_xc.rs
 
 
-extern crate trait_inheritance_auto_xc_aux as aux;
+extern crate auto_xc as aux;
 
 use aux::{Foo, Bar, Baz, Quux};
 
diff --git a/src/test/ui/traits/trait-inheritance-auto.rs b/src/test/ui/traits/inheritance/auto.rs
index 0be67a55eba..0be67a55eba 100644
--- a/src/test/ui/traits/trait-inheritance-auto.rs
+++ b/src/test/ui/traits/inheritance/auto.rs
diff --git a/src/test/ui/traits/auxiliary/trait_inheritance_auto_xc_aux.rs b/src/test/ui/traits/inheritance/auxiliary/auto_xc.rs
index 9af26cb2e2b..9af26cb2e2b 100644
--- a/src/test/ui/traits/auxiliary/trait_inheritance_auto_xc_aux.rs
+++ b/src/test/ui/traits/inheritance/auxiliary/auto_xc.rs
diff --git a/src/test/ui/traits/auxiliary/trait_inheritance_auto_xc_2_aux.rs b/src/test/ui/traits/inheritance/auxiliary/auto_xc_2.rs
index e9327676dc6..e9327676dc6 100644
--- a/src/test/ui/traits/auxiliary/trait_inheritance_auto_xc_2_aux.rs
+++ b/src/test/ui/traits/inheritance/auxiliary/auto_xc_2.rs
diff --git a/src/test/ui/traits/auxiliary/trait_inheritance_overloading_xc.rs b/src/test/ui/traits/inheritance/auxiliary/overloading_xc.rs
index a2570441226..a2570441226 100644
--- a/src/test/ui/traits/auxiliary/trait_inheritance_overloading_xc.rs
+++ b/src/test/ui/traits/inheritance/auxiliary/overloading_xc.rs
diff --git a/src/test/ui/traits/auxiliary/trait_xc_call_aux.rs b/src/test/ui/traits/inheritance/auxiliary/xc_call.rs
index b76c52e62a9..b76c52e62a9 100644
--- a/src/test/ui/traits/auxiliary/trait_xc_call_aux.rs
+++ b/src/test/ui/traits/inheritance/auxiliary/xc_call.rs
diff --git a/src/test/ui/traits/trait-inheritance2.rs b/src/test/ui/traits/inheritance/basic.rs
index 5bfa60b1aec..5bfa60b1aec 100644
--- a/src/test/ui/traits/trait-inheritance2.rs
+++ b/src/test/ui/traits/inheritance/basic.rs
diff --git a/src/test/ui/traits/trait-inheritance-call-bound-inherited.rs b/src/test/ui/traits/inheritance/call-bound-inherited.rs
index 37c2ff63c6a..37c2ff63c6a 100644
--- a/src/test/ui/traits/trait-inheritance-call-bound-inherited.rs
+++ b/src/test/ui/traits/inheritance/call-bound-inherited.rs
diff --git a/src/test/ui/traits/trait-inheritance-call-bound-inherited2.rs b/src/test/ui/traits/inheritance/call-bound-inherited2.rs
index 8576d29f251..8576d29f251 100644
--- a/src/test/ui/traits/trait-inheritance-call-bound-inherited2.rs
+++ b/src/test/ui/traits/inheritance/call-bound-inherited2.rs
diff --git a/src/test/ui/traits/trait-inheritance-cast-without-call-to-supertrait.rs b/src/test/ui/traits/inheritance/cast-without-call-to-supertrait.rs
index 25159c1adb6..25159c1adb6 100644
--- a/src/test/ui/traits/trait-inheritance-cast-without-call-to-supertrait.rs
+++ b/src/test/ui/traits/inheritance/cast-without-call-to-supertrait.rs
diff --git a/src/test/ui/traits/trait-inheritance-cast.rs b/src/test/ui/traits/inheritance/cast.rs
index 9070b9d1f56..9070b9d1f56 100644
--- a/src/test/ui/traits/trait-inheritance-cast.rs
+++ b/src/test/ui/traits/inheritance/cast.rs
diff --git a/src/test/ui/traits/trait-inheritance-cross-trait-call-xc.rs b/src/test/ui/traits/inheritance/cross-trait-call-xc.rs
index dbefb22cb72..99fbb5c6148 100644
--- a/src/test/ui/traits/trait-inheritance-cross-trait-call-xc.rs
+++ b/src/test/ui/traits/inheritance/cross-trait-call-xc.rs
@@ -1,8 +1,8 @@
 // run-pass
-// aux-build:trait_xc_call_aux.rs
+// aux-build:xc_call.rs
 
 
-extern crate trait_xc_call_aux as aux;
+extern crate xc_call as aux;
 
 use aux::Foo;
 
diff --git a/src/test/ui/traits/trait-inheritance-cross-trait-call.rs b/src/test/ui/traits/inheritance/cross-trait-call.rs
index 512c928ca8f..512c928ca8f 100644
--- a/src/test/ui/traits/trait-inheritance-cross-trait-call.rs
+++ b/src/test/ui/traits/inheritance/cross-trait-call.rs
diff --git a/src/test/ui/traits/trait-inheritance-diamond.rs b/src/test/ui/traits/inheritance/diamond.rs
index 32ad0fb4d41..32ad0fb4d41 100644
--- a/src/test/ui/traits/trait-inheritance-diamond.rs
+++ b/src/test/ui/traits/inheritance/diamond.rs
diff --git a/src/test/ui/traits/trait-inheritance-multiple-inheritors.rs b/src/test/ui/traits/inheritance/multiple-inheritors.rs
index 77ecbd8eb17..77ecbd8eb17 100644
--- a/src/test/ui/traits/trait-inheritance-multiple-inheritors.rs
+++ b/src/test/ui/traits/inheritance/multiple-inheritors.rs
diff --git a/src/test/ui/traits/trait-inheritance-multiple-params.rs b/src/test/ui/traits/inheritance/multiple-params.rs
index 8ff5ba54185..8ff5ba54185 100644
--- a/src/test/ui/traits/trait-inheritance-multiple-params.rs
+++ b/src/test/ui/traits/inheritance/multiple-params.rs
diff --git a/src/test/ui/traits/trait-inheritance-num.rs b/src/test/ui/traits/inheritance/num.rs
index 3d63d78cabb..3d63d78cabb 100644
--- a/src/test/ui/traits/trait-inheritance-num.rs
+++ b/src/test/ui/traits/inheritance/num.rs
diff --git a/src/test/ui/traits/trait-inheritance-num0.rs b/src/test/ui/traits/inheritance/num0.rs
index cee52542d38..cee52542d38 100644
--- a/src/test/ui/traits/trait-inheritance-num0.rs
+++ b/src/test/ui/traits/inheritance/num0.rs
diff --git a/src/test/ui/traits/trait-inheritance-num1.rs b/src/test/ui/traits/inheritance/num1.rs
index 663dd3a5eaf..663dd3a5eaf 100644
--- a/src/test/ui/traits/trait-inheritance-num1.rs
+++ b/src/test/ui/traits/inheritance/num1.rs
diff --git a/src/test/ui/traits/trait-inheritance-num2.rs b/src/test/ui/traits/inheritance/num2.rs
index b713c66a37c..b713c66a37c 100644
--- a/src/test/ui/traits/trait-inheritance-num2.rs
+++ b/src/test/ui/traits/inheritance/num2.rs
diff --git a/src/test/ui/traits/trait-inheritance-num3.rs b/src/test/ui/traits/inheritance/num3.rs
index c40be6f8354..c40be6f8354 100644
--- a/src/test/ui/traits/trait-inheritance-num3.rs
+++ b/src/test/ui/traits/inheritance/num3.rs
diff --git a/src/test/ui/traits/trait-inheritance-num5.rs b/src/test/ui/traits/inheritance/num5.rs
index f478618f7b5..f478618f7b5 100644
--- a/src/test/ui/traits/trait-inheritance-num5.rs
+++ b/src/test/ui/traits/inheritance/num5.rs
diff --git a/src/test/ui/traits/trait-inheritance-overloading-simple.rs b/src/test/ui/traits/inheritance/overloading-simple.rs
index c306aa2cda0..c306aa2cda0 100644
--- a/src/test/ui/traits/trait-inheritance-overloading-simple.rs
+++ b/src/test/ui/traits/inheritance/overloading-simple.rs
diff --git a/src/test/ui/traits/trait-inheritance-overloading-xc-exe.rs b/src/test/ui/traits/inheritance/overloading-xc-exe.rs
index 2a9acfdd04a..08778061ba1 100644
--- a/src/test/ui/traits/trait-inheritance-overloading-xc-exe.rs
+++ b/src/test/ui/traits/inheritance/overloading-xc-exe.rs
@@ -1,9 +1,9 @@
 // run-pass
-// aux-build:trait_inheritance_overloading_xc.rs
+// aux-build:overloading_xc.rs
 
 
-extern crate trait_inheritance_overloading_xc;
-use trait_inheritance_overloading_xc::{MyNum, MyInt};
+extern crate overloading_xc;
+use overloading_xc::{MyNum, MyInt};
 
 fn f<T:MyNum>(x: T, y: T) -> (T, T, T) {
     return (x.clone() + y.clone(), x.clone() - y.clone(), x * y);
diff --git a/src/test/ui/traits/trait-inheritance-overloading.rs b/src/test/ui/traits/inheritance/overloading.rs
index 083643e821f..083643e821f 100644
--- a/src/test/ui/traits/trait-inheritance-overloading.rs
+++ b/src/test/ui/traits/inheritance/overloading.rs
diff --git a/src/test/ui/traits/traits-repeated-supertrait-ambig.rs b/src/test/ui/traits/inheritance/repeated-supertrait-ambig.rs
index 6aaef8a305b..6aaef8a305b 100644
--- a/src/test/ui/traits/traits-repeated-supertrait-ambig.rs
+++ b/src/test/ui/traits/inheritance/repeated-supertrait-ambig.rs
diff --git a/src/test/ui/traits/traits-repeated-supertrait-ambig.stderr b/src/test/ui/traits/inheritance/repeated-supertrait-ambig.stderr
index 4107c49bd80..5353b5e2260 100644
--- a/src/test/ui/traits/traits-repeated-supertrait-ambig.stderr
+++ b/src/test/ui/traits/inheritance/repeated-supertrait-ambig.stderr
@@ -1,11 +1,11 @@
 error[E0277]: the trait bound `dyn CompareToInts: CompareTo<i32>` is not satisfied
-  --> $DIR/traits-repeated-supertrait-ambig.rs:26:7
+  --> $DIR/repeated-supertrait-ambig.rs:26:7
    |
 LL |     c.same_as(22)
    |       ^^^^^^^ the trait `CompareTo<i32>` is not implemented for `dyn CompareToInts`
 
 error[E0277]: the trait bound `C: CompareTo<i32>` is not satisfied
-  --> $DIR/traits-repeated-supertrait-ambig.rs:30:7
+  --> $DIR/repeated-supertrait-ambig.rs:30:7
    |
 LL |     c.same_as(22)
    |       ^^^^^^^ the trait `CompareTo<i32>` is not implemented for `C`
@@ -16,7 +16,7 @@ LL | fn with_trait<C:CompareToInts + CompareTo<i32>>(c: &C) -> bool {
    |                               ^^^^^^^^^^^^^^^^
 
 error[E0277]: the trait bound `dyn CompareToInts: CompareTo<i32>` is not satisfied
-  --> $DIR/traits-repeated-supertrait-ambig.rs:34:5
+  --> $DIR/repeated-supertrait-ambig.rs:34:5
    |
 LL |     fn same_as(&self, t: T) -> bool;
    |     -------------------------------- required by `CompareTo::same_as`
@@ -25,7 +25,7 @@ LL |     CompareToInts::same_as(c, 22)
    |     ^^^^^^^^^^^^^^^^^^^^^^ the trait `CompareTo<i32>` is not implemented for `dyn CompareToInts`
 
 error[E0277]: the trait bound `C: CompareTo<i32>` is not satisfied
-  --> $DIR/traits-repeated-supertrait-ambig.rs:38:5
+  --> $DIR/repeated-supertrait-ambig.rs:38:5
    |
 LL |     fn same_as(&self, t: T) -> bool;
    |     -------------------------------- required by `CompareTo::same_as`
@@ -39,7 +39,7 @@ LL | fn with_ufcs2<C:CompareToInts + CompareTo<i32>>(c: &C) -> bool {
    |                               ^^^^^^^^^^^^^^^^
 
 error[E0277]: the trait bound `i64: CompareTo<i32>` is not satisfied
-  --> $DIR/traits-repeated-supertrait-ambig.rs:42:23
+  --> $DIR/repeated-supertrait-ambig.rs:42:23
    |
 LL |     assert_eq!(22_i64.same_as(22), true);
    |                       ^^^^^^^ the trait `CompareTo<i32>` is not implemented for `i64`
diff --git a/src/test/ui/traits/traits-repeated-supertrait.rs b/src/test/ui/traits/inheritance/repeated-supertrait.rs
index 339f9c37eea..339f9c37eea 100644
--- a/src/test/ui/traits/traits-repeated-supertrait.rs
+++ b/src/test/ui/traits/inheritance/repeated-supertrait.rs
diff --git a/src/test/ui/traits/trait-inheritance-self-in-supertype.rs b/src/test/ui/traits/inheritance/self-in-supertype.rs
index e8a2bd791a5..e8a2bd791a5 100644
--- a/src/test/ui/traits/trait-inheritance-self-in-supertype.rs
+++ b/src/test/ui/traits/inheritance/self-in-supertype.rs
diff --git a/src/test/ui/traits/trait-inheritance-self.rs b/src/test/ui/traits/inheritance/self.rs
index 5f2559f48eb..5f2559f48eb 100644
--- a/src/test/ui/traits/trait-inheritance-self.rs
+++ b/src/test/ui/traits/inheritance/self.rs
diff --git a/src/test/ui/traits/trait-inheritance-simple.rs b/src/test/ui/traits/inheritance/simple.rs
index ca3a284e597..ca3a284e597 100644
--- a/src/test/ui/traits/trait-inheritance-simple.rs
+++ b/src/test/ui/traits/inheritance/simple.rs
diff --git a/src/test/ui/traits/trait-inheritance-static.rs b/src/test/ui/traits/inheritance/static.rs
index 16218fbd236..16218fbd236 100644
--- a/src/test/ui/traits/trait-inheritance-static.rs
+++ b/src/test/ui/traits/inheritance/static.rs
diff --git a/src/test/ui/traits/trait-inheritance-static2.rs b/src/test/ui/traits/inheritance/static2.rs
index bc78e1e2328..bc78e1e2328 100644
--- a/src/test/ui/traits/trait-inheritance-static2.rs
+++ b/src/test/ui/traits/inheritance/static2.rs
diff --git a/src/test/ui/traits/trait-inheritance-subst.rs b/src/test/ui/traits/inheritance/subst.rs
index b2b6503666e..b2b6503666e 100644
--- a/src/test/ui/traits/trait-inheritance-subst.rs
+++ b/src/test/ui/traits/inheritance/subst.rs
diff --git a/src/test/ui/traits/trait-inheritance-subst2.rs b/src/test/ui/traits/inheritance/subst2.rs
index ccc9628c777..ccc9628c777 100644
--- a/src/test/ui/traits/trait-inheritance-subst2.rs
+++ b/src/test/ui/traits/inheritance/subst2.rs
diff --git a/src/test/ui/traits/trait-inheritance-visibility.rs b/src/test/ui/traits/inheritance/visibility.rs
index 6ad86492674..6ad86492674 100644
--- a/src/test/ui/traits/trait-inheritance-visibility.rs
+++ b/src/test/ui/traits/inheritance/visibility.rs
diff --git a/src/test/ui/traits/traits-issue-22019.rs b/src/test/ui/traits/issue-22019.rs
index 1a887f0f39f..1a887f0f39f 100644
--- a/src/test/ui/traits/traits-issue-22019.rs
+++ b/src/test/ui/traits/issue-22019.rs
diff --git a/src/test/ui/traits/traits-issue-22110.rs b/src/test/ui/traits/issue-22110.rs
index bdbfee799f1..bdbfee799f1 100644
--- a/src/test/ui/traits/traits-issue-22110.rs
+++ b/src/test/ui/traits/issue-22110.rs
diff --git a/src/test/ui/traits/traits-issue-22655.rs b/src/test/ui/traits/issue-22655.rs
index bc08ca0a2ba..bc08ca0a2ba 100644
--- a/src/test/ui/traits/traits-issue-22655.rs
+++ b/src/test/ui/traits/issue-22655.rs
diff --git a/src/test/ui/traits/traits-issue-23003-overflow.rs b/src/test/ui/traits/issue-23003-overflow.rs
index c5f471f23c2..c5f471f23c2 100644
--- a/src/test/ui/traits/traits-issue-23003-overflow.rs
+++ b/src/test/ui/traits/issue-23003-overflow.rs
diff --git a/src/test/ui/traits/traits-issue-23003.rs b/src/test/ui/traits/issue-23003.rs
index 24c2b2ad660..24c2b2ad660 100644
--- a/src/test/ui/traits/traits-issue-23003.rs
+++ b/src/test/ui/traits/issue-23003.rs
diff --git a/src/test/ui/traits/traits-issue-26339.rs b/src/test/ui/traits/issue-26339.rs
index bedd87cc4cc..bedd87cc4cc 100644
--- a/src/test/ui/traits/traits-issue-26339.rs
+++ b/src/test/ui/traits/issue-26339.rs
diff --git a/src/test/ui/traits/traits-issue-71136.rs b/src/test/ui/traits/issue-71136.rs
index b21756e2b63..b21756e2b63 100644
--- a/src/test/ui/traits/traits-issue-71136.rs
+++ b/src/test/ui/traits/issue-71136.rs
diff --git a/src/test/ui/traits/traits-issue-71136.stderr b/src/test/ui/traits/issue-71136.stderr
index 23a8040f6ff..ba47fdb1522 100644
--- a/src/test/ui/traits/traits-issue-71136.stderr
+++ b/src/test/ui/traits/issue-71136.stderr
@@ -1,5 +1,5 @@
 error[E0277]: the trait bound `Foo: Clone` is not satisfied
-  --> $DIR/traits-issue-71136.rs:5:5
+  --> $DIR/issue-71136.rs:5:5
    |
 LL |     the_foos: Vec<Foo>,
    |     ^^^^^^^^^^^^^^^^^^ expected an implementor of trait `Clone`
diff --git a/src/test/ui/traits/issue-9394-inherited-trait-calls.rs b/src/test/ui/traits/issue-9394-inherited-calls.rs
index cc0dd4fc14a..cc0dd4fc14a 100644
--- a/src/test/ui/traits/issue-9394-inherited-trait-calls.rs
+++ b/src/test/ui/traits/issue-9394-inherited-calls.rs
diff --git a/src/test/ui/traits/trait-item-inside-macro.rs b/src/test/ui/traits/item-inside-macro.rs
index 54bf872d028..54bf872d028 100644
--- a/src/test/ui/traits/trait-item-inside-macro.rs
+++ b/src/test/ui/traits/item-inside-macro.rs
diff --git a/src/test/ui/traits/trait-item-privacy.rs b/src/test/ui/traits/item-privacy.rs
index 1ea1d65df62..1ea1d65df62 100644
--- a/src/test/ui/traits/trait-item-privacy.rs
+++ b/src/test/ui/traits/item-privacy.rs
diff --git a/src/test/ui/traits/trait-item-privacy.stderr b/src/test/ui/traits/item-privacy.stderr
index 4d97d934376..6fd82142d61 100644
--- a/src/test/ui/traits/trait-item-privacy.stderr
+++ b/src/test/ui/traits/item-privacy.stderr
@@ -1,5 +1,5 @@
 error[E0599]: no method named `a` found for struct `S` in the current scope
-  --> $DIR/trait-item-privacy.rs:67:7
+  --> $DIR/item-privacy.rs:67:7
    |
 LL | struct S;
    | --------- method `a` not found for this
@@ -9,13 +9,13 @@ LL |     S.a();
    |
    = help: items from traits can only be used if the trait is implemented and in scope
 note: `method::A` defines an item `a`, perhaps you need to implement it
-  --> $DIR/trait-item-privacy.rs:6:5
+  --> $DIR/item-privacy.rs:6:5
    |
 LL |     trait A {
    |     ^^^^^^^
 
 error[E0599]: no method named `b` found for struct `S` in the current scope
-  --> $DIR/trait-item-privacy.rs:68:7
+  --> $DIR/item-privacy.rs:68:7
    |
 LL | struct S;
    | --------- method `b` not found for this
@@ -30,13 +30,13 @@ LL | use method::B;
    |
 
 error[E0624]: associated function `a` is private
-  --> $DIR/trait-item-privacy.rs:72:7
+  --> $DIR/item-privacy.rs:72:7
    |
 LL |     c.a();
    |       ^ private associated function
 
 error[E0599]: no function or associated item named `a` found for struct `S` in the current scope
-  --> $DIR/trait-item-privacy.rs:78:8
+  --> $DIR/item-privacy.rs:78:8
    |
 LL | struct S;
    | --------- function or associated item `a` not found for this
@@ -46,13 +46,13 @@ LL |     S::a(&S);
    |
    = help: items from traits can only be used if the trait is implemented and in scope
 note: `method::A` defines an item `a`, perhaps you need to implement it
-  --> $DIR/trait-item-privacy.rs:6:5
+  --> $DIR/item-privacy.rs:6:5
    |
 LL |     trait A {
    |     ^^^^^^^
 
 error[E0599]: no function or associated item named `b` found for struct `S` in the current scope
-  --> $DIR/trait-item-privacy.rs:80:8
+  --> $DIR/item-privacy.rs:80:8
    |
 LL | struct S;
    | --------- function or associated item `b` not found for this
@@ -67,13 +67,13 @@ LL | use method::B;
    |
 
 error[E0624]: associated function `a` is private
-  --> $DIR/trait-item-privacy.rs:84:8
+  --> $DIR/item-privacy.rs:84:8
    |
 LL |     C::a(&S);
    |        ^ private associated function
 
 error[E0599]: no associated item named `A` found for struct `S` in the current scope
-  --> $DIR/trait-item-privacy.rs:97:8
+  --> $DIR/item-privacy.rs:97:8
    |
 LL | struct S;
    | --------- associated item `A` not found for this
@@ -83,13 +83,13 @@ LL |     S::A;
    |
    = help: items from traits can only be used if the trait is implemented and in scope
 note: `assoc_const::A` defines an item `A`, perhaps you need to implement it
-  --> $DIR/trait-item-privacy.rs:24:5
+  --> $DIR/item-privacy.rs:24:5
    |
 LL |     trait A {
    |     ^^^^^^^
 
 error[E0599]: no associated item named `B` found for struct `S` in the current scope
-  --> $DIR/trait-item-privacy.rs:98:8
+  --> $DIR/item-privacy.rs:98:8
    |
 LL | struct S;
    | --------- associated item `B` not found for this
@@ -104,13 +104,13 @@ LL | use assoc_const::B;
    |
 
 error[E0624]: associated constant `A` is private
-  --> $DIR/trait-item-privacy.rs:101:8
+  --> $DIR/item-privacy.rs:101:8
    |
 LL |     C::A;
    |        ^ private associated constant
 
 error[E0038]: the trait `assoc_const::C` cannot be made into an object
-  --> $DIR/trait-item-privacy.rs:101:5
+  --> $DIR/item-privacy.rs:101:5
    |
 LL |     C::A;
    |     ^^^^ `assoc_const::C` cannot be made into an object
@@ -119,7 +119,7 @@ LL |     C::A;
    = help: consider moving `B` to another trait
    = help: consider moving `A` to another trait
 note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/trait-item-privacy.rs:25:15
+  --> $DIR/item-privacy.rs:25:15
    |
 LL |         const A: u8 = 0;
    |               ^ ...because it contains this associated `const`
@@ -133,31 +133,31 @@ LL |         const C: u8 = 0;
    |               ^ ...because it contains this associated `const`
 
 error[E0223]: ambiguous associated type
-  --> $DIR/trait-item-privacy.rs:115:12
+  --> $DIR/item-privacy.rs:115:12
    |
 LL |     let _: S::A;
    |            ^^^^ help: use fully-qualified syntax: `<S as Trait>::A`
 
 error[E0223]: ambiguous associated type
-  --> $DIR/trait-item-privacy.rs:116:12
+  --> $DIR/item-privacy.rs:116:12
    |
 LL |     let _: S::B;
    |            ^^^^ help: use fully-qualified syntax: `<S as Trait>::B`
 
 error[E0223]: ambiguous associated type
-  --> $DIR/trait-item-privacy.rs:117:12
+  --> $DIR/item-privacy.rs:117:12
    |
 LL |     let _: S::C;
    |            ^^^^ help: use fully-qualified syntax: `<S as Trait>::C`
 
 error: associated type `A` is private
-  --> $DIR/trait-item-privacy.rs:119:12
+  --> $DIR/item-privacy.rs:119:12
    |
 LL |     let _: T::A;
    |            ^^^^ private associated type
 
 error: associated type `A` is private
-  --> $DIR/trait-item-privacy.rs:128:9
+  --> $DIR/item-privacy.rs:128:9
    |
 LL |         A = u8,
    |         ^^^^^^ private associated type
diff --git a/src/test/ui/traits/kindck-owned-trait-contains-1.rs b/src/test/ui/traits/kindck-owned-contains-1.rs
index 23b91f924b5..23b91f924b5 100644
--- a/src/test/ui/traits/kindck-owned-trait-contains-1.rs
+++ b/src/test/ui/traits/kindck-owned-contains-1.rs
diff --git a/src/test/ui/traits/trait-matching-lifetimes.rs b/src/test/ui/traits/matching-lifetimes.rs
index 1430dc65591..1430dc65591 100644
--- a/src/test/ui/traits/trait-matching-lifetimes.rs
+++ b/src/test/ui/traits/matching-lifetimes.rs
diff --git a/src/test/ui/traits/trait-matching-lifetimes.stderr b/src/test/ui/traits/matching-lifetimes.stderr
index 17ebdb7c825..5c28d40160d 100644
--- a/src/test/ui/traits/trait-matching-lifetimes.stderr
+++ b/src/test/ui/traits/matching-lifetimes.stderr
@@ -1,5 +1,5 @@
 error[E0308]: method not compatible with trait
-  --> $DIR/trait-matching-lifetimes.rs:14:5
+  --> $DIR/matching-lifetimes.rs:14:5
    |
 LL |     fn foo(x: Foo<'b,'a>) {
    |     ^^^^^^^^^^^^^^^^^^^^^ lifetime mismatch
@@ -7,18 +7,18 @@ LL |     fn foo(x: Foo<'b,'a>) {
    = note: expected fn pointer `fn(Foo<'a, 'b>)`
               found fn pointer `fn(Foo<'b, 'a>)`
 note: the lifetime `'b` as defined on the impl at 13:9...
-  --> $DIR/trait-matching-lifetimes.rs:13:9
+  --> $DIR/matching-lifetimes.rs:13:9
    |
 LL | impl<'a,'b> Tr for Foo<'a,'b> {
    |         ^^
 note: ...does not necessarily outlive the lifetime `'a` as defined on the impl at 13:6
-  --> $DIR/trait-matching-lifetimes.rs:13:6
+  --> $DIR/matching-lifetimes.rs:13:6
    |
 LL | impl<'a,'b> Tr for Foo<'a,'b> {
    |      ^^
 
 error[E0308]: method not compatible with trait
-  --> $DIR/trait-matching-lifetimes.rs:14:5
+  --> $DIR/matching-lifetimes.rs:14:5
    |
 LL |     fn foo(x: Foo<'b,'a>) {
    |     ^^^^^^^^^^^^^^^^^^^^^ lifetime mismatch
@@ -26,12 +26,12 @@ LL |     fn foo(x: Foo<'b,'a>) {
    = note: expected fn pointer `fn(Foo<'a, 'b>)`
               found fn pointer `fn(Foo<'b, 'a>)`
 note: the lifetime `'a` as defined on the impl at 13:6...
-  --> $DIR/trait-matching-lifetimes.rs:13:6
+  --> $DIR/matching-lifetimes.rs:13:6
    |
 LL | impl<'a,'b> Tr for Foo<'a,'b> {
    |      ^^
 note: ...does not necessarily outlive the lifetime `'b` as defined on the impl at 13:9
-  --> $DIR/trait-matching-lifetimes.rs:13:9
+  --> $DIR/matching-lifetimes.rs:13:9
    |
 LL | impl<'a,'b> Tr for Foo<'a,'b> {
    |         ^^
diff --git a/src/test/ui/traits/trait-method-private.rs b/src/test/ui/traits/method-private.rs
index 4cd184854ec..4cd184854ec 100644
--- a/src/test/ui/traits/trait-method-private.rs
+++ b/src/test/ui/traits/method-private.rs
diff --git a/src/test/ui/traits/trait-method-private.stderr b/src/test/ui/traits/method-private.stderr
index c33673aea4d..99f330b38ae 100644
--- a/src/test/ui/traits/trait-method-private.stderr
+++ b/src/test/ui/traits/method-private.stderr
@@ -1,5 +1,5 @@
 error[E0624]: associated function `method` is private
-  --> $DIR/trait-method-private.rs:19:9
+  --> $DIR/method-private.rs:19:9
    |
 LL |     foo.method();
    |         ^^^^^^ private associated function
diff --git a/src/test/ui/traits/traits-multidispatch-bad.rs b/src/test/ui/traits/multidispatch-bad.rs
index b625b961590..b625b961590 100644
--- a/src/test/ui/traits/traits-multidispatch-bad.rs
+++ b/src/test/ui/traits/multidispatch-bad.rs
diff --git a/src/test/ui/traits/traits-multidispatch-bad.stderr b/src/test/ui/traits/multidispatch-bad.stderr
index 671faf45178..8d4813c453e 100644
--- a/src/test/ui/traits/traits-multidispatch-bad.stderr
+++ b/src/test/ui/traits/multidispatch-bad.stderr
@@ -1,5 +1,5 @@
 error[E0308]: mismatched types
-  --> $DIR/traits-multidispatch-bad.rs:19:17
+  --> $DIR/multidispatch-bad.rs:19:17
    |
 LL |     test(22i32, 44i32);
    |                 ^^^^^ expected `u32`, found `i32`
diff --git a/src/test/ui/traits/traits-multidispatch-convert-ambig-dest.rs b/src/test/ui/traits/multidispatch-convert-ambig-dest.rs
index 58cb69a05b7..58cb69a05b7 100644
--- a/src/test/ui/traits/traits-multidispatch-convert-ambig-dest.rs
+++ b/src/test/ui/traits/multidispatch-convert-ambig-dest.rs
diff --git a/src/test/ui/traits/traits-multidispatch-convert-ambig-dest.stderr b/src/test/ui/traits/multidispatch-convert-ambig-dest.stderr
index 338c8cbf2e4..62f5f5aaa88 100644
--- a/src/test/ui/traits/traits-multidispatch-convert-ambig-dest.stderr
+++ b/src/test/ui/traits/multidispatch-convert-ambig-dest.stderr
@@ -1,5 +1,5 @@
 error[E0282]: type annotations needed
-  --> $DIR/traits-multidispatch-convert-ambig-dest.rs:26:5
+  --> $DIR/multidispatch-convert-ambig-dest.rs:26:5
    |
 LL |     test(22, std::default::Default::default());
    |     ^^^^ cannot infer type for type parameter `U` declared on the function `test`
diff --git a/src/test/ui/traits/traits-multidispatch-infer-convert-target.rs b/src/test/ui/traits/multidispatch-infer-convert-target.rs
index 626e1ae71bc..626e1ae71bc 100644
--- a/src/test/ui/traits/traits-multidispatch-infer-convert-target.rs
+++ b/src/test/ui/traits/multidispatch-infer-convert-target.rs
diff --git a/src/test/ui/traits/trait-object-auto-dedup-in-impl.rs b/src/test/ui/traits/object/auto-dedup-in-impl.rs
index 85698f19489..85698f19489 100644
--- a/src/test/ui/traits/trait-object-auto-dedup-in-impl.rs
+++ b/src/test/ui/traits/object/auto-dedup-in-impl.rs
diff --git a/src/test/ui/traits/trait-object-auto-dedup-in-impl.stderr b/src/test/ui/traits/object/auto-dedup-in-impl.stderr
index d10e58629cc..5f13c781341 100644
--- a/src/test/ui/traits/trait-object-auto-dedup-in-impl.stderr
+++ b/src/test/ui/traits/object/auto-dedup-in-impl.stderr
@@ -1,5 +1,5 @@
 error[E0592]: duplicate definitions with name `test`
-  --> $DIR/trait-object-auto-dedup-in-impl.rs:14:5
+  --> $DIR/auto-dedup-in-impl.rs:14:5
    |
 LL |     fn test(&self) { println!("one"); }
    |     ^^^^^^^^^^^^^^ duplicate definitions for `test`
diff --git a/src/test/ui/traits/trait-object-auto-dedup.rs b/src/test/ui/traits/object/auto-dedup.rs
index 39d25eb7fe0..39d25eb7fe0 100644
--- a/src/test/ui/traits/trait-object-auto-dedup.rs
+++ b/src/test/ui/traits/object/auto-dedup.rs
diff --git a/src/test/ui/traits/trait-object-bounds-cycle-1.rs b/src/test/ui/traits/object/bounds-cycle-1.rs
index 3146764927c..3146764927c 100644
--- a/src/test/ui/traits/trait-object-bounds-cycle-1.rs
+++ b/src/test/ui/traits/object/bounds-cycle-1.rs
diff --git a/src/test/ui/traits/trait-object-bounds-cycle-2.rs b/src/test/ui/traits/object/bounds-cycle-2.rs
index 4c1df38058d..4c1df38058d 100644
--- a/src/test/ui/traits/trait-object-bounds-cycle-2.rs
+++ b/src/test/ui/traits/object/bounds-cycle-2.rs
diff --git a/src/test/ui/traits/trait-object-bounds-cycle-3.rs b/src/test/ui/traits/object/bounds-cycle-3.rs
index 55726a5ae45..55726a5ae45 100644
--- a/src/test/ui/traits/trait-object-bounds-cycle-3.rs
+++ b/src/test/ui/traits/object/bounds-cycle-3.rs
diff --git a/src/test/ui/traits/trait-object-bounds-cycle-4.rs b/src/test/ui/traits/object/bounds-cycle-4.rs
index f83cb75c7f2..f83cb75c7f2 100644
--- a/src/test/ui/traits/trait-object-bounds-cycle-4.rs
+++ b/src/test/ui/traits/object/bounds-cycle-4.rs
diff --git a/src/test/ui/traits/trait-object-exclusion.rs b/src/test/ui/traits/object/exclusion.rs
index 0b8b0e2f5ef..0b8b0e2f5ef 100644
--- a/src/test/ui/traits/trait-object-exclusion.rs
+++ b/src/test/ui/traits/object/exclusion.rs
diff --git a/src/test/ui/traits/trait-object-generics.rs b/src/test/ui/traits/object/generics.rs
index c18754302b7..c18754302b7 100644
--- a/src/test/ui/traits/trait-object-generics.rs
+++ b/src/test/ui/traits/object/generics.rs
diff --git a/src/test/ui/traits/trait-object-lifetime-first.rs b/src/test/ui/traits/object/lifetime-first.rs
index 33757cb7c0a..33757cb7c0a 100644
--- a/src/test/ui/traits/trait-object-lifetime-first.rs
+++ b/src/test/ui/traits/object/lifetime-first.rs
diff --git a/src/test/ui/traits/trait-object-macro-matcher.rs b/src/test/ui/traits/object/macro-matcher.rs
index 91097874997..91097874997 100644
--- a/src/test/ui/traits/trait-object-macro-matcher.rs
+++ b/src/test/ui/traits/object/macro-matcher.rs
diff --git a/src/test/ui/traits/trait-object-macro-matcher.stderr b/src/test/ui/traits/object/macro-matcher.stderr
index 335eeb8f151..6d1e236c048 100644
--- a/src/test/ui/traits/trait-object-macro-matcher.stderr
+++ b/src/test/ui/traits/object/macro-matcher.stderr
@@ -1,11 +1,11 @@
 error[E0224]: at least one trait is required for an object type
-  --> $DIR/trait-object-macro-matcher.rs:11:8
+  --> $DIR/macro-matcher.rs:11:8
    |
 LL |     m!(dyn 'static +);
    |        ^^^^^^^^^^^^^
 
 error[E0038]: the trait `Copy` cannot be made into an object
-  --> $DIR/trait-object-macro-matcher.rs:8:8
+  --> $DIR/macro-matcher.rs:8:8
    |
 LL |     m!(dyn Copy + Send + 'static);
    |        ^^^^^^^^^^^^^^^^^^^^^^^^^ `Copy` cannot be made into an object
diff --git a/src/test/ui/traits/trait-object-safety.rs b/src/test/ui/traits/object/safety.rs
index f43d332d696..f43d332d696 100644
--- a/src/test/ui/traits/trait-object-safety.rs
+++ b/src/test/ui/traits/object/safety.rs
diff --git a/src/test/ui/traits/trait-object-safety.stderr b/src/test/ui/traits/object/safety.stderr
index 16f60962cc1..6784689072e 100644
--- a/src/test/ui/traits/trait-object-safety.stderr
+++ b/src/test/ui/traits/object/safety.stderr
@@ -1,11 +1,11 @@
 error[E0038]: the trait `Tr` cannot be made into an object
-  --> $DIR/trait-object-safety.rs:15:22
+  --> $DIR/safety.rs:15:22
    |
 LL |     let _: &dyn Tr = &St;
    |                      ^^^ `Tr` cannot be made into an object
    |
 note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/trait-object-safety.rs:4:8
+  --> $DIR/safety.rs:4:8
    |
 LL | trait Tr {
    |       -- this trait cannot be made into an object...
@@ -23,13 +23,13 @@ LL |     fn foo() where Self: Sized;
    |              ^^^^^^^^^^^^^^^^^
 
 error[E0038]: the trait `Tr` cannot be made into an object
-  --> $DIR/trait-object-safety.rs:15:12
+  --> $DIR/safety.rs:15:12
    |
 LL |     let _: &dyn Tr = &St;
    |            ^^^^^^^ `Tr` cannot be made into an object
    |
 note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/trait-object-safety.rs:4:8
+  --> $DIR/safety.rs:4:8
    |
 LL | trait Tr {
    |       -- this trait cannot be made into an object...
diff --git a/src/test/ui/traits/trait-object-supertrait-lifetime-bound.rs b/src/test/ui/traits/object/supertrait-lifetime-bound.rs
index 9d834727a4a..9d834727a4a 100644
--- a/src/test/ui/traits/trait-object-supertrait-lifetime-bound.rs
+++ b/src/test/ui/traits/object/supertrait-lifetime-bound.rs
diff --git a/src/test/ui/traits/trait-object-vs-lifetime-2.rs b/src/test/ui/traits/object/vs-lifetime-2.rs
index 0b33dc7f69a..0b33dc7f69a 100644
--- a/src/test/ui/traits/trait-object-vs-lifetime-2.rs
+++ b/src/test/ui/traits/object/vs-lifetime-2.rs
diff --git a/src/test/ui/traits/trait-object-vs-lifetime-2.stderr b/src/test/ui/traits/object/vs-lifetime-2.stderr
index 28b8e11f133..9b8e793dfd2 100644
--- a/src/test/ui/traits/trait-object-vs-lifetime-2.stderr
+++ b/src/test/ui/traits/object/vs-lifetime-2.stderr
@@ -1,5 +1,5 @@
 error[E0224]: at least one trait is required for an object type
-  --> $DIR/trait-object-vs-lifetime-2.rs:7:5
+  --> $DIR/vs-lifetime-2.rs:7:5
    |
 LL |     dyn 'static +: 'static + Copy,
    |     ^^^^^^^^^^^^^
diff --git a/src/test/ui/traits/trait-object-vs-lifetime.rs b/src/test/ui/traits/object/vs-lifetime.rs
index e49d276a55a..e49d276a55a 100644
--- a/src/test/ui/traits/trait-object-vs-lifetime.rs
+++ b/src/test/ui/traits/object/vs-lifetime.rs
diff --git a/src/test/ui/traits/trait-object-vs-lifetime.stderr b/src/test/ui/traits/object/vs-lifetime.stderr
index 620c816d6d9..6673472e4a9 100644
--- a/src/test/ui/traits/trait-object-vs-lifetime.stderr
+++ b/src/test/ui/traits/object/vs-lifetime.stderr
@@ -1,11 +1,11 @@
 error[E0224]: at least one trait is required for an object type
-  --> $DIR/trait-object-vs-lifetime.rs:9:23
+  --> $DIR/vs-lifetime.rs:9:23
    |
 LL |     let _: S<'static, dyn 'static +>;
    |                       ^^^^^^^^^^^^^
 
 error[E0107]: this struct takes 1 lifetime argument but 2 lifetime arguments were supplied
-  --> $DIR/trait-object-vs-lifetime.rs:11:12
+  --> $DIR/vs-lifetime.rs:11:12
    |
 LL |     let _: S<'static, 'static>;
    |            ^        --------- help: remove this lifetime argument
@@ -13,19 +13,19 @@ LL |     let _: S<'static, 'static>;
    |            expected 1 lifetime argument
    |
 note: struct defined here, with 1 lifetime parameter: `'a`
-  --> $DIR/trait-object-vs-lifetime.rs:4:8
+  --> $DIR/vs-lifetime.rs:4:8
    |
 LL | struct S<'a, T>(&'a u8, T);
    |        ^ --
 
 error[E0107]: this struct takes 1 type argument but 0 type arguments were supplied
-  --> $DIR/trait-object-vs-lifetime.rs:11:12
+  --> $DIR/vs-lifetime.rs:11:12
    |
 LL |     let _: S<'static, 'static>;
    |            ^ expected 1 type argument
    |
 note: struct defined here, with 1 type parameter: `T`
-  --> $DIR/trait-object-vs-lifetime.rs:4:8
+  --> $DIR/vs-lifetime.rs:4:8
    |
 LL | struct S<'a, T>(&'a u8, T);
    |        ^     -
@@ -35,13 +35,13 @@ LL |     let _: S<'static, 'static, T>;
    |                              ^^^
 
 error[E0224]: at least one trait is required for an object type
-  --> $DIR/trait-object-vs-lifetime.rs:14:14
+  --> $DIR/vs-lifetime.rs:14:14
    |
 LL |     let _: S<dyn 'static +, 'static>;
    |              ^^^^^^^^^^^^^
 
 error[E0747]: type provided when a lifetime was expected
-  --> $DIR/trait-object-vs-lifetime.rs:14:14
+  --> $DIR/vs-lifetime.rs:14:14
    |
 LL |     let _: S<dyn 'static +, 'static>;
    |              ^^^^^^^^^^^^^
diff --git a/src/test/ui/traits/trait-object-with-lifetime-bound.rs b/src/test/ui/traits/object/with-lifetime-bound.rs
index 05aab5e3b08..05aab5e3b08 100644
--- a/src/test/ui/traits/trait-object-with-lifetime-bound.rs
+++ b/src/test/ui/traits/object/with-lifetime-bound.rs
diff --git a/src/test/ui/traits/trait-object-with-self-in-projection-output-bad.rs b/src/test/ui/traits/object/with-self-in-projection-output-bad.rs
index f34fa80a0ce..f34fa80a0ce 100644
--- a/src/test/ui/traits/trait-object-with-self-in-projection-output-bad.rs
+++ b/src/test/ui/traits/object/with-self-in-projection-output-bad.rs
diff --git a/src/test/ui/traits/trait-object-with-self-in-projection-output-bad.stderr b/src/test/ui/traits/object/with-self-in-projection-output-bad.stderr
index 79eb27e101a..45978a84068 100644
--- a/src/test/ui/traits/trait-object-with-self-in-projection-output-bad.stderr
+++ b/src/test/ui/traits/object/with-self-in-projection-output-bad.stderr
@@ -1,5 +1,5 @@
 error[E0191]: the value of the associated type `Output` (from trait `Base`) must be specified
-  --> $DIR/trait-object-with-self-in-projection-output-bad.rs:45:21
+  --> $DIR/with-self-in-projection-output-bad.rs:45:21
    |
 LL |     type Output;
    |     ------------ `Output` defined here
@@ -8,7 +8,7 @@ LL |     let _x: Box<dyn Helper<Target=i32>> = Box::new(2u32);
    |                     ^^^^^^^^^^^^^^^^^^ help: specify the associated type: `Helper<Target=i32, Output = Type>`
 
 error[E0191]: the value of the associated type `Output` (from trait `Base`) must be specified
-  --> $DIR/trait-object-with-self-in-projection-output-bad.rs:48:21
+  --> $DIR/with-self-in-projection-output-bad.rs:48:21
    |
 LL |     type Output;
    |     ------------ `Output` defined here
diff --git a/src/test/ui/traits/trait-object-with-self-in-projection-output-good.rs b/src/test/ui/traits/object/with-self-in-projection-output-good.rs
index d1b7bf6c2d7..d1b7bf6c2d7 100644
--- a/src/test/ui/traits/trait-object-with-self-in-projection-output-good.rs
+++ b/src/test/ui/traits/object/with-self-in-projection-output-good.rs
diff --git a/src/test/ui/traits/trait-object-with-self-in-projection-output-repeated-supertrait.rs b/src/test/ui/traits/object/with-self-in-projection-output-repeated-supertrait.rs
index 39e817168f6..39e817168f6 100644
--- a/src/test/ui/traits/trait-object-with-self-in-projection-output-repeated-supertrait.rs
+++ b/src/test/ui/traits/object/with-self-in-projection-output-repeated-supertrait.rs
diff --git a/src/test/ui/traits/trait-param-without-lifetime-constraint.rs b/src/test/ui/traits/param-without-lifetime-constraint.rs
index a79b74dcdde..a79b74dcdde 100644
--- a/src/test/ui/traits/trait-param-without-lifetime-constraint.rs
+++ b/src/test/ui/traits/param-without-lifetime-constraint.rs
diff --git a/src/test/ui/traits/trait-param-without-lifetime-constraint.stderr b/src/test/ui/traits/param-without-lifetime-constraint.stderr
index 4942dbe480b..763fb5186cc 100644
--- a/src/test/ui/traits/trait-param-without-lifetime-constraint.stderr
+++ b/src/test/ui/traits/param-without-lifetime-constraint.stderr
@@ -1,5 +1,5 @@
 error: `impl` item signature doesn't match `trait` item signature
-  --> $DIR/trait-param-without-lifetime-constraint.rs:14:5
+  --> $DIR/param-without-lifetime-constraint.rs:14:5
    |
 LL |     fn get_relation(&self) -> To;
    |     ----------------------------- expected `fn(&Article) -> &ProofReader`
@@ -10,7 +10,7 @@ LL |     fn get_relation(&self) -> &ProofReader {
    = note: expected `fn(&Article) -> &ProofReader`
               found `fn(&Article) -> &ProofReader`
 help: the lifetime requirements from the `impl` do not correspond to the requirements in the `trait`
-  --> $DIR/trait-param-without-lifetime-constraint.rs:10:31
+  --> $DIR/param-without-lifetime-constraint.rs:10:31
    |
 LL |     fn get_relation(&self) -> To;
    |                               ^^ consider borrowing this type parameter in the trait
diff --git a/src/test/ui/traits/parameterized-trait-with-bounds.rs b/src/test/ui/traits/parameterized-with-bounds.rs
index 832d4f6c89f..832d4f6c89f 100644
--- a/src/test/ui/traits/parameterized-trait-with-bounds.rs
+++ b/src/test/ui/traits/parameterized-with-bounds.rs
diff --git a/src/test/ui/traits/principal-less-trait-objects.rs b/src/test/ui/traits/principal-less-objects.rs
index 82c76eb693a..82c76eb693a 100644
--- a/src/test/ui/traits/principal-less-trait-objects.rs
+++ b/src/test/ui/traits/principal-less-objects.rs
diff --git a/src/test/ui/traits/trait-privacy.rs b/src/test/ui/traits/privacy.rs
index 17a2e05e99f..17a2e05e99f 100644
--- a/src/test/ui/traits/trait-privacy.rs
+++ b/src/test/ui/traits/privacy.rs
diff --git a/src/test/ui/traits/trait-region-pointer-simple.rs b/src/test/ui/traits/region-pointer-simple.rs
index 0456ca93115..0456ca93115 100644
--- a/src/test/ui/traits/trait-region-pointer-simple.rs
+++ b/src/test/ui/traits/region-pointer-simple.rs
diff --git a/src/test/ui/traits/reservation-impls/reservation-impl-coherence-conflict.rs b/src/test/ui/traits/reservation-impl/coherence-conflict.rs
index fa4a309315b..fa4a309315b 100644
--- a/src/test/ui/traits/reservation-impls/reservation-impl-coherence-conflict.rs
+++ b/src/test/ui/traits/reservation-impl/coherence-conflict.rs
diff --git a/src/test/ui/traits/reservation-impls/reservation-impl-coherence-conflict.stderr b/src/test/ui/traits/reservation-impl/coherence-conflict.stderr
index d76d3a91c8d..1a227a85c06 100644
--- a/src/test/ui/traits/reservation-impls/reservation-impl-coherence-conflict.stderr
+++ b/src/test/ui/traits/reservation-impl/coherence-conflict.stderr
@@ -1,5 +1,5 @@
 error[E0119]: conflicting implementations of trait `OtherTrait` for type `()`:
-  --> $DIR/reservation-impl-coherence-conflict.rs:11:1
+  --> $DIR/coherence-conflict.rs:11:1
    |
 LL | impl OtherTrait for () {}
    | ---------------------- first implementation here
diff --git a/src/test/ui/traits/reservation-impls/reservation-impl-no-use.rs b/src/test/ui/traits/reservation-impl/no-use.rs
index 65a55d9e209..65a55d9e209 100644
--- a/src/test/ui/traits/reservation-impls/reservation-impl-no-use.rs
+++ b/src/test/ui/traits/reservation-impl/no-use.rs
diff --git a/src/test/ui/traits/reservation-impls/reservation-impl-no-use.stderr b/src/test/ui/traits/reservation-impl/no-use.stderr
index 794faff8848..fb4a443435f 100644
--- a/src/test/ui/traits/reservation-impls/reservation-impl-no-use.stderr
+++ b/src/test/ui/traits/reservation-impl/no-use.stderr
@@ -1,5 +1,5 @@
 error[E0277]: the trait bound `(): MyTrait` is not satisfied
-  --> $DIR/reservation-impl-no-use.rs:10:26
+  --> $DIR/no-use.rs:10:26
    |
 LL | trait MyTrait { fn foo(&self); }
    |                 -------------- required by `MyTrait::foo`
diff --git a/src/test/ui/traits/reservation-impls/reservation-impl-non-lattice-ok.rs b/src/test/ui/traits/reservation-impl/non-lattice-ok.rs
index f14589ccf84..f14589ccf84 100644
--- a/src/test/ui/traits/reservation-impls/reservation-impl-non-lattice-ok.rs
+++ b/src/test/ui/traits/reservation-impl/non-lattice-ok.rs
diff --git a/src/test/ui/traits/reservation-impls/reservation-impl-ok.rs b/src/test/ui/traits/reservation-impl/ok.rs
index 611c8d88413..611c8d88413 100644
--- a/src/test/ui/traits/reservation-impls/reservation-impl-ok.rs
+++ b/src/test/ui/traits/reservation-impl/ok.rs
diff --git a/src/test/ui/traits/trait-resolution-in-overloaded-op.rs b/src/test/ui/traits/resolution-in-overloaded-op.rs
index a9bacc357bc..a9bacc357bc 100644
--- a/src/test/ui/traits/trait-resolution-in-overloaded-op.rs
+++ b/src/test/ui/traits/resolution-in-overloaded-op.rs
diff --git a/src/test/ui/traits/trait-resolution-in-overloaded-op.stderr b/src/test/ui/traits/resolution-in-overloaded-op.stderr
index ada76cd8b77..6a641ed214d 100644
--- a/src/test/ui/traits/trait-resolution-in-overloaded-op.stderr
+++ b/src/test/ui/traits/resolution-in-overloaded-op.stderr
@@ -1,5 +1,5 @@
 error[E0369]: cannot multiply `&T` by `f64`
-  --> $DIR/trait-resolution-in-overloaded-op.rs:8:7
+  --> $DIR/resolution-in-overloaded-op.rs:8:7
    |
 LL |     a * b
    |     - ^ - f64
diff --git a/src/test/ui/traits/trait-safety-fn-body.rs b/src/test/ui/traits/safety-fn-body.rs
index df527747305..df527747305 100644
--- a/src/test/ui/traits/trait-safety-fn-body.rs
+++ b/src/test/ui/traits/safety-fn-body.rs
diff --git a/src/test/ui/traits/trait-safety-fn-body.stderr b/src/test/ui/traits/safety-fn-body.stderr
index a27cd869da5..4f784a020d9 100644
--- a/src/test/ui/traits/trait-safety-fn-body.stderr
+++ b/src/test/ui/traits/safety-fn-body.stderr
@@ -1,5 +1,5 @@
 error[E0133]: dereference of raw pointer is unsafe and requires unsafe function or block
-  --> $DIR/trait-safety-fn-body.rs:11:9
+  --> $DIR/safety-fn-body.rs:11:9
    |
 LL |         *self += 1;
    |         ^^^^^^^^^^ dereference of raw pointer
diff --git a/src/test/ui/traits/trait-safety-inherent-impl.rs b/src/test/ui/traits/safety-inherent-impl.rs
index 50e15f0d25f..50e15f0d25f 100644
--- a/src/test/ui/traits/trait-safety-inherent-impl.rs
+++ b/src/test/ui/traits/safety-inherent-impl.rs
diff --git a/src/test/ui/traits/trait-safety-inherent-impl.stderr b/src/test/ui/traits/safety-inherent-impl.stderr
index 0738d2973e2..1c8f43feca4 100644
--- a/src/test/ui/traits/trait-safety-inherent-impl.stderr
+++ b/src/test/ui/traits/safety-inherent-impl.stderr
@@ -1,5 +1,5 @@
 error[E0197]: inherent impls cannot be unsafe
-  --> $DIR/trait-safety-inherent-impl.rs:5:13
+  --> $DIR/safety-inherent-impl.rs:5:13
    |
 LL | unsafe impl SomeStruct {
    | ------      ^^^^^^^^^^ inherent impl for this type
diff --git a/src/test/ui/traits/trait-safety-ok-cc.rs b/src/test/ui/traits/safety-ok-cc.rs
index 099ba80e5b5..099ba80e5b5 100644
--- a/src/test/ui/traits/trait-safety-ok-cc.rs
+++ b/src/test/ui/traits/safety-ok-cc.rs
diff --git a/src/test/ui/traits/trait-safety-ok.rs b/src/test/ui/traits/safety-ok.rs
index d456a78b64d..d456a78b64d 100644
--- a/src/test/ui/traits/trait-safety-ok.rs
+++ b/src/test/ui/traits/safety-ok.rs
diff --git a/src/test/ui/traits/trait-safety-trait-impl-cc.rs b/src/test/ui/traits/safety-trait-impl-cc.rs
index 6f125e5f950..6f125e5f950 100644
--- a/src/test/ui/traits/trait-safety-trait-impl-cc.rs
+++ b/src/test/ui/traits/safety-trait-impl-cc.rs
diff --git a/src/test/ui/traits/trait-safety-trait-impl-cc.stderr b/src/test/ui/traits/safety-trait-impl-cc.stderr
index 2fcedc5cc52..5a0f8d3b8ca 100644
--- a/src/test/ui/traits/trait-safety-trait-impl-cc.stderr
+++ b/src/test/ui/traits/safety-trait-impl-cc.stderr
@@ -1,5 +1,5 @@
 error[E0200]: the trait `Foo` requires an `unsafe impl` declaration
-  --> $DIR/trait-safety-trait-impl-cc.rs:9:1
+  --> $DIR/safety-trait-impl-cc.rs:9:1
    |
 LL | / impl lib::Foo for Bar {
 LL | |     fn foo(&self) -> isize {
diff --git a/src/test/ui/traits/trait-safety-trait-impl.rs b/src/test/ui/traits/safety-trait-impl.rs
index 45258b78d01..45258b78d01 100644
--- a/src/test/ui/traits/trait-safety-trait-impl.rs
+++ b/src/test/ui/traits/safety-trait-impl.rs
diff --git a/src/test/ui/traits/trait-safety-trait-impl.stderr b/src/test/ui/traits/safety-trait-impl.stderr
index 5b29fd12ab5..fc0f6c69308 100644
--- a/src/test/ui/traits/trait-safety-trait-impl.stderr
+++ b/src/test/ui/traits/safety-trait-impl.stderr
@@ -1,11 +1,11 @@
 error[E0200]: the trait `UnsafeTrait` requires an `unsafe impl` declaration
-  --> $DIR/trait-safety-trait-impl.rs:14:1
+  --> $DIR/safety-trait-impl.rs:14:1
    |
 LL | impl UnsafeTrait for u16 { }
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0199]: implementing the trait `SafeTrait` is not unsafe
-  --> $DIR/trait-safety-trait-impl.rs:16:1
+  --> $DIR/safety-trait-impl.rs:16:1
    |
 LL | unsafe impl SafeTrait for u32 { }
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/src/test/ui/traits/trait-static-method-generic-inference.rs b/src/test/ui/traits/static-method-generic-inference.rs
index 759416d1901..759416d1901 100644
--- a/src/test/ui/traits/trait-static-method-generic-inference.rs
+++ b/src/test/ui/traits/static-method-generic-inference.rs
diff --git a/src/test/ui/traits/trait-static-method-generic-inference.stderr b/src/test/ui/traits/static-method-generic-inference.stderr
index 6a7e8f59d87..2b9ce7321ee 100644
--- a/src/test/ui/traits/trait-static-method-generic-inference.stderr
+++ b/src/test/ui/traits/static-method-generic-inference.stderr
@@ -1,5 +1,5 @@
 error[E0283]: type annotations needed
-  --> $DIR/trait-static-method-generic-inference.rs:24:25
+  --> $DIR/static-method-generic-inference.rs:24:25
    |
 LL |         fn new() -> T;
    |         -------------- required by `HasNew::new`
diff --git a/src/test/ui/traits/trait-static-method-overwriting.rs b/src/test/ui/traits/static-method-overwriting.rs
index f669ffae6bb..f669ffae6bb 100644
--- a/src/test/ui/traits/trait-static-method-overwriting.rs
+++ b/src/test/ui/traits/static-method-overwriting.rs
diff --git a/src/test/ui/traits/traits-static-outlives-a-where-clause.rs b/src/test/ui/traits/static-outlives-a-where-clause.rs
index f0c2c1082b0..f0c2c1082b0 100644
--- a/src/test/ui/traits/traits-static-outlives-a-where-clause.rs
+++ b/src/test/ui/traits/static-outlives-a-where-clause.rs
diff --git a/src/test/ui/traits/trait-suggest-deferences-issue-39029.fixed b/src/test/ui/traits/suggest-deferences/issue-39029.fixed
index a1abf668b8b..a1abf668b8b 100644
--- a/src/test/ui/traits/trait-suggest-deferences-issue-39029.fixed
+++ b/src/test/ui/traits/suggest-deferences/issue-39029.fixed
diff --git a/src/test/ui/traits/trait-suggest-deferences-issue-39029.rs b/src/test/ui/traits/suggest-deferences/issue-39029.rs
index 90d097105ed..90d097105ed 100644
--- a/src/test/ui/traits/trait-suggest-deferences-issue-39029.rs
+++ b/src/test/ui/traits/suggest-deferences/issue-39029.rs
diff --git a/src/test/ui/traits/trait-suggest-deferences-issue-39029.stderr b/src/test/ui/traits/suggest-deferences/issue-39029.stderr
index 4273b8e3f3e..1005231d396 100644
--- a/src/test/ui/traits/trait-suggest-deferences-issue-39029.stderr
+++ b/src/test/ui/traits/suggest-deferences/issue-39029.stderr
@@ -1,5 +1,5 @@
 error[E0277]: the trait bound `NoToSocketAddrs: ToSocketAddrs` is not satisfied
-  --> $DIR/trait-suggest-deferences-issue-39029.rs:16:37
+  --> $DIR/issue-39029.rs:16:37
    |
 LL |     let _errors = TcpListener::bind(&bad);
    |                                     ^^^^
diff --git a/src/test/ui/traits/trait-suggest-deferences-issue-62530.fixed b/src/test/ui/traits/suggest-deferences/issue-62530.fixed
index 406caaa007f..406caaa007f 100644
--- a/src/test/ui/traits/trait-suggest-deferences-issue-62530.fixed
+++ b/src/test/ui/traits/suggest-deferences/issue-62530.fixed
diff --git a/src/test/ui/traits/trait-suggest-deferences-issue-62530.rs b/src/test/ui/traits/suggest-deferences/issue-62530.rs
index 53846be7306..53846be7306 100644
--- a/src/test/ui/traits/trait-suggest-deferences-issue-62530.rs
+++ b/src/test/ui/traits/suggest-deferences/issue-62530.rs
diff --git a/src/test/ui/traits/trait-suggest-deferences-issue-62530.stderr b/src/test/ui/traits/suggest-deferences/issue-62530.stderr
index eaec87d01da..4f1165b17c5 100644
--- a/src/test/ui/traits/trait-suggest-deferences-issue-62530.stderr
+++ b/src/test/ui/traits/suggest-deferences/issue-62530.stderr
@@ -1,5 +1,5 @@
 error[E0277]: the trait bound `&String: SomeTrait` is not satisfied
-  --> $DIR/trait-suggest-deferences-issue-62530.rs:13:26
+  --> $DIR/issue-62530.rs:13:26
    |
 LL | fn takes_type_parameter<T>(_x: T) where T: SomeTrait {}
    |                                            --------- required by this bound in `takes_type_parameter`
diff --git a/src/test/ui/traits/trait-suggest-deferences-multiple-0.fixed b/src/test/ui/traits/suggest-deferences/multiple-0.fixed
index b7160b75c60..b7160b75c60 100644
--- a/src/test/ui/traits/trait-suggest-deferences-multiple-0.fixed
+++ b/src/test/ui/traits/suggest-deferences/multiple-0.fixed
diff --git a/src/test/ui/traits/trait-suggest-deferences-multiple-0.rs b/src/test/ui/traits/suggest-deferences/multiple-0.rs
index 9ac55177ffa..9ac55177ffa 100644
--- a/src/test/ui/traits/trait-suggest-deferences-multiple-0.rs
+++ b/src/test/ui/traits/suggest-deferences/multiple-0.rs
diff --git a/src/test/ui/traits/trait-suggest-deferences-multiple-0.stderr b/src/test/ui/traits/suggest-deferences/multiple-0.stderr
index add34a553bc..f76c73cbb63 100644
--- a/src/test/ui/traits/trait-suggest-deferences-multiple-0.stderr
+++ b/src/test/ui/traits/suggest-deferences/multiple-0.stderr
@@ -1,5 +1,5 @@
 error[E0277]: the trait bound `&Baz: Happy` is not satisfied
-  --> $DIR/trait-suggest-deferences-multiple-0.rs:34:9
+  --> $DIR/multiple-0.rs:34:9
    |
 LL | fn foo<T>(_: T) where T: Happy {}
    |                          ----- required by this bound in `foo`
diff --git a/src/test/ui/traits/trait-suggest-deferences-multiple-1.rs b/src/test/ui/traits/suggest-deferences/multiple-1.rs
index 91c6c7924a4..91c6c7924a4 100644
--- a/src/test/ui/traits/trait-suggest-deferences-multiple-1.rs
+++ b/src/test/ui/traits/suggest-deferences/multiple-1.rs
diff --git a/src/test/ui/traits/trait-suggest-deferences-multiple-1.stderr b/src/test/ui/traits/suggest-deferences/multiple-1.stderr
index e90278fa16f..f98cc54227f 100644
--- a/src/test/ui/traits/trait-suggest-deferences-multiple-1.stderr
+++ b/src/test/ui/traits/suggest-deferences/multiple-1.stderr
@@ -1,5 +1,5 @@
 error[E0277]: the trait bound `&mut Baz: Happy` is not satisfied
-  --> $DIR/trait-suggest-deferences-multiple-1.rs:52:9
+  --> $DIR/multiple-1.rs:52:9
    |
 LL | fn foo<T>(_: T) where T: Happy {}
    |                          ----- required by this bound in `foo`
diff --git a/src/test/ui/traits/trait-suggest-where-clause.rs b/src/test/ui/traits/suggest-where-clause.rs
index 46d047a2de3..46d047a2de3 100644
--- a/src/test/ui/traits/trait-suggest-where-clause.rs
+++ b/src/test/ui/traits/suggest-where-clause.rs
diff --git a/src/test/ui/traits/trait-suggest-where-clause.stderr b/src/test/ui/traits/suggest-where-clause.stderr
index 0f6f8d75c5e..b50017afa4d 100644
--- a/src/test/ui/traits/trait-suggest-where-clause.stderr
+++ b/src/test/ui/traits/suggest-where-clause.stderr
@@ -1,5 +1,5 @@
 error[E0277]: the size for values of type `U` cannot be known at compilation time
-  --> $DIR/trait-suggest-where-clause.rs:7:20
+  --> $DIR/suggest-where-clause.rs:7:20
    |
 LL | fn check<T: Iterator, U: ?Sized>() {
    |                       - this type parameter needs to be `Sized`
@@ -13,7 +13,7 @@ LL | pub const fn size_of<T>() -> usize {
    |                      - required by this bound in `std::mem::size_of`
 
 error[E0277]: the size for values of type `U` cannot be known at compilation time
-  --> $DIR/trait-suggest-where-clause.rs:10:5
+  --> $DIR/suggest-where-clause.rs:10:5
    |
 LL | fn check<T: Iterator, U: ?Sized>() {
    |                       - this type parameter needs to be `Sized`
@@ -29,7 +29,7 @@ LL | pub const fn size_of<T>() -> usize {
    = note: required because it appears within the type `Misc<U>`
 
 error[E0277]: the trait bound `u64: From<T>` is not satisfied
-  --> $DIR/trait-suggest-where-clause.rs:15:5
+  --> $DIR/suggest-where-clause.rs:15:5
    |
 LL |     <u64 as From<T>>::from;
    |     ^^^^^^^^^^^^^^^^^^^^^^ the trait `From<T>` is not implemented for `u64`
@@ -37,7 +37,7 @@ LL |     <u64 as From<T>>::from;
    = note: required by `from`
 
 error[E0277]: the trait bound `u64: From<<T as Iterator>::Item>` is not satisfied
-  --> $DIR/trait-suggest-where-clause.rs:18:5
+  --> $DIR/suggest-where-clause.rs:18:5
    |
 LL |     <u64 as From<<T as Iterator>::Item>>::from;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `From<<T as Iterator>::Item>` is not implemented for `u64`
@@ -45,7 +45,7 @@ LL |     <u64 as From<<T as Iterator>::Item>>::from;
    = note: required by `from`
 
 error[E0277]: the trait bound `Misc<_>: From<T>` is not satisfied
-  --> $DIR/trait-suggest-where-clause.rs:23:5
+  --> $DIR/suggest-where-clause.rs:23:5
    |
 LL |     <Misc<_> as From<T>>::from;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `From<T>` is not implemented for `Misc<_>`
@@ -53,7 +53,7 @@ LL |     <Misc<_> as From<T>>::from;
    = note: required by `from`
 
 error[E0277]: the size for values of type `[T]` cannot be known at compilation time
-  --> $DIR/trait-suggest-where-clause.rs:28:20
+  --> $DIR/suggest-where-clause.rs:28:20
    |
 LL |     mem::size_of::<[T]>();
    |                    ^^^ doesn't have a size known at compile-time
@@ -66,7 +66,7 @@ LL | pub const fn size_of<T>() -> usize {
    = help: the trait `Sized` is not implemented for `[T]`
 
 error[E0277]: the size for values of type `[&U]` cannot be known at compilation time
-  --> $DIR/trait-suggest-where-clause.rs:31:5
+  --> $DIR/suggest-where-clause.rs:31:5
    |
 LL |     mem::size_of::<[&U]>();
    |     ^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
diff --git a/src/test/ui/traits/supertrait-default-generics.rs b/src/test/ui/traits/superdefault-generics.rs
index e862c0e976b..e862c0e976b 100644
--- a/src/test/ui/traits/supertrait-default-generics.rs
+++ b/src/test/ui/traits/superdefault-generics.rs
diff --git a/src/test/ui/traits/syntax-trait-polarity.rs b/src/test/ui/traits/syntax-polarity.rs
index c809f9e89f9..c809f9e89f9 100644
--- a/src/test/ui/traits/syntax-trait-polarity.rs
+++ b/src/test/ui/traits/syntax-polarity.rs
diff --git a/src/test/ui/traits/trait-test-2.rs b/src/test/ui/traits/test-2.rs
index a33773144c2..a33773144c2 100644
--- a/src/test/ui/traits/trait-test-2.rs
+++ b/src/test/ui/traits/test-2.rs
diff --git a/src/test/ui/traits/trait-test-2.stderr b/src/test/ui/traits/test-2.stderr
index a38d3387c8d..12b55c3a4fd 100644
--- a/src/test/ui/traits/trait-test-2.stderr
+++ b/src/test/ui/traits/test-2.stderr
@@ -1,5 +1,5 @@
 error[E0107]: this associated function takes 0 type arguments but 1 type argument was supplied
-  --> $DIR/trait-test-2.rs:9:8
+  --> $DIR/test-2.rs:9:8
    |
 LL |     10.dup::<i32>();
    |        ^^^------- help: remove these generics
@@ -7,13 +7,13 @@ LL |     10.dup::<i32>();
    |        expected 0 type arguments
    |
 note: associated function defined here, with 0 type parameters
-  --> $DIR/trait-test-2.rs:4:16
+  --> $DIR/test-2.rs:4:16
    |
 LL | trait bar { fn dup(&self) -> Self; fn blah<X>(&self); }
    |                ^^^
 
 error[E0107]: this associated function takes 1 type argument but 2 type arguments were supplied
-  --> $DIR/trait-test-2.rs:11:8
+  --> $DIR/test-2.rs:11:8
    |
 LL |     10.blah::<i32, i32>();
    |        ^^^^      ----- help: remove this type argument
@@ -21,13 +21,13 @@ LL |     10.blah::<i32, i32>();
    |        expected 1 type argument
    |
 note: associated function defined here, with 1 type parameter: `X`
-  --> $DIR/trait-test-2.rs:4:39
+  --> $DIR/test-2.rs:4:39
    |
 LL | trait bar { fn dup(&self) -> Self; fn blah<X>(&self); }
    |                                       ^^^^ -
 
 error[E0038]: the trait `bar` cannot be made into an object
-  --> $DIR/trait-test-2.rs:13:16
+  --> $DIR/test-2.rs:13:16
    |
 LL |     (box 10 as Box<dyn bar>).dup();
    |                ^^^^^^^^^^^^ `bar` cannot be made into an object
@@ -35,7 +35,7 @@ LL |     (box 10 as Box<dyn bar>).dup();
    = help: consider moving `dup` to another trait
    = help: consider moving `blah` to another trait
 note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/trait-test-2.rs:4:30
+  --> $DIR/test-2.rs:4:30
    |
 LL | trait bar { fn dup(&self) -> Self; fn blah<X>(&self); }
    |       ---                    ^^^^     ^^^^ ...because method `blah` has generic type parameters
@@ -44,7 +44,7 @@ LL | trait bar { fn dup(&self) -> Self; fn blah<X>(&self); }
    |       this trait cannot be made into an object...
 
 error[E0038]: the trait `bar` cannot be made into an object
-  --> $DIR/trait-test-2.rs:13:6
+  --> $DIR/test-2.rs:13:6
    |
 LL |     (box 10 as Box<dyn bar>).dup();
    |      ^^^^^^ `bar` cannot be made into an object
@@ -52,7 +52,7 @@ LL |     (box 10 as Box<dyn bar>).dup();
    = help: consider moving `dup` to another trait
    = help: consider moving `blah` to another trait
 note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/trait-test-2.rs:4:30
+  --> $DIR/test-2.rs:4:30
    |
 LL | trait bar { fn dup(&self) -> Self; fn blah<X>(&self); }
    |       ---                    ^^^^     ^^^^ ...because method `blah` has generic type parameters
diff --git a/src/test/ui/traits/trait-test.rs b/src/test/ui/traits/test.rs
index 72fc66f740b..72fc66f740b 100644
--- a/src/test/ui/traits/trait-test.rs
+++ b/src/test/ui/traits/test.rs
diff --git a/src/test/ui/traits/trait-test.stderr b/src/test/ui/traits/test.stderr
index f5e47e51526..668228abe09 100644
--- a/src/test/ui/traits/trait-test.stderr
+++ b/src/test/ui/traits/test.stderr
@@ -1,5 +1,5 @@
 error[E0404]: expected trait, found builtin type `isize`
-  --> $DIR/trait-test.rs:4:6
+  --> $DIR/test.rs:4:6
    |
 LL | impl isize for usize { fn foo(&self) {} }
    |      ^^^^^ not a trait
diff --git a/src/test/ui/traits/trait-to-str.rs b/src/test/ui/traits/to-str.rs
index 9670edbfa2b..9670edbfa2b 100644
--- a/src/test/ui/traits/trait-to-str.rs
+++ b/src/test/ui/traits/to-str.rs
diff --git a/src/test/ui/traits/trait-bounds-on-structs-and-enums-xc.rs b/src/test/ui/traits/trait-bounds-on-structs-and-enums-xc.rs
deleted file mode 100644
index 901a2c4391f..00000000000
--- a/src/test/ui/traits/trait-bounds-on-structs-and-enums-xc.rs
+++ /dev/null
@@ -1,14 +0,0 @@
-// aux-build:trait_bounds_on_structs_and_enums_xc.rs
-
-extern crate trait_bounds_on_structs_and_enums_xc;
-
-use trait_bounds_on_structs_and_enums_xc::{Bar, Foo, Trait};
-
-fn explode(x: Foo<usize>) {}
-//~^ ERROR E0277
-
-fn kaboom(y: Bar<f32>) {}
-//~^ ERROR E0277
-
-fn main() {
-}
diff --git a/src/test/ui/traits/trait-bounds-on-structs-and-enums-xc1.rs b/src/test/ui/traits/trait-bounds-on-structs-and-enums-xc1.rs
deleted file mode 100644
index 2a4ba9677ef..00000000000
--- a/src/test/ui/traits/trait-bounds-on-structs-and-enums-xc1.rs
+++ /dev/null
@@ -1,15 +0,0 @@
-// aux-build:trait_bounds_on_structs_and_enums_xc.rs
-
-extern crate trait_bounds_on_structs_and_enums_xc;
-
-use trait_bounds_on_structs_and_enums_xc::{Bar, Foo, Trait};
-
-fn main() {
-    let foo = Foo {
-    //~^ ERROR E0277
-        x: 3
-    };
-    let bar: Bar<f64> = return;
-    //~^ ERROR E0277
-    let _ = bar;
-}
diff --git a/src/test/ui/traits/ufcs-trait-object.rs b/src/test/ui/traits/ufcs-object.rs
index 700488c22d6..700488c22d6 100644
--- a/src/test/ui/traits/ufcs-trait-object.rs
+++ b/src/test/ui/traits/ufcs-object.rs
diff --git a/src/test/ui/traits/use-trait-before-def.rs b/src/test/ui/traits/use-before-def.rs
index 1ee2b941909..1ee2b941909 100644
--- a/src/test/ui/traits/use-trait-before-def.rs
+++ b/src/test/ui/traits/use-before-def.rs
diff --git a/src/test/ui/traits/wf-trait-object-maybe-bound.rs b/src/test/ui/traits/wf-object/maybe-bound.rs
index 17771e976ef..17771e976ef 100644
--- a/src/test/ui/traits/wf-trait-object-maybe-bound.rs
+++ b/src/test/ui/traits/wf-object/maybe-bound.rs
diff --git a/src/test/ui/traits/wf-trait-object-maybe-bound.stderr b/src/test/ui/traits/wf-object/maybe-bound.stderr
index 4a570efcb5d..2fe3f0fc39f 100644
--- a/src/test/ui/traits/wf-trait-object-maybe-bound.stderr
+++ b/src/test/ui/traits/wf-object/maybe-bound.stderr
@@ -1,29 +1,29 @@
 error: `?Trait` is not permitted in trait object types
-  --> $DIR/wf-trait-object-maybe-bound.rs:5:15
+  --> $DIR/maybe-bound.rs:5:15
    |
 LL | type _0 = dyn ?Sized + Foo;
    |               ^^^^^^
 
 error: `?Trait` is not permitted in trait object types
-  --> $DIR/wf-trait-object-maybe-bound.rs:8:21
+  --> $DIR/maybe-bound.rs:8:21
    |
 LL | type _1 = dyn Foo + ?Sized;
    |                     ^^^^^^
 
 error: `?Trait` is not permitted in trait object types
-  --> $DIR/wf-trait-object-maybe-bound.rs:11:21
+  --> $DIR/maybe-bound.rs:11:21
    |
 LL | type _2 = dyn Foo + ?Sized + ?Sized;
    |                     ^^^^^^
 
 error: `?Trait` is not permitted in trait object types
-  --> $DIR/wf-trait-object-maybe-bound.rs:11:30
+  --> $DIR/maybe-bound.rs:11:30
    |
 LL | type _2 = dyn Foo + ?Sized + ?Sized;
    |                              ^^^^^^
 
 error: `?Trait` is not permitted in trait object types
-  --> $DIR/wf-trait-object-maybe-bound.rs:15:15
+  --> $DIR/maybe-bound.rs:15:15
    |
 LL | type _3 = dyn ?Sized + Foo;
    |               ^^^^^^
diff --git a/src/test/ui/traits/wf-trait-object-no-duplicates.rs b/src/test/ui/traits/wf-object/no-duplicates.rs
index 678ede58296..678ede58296 100644
--- a/src/test/ui/traits/wf-trait-object-no-duplicates.rs
+++ b/src/test/ui/traits/wf-object/no-duplicates.rs
diff --git a/src/test/ui/traits/wf-trait-object-no-duplicates.stderr b/src/test/ui/traits/wf-object/no-duplicates.stderr
index ed5409d0159..b9506894f82 100644
--- a/src/test/ui/traits/wf-trait-object-no-duplicates.stderr
+++ b/src/test/ui/traits/wf-object/no-duplicates.stderr
@@ -1,5 +1,5 @@
 error[E0225]: only auto traits can be used as additional traits in a trait object
-  --> $DIR/wf-trait-object-no-duplicates.rs:8:21
+  --> $DIR/no-duplicates.rs:8:21
    |
 LL | type _0 = dyn Obj + Obj;
    |               ---   ^^^ additional non-auto trait
@@ -10,7 +10,7 @@ LL | type _0 = dyn Obj + Obj;
    = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
 
 error[E0225]: only auto traits can be used as additional traits in a trait object
-  --> $DIR/wf-trait-object-no-duplicates.rs:13:28
+  --> $DIR/no-duplicates.rs:13:28
    |
 LL | type _1 = dyn Send + Obj + Obj;
    |                      ---   ^^^ additional non-auto trait
@@ -21,7 +21,7 @@ LL | type _1 = dyn Send + Obj + Obj;
    = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
 
 error[E0225]: only auto traits can be used as additional traits in a trait object
-  --> $DIR/wf-trait-object-no-duplicates.rs:16:28
+  --> $DIR/no-duplicates.rs:16:28
    |
 LL | type _2 = dyn Obj + Send + Obj;
    |               ---          ^^^ additional non-auto trait
@@ -32,7 +32,7 @@ LL | type _2 = dyn Obj + Send + Obj;
    = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
 
 error[E0225]: only auto traits can be used as additional traits in a trait object
-  --> $DIR/wf-trait-object-no-duplicates.rs:26:34
+  --> $DIR/no-duplicates.rs:26:34
    |
 LL | type _4 = dyn for<'a> ObjL<'a> + for<'b> ObjL<'b>;
    |               ----------------   ^^^^^^^^^^^^^^^^ additional non-auto trait
@@ -43,7 +43,7 @@ LL | type _4 = dyn for<'a> ObjL<'a> + for<'b> ObjL<'b>;
    = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
 
 error[E0225]: only auto traits can be used as additional traits in a trait object
-  --> $DIR/wf-trait-object-no-duplicates.rs:30:42
+  --> $DIR/no-duplicates.rs:30:42
    |
 LL | type _5 = dyn ObjT<for<'a> fn(&'a u8)> + ObjT<for<'b> fn(&'b u8)>;
    |               ------------------------   ^^^^^^^^^^^^^^^^^^^^^^^^ additional non-auto trait
diff --git a/src/test/ui/traits/wf-trait-object-only-maybe-bound.rs b/src/test/ui/traits/wf-object/only-maybe-bound.rs
index 3e6db3e997c..3e6db3e997c 100644
--- a/src/test/ui/traits/wf-trait-object-only-maybe-bound.rs
+++ b/src/test/ui/traits/wf-object/only-maybe-bound.rs
diff --git a/src/test/ui/traits/wf-trait-object-only-maybe-bound.stderr b/src/test/ui/traits/wf-object/only-maybe-bound.stderr
index 48241088632..cbc41feec1e 100644
--- a/src/test/ui/traits/wf-trait-object-only-maybe-bound.stderr
+++ b/src/test/ui/traits/wf-object/only-maybe-bound.stderr
@@ -1,11 +1,11 @@
 error: `?Trait` is not permitted in trait object types
-  --> $DIR/wf-trait-object-only-maybe-bound.rs:3:15
+  --> $DIR/only-maybe-bound.rs:3:15
    |
 LL | type _0 = dyn ?Sized;
    |               ^^^^^^
 
 error[E0224]: at least one trait is required for an object type
-  --> $DIR/wf-trait-object-only-maybe-bound.rs:3:11
+  --> $DIR/only-maybe-bound.rs:3:11
    |
 LL | type _0 = dyn ?Sized;
    |           ^^^^^^^^^^
diff --git a/src/test/ui/traits/wf-trait-object-reverse-order.rs b/src/test/ui/traits/wf-object/reverse-order.rs
index 4f676cbe338..4f676cbe338 100644
--- a/src/test/ui/traits/wf-trait-object-reverse-order.rs
+++ b/src/test/ui/traits/wf-object/reverse-order.rs
diff --git a/src/test/ui/traits/trait-where-clause-vs-impl.rs b/src/test/ui/traits/where-clause-vs-impl.rs
index 7cfee27efb3..7cfee27efb3 100644
--- a/src/test/ui/traits/trait-where-clause-vs-impl.rs
+++ b/src/test/ui/traits/where-clause-vs-impl.rs
diff --git a/src/test/ui/traits/trait-with-bounds-default.rs b/src/test/ui/traits/with-bounds-default.rs
index 31f73d79cc7..31f73d79cc7 100644
--- a/src/test/ui/traits/trait-with-bounds-default.rs
+++ b/src/test/ui/traits/with-bounds-default.rs
diff --git a/src/test/ui/traits/trait-with-dst.rs b/src/test/ui/traits/with-dst.rs
index a3e3b31df92..a3e3b31df92 100644
--- a/src/test/ui/traits/trait-with-dst.rs
+++ b/src/test/ui/traits/with-dst.rs