1
Fork 0

Change src/test to tests in source files, fix tidy and tests

This commit is contained in:
Albert Larsan 2023-01-05 09:45:44 +01:00
parent cf2dff2b1e
commit 40ba0e84d5
No known key found for this signature in database
GPG key ID: 92709B88BB8F13EA
137 changed files with 315 additions and 311 deletions

View file

@ -749,7 +749,7 @@ impl<'tcx> TypeVisitor<'tcx> for OrphanChecker<'tcx> {
///
/// This means that we can completely ignore constants during the orphan check.
///
/// See `src/test/ui/coherence/const-generics-orphan-check-ok.rs` for examples.
/// See `tests/ui/coherence/const-generics-orphan-check-ok.rs` for examples.
///
/// [^1]: This might not hold for function pointers or trait objects in the future.
/// As these should be quite rare as const arguments and especially rare as impl

View file

@ -282,7 +282,7 @@ fn project_and_unify_type<'cx, 'tcx>(
};
debug!(?normalized, ?obligations, "project_and_unify_type result");
let actual = obligation.predicate.term;
// For an example where this is necessary see src/test/ui/impl-trait/nested-return-type2.rs
// For an example where this is necessary see tests/ui/impl-trait/nested-return-type2.rs
// This allows users to omit re-mentioning all bounds on an associated type and just use an
// `impl Trait` for the assoc type to add more bounds.
let InferOk { value: actual, obligations: new } =

View file

@ -232,7 +232,7 @@ fn extend_cause_with_original_assoc_item_obligation<'tcx>(
// The obligation comes not from the current `impl` nor the `trait` being implemented,
// but rather from a "second order" obligation, where an associated type has a
// projection coming from another associated type. See
// `src/test/ui/associated-types/point-at-type-on-obligation-failure.rs` and
// `tests/ui/associated-types/point-at-type-on-obligation-failure.rs` and
// `traits-assoc-type-in-supertrait-bad.rs`.
if let Some(ty::Alias(ty::Projection, projection_ty)) = proj.term.ty().map(|ty| ty.kind())
&& let Some(&impl_item_id) =
@ -640,7 +640,7 @@ impl<'tcx> WfPredicates<'tcx> {
// hidden type that is not actually well formed and
// can cause compiler crashes when the user abuses unsafe
// code to procure such a closure.
// See src/test/ui/type-alias-impl-trait/wf_check_closures.rs
// See tests/ui/type-alias-impl-trait/wf_check_closures.rs
let obligations = self.nominal_obligations(did, substs);
self.out.extend(obligations);
}