Skip to content

Commit 506c84b

Browse files
Change src/test to tests in source files, fix tidy and tests
1 parent c3bb324 commit 506c84b

File tree

137 files changed

+314
-308
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

137 files changed

+314
-308
lines changed

Diff for: .github/workflows/ci.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ jobs:
342342
os: macos-12-xl
343343
- name: x86_64-apple-1
344344
env:
345-
SCRIPT: "./x.py --stage 2 test --exclude src/test/ui --exclude src/test/rustdoc --exclude src/test/run-make-fulldeps"
345+
SCRIPT: "./x.py --stage 2 test --exclude tests/ui --exclude tests/rustdoc --exclude tests/run-make-fulldeps"
346346
RUST_CONFIGURE_ARGS: "--build=x86_64-apple-darwin --enable-sanitizers --enable-profiler --set rust.jemalloc --set llvm.ninja=false"
347347
RUSTC_RETRY_LINKER_ON_SEGFAULT: 1
348348
MACOSX_DEPLOYMENT_TARGET: 10.8
@@ -353,7 +353,7 @@ jobs:
353353
os: macos-12-xl
354354
- name: x86_64-apple-2
355355
env:
356-
SCRIPT: "./x.py --stage 2 test src/test/ui src/test/rustdoc src/test/run-make-fulldeps"
356+
SCRIPT: "./x.py --stage 2 test tests/ui tests/rustdoc tests/run-make-fulldeps"
357357
RUST_CONFIGURE_ARGS: "--build=x86_64-apple-darwin --enable-sanitizers --enable-profiler --set rust.jemalloc --set llvm.ninja=false"
358358
RUSTC_RETRY_LINKER_ON_SEGFAULT: 1
359359
MACOSX_DEPLOYMENT_TARGET: 10.8

Diff for: .gitignore

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Session.vim
2626
.valgrindrc
2727
.cargo
2828
# Included because it is part of the test case
29-
!/src/test/run-make/thumb-none-qemu/example/.cargo
29+
!/tests/run-make/thumb-none-qemu/example/.cargo
3030

3131
## Configuration
3232
/config.toml
@@ -74,6 +74,6 @@ package-lock.json
7474
package.json
7575

7676
## Rustdoc GUI tests
77-
src/test/rustdoc-gui/src/**.lock
77+
tests/rustdoc-gui/src/**.lock
7878

7979
# Before adding new lines, see the comment at the top.

Diff for: Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ exclude = [
5151
"compiler/rustc_codegen_cranelift",
5252
"compiler/rustc_codegen_gcc",
5353
"src/bootstrap",
54-
"src/test/rustdoc-gui",
54+
"tests/rustdoc-gui",
5555
# HACK(eddyb) This hardcodes the fact that our CI uses `/checkout/obj`.
5656
"obj",
5757
# The `x` binary is a thin wrapper that calls `x.py`, which initializes

Diff for: compiler/rustc_ast_lowering/src/expr.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -689,8 +689,8 @@ impl<'hir> LoweringContext<'_, 'hir> {
689689
// call (like the identity function), as otherwise type and lifetime
690690
// inference have a hard time figuring things out.
691691
// Without this, we would get:
692-
// E0720 in src/test/ui/impl-trait/in-trait/default-body-with-rpit.rs
693-
// E0700 in src/test/ui/self/self_lifetime-async.rs
692+
// E0720 in tests/ui/impl-trait/in-trait/default-body-with-rpit.rs
693+
// E0700 in tests/ui/self/self_lifetime-async.rs
694694

695695
// `future::identity_future`:
696696
let identity_future =

Diff for: compiler/rustc_borrowck/src/consumers.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ pub use super::{
2525
/// can, for example, happen when requesting a body of a `const` function
2626
/// because they are evaluated during typechecking. The panic can be avoided
2727
/// by overriding the `mir_borrowck` query. You can find a complete example
28-
/// that shows how to do this at `src/test/run-make/obtain-borrowck/`.
28+
/// that shows how to do this at `tests/run-make/obtain-borrowck/`.
2929
///
3030
/// * Polonius is highly unstable, so expect regular changes in its signature or other details.
3131
pub fn get_body_with_borrowck_facts(

Diff for: compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1737,7 +1737,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
17371737

17381738
/// We check that there's a single level of block nesting to ensure always correct
17391739
/// suggestions. If we don't, then we only provide a free-form message to avoid
1740-
/// misleading users in cases like `src/test/ui/nll/borrowed-temporary-error.rs`.
1740+
/// misleading users in cases like `tests/ui/nll/borrowed-temporary-error.rs`.
17411741
/// We could expand the analysis to suggest hoising all of the relevant parts of
17421742
/// the users' code to make the code compile, but that could be too much.
17431743
struct NestedStatementVisitor {

Diff for: compiler/rustc_borrowck/src/region_infer/opaque_types.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ impl<'tcx> InferCtxtExt<'tcx> for InferCtxt<'tcx> {
262262
return self.tcx.ty_error();
263263
}
264264

265-
// Only check this for TAIT. RPIT already supports `src/test/ui/impl-trait/nested-return-type2.rs`
265+
// Only check this for TAIT. RPIT already supports `tests/ui/impl-trait/nested-return-type2.rs`
266266
// on stable and we'd break that.
267267
let OpaqueTyOrigin::TyAlias = origin else {
268268
return definition_ty;

Diff for: compiler/rustc_codegen_cranelift/scripts/test_rustc_tests.sh

+66-66
Original file line numberDiff line numberDiff line change
@@ -10,118 +10,118 @@ pushd rust
1010

1111
command -v rg >/dev/null 2>&1 || cargo install ripgrep
1212

13-
rm -r src/test/ui/{extern/,unsized-locals/,lto/,linkage*} || true
14-
for test in $(rg --files-with-matches "lto|// needs-asm-support|// needs-unwind" src/test/{ui,incremental}); do
13+
rm -r tests/ui/{extern/,unsized-locals/,lto/,linkage*} || true
14+
for test in $(rg --files-with-matches "lto|// needs-asm-support|// needs-unwind" tests/{ui,incremental}); do
1515
rm $test
1616
done
1717

18-
for test in $(rg -i --files-with-matches "//(\[\w+\])?~[^\|]*\s*ERR|// error-pattern:|// build-fail|// run-fail|-Cllvm-args" src/test/ui); do
18+
for test in $(rg -i --files-with-matches "//(\[\w+\])?~[^\|]*\s*ERR|// error-pattern:|// build-fail|// run-fail|-Cllvm-args" tests/ui); do
1919
rm $test
2020
done
2121

22-
git checkout -- src/test/ui/issues/auxiliary/issue-3136-a.rs # contains //~ERROR, but shouldn't be removed
23-
git checkout -- src/test/ui/proc-macro/pretty-print-hack/
22+
git checkout -- tests/ui/issues/auxiliary/issue-3136-a.rs # contains //~ERROR, but shouldn't be removed
23+
git checkout -- tests/ui/proc-macro/pretty-print-hack/
2424

2525
# missing features
2626
# ================
2727

2828
# requires stack unwinding
29-
rm src/test/incremental/change_crate_dep_kind.rs
30-
rm src/test/incremental/issue-80691-bad-eval-cache.rs # -Cpanic=abort causes abort instead of exit(101)
29+
rm tests/incremental/change_crate_dep_kind.rs
30+
rm tests/incremental/issue-80691-bad-eval-cache.rs # -Cpanic=abort causes abort instead of exit(101)
3131

3232
# requires compiling with -Cpanic=unwind
33-
rm -r src/test/ui/macros/rfc-2011-nicer-assert-messages/
34-
rm -r src/test/run-make/test-benches
33+
rm -r tests/ui/macros/rfc-2011-nicer-assert-messages/
34+
rm -r tests/run-make/test-benches
3535

3636
# vendor intrinsics
37-
rm src/test/ui/sse2.rs # cpuid not supported, so sse2 not detected
38-
rm src/test/ui/intrinsics/const-eval-select-x86_64.rs # requires x86_64 vendor intrinsics
39-
rm src/test/ui/simd/array-type.rs # "Index argument for `simd_insert` is not a constant"
40-
rm src/test/ui/simd/intrinsic/generic-bitmask-pass.rs # simd_bitmask unimplemented
41-
rm src/test/ui/simd/intrinsic/generic-as.rs # simd_as unimplemented
42-
rm src/test/ui/simd/intrinsic/generic-arithmetic-saturating-pass.rs # simd_saturating_add unimplemented
43-
rm src/test/ui/simd/intrinsic/float-math-pass.rs # simd_fcos unimplemented
44-
rm src/test/ui/simd/intrinsic/generic-gather-pass.rs # simd_gather unimplemented
45-
rm src/test/ui/simd/intrinsic/generic-select-pass.rs # simd_select_bitmask unimplemented
46-
rm src/test/ui/simd/issue-85915-simd-ptrs.rs # simd_gather unimplemented
47-
rm src/test/ui/simd/issue-89193.rs # simd_gather unimplemented
48-
rm src/test/ui/simd/simd-bitmask.rs # simd_bitmask unimplemented
37+
rm tests/ui/sse2.rs # cpuid not supported, so sse2 not detected
38+
rm tests/ui/intrinsics/const-eval-select-x86_64.rs # requires x86_64 vendor intrinsics
39+
rm tests/ui/simd/array-type.rs # "Index argument for `simd_insert` is not a constant"
40+
rm tests/ui/simd/intrinsic/generic-bitmask-pass.rs # simd_bitmask unimplemented
41+
rm tests/ui/simd/intrinsic/generic-as.rs # simd_as unimplemented
42+
rm tests/ui/simd/intrinsic/generic-arithmetic-saturating-pass.rs # simd_saturating_add unimplemented
43+
rm tests/ui/simd/intrinsic/float-math-pass.rs # simd_fcos unimplemented
44+
rm tests/ui/simd/intrinsic/generic-gather-pass.rs # simd_gather unimplemented
45+
rm tests/ui/simd/intrinsic/generic-select-pass.rs # simd_select_bitmask unimplemented
46+
rm tests/ui/simd/issue-85915-simd-ptrs.rs # simd_gather unimplemented
47+
rm tests/ui/simd/issue-89193.rs # simd_gather unimplemented
48+
rm tests/ui/simd/simd-bitmask.rs # simd_bitmask unimplemented
4949

5050
# exotic linkages
51-
rm src/test/ui/issues/issue-33992.rs # unsupported linkages
52-
rm src/test/incremental/hashes/function_interfaces.rs # same
53-
rm src/test/incremental/hashes/statics.rs # same
51+
rm tests/ui/issues/issue-33992.rs # unsupported linkages
52+
rm tests/incremental/hashes/function_interfaces.rs # same
53+
rm tests/incremental/hashes/statics.rs # same
5454

5555
# variadic arguments
56-
rm src/test/ui/abi/mir/mir_codegen_calls_variadic.rs # requires float varargs
57-
rm src/test/ui/abi/variadic-ffi.rs # requires callee side vararg support
56+
rm tests/ui/abi/mir/mir_codegen_calls_variadic.rs # requires float varargs
57+
rm tests/ui/abi/variadic-ffi.rs # requires callee side vararg support
5858

5959
# unsized locals
60-
rm -r src/test/run-pass-valgrind/unsized-locals
60+
rm -r tests/run-pass-valgrind/unsized-locals
6161

6262
# misc unimplemented things
63-
rm src/test/ui/intrinsics/intrinsic-nearby.rs # unimplemented nearbyintf32 and nearbyintf64 intrinsics
64-
rm src/test/ui/target-feature/missing-plusminus.rs # error not implemented
65-
rm src/test/ui/fn/dyn-fn-alignment.rs # wants a 256 byte alignment
66-
rm -r src/test/run-make/emit-named-files # requires full --emit support
67-
rm src/test/ui/abi/stack-probes.rs # stack probes not yet implemented
68-
rm src/test/ui/simd/intrinsic/ptr-cast.rs # simd_expose_addr intrinsic unimplemented
69-
rm -r src/test/run-make/repr128-dwarf # debuginfo test
70-
rm src/test/codegen-units/item-collection/asm-sym.rs # requires support for sym in asm!()
63+
rm tests/ui/intrinsics/intrinsic-nearby.rs # unimplemented nearbyintf32 and nearbyintf64 intrinsics
64+
rm tests/ui/target-feature/missing-plusminus.rs # error not implemented
65+
rm tests/ui/fn/dyn-fn-alignment.rs # wants a 256 byte alignment
66+
rm -r tests/run-make/emit-named-files # requires full --emit support
67+
rm tests/ui/abi/stack-probes.rs # stack probes not yet implemented
68+
rm tests/ui/simd/intrinsic/ptr-cast.rs # simd_expose_addr intrinsic unimplemented
69+
rm -r tests/run-make/repr128-dwarf # debuginfo test
70+
rm tests/codegen-units/item-collection/asm-sym.rs # requires support for sym in asm!()
7171

7272
# optimization tests
7373
# ==================
74-
rm src/test/ui/codegen/issue-28950.rs # depends on stack size optimizations
75-
rm src/test/ui/codegen/init-large-type.rs # same
76-
rm src/test/ui/issues/issue-40883.rs # same
77-
rm -r src/test/run-make/fmt-write-bloat/ # tests an optimization
74+
rm tests/ui/codegen/issue-28950.rs # depends on stack size optimizations
75+
rm tests/ui/codegen/init-large-type.rs # same
76+
rm tests/ui/issues/issue-40883.rs # same
77+
rm -r tests/run-make/fmt-write-bloat/ # tests an optimization
7878

7979
# backend specific tests
8080
# ======================
81-
rm src/test/incremental/thinlto/cgu_invalidated_when_import_{added,removed}.rs # requires LLVM
82-
rm src/test/ui/abi/stack-protector.rs # requires stack protector support
81+
rm tests/incremental/thinlto/cgu_invalidated_when_import_{added,removed}.rs # requires LLVM
82+
rm tests/ui/abi/stack-protector.rs # requires stack protector support
8383

8484
# giving different but possibly correct results
8585
# =============================================
86-
rm src/test/ui/mir/mir_misc_casts.rs # depends on deduplication of constants
87-
rm src/test/ui/mir/mir_raw_fat_ptr.rs # same
88-
rm src/test/ui/consts/issue-33537.rs # same
89-
rm src/test/ui/layout/valid_range_oob.rs # different ICE message
86+
rm tests/ui/mir/mir_misc_casts.rs # depends on deduplication of constants
87+
rm tests/ui/mir/mir_raw_fat_ptr.rs # same
88+
rm tests/ui/consts/issue-33537.rs # same
89+
rm tests/ui/layout/valid_range_oob.rs # different ICE message
9090

9191
# doesn't work due to the way the rustc test suite is invoked.
9292
# should work when using ./x.py test the way it is intended
9393
# ============================================================
94-
rm -r src/test/run-make/emit-shared-files # requires the rustdoc executable in dist/bin/
95-
rm -r src/test/run-make/unstable-flag-required # same
96-
rm -r src/test/run-make/rustdoc-* # same
97-
rm -r src/test/run-make/issue-88756-default-output # same
98-
rm -r src/test/run-make/remap-path-prefix-dwarf # requires llvm-dwarfdump
99-
rm -r src/test/ui/consts/missing_span_in_backtrace.rs # expects sysroot source to be elsewhere
94+
rm -r tests/run-make/emit-shared-files # requires the rustdoc executable in dist/bin/
95+
rm -r tests/run-make/unstable-flag-required # same
96+
rm -r tests/run-make/rustdoc-* # same
97+
rm -r tests/run-make/issue-88756-default-output # same
98+
rm -r tests/run-make/remap-path-prefix-dwarf # requires llvm-dwarfdump
99+
rm -r tests/ui/consts/missing_span_in_backtrace.rs # expects sysroot source to be elsewhere
100100

101101
# genuine bugs
102102
# ============
103-
rm src/test/incremental/spike-neg1.rs # errors out for some reason
104-
rm src/test/incremental/spike-neg2.rs # same
105-
rm src/test/ui/issues/issue-74564-if-expr-stack-overflow.rs # gives a stackoverflow before the backend runs
106-
rm src/test/ui/mir/ssa-analysis-regression-50041.rs # produces ICE
107-
rm src/test/ui/type-alias-impl-trait/assoc-projection-ice.rs # produces ICE
103+
rm tests/incremental/spike-neg1.rs # errors out for some reason
104+
rm tests/incremental/spike-neg2.rs # same
105+
rm tests/ui/issues/issue-74564-if-expr-stack-overflow.rs # gives a stackoverflow before the backend runs
106+
rm tests/ui/mir/ssa-analysis-regression-50041.rs # produces ICE
107+
rm tests/ui/type-alias-impl-trait/assoc-projection-ice.rs # produces ICE
108108

109-
rm src/test/ui/simd/intrinsic/generic-reduction-pass.rs # simd_reduce_add_unordered doesn't accept an accumulator for integer vectors
109+
rm tests/ui/simd/intrinsic/generic-reduction-pass.rs # simd_reduce_add_unordered doesn't accept an accumulator for integer vectors
110110

111-
rm src/test/ui/runtime/out-of-stack.rs # SIGSEGV instead of SIGABRT for some reason (#1301)
111+
rm tests/ui/runtime/out-of-stack.rs # SIGSEGV instead of SIGABRT for some reason (#1301)
112112

113113
# bugs in the test suite
114114
# ======================
115-
rm src/test/ui/backtrace.rs # TODO warning
116-
rm src/test/ui/simple_global_asm.rs # TODO add needs-asm-support
117-
rm src/test/ui/test-attrs/test-type.rs # TODO panic message on stderr. correct stdout
115+
rm tests/ui/backtrace.rs # TODO warning
116+
rm tests/ui/simple_global_asm.rs # TODO add needs-asm-support
117+
rm tests/ui/test-attrs/test-type.rs # TODO panic message on stderr. correct stdout
118118
# not sure if this is actually a bug in the test suite, but the symbol list shows the function without leading _ for some reason
119-
rm -r src/test/run-make/native-link-modifier-bundle
120-
rm src/test/ui/process/nofile-limit.rs # TODO some AArch64 linking issue
121-
rm src/test/ui/dyn-star/dispatch-on-pin-mut.rs # TODO failed assertion in vtable::get_ptr_and_method_ref
119+
rm -r tests/run-make/native-link-modifier-bundle
120+
rm tests/ui/process/nofile-limit.rs # TODO some AArch64 linking issue
121+
rm tests/ui/dyn-star/dispatch-on-pin-mut.rs # TODO failed assertion in vtable::get_ptr_and_method_ref
122122

123-
rm src/test/ui/stdio-is-blocking.rs # really slow with unoptimized libstd
123+
rm tests/ui/stdio-is-blocking.rs # really slow with unoptimized libstd
124124

125125
echo "[TEST] rustc test suite"
126-
RUST_TEST_NOCAPTURE=1 COMPILETEST_FORCE_STAGE0=1 ./x.py test --stage 0 src/test/{codegen-units,run-make,run-pass-valgrind,ui,incremental}
126+
RUST_TEST_NOCAPTURE=1 COMPILETEST_FORCE_STAGE0=1 ./x.py test --stage 0 tests/{codegen-units,run-make,run-pass-valgrind,ui,incremental}
127127
popd

Diff for: compiler/rustc_codegen_gcc/test.sh

+8-8
Original file line numberDiff line numberDiff line change
@@ -253,25 +253,25 @@ rustc = "$HOME/.rustup/toolchains/$rust_toolchain-$TARGET_TRIPLE/bin/rustc"
253253
EOF
254254

255255
rustc -V | cut -d' ' -f3 | tr -d '('
256-
git checkout $(rustc -V | cut -d' ' -f3 | tr -d '(') src/test
256+
git checkout $(rustc -V | cut -d' ' -f3 | tr -d '(') tests
257257

258-
for test in $(rg -i --files-with-matches "//(\[\w+\])?~|// error-pattern:|// build-fail|// run-fail|-Cllvm-args" src/test/ui); do
258+
for test in $(rg -i --files-with-matches "//(\[\w+\])?~|// error-pattern:|// build-fail|// run-fail|-Cllvm-args" tests/ui); do
259259
rm $test
260260
done
261261

262-
git checkout -- src/test/ui/issues/auxiliary/issue-3136-a.rs # contains //~ERROR, but shouldn't be removed
262+
git checkout -- tests/ui/issues/auxiliary/issue-3136-a.rs # contains //~ERROR, but shouldn't be removed
263263

264-
rm -r src/test/ui/{abi*,extern/,panic-runtime/,panics/,unsized-locals/,proc-macro/,threads-sendsync/,thinlto/,borrowck/,test*,*lto*.rs} || true
265-
for test in $(rg --files-with-matches "catch_unwind|should_panic|thread|lto" src/test/ui); do
264+
rm -r tests/ui/{abi*,extern/,panic-runtime/,panics/,unsized-locals/,proc-macro/,threads-sendsync/,thinlto/,borrowck/,test*,*lto*.rs} || true
265+
for test in $(rg --files-with-matches "catch_unwind|should_panic|thread|lto" tests/ui); do
266266
rm $test
267267
done
268-
git checkout src/test/ui/type-alias-impl-trait/auxiliary/cross_crate_ice.rs
269-
git checkout src/test/ui/type-alias-impl-trait/auxiliary/cross_crate_ice2.rs
268+
git checkout tests/ui/type-alias-impl-trait/auxiliary/cross_crate_ice.rs
269+
git checkout tests/ui/type-alias-impl-trait/auxiliary/cross_crate_ice2.rs
270270

271271
RUSTC_ARGS="-Zpanic-abort-tests -Csymbol-mangling-version=v0 -Zcodegen-backend="$(pwd)"/../target/"$CHANNEL"/librustc_codegen_gcc."$dylib_ext" --sysroot "$(pwd)"/../build_sysroot/sysroot -Cpanic=abort"
272272

273273
echo "[TEST] rustc test suite"
274-
COMPILETEST_FORCE_STAGE0=1 ./x.py test --run always --stage 0 src/test/ui/ --rustc-args "$RUSTC_ARGS"
274+
COMPILETEST_FORCE_STAGE0=1 ./x.py test --run always --stage 0 tests/ui/ --rustc-args "$RUSTC_ARGS"
275275
}
276276

277277
function clean_ui_tests() {

Diff for: compiler/rustc_const_eval/src/transform/check_consts/post_drop_elaboration.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ impl<'tcx> Visitor<'tcx> for CheckLiveDrops<'_, 'tcx> {
9595
}
9696

9797
// Drop elaboration is not precise enough to accept code like
98-
// `src/test/ui/consts/control-flow/drop-pass.rs`; e.g., when an `Option<Vec<T>>` is
98+
// `tests/ui/consts/control-flow/drop-pass.rs`; e.g., when an `Option<Vec<T>>` is
9999
// initialized with `None` and never changed, it still emits drop glue.
100100
// Hence we additionally check the qualifs here to allow more code to pass.
101101
if self.qualifs.needs_non_const_drop(self.ccx, dropped_place.local, location) {

Diff for: compiler/rustc_hir_analysis/src/astconv/errors.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
267267
// segments, even though `trait_ref.path.segments` is of length `1`. Work
268268
// around that bug here, even though it should be fixed elsewhere.
269269
// This would otherwise cause an invalid suggestion. For an example, look at
270-
// `src/test/ui/issues/issue-28344.rs` where instead of the following:
270+
// `tests/ui/issues/issue-28344.rs` where instead of the following:
271271
//
272272
// error[E0191]: the value of the associated type `Output`
273273
// (from trait `std::ops::BitXor`) must be specified

Diff for: compiler/rustc_hir_typeck/src/coercion.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
//! useful for freezing mut things (that is, when the expected type is &T
1414
//! but you have &mut T) and also for avoiding the linearity
1515
//! of mut things (when the expected is &mut T and you have &mut T). See
16-
//! the various `src/test/ui/coerce/*.rs` tests for
16+
//! the various `tests/ui/coerce/*.rs` tests for
1717
//! examples of where this is useful.
1818
//!
1919
//! ## Subtle note

Diff for: compiler/rustc_hir_typeck/src/demand.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1855,7 +1855,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
18551855
let mut expectation = Some(expected_ty);
18561856
while let hir::ExprKind::MethodCall(_, rcvr, ..) = expr.kind {
18571857
// Getting to the root receiver and asserting it is a fn call let's us ignore cases in
1858-
// `src/test/ui/methods/issues/issue-90315.stderr`.
1858+
// `tests/ui/methods/issues/issue-90315.stderr`.
18591859
expr = rcvr;
18601860
// If we have more than one layer of calls, then the expected ty
18611861
// cannot guide the method probe.

Diff for: compiler/rustc_hir_typeck/src/fallback.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ impl<'tcx> FnCtxt<'_, 'tcx> {
308308

309309
if relationship.self_in_trait && relationship.output {
310310
// This case falls back to () to ensure that the code pattern in
311-
// src/test/ui/never_type/fallback-closure-ret.rs continues to
311+
// tests/ui/never_type/fallback-closure-ret.rs continues to
312312
// compile when never_type_fallback is enabled.
313313
//
314314
// This rule is not readily explainable from first principles,

0 commit comments

Comments
 (0)