diff options
| -rw-r--r-- | .github/workflows/ci.yml | 6 | ||||
| -rw-r--r-- | .mailmap | 2 | ||||
| -rw-r--r-- | CONTRIBUTING.md | 1 | ||||
| -rw-r--r-- | Cargo.lock | 124 | ||||
| -rw-r--r-- | compiler/rustc_abi/src/layout.rs | 4 | ||||
| -rw-r--r-- | compiler/rustc_abi/src/lib.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_ast/src/ast.rs | 54 | ||||
| -rw-r--r-- | compiler/rustc_ast/src/mut_visit.rs | 26 | ||||
| -rw-r--r-- | compiler/rustc_ast/src/visit.rs | 10 | ||||
| -rw-r--r-- | compiler/rustc_ast_lowering/messages.ftl | 12 | ||||
| -rw-r--r-- | compiler/rustc_ast_lowering/src/errors.rs | 22 | ||||
| -rw-r--r-- | compiler/rustc_ast_lowering/src/item.rs | 16 | ||||
| -rw-r--r-- | compiler/rustc_ast_lowering/src/lib.rs | 72 | ||||
| -rw-r--r-- | compiler/rustc_ast_lowering/src/path.rs | 38 | ||||
| -rw-r--r-- | compiler/rustc_ast_passes/src/ast_validation.rs | 34 | ||||
| -rw-r--r-- | compiler/rustc_ast_passes/src/feature_gate.rs | 22 | ||||
| -rw-r--r-- | compiler/rustc_ast_pretty/src/pprust/state.rs | 4 | ||||
| -rw-r--r-- | compiler/rustc_ast_pretty/src/pprust/state/item.rs | 18 | ||||
| -rw-r--r-- | compiler/rustc_borrowck/src/constraints/mod.rs | 6 | ||||
| -rw-r--r-- | compiler/rustc_borrowck/src/consumers.rs | 4 | ||||
| -rw-r--r-- | compiler/rustc_borrowck/src/diagnostics/explain_borrow.rs | 4 | ||||
| -rw-r--r-- | compiler/rustc_borrowck/src/diagnostics/mod.rs | 5 | ||||
| -rw-r--r-- | compiler/rustc_borrowck/src/diagnostics/var_name.rs | 6 | ||||
| -rw-r--r-- | compiler/rustc_borrowck/src/lib.rs | 10 | ||||
| -rw-r--r-- | compiler/rustc_borrowck/src/member_constraints.rs | 4 | ||||
| -rw-r--r-- | compiler/rustc_borrowck/src/nll.rs | 6 | ||||
| -rw-r--r-- | compiler/rustc_borrowck/src/region_infer/mod.rs | 6 | ||||
| -rw-r--r-- | compiler/rustc_borrowck/src/renumber.rs | 4 | ||||
| -rw-r--r-- | compiler/rustc_borrowck/src/type_check/liveness/local_use_map.rs | 4 | ||||
| -rw-r--r-- | compiler/rustc_borrowck/src/type_check/mod.rs | 25 | ||||
| -rw-r--r-- | compiler/rustc_builtin_macros/src/global_allocator.rs | 4 | ||||
| -rw-r--r-- | compiler/rustc_builtin_macros/src/test.rs | 48 | ||||
| -rw-r--r-- | compiler/rustc_codegen_cranelift/src/base.rs | 7 | ||||
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/builder.rs | 4 | ||||
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/common.rs | 3 | ||||
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/debuginfo/metadata.rs | 19 | ||||
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/debuginfo/metadata/enums/mod.rs | 4 | ||||
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/debuginfo/mod.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/llvm/ffi.rs | 16 | ||||
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/back/linker.rs | 5 | ||||
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/base.rs | 6 | ||||
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/coverageinfo/map.rs | 4 | ||||
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/mir/analyze.rs | 9 | ||||
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/mir/debuginfo.rs | 14 | ||||
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/mir/rvalue.rs | 6 | ||||
| -rw-r--r-- | compiler/rustc_const_eval/src/interpret/operand.rs | 9 | ||||
| -rw-r--r-- | compiler/rustc_const_eval/src/interpret/place.rs | 9 | ||||
| -rw-r--r-- | compiler/rustc_const_eval/src/transform/promote_consts.rs | 6 | ||||
| -rw-r--r-- | compiler/rustc_const_eval/src/transform/validate.rs | 46 | ||||
| -rw-r--r-- | compiler/rustc_data_structures/src/graph/dominators/mod.rs | 14 | ||||
| -rw-r--r-- | compiler/rustc_data_structures/src/graph/iterate/mod.rs | 4 | ||||
| -rw-r--r-- | compiler/rustc_data_structures/src/graph/scc/mod.rs | 6 | ||||
| -rw-r--r-- | compiler/rustc_errors/src/emitter.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_expand/src/build.rs | 20 | ||||
| -rw-r--r-- | compiler/rustc_expand/src/proc_macro.rs | 10 | ||||
| -rw-r--r-- | compiler/rustc_feature/src/active.rs | 4 | ||||
| -rw-r--r-- | compiler/rustc_feature/src/builtin_attrs.rs | 4 | ||||
| -rw-r--r-- | compiler/rustc_hir/src/hir.rs | 22 | ||||
| -rw-r--r-- | compiler/rustc_hir_analysis/messages.ftl | 11 | ||||
| -rw-r--r-- | compiler/rustc_hir_analysis/src/astconv/errors.rs | 26 | ||||
| -rw-r--r-- | compiler/rustc_hir_analysis/src/astconv/mod.rs | 204 | ||||
| -rw-r--r-- | compiler/rustc_hir_analysis/src/check/dropck.rs | 8 | ||||
| -rw-r--r-- | compiler/rustc_hir_analysis/src/collect/resolve_bound_vars.rs | 56 | ||||
| -rw-r--r-- | compiler/rustc_hir_analysis/src/errors.rs | 28 | ||||
| -rw-r--r-- | compiler/rustc_hir_analysis/src/structured_errors/wrong_number_of_generic_args.rs | 8 | ||||
| -rw-r--r-- | compiler/rustc_hir_pretty/src/lib.rs | 100 | ||||
| -rw-r--r-- | compiler/rustc_hir_typeck/src/expr_use_visitor.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_hir_typeck/src/upvar.rs | 5 | ||||
| -rw-r--r-- | compiler/rustc_index/src/vec.rs | 59 | ||||
| -rw-r--r-- | compiler/rustc_infer/src/infer/canonical/canonicalizer.rs | 4 | ||||
| -rw-r--r-- | compiler/rustc_infer/src/infer/combine.rs | 24 | ||||
| -rw-r--r-- | compiler/rustc_infer/src/infer/equate.rs | 8 | ||||
| -rw-r--r-- | compiler/rustc_infer/src/infer/error_reporting/mod.rs | 25 | ||||
| -rw-r--r-- | compiler/rustc_infer/src/infer/glb.rs | 9 | ||||
| -rw-r--r-- | compiler/rustc_infer/src/infer/lexical_region_resolve/mod.rs | 8 | ||||
| -rw-r--r-- | compiler/rustc_infer/src/infer/lub.rs | 9 | ||||
| -rw-r--r-- | compiler/rustc_infer/src/infer/nll_relate/mod.rs | 24 | ||||
| -rw-r--r-- | compiler/rustc_infer/src/infer/outlives/test_type_match.rs | 8 | ||||
| -rw-r--r-- | compiler/rustc_infer/src/infer/sub.rs | 8 | ||||
| -rw-r--r-- | compiler/rustc_interface/src/interface.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_interface/src/tests.rs | 3 | ||||
| -rw-r--r-- | compiler/rustc_lint/src/methods.rs | 49 | ||||
| -rw-r--r-- | compiler/rustc_lint/src/unused.rs | 4 | ||||
| -rw-r--r-- | compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp | 3 | ||||
| -rw-r--r-- | compiler/rustc_macros/src/diagnostics/fluent.rs | 23 | ||||
| -rw-r--r-- | compiler/rustc_middle/messages.ftl | 4 | ||||
| -rw-r--r-- | compiler/rustc_middle/src/error.rs | 8 | ||||
| -rw-r--r-- | compiler/rustc_middle/src/middle/mod.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_middle/src/mir/basic_blocks.rs | 6 | ||||
| -rw-r--r-- | compiler/rustc_middle/src/mir/mod.rs | 43 | ||||
| -rw-r--r-- | compiler/rustc_middle/src/mir/syntax.rs | 7 | ||||
| -rw-r--r-- | compiler/rustc_middle/src/mir/tcx.rs | 10 | ||||
| -rw-r--r-- | compiler/rustc_middle/src/mir/traversal.rs | 4 | ||||
| -rw-r--r-- | compiler/rustc_middle/src/ty/_match.rs | 8 | ||||
| -rw-r--r-- | compiler/rustc_middle/src/ty/adt.rs | 4 | ||||
| -rw-r--r-- | compiler/rustc_middle/src/ty/consts/valtree.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_middle/src/ty/normalize_erasing_regions.rs | 6 | ||||
| -rw-r--r-- | compiler/rustc_middle/src/ty/relate.rs | 32 | ||||
| -rw-r--r-- | compiler/rustc_middle/src/ty/util.rs | 14 | ||||
| -rw-r--r-- | compiler/rustc_mir_build/src/build/custom/mod.rs | 6 | ||||
| -rw-r--r-- | compiler/rustc_mir_build/src/build/custom/parse.rs | 4 | ||||
| -rw-r--r-- | compiler/rustc_mir_build/src/build/custom/parse/instruction.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_mir_build/src/build/expr/as_constant.rs | 6 | ||||
| -rw-r--r-- | compiler/rustc_mir_build/src/build/expr/as_rvalue.rs | 13 | ||||
| -rw-r--r-- | compiler/rustc_mir_build/src/build/expr/into.rs | 11 | ||||
| -rw-r--r-- | compiler/rustc_mir_build/src/build/mod.rs | 4 | ||||
| -rw-r--r-- | compiler/rustc_mir_build/src/build/scope.rs | 4 | ||||
| -rw-r--r-- | compiler/rustc_mir_build/src/thir/pattern/deconstruct_pat.rs | 35 | ||||
| -rw-r--r-- | compiler/rustc_mir_build/src/thir/pattern/usefulness.rs | 11 | ||||
| -rw-r--r-- | compiler/rustc_mir_dataflow/src/elaborate_drops.rs | 72 | ||||
| -rw-r--r-- | compiler/rustc_mir_dataflow/src/move_paths/mod.rs | 8 | ||||
| -rw-r--r-- | compiler/rustc_mir_dataflow/src/value_analysis.rs | 10 | ||||
| -rw-r--r-- | compiler/rustc_mir_transform/src/check_alignment.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_mir_transform/src/const_prop.rs | 6 | ||||
| -rw-r--r-- | compiler/rustc_mir_transform/src/const_prop_lint.rs | 18 | ||||
| -rw-r--r-- | compiler/rustc_mir_transform/src/copy_prop.rs | 4 | ||||
| -rw-r--r-- | compiler/rustc_mir_transform/src/coverage/graph.rs | 11 | ||||
| -rw-r--r-- | compiler/rustc_mir_transform/src/generator.rs | 4 | ||||
| -rw-r--r-- | compiler/rustc_mir_transform/src/lower_slice_len.rs | 4 | ||||
| -rw-r--r-- | compiler/rustc_mir_transform/src/simplify.rs | 10 | ||||
| -rw-r--r-- | compiler/rustc_mir_transform/src/ssa.rs | 4 | ||||
| -rw-r--r-- | compiler/rustc_monomorphize/src/collector.rs | 4 | ||||
| -rw-r--r-- | compiler/rustc_monomorphize/src/partitioning/default.rs | 5 | ||||
| -rw-r--r-- | compiler/rustc_parse/messages.ftl | 4 | ||||
| -rw-r--r-- | compiler/rustc_parse/src/errors.rs | 8 | ||||
| -rw-r--r-- | compiler/rustc_parse/src/parser/diagnostics.rs | 3 | ||||
| -rw-r--r-- | compiler/rustc_parse/src/parser/item.rs | 17 | ||||
| -rw-r--r-- | compiler/rustc_parse/src/parser/path.rs | 31 | ||||
| -rw-r--r-- | compiler/rustc_parse/src/parser/ty.rs | 7 | ||||
| -rw-r--r-- | compiler/rustc_passes/messages.ftl | 3 | ||||
| -rw-r--r-- | compiler/rustc_passes/src/check_attr.rs | 11 | ||||
| -rw-r--r-- | compiler/rustc_passes/src/entry.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_passes/src/errors.rs | 4 | ||||
| -rw-r--r-- | compiler/rustc_passes/src/hir_stats.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_resolve/src/build_reduced_graph.rs | 4 | ||||
| -rw-r--r-- | compiler/rustc_resolve/src/diagnostics.rs | 6 | ||||
| -rw-r--r-- | compiler/rustc_resolve/src/ident.rs | 37 | ||||
| -rw-r--r-- | compiler/rustc_resolve/src/late.rs | 15 | ||||
| -rw-r--r-- | compiler/rustc_resolve/src/lib.rs | 1 | ||||
| -rw-r--r-- | compiler/rustc_resolve/src/rustdoc.rs | 8 | ||||
| -rw-r--r-- | compiler/rustc_session/src/config.rs | 29 | ||||
| -rw-r--r-- | compiler/rustc_session/src/options.rs | 21 | ||||
| -rw-r--r-- | compiler/rustc_span/src/hygiene.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_span/src/lib.rs | 23 | ||||
| -rw-r--r-- | compiler/rustc_span/src/profiling.rs | 16 | ||||
| -rw-r--r-- | compiler/rustc_span/src/symbol.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/armv4t_none_eabi.rs | 11 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/thumbv4t_none_eabi.rs | 11 | ||||
| -rw-r--r-- | compiler/rustc_trait_selection/src/traits/error_reporting/method_chain.rs | 8 | ||||
| -rw-r--r-- | compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs | 5 | ||||
| -rw-r--r-- | compiler/rustc_trait_selection/src/traits/outlives_bounds.rs | 4 | ||||
| -rw-r--r-- | compiler/rustc_trait_selection/src/traits/select/candidate_assembly.rs | 10 | ||||
| -rw-r--r-- | compiler/rustc_trait_selection/src/traits/select/mod.rs | 12 | ||||
| -rw-r--r-- | compiler/rustc_traits/src/chalk/lowering.rs | 3 | ||||
| -rw-r--r-- | compiler/rustc_ty_utils/src/layout.rs | 2 | ||||
| -rw-r--r-- | library/alloc/src/collections/binary_heap/mod.rs | 73 | ||||
| -rw-r--r-- | library/alloc/tests/lib.rs | 1 | ||||
| -rw-r--r-- | library/core/src/cell.rs | 2 | ||||
| -rw-r--r-- | library/core/src/cell/lazy.rs | 88 | ||||
| -rw-r--r-- | library/core/src/iter/traits/iterator.rs | 4 | ||||
| -rw-r--r-- | library/core/src/num/nonzero.rs | 7 | ||||
| -rw-r--r-- | library/core/src/primitive_docs.rs | 75 | ||||
| -rw-r--r-- | library/std/Cargo.toml | 2 | ||||
| -rw-r--r-- | library/std/src/os/fd/owned.rs | 2 | ||||
| -rw-r--r-- | library/std/src/primitive_docs.rs | 75 | ||||
| -rw-r--r-- | library/std/src/sys/hermit/net.rs | 31 | ||||
| -rw-r--r-- | src/bootstrap/Cargo.lock | 72 | ||||
| -rw-r--r-- | src/bootstrap/Cargo.toml | 2 | ||||
| -rw-r--r-- | src/bootstrap/bootstrap.py | 3 | ||||
| -rw-r--r-- | src/bootstrap/compile.rs | 51 | ||||
| -rw-r--r-- | src/bootstrap/config.rs | 6 | ||||
| -rw-r--r-- | src/bootstrap/dylib_util.rs | 2 | ||||
| -rw-r--r-- | src/bootstrap/lib.rs | 23 | ||||
| -rw-r--r-- | src/bootstrap/metrics.rs | 13 | ||||
| -rw-r--r-- | src/ci/docker/host-x86_64/x86_64-gnu-tools/browser-ui-test.version | 2 | ||||
| -rw-r--r-- | src/ci/github-actions/ci.yml | 6 | ||||
| -rwxr-xr-x | src/ci/run.sh | 7 | ||||
| m--------- | src/doc/book | 0 | ||||
| m--------- | src/doc/rust-by-example | 0 | ||||
| m--------- | src/doc/rustc-dev-guide | 0 | ||||
| -rw-r--r-- | src/doc/rustc/src/codegen-options/index.md | 8 | ||||
| -rw-r--r-- | src/doc/rustc/src/platform-support/armv4t-none-eabi.md | 7 | ||||
| -rw-r--r-- | src/doc/rustdoc/src/unstable-features.md | 6 | ||||
| -rw-r--r-- | src/librustdoc/clean/mod.rs | 3 | ||||
| -rw-r--r-- | src/librustdoc/clean/types.rs | 62 | ||||
| -rw-r--r-- | src/librustdoc/config.rs | 9 | ||||
| -rw-r--r-- | src/librustdoc/formats/cache.rs | 4 | ||||
| -rw-r--r-- | src/librustdoc/html/format.rs | 31 | ||||
| -rw-r--r-- | src/librustdoc/html/highlight.rs | 4 | ||||
| -rw-r--r-- | src/librustdoc/html/render/sidebar.rs | 7 | ||||
| -rw-r--r-- | src/librustdoc/html/static/js/main.js | 4 | ||||
| -rw-r--r-- | src/librustdoc/json/conversions.rs | 4 | ||||
| -rw-r--r-- | src/librustdoc/json/mod.rs | 2 | ||||
| -rw-r--r-- | src/librustdoc/passes/collect_intra_doc_links.rs | 392 | ||||
| -rw-r--r-- | src/librustdoc/visit_ast.rs | 10 | ||||
| m--------- | src/tools/cargo | 0 | ||||
| -rw-r--r-- | src/tools/clippy/clippy_lints/src/redundant_static_lifetimes.rs | 6 | ||||
| -rw-r--r-- | src/tools/clippy/clippy_lints/src/ref_option_ref.rs | 4 | ||||
| -rw-r--r-- | src/tools/clippy/clippy_lints/src/types/borrowed_box.rs | 2 | ||||
| -rw-r--r-- | src/tools/clippy/clippy_lints/src/types/utils.rs | 4 | ||||
| -rw-r--r-- | src/tools/clippy/clippy_lints/src/use_self.rs | 5 | ||||
| -rw-r--r-- | src/tools/clippy/clippy_utils/src/ast_utils.rs | 6 | ||||
| -rw-r--r-- | src/tools/clippy/clippy_utils/src/hir_utils.rs | 7 | ||||
| -rw-r--r-- | src/tools/compiletest/src/util.rs | 2 | ||||
| -rw-r--r-- | src/tools/miri/Cargo.toml | 2 | ||||
| -rw-r--r-- | src/tools/rust-installer/src/compression.rs | 52 | ||||
| -rw-r--r-- | src/tools/rustfmt/src/items.rs | 26 | ||||
| -rw-r--r-- | src/tools/tidy/src/ui_tests.rs | 2 | ||||
| -rw-r--r-- | tests/codegen/debug-limited.rs | 27 | ||||
| -rw-r--r-- | tests/codegen/debug-line-directives-only.rs | 27 | ||||
| -rw-r--r-- | tests/codegen/debug-line-tables-only.rs | 27 | ||||
| -rw-r--r-- | tests/codegen/vec-in-place.rs | 42 | ||||
| -rw-r--r-- | tests/run-make-fulldeps/hotplug_codegen_backend/Makefile | 2 | ||||
| -rw-r--r-- | tests/run-make-fulldeps/issue-19371/Makefile | 2 | ||||
| -rw-r--r-- | tests/run-make-fulldeps/issue-25581/Makefile | 5 | ||||
| -rw-r--r-- | tests/run-make-fulldeps/obtain-borrowck/Makefile | 2 | ||||
| -rw-r--r-- | tests/run-make-fulldeps/pretty-expanded/Makefile | 2 | ||||
| -rw-r--r-- | tests/run-make/a-b-a-linker-guard/Makefile (renamed from tests/run-make-fulldeps/a-b-a-linker-guard/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/a-b-a-linker-guard/a.rs (renamed from tests/run-make-fulldeps/a-b-a-linker-guard/a.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/a-b-a-linker-guard/b.rs (renamed from tests/run-make-fulldeps/a-b-a-linker-guard/b.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/alloc-no-oom-handling/Makefile (renamed from tests/run-make-fulldeps/alloc-no-oom-handling/Makefile) | 0 | ||||
| -rw-r--r-- | tests/run-make/alloc-no-rc/Makefile (renamed from tests/run-make-fulldeps/alloc-no-rc/Makefile) | 0 | ||||
| -rw-r--r-- | tests/run-make/alloc-no-sync/Makefile (renamed from tests/run-make-fulldeps/alloc-no-sync/Makefile) | 0 | ||||
| -rw-r--r-- | tests/run-make/allow-non-lint-warnings-cmdline/Makefile (renamed from tests/run-make-fulldeps/allow-non-lint-warnings-cmdline/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/allow-non-lint-warnings-cmdline/foo.rs (renamed from tests/run-make-fulldeps/allow-non-lint-warnings-cmdline/foo.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/allow-warnings-cmdline-stability/Makefile (renamed from tests/run-make-fulldeps/allow-warnings-cmdline-stability/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/allow-warnings-cmdline-stability/bar.rs (renamed from tests/run-make-fulldeps/allow-warnings-cmdline-stability/bar.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/allow-warnings-cmdline-stability/foo.rs (renamed from tests/run-make-fulldeps/allow-warnings-cmdline-stability/foo.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/archive-duplicate-names/Makefile (renamed from tests/run-make-fulldeps/archive-duplicate-names/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/archive-duplicate-names/bar.c (renamed from tests/run-make-fulldeps/archive-duplicate-names/bar.c) | 0 | ||||
| -rw-r--r-- | tests/run-make/archive-duplicate-names/bar.rs (renamed from tests/run-make-fulldeps/archive-duplicate-names/bar.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/archive-duplicate-names/foo.c (renamed from tests/run-make-fulldeps/archive-duplicate-names/foo.c) | 0 | ||||
| -rw-r--r-- | tests/run-make/archive-duplicate-names/foo.rs (renamed from tests/run-make-fulldeps/archive-duplicate-names/foo.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/arguments-non-c-like-enum/Makefile (renamed from tests/run-make-fulldeps/arguments-non-c-like-enum/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/arguments-non-c-like-enum/nonclike.rs (renamed from tests/run-make-fulldeps/arguments-non-c-like-enum/nonclike.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/arguments-non-c-like-enum/test.c (renamed from tests/run-make-fulldeps/arguments-non-c-like-enum/test.c) | 0 | ||||
| -rw-r--r-- | tests/run-make/atomic-lock-free/Makefile (renamed from tests/run-make-fulldeps/atomic-lock-free/Makefile) | 0 | ||||
| -rw-r--r-- | tests/run-make/atomic-lock-free/atomic_lock_free.rs (renamed from tests/run-make-fulldeps/atomic-lock-free/atomic_lock_free.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/bare-outfile/Makefile (renamed from tests/run-make-fulldeps/bare-outfile/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/bare-outfile/foo.rs (renamed from tests/run-make-fulldeps/bare-outfile/foo.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/c-dynamic-dylib/Makefile (renamed from tests/run-make-fulldeps/c-dynamic-dylib/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/c-dynamic-dylib/bar.rs (renamed from tests/run-make-fulldeps/c-dynamic-dylib/bar.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/c-dynamic-dylib/cfoo.c (renamed from tests/run-make-fulldeps/c-dynamic-dylib/cfoo.c) | 0 | ||||
| -rw-r--r-- | tests/run-make/c-dynamic-dylib/foo.rs (renamed from tests/run-make-fulldeps/c-dynamic-dylib/foo.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/c-dynamic-rlib/Makefile (renamed from tests/run-make-fulldeps/c-dynamic-rlib/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/c-dynamic-rlib/bar.rs (renamed from tests/run-make-fulldeps/c-dynamic-rlib/bar.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/c-dynamic-rlib/cfoo.c (renamed from tests/run-make-fulldeps/c-dynamic-rlib/cfoo.c) | 0 | ||||
| -rw-r--r-- | tests/run-make/c-dynamic-rlib/foo.rs (renamed from tests/run-make-fulldeps/c-dynamic-rlib/foo.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/c-link-to-rust-dylib/Makefile (renamed from tests/run-make-fulldeps/c-link-to-rust-dylib/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/c-link-to-rust-dylib/bar.c (renamed from tests/run-make-fulldeps/c-link-to-rust-dylib/bar.c) | 0 | ||||
| -rw-r--r-- | tests/run-make/c-link-to-rust-dylib/foo.rs (renamed from tests/run-make-fulldeps/c-link-to-rust-dylib/foo.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/c-link-to-rust-staticlib/Makefile (renamed from tests/run-make-fulldeps/c-link-to-rust-staticlib/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/c-link-to-rust-staticlib/bar.c (renamed from tests/run-make-fulldeps/c-link-to-rust-staticlib/bar.c) | 0 | ||||
| -rw-r--r-- | tests/run-make/c-link-to-rust-staticlib/foo.rs (renamed from tests/run-make-fulldeps/c-link-to-rust-staticlib/foo.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/c-link-to-rust-va-list-fn/Makefile (renamed from tests/run-make-fulldeps/c-link-to-rust-va-list-fn/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/c-link-to-rust-va-list-fn/checkrust.rs (renamed from tests/run-make-fulldeps/c-link-to-rust-va-list-fn/checkrust.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/c-link-to-rust-va-list-fn/test.c (renamed from tests/run-make-fulldeps/c-link-to-rust-va-list-fn/test.c) | 0 | ||||
| -rw-r--r-- | tests/run-make/c-static-dylib/Makefile (renamed from tests/run-make-fulldeps/c-static-dylib/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/c-static-dylib/bar.rs (renamed from tests/run-make-fulldeps/c-static-dylib/bar.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/c-static-dylib/cfoo.c (renamed from tests/run-make-fulldeps/c-static-dylib/cfoo.c) | 0 | ||||
| -rw-r--r-- | tests/run-make/c-static-dylib/foo.rs (renamed from tests/run-make-fulldeps/c-static-dylib/foo.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/c-static-rlib/Makefile (renamed from tests/run-make-fulldeps/c-static-rlib/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/c-static-rlib/bar.rs (renamed from tests/run-make-fulldeps/c-static-rlib/bar.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/c-static-rlib/cfoo.c (renamed from tests/run-make-fulldeps/c-static-rlib/cfoo.c) | 0 | ||||
| -rw-r--r-- | tests/run-make/c-static-rlib/foo.rs (renamed from tests/run-make-fulldeps/c-static-rlib/foo.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/c-unwind-abi-catch-lib-panic/Makefile (renamed from tests/run-make-fulldeps/c-unwind-abi-catch-lib-panic/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/c-unwind-abi-catch-lib-panic/add.c (renamed from tests/run-make-fulldeps/c-unwind-abi-catch-lib-panic/add.c) | 0 | ||||
| -rw-r--r-- | tests/run-make/c-unwind-abi-catch-lib-panic/main.rs (renamed from tests/run-make-fulldeps/c-unwind-abi-catch-lib-panic/main.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/c-unwind-abi-catch-lib-panic/panic.rs (renamed from tests/run-make-fulldeps/c-unwind-abi-catch-lib-panic/panic.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/c-unwind-abi-catch-panic/Makefile (renamed from tests/run-make-fulldeps/c-unwind-abi-catch-panic/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/c-unwind-abi-catch-panic/add.c (renamed from tests/run-make-fulldeps/c-unwind-abi-catch-panic/add.c) | 0 | ||||
| -rw-r--r-- | tests/run-make/c-unwind-abi-catch-panic/main.rs (renamed from tests/run-make-fulldeps/c-unwind-abi-catch-panic/main.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/cat-and-grep-sanity-check/Makefile (renamed from tests/run-make-fulldeps/cat-and-grep-sanity-check/Makefile) | 0 | ||||
| -rw-r--r-- | tests/run-make/cdylib-dylib-linkage/Makefile (renamed from tests/run-make-fulldeps/cdylib-dylib-linkage/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/cdylib-dylib-linkage/bar.rs (renamed from tests/run-make-fulldeps/cdylib-dylib-linkage/bar.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/cdylib-dylib-linkage/foo.c (renamed from tests/run-make-fulldeps/cdylib-dylib-linkage/foo.c) | 0 | ||||
| -rw-r--r-- | tests/run-make/cdylib-dylib-linkage/foo.rs (renamed from tests/run-make-fulldeps/cdylib-dylib-linkage/foo.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/cdylib-fewer-symbols/Makefile (renamed from tests/run-make-fulldeps/cdylib-fewer-symbols/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/cdylib-fewer-symbols/foo.rs (renamed from tests/run-make-fulldeps/cdylib-fewer-symbols/foo.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/cdylib/Makefile (renamed from tests/run-make-fulldeps/cdylib/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/cdylib/bar.rs (renamed from tests/run-make-fulldeps/cdylib/bar.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/cdylib/foo.c (renamed from tests/run-make-fulldeps/cdylib/foo.c) | 0 | ||||
| -rw-r--r-- | tests/run-make/cdylib/foo.rs (renamed from tests/run-make-fulldeps/cdylib/foo.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/codegen-options-parsing/Makefile (renamed from tests/run-make-fulldeps/codegen-options-parsing/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/codegen-options-parsing/dummy.rs (renamed from tests/run-make-fulldeps/codegen-options-parsing/dummy.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/compile-stdin/Makefile (renamed from tests/run-make-fulldeps/compile-stdin/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/compiler-lookup-paths-2/Makefile (renamed from tests/run-make-fulldeps/compiler-lookup-paths-2/Makefile) | 0 | ||||
| -rw-r--r-- | tests/run-make/compiler-lookup-paths-2/a.rs (renamed from tests/run-make-fulldeps/compiler-lookup-paths-2/a.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/compiler-lookup-paths-2/b.rs (renamed from tests/run-make-fulldeps/compiler-lookup-paths-2/b.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/compiler-lookup-paths-2/c.rs (renamed from tests/run-make-fulldeps/compiler-lookup-paths-2/c.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/compiler-lookup-paths/Makefile (renamed from tests/run-make-fulldeps/compiler-lookup-paths/Makefile) | 3 | ||||
| -rw-r--r-- | tests/run-make/compiler-lookup-paths/a.rs (renamed from tests/run-make-fulldeps/compiler-lookup-paths/a.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/compiler-lookup-paths/b.rs (renamed from tests/run-make-fulldeps/compiler-lookup-paths/b.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/compiler-lookup-paths/c.rs (renamed from tests/run-make-fulldeps/compiler-lookup-paths/c.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/compiler-lookup-paths/d.rs (renamed from tests/run-make-fulldeps/compiler-lookup-paths/d.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/compiler-lookup-paths/e.rs (renamed from tests/run-make-fulldeps/compiler-lookup-paths/e.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/compiler-lookup-paths/e2.rs (renamed from tests/run-make-fulldeps/compiler-lookup-paths/e2.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/compiler-lookup-paths/f.rs (renamed from tests/run-make-fulldeps/compiler-lookup-paths/f.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/compiler-lookup-paths/native.c (renamed from tests/run-make-fulldeps/compiler-lookup-paths/native.c) | 0 | ||||
| -rw-r--r-- | tests/run-make/compiler-rt-works-on-mingw/Makefile (renamed from tests/run-make-fulldeps/compiler-rt-works-on-mingw/Makefile) | 0 | ||||
| -rw-r--r-- | tests/run-make/compiler-rt-works-on-mingw/foo.cpp (renamed from tests/run-make-fulldeps/compiler-rt-works-on-mingw/foo.cpp) | 0 | ||||
| -rw-r--r-- | tests/run-make/compiler-rt-works-on-mingw/foo.rs (renamed from tests/run-make-fulldeps/compiler-rt-works-on-mingw/foo.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/const_fn_mir/Makefile | 2 | ||||
| -rw-r--r-- | tests/run-make/core-no-fp-fmt-parse/Makefile (renamed from tests/run-make-fulldeps/core-no-fp-fmt-parse/Makefile) | 0 | ||||
| -rw-r--r-- | tests/run-make/coverage/coverage_tools.mk | 2 | ||||
| -rw-r--r-- | tests/run-make/crate-data-smoke/Makefile (renamed from tests/run-make-fulldeps/crate-data-smoke/Makefile) | 0 | ||||
| -rw-r--r-- | tests/run-make/crate-data-smoke/crate.rs (renamed from tests/run-make-fulldeps/crate-data-smoke/crate.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/crate-data-smoke/lib.rs (renamed from tests/run-make-fulldeps/crate-data-smoke/lib.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/crate-data-smoke/rlib.rs (renamed from tests/run-make-fulldeps/crate-data-smoke/rlib.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/crate-hash-rustc-version/Makefile (renamed from tests/run-make-fulldeps/crate-hash-rustc-version/Makefile) | 3 | ||||
| -rw-r--r-- | tests/run-make/crate-hash-rustc-version/a.rs (renamed from tests/run-make-fulldeps/crate-hash-rustc-version/a.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/crate-hash-rustc-version/b.rs (renamed from tests/run-make-fulldeps/crate-hash-rustc-version/b.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/crate-name-priority/Makefile (renamed from tests/run-make-fulldeps/crate-name-priority/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/crate-name-priority/foo.rs (renamed from tests/run-make-fulldeps/crate-name-priority/foo.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/crate-name-priority/foo1.rs (renamed from tests/run-make-fulldeps/crate-name-priority/foo1.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/cross-lang-lto-clang/Makefile (renamed from tests/run-make-fulldeps/cross-lang-lto-clang/Makefile) | 0 | ||||
| -rw-r--r-- | tests/run-make/cross-lang-lto-clang/clib.c (renamed from tests/run-make-fulldeps/cross-lang-lto-clang/clib.c) | 0 | ||||
| -rw-r--r-- | tests/run-make/cross-lang-lto-clang/cmain.c (renamed from tests/run-make-fulldeps/cross-lang-lto-clang/cmain.c) | 0 | ||||
| -rw-r--r-- | tests/run-make/cross-lang-lto-clang/main.rs (renamed from tests/run-make-fulldeps/cross-lang-lto-clang/main.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/cross-lang-lto-clang/rustlib.rs (renamed from tests/run-make-fulldeps/cross-lang-lto-clang/rustlib.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/cross-lang-lto-pgo-smoketest/Makefile (renamed from tests/run-make-fulldeps/cross-lang-lto-pgo-smoketest/Makefile) | 0 | ||||
| -rw-r--r-- | tests/run-make/cross-lang-lto-pgo-smoketest/clib.c (renamed from tests/run-make-fulldeps/cross-lang-lto-pgo-smoketest/clib.c) | 0 | ||||
| -rw-r--r-- | tests/run-make/cross-lang-lto-pgo-smoketest/cmain.c (renamed from tests/run-make-fulldeps/cross-lang-lto-pgo-smoketest/cmain.c) | 0 | ||||
| -rw-r--r-- | tests/run-make/cross-lang-lto-pgo-smoketest/main.rs (renamed from tests/run-make-fulldeps/cross-lang-lto-pgo-smoketest/main.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/cross-lang-lto-pgo-smoketest/rustlib.rs (renamed from tests/run-make-fulldeps/cross-lang-lto-pgo-smoketest/rustlib.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/cross-lang-lto-upstream-rlibs/Makefile (renamed from tests/run-make-fulldeps/cross-lang-lto-upstream-rlibs/Makefile) | 0 | ||||
| -rw-r--r-- | tests/run-make/cross-lang-lto-upstream-rlibs/staticlib.rs (renamed from tests/run-make-fulldeps/cross-lang-lto-upstream-rlibs/staticlib.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/cross-lang-lto-upstream-rlibs/upstream.rs (renamed from tests/run-make-fulldeps/cross-lang-lto-upstream-rlibs/upstream.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/cross-lang-lto/Makefile (renamed from tests/run-make-fulldeps/cross-lang-lto/Makefile) | 0 | ||||
| -rw-r--r-- | tests/run-make/cross-lang-lto/lib.rs (renamed from tests/run-make-fulldeps/cross-lang-lto/lib.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/cross-lang-lto/main.rs (renamed from tests/run-make-fulldeps/cross-lang-lto/main.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/debug-assertions/Makefile (renamed from tests/run-make-fulldeps/debug-assertions/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/debug-assertions/debug.rs (renamed from tests/run-make-fulldeps/debug-assertions/debug.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/dep-graph/Makefile | 2 | ||||
| -rw-r--r-- | tests/run-make/dep-info-doesnt-run-much/Makefile (renamed from tests/run-make-fulldeps/dep-info-doesnt-run-much/Makefile) | 0 | ||||
| -rw-r--r-- | tests/run-make/dep-info-doesnt-run-much/foo.rs (renamed from tests/run-make-fulldeps/dep-info-doesnt-run-much/foo.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/dep-info-spaces/Makefile (renamed from tests/run-make-fulldeps/dep-info-spaces/Makefile) | 0 | ||||
| -rw-r--r-- | tests/run-make/dep-info-spaces/Makefile.foo (renamed from tests/run-make-fulldeps/dep-info-spaces/Makefile.foo) | 0 | ||||
| -rw-r--r-- | tests/run-make/dep-info-spaces/bar.rs (renamed from tests/run-make-fulldeps/dep-info-spaces/bar.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/dep-info-spaces/foo foo.rs (renamed from tests/run-make-fulldeps/dep-info-spaces/foo foo.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/dep-info-spaces/lib.rs (renamed from tests/run-make-fulldeps/dep-info-spaces/lib.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/dep-info/Makefile (renamed from tests/run-make-fulldeps/dep-info/Makefile) | 0 | ||||
| -rw-r--r-- | tests/run-make/dep-info/Makefile.foo (renamed from tests/run-make-fulldeps/dep-info/Makefile.foo) | 0 | ||||
| -rw-r--r-- | tests/run-make/dep-info/bar.rs (renamed from tests/run-make-fulldeps/dep-info/bar.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/dep-info/foo.rs (renamed from tests/run-make-fulldeps/dep-info/foo.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/dep-info/lib.rs (renamed from tests/run-make-fulldeps/dep-info/lib.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/dep-info/lib2.rs (renamed from tests/run-make-fulldeps/dep-info/lib2.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/doctests-keep-binaries/Makefile (renamed from tests/run-make-fulldeps/doctests-keep-binaries/Makefile) | 3 | ||||
| -rw-r--r-- | tests/run-make/doctests-keep-binaries/t.rs (renamed from tests/run-make-fulldeps/doctests-keep-binaries/t.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/dump-mono-stats/Makefile | 2 | ||||
| -rw-r--r-- | tests/run-make/duplicate-output-flavors/Makefile (renamed from tests/run-make-fulldeps/duplicate-output-flavors/Makefile) | 0 | ||||
| -rw-r--r-- | tests/run-make/duplicate-output-flavors/foo.rs (renamed from tests/run-make-fulldeps/duplicate-output-flavors/foo.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/dylib-chain/Makefile (renamed from tests/run-make-fulldeps/dylib-chain/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/dylib-chain/m1.rs (renamed from tests/run-make-fulldeps/dylib-chain/m1.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/dylib-chain/m2.rs (renamed from tests/run-make-fulldeps/dylib-chain/m2.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/dylib-chain/m3.rs (renamed from tests/run-make-fulldeps/dylib-chain/m3.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/dylib-chain/m4.rs (renamed from tests/run-make-fulldeps/dylib-chain/m4.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/emit-named-files/Makefile | 2 | ||||
| -rw-r--r-- | tests/run-make/emit-path-unhashed/Makefile | 2 | ||||
| -rw-r--r-- | tests/run-make/emit-shared-files/Makefile | 2 | ||||
| -rw-r--r-- | tests/run-make/emit-stack-sizes/Makefile (renamed from tests/run-make-fulldeps/emit-stack-sizes/Makefile) | 0 | ||||
| -rw-r--r-- | tests/run-make/emit-stack-sizes/foo.rs (renamed from tests/run-make-fulldeps/emit-stack-sizes/foo.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/emit/Makefile (renamed from tests/run-make-fulldeps/emit/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/emit/test-24876.rs (renamed from tests/run-make-fulldeps/emit/test-24876.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/emit/test-26235.rs (renamed from tests/run-make-fulldeps/emit/test-26235.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/env-dep-info/Makefile | 2 | ||||
| -rw-r--r-- | tests/run-make/error-found-staticlib-instead-crate/Makefile (renamed from tests/run-make-fulldeps/error-found-staticlib-instead-crate/Makefile) | 0 | ||||
| -rw-r--r-- | tests/run-make/error-found-staticlib-instead-crate/bar.rs (renamed from tests/run-make-fulldeps/error-found-staticlib-instead-crate/bar.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/error-found-staticlib-instead-crate/foo.rs (renamed from tests/run-make-fulldeps/error-found-staticlib-instead-crate/foo.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/error-writing-dependencies/Makefile (renamed from tests/run-make-fulldeps/error-writing-dependencies/Makefile) | 0 | ||||
| -rw-r--r-- | tests/run-make/error-writing-dependencies/foo.rs (renamed from tests/run-make-fulldeps/error-writing-dependencies/foo.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/exit-code/Makefile (renamed from tests/run-make-fulldeps/exit-code/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/exit-code/compile-error.rs (renamed from tests/run-make-fulldeps/exit-code/compile-error.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/exit-code/lint-failure.rs (renamed from tests/run-make-fulldeps/exit-code/lint-failure.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/exit-code/success.rs (renamed from tests/run-make-fulldeps/exit-code/success.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/export-executable-symbols/Makefile | 2 | ||||
| -rw-r--r-- | tests/run-make/extern-diff-internal-name/Makefile (renamed from tests/run-make-fulldeps/extern-diff-internal-name/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/extern-diff-internal-name/lib.rs (renamed from tests/run-make-fulldeps/extern-diff-internal-name/lib.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/extern-diff-internal-name/test.rs (renamed from tests/run-make-fulldeps/extern-diff-internal-name/test.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/extern-flag-disambiguates/Makefile (renamed from tests/run-make-fulldeps/extern-flag-disambiguates/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/extern-flag-disambiguates/a.rs (renamed from tests/run-make-fulldeps/extern-flag-disambiguates/a.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/extern-flag-disambiguates/b.rs (renamed from tests/run-make-fulldeps/extern-flag-disambiguates/b.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/extern-flag-disambiguates/c.rs (renamed from tests/run-make-fulldeps/extern-flag-disambiguates/c.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/extern-flag-disambiguates/d.rs (renamed from tests/run-make-fulldeps/extern-flag-disambiguates/d.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/extern-flag-fun/Makefile (renamed from tests/run-make-fulldeps/extern-flag-fun/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/extern-flag-fun/bar-alt.rs (renamed from tests/run-make-fulldeps/extern-flag-fun/bar-alt.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/extern-flag-fun/bar.rs (renamed from tests/run-make-fulldeps/extern-flag-fun/bar.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/extern-flag-fun/foo.rs (renamed from tests/run-make-fulldeps/extern-flag-fun/foo.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/extern-flag-fun/gated_unstable.rs (renamed from tests/run-make-fulldeps/extern-flag-fun/gated_unstable.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/extern-flag-fun/rustc.rs (renamed from tests/run-make-fulldeps/extern-flag-fun/rustc.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/extern-flag-pathless/Makefile (renamed from tests/run-make-fulldeps/extern-flag-pathless/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/extern-flag-pathless/bar-dynamic.rs (renamed from tests/run-make-fulldeps/extern-flag-pathless/bar-dynamic.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/extern-flag-pathless/bar-static.rs (renamed from tests/run-make-fulldeps/extern-flag-pathless/bar-static.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/extern-flag-pathless/foo.rs (renamed from tests/run-make-fulldeps/extern-flag-pathless/foo.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/extern-flag-rename-transitive/Makefile (renamed from tests/run-make-fulldeps/extern-flag-rename-transitive/Makefile) | 0 | ||||
| -rw-r--r-- | tests/run-make/extern-flag-rename-transitive/bar.rs (renamed from tests/run-make-fulldeps/extern-flag-rename-transitive/bar.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/extern-flag-rename-transitive/baz.rs (renamed from tests/run-make-fulldeps/extern-flag-rename-transitive/baz.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/extern-flag-rename-transitive/foo.rs (renamed from tests/run-make-fulldeps/extern-flag-rename-transitive/foo.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/extern-fn-generic/Makefile (renamed from tests/run-make-fulldeps/extern-fn-generic/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/extern-fn-generic/test.c (renamed from tests/run-make-fulldeps/extern-fn-generic/test.c) | 0 | ||||
| -rw-r--r-- | tests/run-make/extern-fn-generic/test.rs (renamed from tests/run-make-fulldeps/extern-fn-generic/test.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/extern-fn-generic/testcrate.rs (renamed from tests/run-make-fulldeps/extern-fn-generic/testcrate.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/extern-fn-mangle/Makefile (renamed from tests/run-make-fulldeps/extern-fn-mangle/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/extern-fn-mangle/test.c (renamed from tests/run-make-fulldeps/extern-fn-mangle/test.c) | 0 | ||||
| -rw-r--r-- | tests/run-make/extern-fn-mangle/test.rs (renamed from tests/run-make-fulldeps/extern-fn-mangle/test.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/extern-fn-reachable/Makefile (renamed from tests/run-make-fulldeps/extern-fn-reachable/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/extern-fn-reachable/dylib.rs (renamed from tests/run-make-fulldeps/extern-fn-reachable/dylib.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/extern-fn-struct-passing-abi/Makefile (renamed from tests/run-make-fulldeps/extern-fn-struct-passing-abi/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/extern-fn-struct-passing-abi/test.c (renamed from tests/run-make-fulldeps/extern-fn-struct-passing-abi/test.c) | 0 | ||||
| -rw-r--r-- | tests/run-make/extern-fn-struct-passing-abi/test.rs (renamed from tests/run-make-fulldeps/extern-fn-struct-passing-abi/test.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/extern-fn-with-extern-types/Makefile (renamed from tests/run-make-fulldeps/extern-fn-with-extern-types/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/extern-fn-with-extern-types/ctest.c (renamed from tests/run-make-fulldeps/extern-fn-with-extern-types/ctest.c) | 0 | ||||
| -rw-r--r-- | tests/run-make/extern-fn-with-extern-types/test.rs (renamed from tests/run-make-fulldeps/extern-fn-with-extern-types/test.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/extern-fn-with-packed-struct/Makefile (renamed from tests/run-make-fulldeps/extern-fn-with-packed-struct/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/extern-fn-with-packed-struct/test.c (renamed from tests/run-make-fulldeps/extern-fn-with-packed-struct/test.c) | 0 | ||||
| -rw-r--r-- | tests/run-make/extern-fn-with-packed-struct/test.rs (renamed from tests/run-make-fulldeps/extern-fn-with-packed-struct/test.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/extern-fn-with-union/Makefile (renamed from tests/run-make-fulldeps/extern-fn-with-union/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/extern-fn-with-union/ctest.c (renamed from tests/run-make-fulldeps/extern-fn-with-union/ctest.c) | 0 | ||||
| -rw-r--r-- | tests/run-make/extern-fn-with-union/test.rs (renamed from tests/run-make-fulldeps/extern-fn-with-union/test.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/extern-fn-with-union/testcrate.rs (renamed from tests/run-make-fulldeps/extern-fn-with-union/testcrate.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/extern-multiple-copies/Makefile (renamed from tests/run-make-fulldeps/extern-multiple-copies/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/extern-multiple-copies/bar.rs (renamed from tests/run-make-fulldeps/extern-multiple-copies/bar.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/extern-multiple-copies/foo1.rs (renamed from tests/run-make-fulldeps/extern-multiple-copies/foo1.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/extern-multiple-copies/foo2.rs (renamed from tests/run-make-fulldeps/extern-multiple-copies/foo2.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/extern-multiple-copies2/Makefile (renamed from tests/run-make-fulldeps/extern-multiple-copies2/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/extern-multiple-copies2/bar.rs (renamed from tests/run-make-fulldeps/extern-multiple-copies2/bar.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/extern-multiple-copies2/foo1.rs (renamed from tests/run-make-fulldeps/extern-multiple-copies2/foo1.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/extern-multiple-copies2/foo2.rs (renamed from tests/run-make-fulldeps/extern-multiple-copies2/foo2.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/extern-overrides-distribution/Makefile (renamed from tests/run-make-fulldeps/extern-overrides-distribution/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/extern-overrides-distribution/libc.rs (renamed from tests/run-make-fulldeps/extern-overrides-distribution/libc.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/extern-overrides-distribution/main.rs (renamed from tests/run-make-fulldeps/extern-overrides-distribution/main.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/extra-filename-with-temp-outputs/Makefile (renamed from tests/run-make-fulldeps/extra-filename-with-temp-outputs/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/extra-filename-with-temp-outputs/foo.rs (renamed from tests/run-make-fulldeps/extra-filename-with-temp-outputs/foo.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/fmt-write-bloat/Makefile | 2 | ||||
| -rw-r--r-- | tests/run-make/foreign-double-unwind/Makefile (renamed from tests/run-make-fulldeps/foreign-double-unwind/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/foreign-double-unwind/foo.cpp (renamed from tests/run-make-fulldeps/foreign-double-unwind/foo.cpp) | 0 | ||||
| -rw-r--r-- | tests/run-make/foreign-double-unwind/foo.rs (renamed from tests/run-make-fulldeps/foreign-double-unwind/foo.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/foreign-exceptions/Makefile (renamed from tests/run-make-fulldeps/foreign-exceptions/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/foreign-exceptions/foo.cpp (renamed from tests/run-make-fulldeps/foreign-exceptions/foo.cpp) | 0 | ||||
| -rw-r--r-- | tests/run-make/foreign-exceptions/foo.rs (renamed from tests/run-make-fulldeps/foreign-exceptions/foo.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/foreign-rust-exceptions/Makefile (renamed from tests/run-make-fulldeps/foreign-rust-exceptions/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/foreign-rust-exceptions/bar.rs (renamed from tests/run-make-fulldeps/foreign-rust-exceptions/bar.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/foreign-rust-exceptions/foo.rs (renamed from tests/run-make-fulldeps/foreign-rust-exceptions/foo.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/fpic/Makefile (renamed from tests/run-make-fulldeps/fpic/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/fpic/hello.rs (renamed from tests/run-make-fulldeps/fpic/hello.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/glibc-staticlib-args/Makefile (renamed from tests/run-make-fulldeps/glibc-staticlib-args/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/glibc-staticlib-args/library.rs (renamed from tests/run-make-fulldeps/glibc-staticlib-args/library.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/glibc-staticlib-args/program.c (renamed from tests/run-make-fulldeps/glibc-staticlib-args/program.c) | 0 | ||||
| -rw-r--r-- | tests/run-make/hir-tree/Makefile (renamed from tests/run-make-fulldeps/hir-tree/Makefile) | 0 | ||||
| -rw-r--r-- | tests/run-make/hir-tree/input.rs (renamed from tests/run-make-fulldeps/hir-tree/input.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/include_bytes_deps/Makefile (renamed from tests/run-make-fulldeps/include_bytes_deps/Makefile) | 0 | ||||
| -rw-r--r-- | tests/run-make/include_bytes_deps/input.bin (renamed from tests/run-make-fulldeps/include_bytes_deps/input.bin) | 0 | ||||
| -rw-r--r-- | tests/run-make/include_bytes_deps/input.md (renamed from tests/run-make-fulldeps/include_bytes_deps/input.md) | 0 | ||||
| -rw-r--r-- | tests/run-make/include_bytes_deps/input.txt (renamed from tests/run-make-fulldeps/include_bytes_deps/input.txt) | 0 | ||||
| -rw-r--r-- | tests/run-make/include_bytes_deps/main.rs (renamed from tests/run-make-fulldeps/include_bytes_deps/main.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/incr-add-rust-src-component/Makefile (renamed from tests/run-make-fulldeps/incr-add-rust-src-component/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/incr-add-rust-src-component/main.rs (renamed from tests/run-make-fulldeps/incr-add-rust-src-component/main.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/incr-foreign-head-span/Makefile | 2 | ||||
| -rw-r--r-- | tests/run-make/incr-prev-body-beyond-eof/Makefile | 2 | ||||
| -rw-r--r-- | tests/run-make/incremental-session-fail/Makefile | 2 | ||||
| -rw-r--r-- | tests/run-make/inline-always-many-cgu/Makefile (renamed from tests/run-make-fulldeps/inline-always-many-cgu/Makefile) | 0 | ||||
| -rw-r--r-- | tests/run-make/inline-always-many-cgu/foo.rs (renamed from tests/run-make-fulldeps/inline-always-many-cgu/foo.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/interdependent-c-libraries/Makefile (renamed from tests/run-make-fulldeps/interdependent-c-libraries/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/interdependent-c-libraries/bar.c (renamed from tests/run-make-fulldeps/interdependent-c-libraries/bar.c) | 0 | ||||
| -rw-r--r-- | tests/run-make/interdependent-c-libraries/bar.rs (renamed from tests/run-make-fulldeps/interdependent-c-libraries/bar.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/interdependent-c-libraries/foo.c (renamed from tests/run-make-fulldeps/interdependent-c-libraries/foo.c) | 0 | ||||
| -rw-r--r-- | tests/run-make/interdependent-c-libraries/foo.rs (renamed from tests/run-make-fulldeps/interdependent-c-libraries/foo.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/interdependent-c-libraries/main.rs (renamed from tests/run-make-fulldeps/interdependent-c-libraries/main.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/intrinsic-unreachable/Makefile (renamed from tests/run-make-fulldeps/intrinsic-unreachable/Makefile) | 0 | ||||
| -rw-r--r-- | tests/run-make/intrinsic-unreachable/exit-ret.rs (renamed from tests/run-make-fulldeps/intrinsic-unreachable/exit-ret.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/intrinsic-unreachable/exit-unreachable.rs (renamed from tests/run-make-fulldeps/intrinsic-unreachable/exit-unreachable.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/invalid-library/Makefile (renamed from tests/run-make-fulldeps/invalid-library/Makefile) | 0 | ||||
| -rw-r--r-- | tests/run-make/invalid-library/foo.rs (renamed from tests/run-make-fulldeps/invalid-library/foo.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/invalid-so/Makefile | 2 | ||||
| -rw-r--r-- | tests/run-make/invalid-staticlib/Makefile (renamed from tests/run-make-fulldeps/invalid-staticlib/Makefile) | 0 | ||||
| -rw-r--r-- | tests/run-make/issue-10971-temps-dir/Makefile | 2 | ||||
| -rw-r--r-- | tests/run-make/issue-11908/Makefile (renamed from tests/run-make-fulldeps/issue-11908/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/issue-11908/bar.rs (renamed from tests/run-make-fulldeps/issue-11908/bar.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/issue-11908/foo.rs (renamed from tests/run-make-fulldeps/issue-11908/foo.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/issue-14500/Makefile (renamed from tests/run-make-fulldeps/issue-14500/Makefile) | 2 | ||||
| -rw-r--r-- | tests/run-make/issue-14500/bar.rs (renamed from tests/run-make-fulldeps/issue-14500/bar.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/issue-14500/foo.c (renamed from tests/run-make-fulldeps/issue-14500/foo.c) | 0 | ||||
| -rw-r--r-- | tests/run-make/issue-14500/foo.rs (renamed from tests/run-make-fulldeps/issue-14500/foo.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/issue-14698/Makefile (renamed from tests/run-make-fulldeps/issue-14698/Makefile) | 0 | ||||
| -rw-r--r-- | tests/run-make/issue-14698/foo.rs (renamed from tests/run-make-fulldeps/issue-14698/foo.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/issue-15460/Makefile (renamed from tests/run-make-fulldeps/issue-15460/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/issue-15460/bar.rs (renamed from tests/run-make-fulldeps/issue-15460/bar.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/issue-15460/foo.c (renamed from tests/run-make-fulldeps/issue-15460/foo.c) | 0 | ||||
| -rw-r--r-- | tests/run-make/issue-15460/foo.rs (renamed from tests/run-make-fulldeps/issue-15460/foo.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/issue-18943/Makefile (renamed from tests/run-make-fulldeps/issue-18943/Makefile) | 0 | ||||
| -rw-r--r-- | tests/run-make/issue-18943/foo.rs (renamed from tests/run-make-fulldeps/issue-18943/foo.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/issue-20626/Makefile (renamed from tests/run-make-fulldeps/issue-20626/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/issue-20626/foo.rs (renamed from tests/run-make-fulldeps/issue-20626/foo.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/issue-22131/Makefile (renamed from tests/run-make-fulldeps/issue-22131/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/issue-22131/foo.rs (renamed from tests/run-make-fulldeps/issue-22131/foo.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/issue-24445/Makefile (renamed from tests/run-make-fulldeps/issue-24445/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/issue-24445/foo.c (renamed from tests/run-make-fulldeps/issue-24445/foo.c) | 0 | ||||
| -rw-r--r-- | tests/run-make/issue-24445/foo.rs (renamed from tests/run-make-fulldeps/issue-24445/foo.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/issue-25581/Makefile | 6 | ||||
| -rw-r--r-- | tests/run-make/issue-25581/test.c (renamed from tests/run-make-fulldeps/issue-25581/test.c) | 0 | ||||
| -rw-r--r-- | tests/run-make/issue-25581/test.rs (renamed from tests/run-make-fulldeps/issue-25581/test.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/issue-26006/Makefile (renamed from tests/run-make-fulldeps/issue-26006/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/issue-26006/in/libc/lib.rs (renamed from tests/run-make-fulldeps/issue-26006/in/libc/lib.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/issue-26006/in/time/lib.rs (renamed from tests/run-make-fulldeps/issue-26006/in/time/lib.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/issue-26092/Makefile (renamed from tests/run-make-fulldeps/issue-26092/Makefile) | 0 | ||||
| -rw-r--r-- | tests/run-make/issue-26092/blank.rs (renamed from tests/run-make-fulldeps/issue-26092/blank.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/issue-28595/Makefile (renamed from tests/run-make-fulldeps/issue-28595/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/issue-28595/a.c (renamed from tests/run-make-fulldeps/issue-28595/a.c) | 0 | ||||
| -rw-r--r-- | tests/run-make/issue-28595/a.rs (renamed from tests/run-make-fulldeps/issue-28595/a.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/issue-28595/b.c (renamed from tests/run-make-fulldeps/issue-28595/b.c) | 0 | ||||
| -rw-r--r-- | tests/run-make/issue-28595/b.rs (renamed from tests/run-make-fulldeps/issue-28595/b.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/issue-28766/Makefile (renamed from tests/run-make-fulldeps/issue-28766/Makefile) | 0 | ||||
| -rw-r--r-- | tests/run-make/issue-28766/foo.rs (renamed from tests/run-make-fulldeps/issue-28766/foo.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/issue-28766/main.rs (renamed from tests/run-make-fulldeps/issue-28766/main.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/issue-30063/Makefile (renamed from tests/run-make-fulldeps/issue-30063/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/issue-30063/foo.rs (renamed from tests/run-make-fulldeps/issue-30063/foo.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/issue-33329/Makefile (renamed from tests/run-make-fulldeps/issue-33329/Makefile) | 0 | ||||
| -rw-r--r-- | tests/run-make/issue-33329/main.rs (renamed from tests/run-make-fulldeps/issue-33329/main.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/issue-35164/Makefile (renamed from tests/run-make-fulldeps/issue-35164/Makefile) | 0 | ||||
| -rw-r--r-- | tests/run-make/issue-35164/main.rs (renamed from tests/run-make-fulldeps/issue-35164/main.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/issue-35164/submodule/mod.rs (renamed from tests/run-make-fulldeps/issue-35164/submodule/mod.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/issue-36710/Makefile | 3 | ||||
| -rw-r--r-- | tests/run-make/issue-37839/Makefile (renamed from tests/run-make-fulldeps/issue-37839/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/issue-37839/a.rs (renamed from tests/run-make-fulldeps/issue-37839/a.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/issue-37839/b.rs (renamed from tests/run-make-fulldeps/issue-37839/b.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/issue-37839/c.rs (renamed from tests/run-make-fulldeps/issue-37839/c.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/issue-37893/Makefile (renamed from tests/run-make-fulldeps/issue-37893/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/issue-37893/a.rs (renamed from tests/run-make-fulldeps/issue-37893/a.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/issue-37893/b.rs (renamed from tests/run-make-fulldeps/issue-37893/b.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/issue-37893/c.rs (renamed from tests/run-make-fulldeps/issue-37893/c.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/issue-38237/Makefile (renamed from tests/run-make-fulldeps/issue-38237/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/issue-38237/bar.rs (renamed from tests/run-make-fulldeps/issue-38237/bar.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/issue-38237/baz.rs (renamed from tests/run-make-fulldeps/issue-38237/baz.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/issue-38237/foo.rs (renamed from tests/run-make-fulldeps/issue-38237/foo.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/issue-40535/Makefile (renamed from tests/run-make-fulldeps/issue-40535/Makefile) | 0 | ||||
| -rw-r--r-- | tests/run-make/issue-40535/bar.rs (renamed from tests/run-make-fulldeps/issue-40535/bar.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/issue-40535/baz.rs (renamed from tests/run-make-fulldeps/issue-40535/baz.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/issue-40535/foo.rs (renamed from tests/run-make-fulldeps/issue-40535/foo.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/issue-46239/Makefile (renamed from tests/run-make-fulldeps/issue-46239/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/issue-46239/main.rs (renamed from tests/run-make-fulldeps/issue-46239/main.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/issue-47384/Makefile | 2 | ||||
| -rw-r--r-- | tests/run-make/issue-47551/Makefile (renamed from tests/run-make-fulldeps/issue-47551/Makefile) | 0 | ||||
| -rw-r--r-- | tests/run-make/issue-47551/eh_frame-terminator.rs (renamed from tests/run-make-fulldeps/issue-47551/eh_frame-terminator.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/issue-51671/Makefile (renamed from tests/run-make-fulldeps/issue-51671/Makefile) | 0 | ||||
| -rw-r--r-- | tests/run-make/issue-51671/app.rs (renamed from tests/run-make-fulldeps/issue-51671/app.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/issue-53964/Makefile (renamed from tests/run-make-fulldeps/issue-53964/Makefile) | 0 | ||||
| -rw-r--r-- | tests/run-make/issue-53964/app.rs (renamed from tests/run-make-fulldeps/issue-53964/app.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/issue-53964/panic.rs (renamed from tests/run-make-fulldeps/issue-53964/panic.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/issue-64153/Makefile (renamed from tests/run-make-fulldeps/issue-64153/Makefile) | 0 | ||||
| -rw-r--r-- | tests/run-make/issue-64153/downstream.rs (renamed from tests/run-make-fulldeps/issue-64153/downstream.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/issue-64153/upstream.rs (renamed from tests/run-make-fulldeps/issue-64153/upstream.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/issue-68794-textrel-on-minimal-lib/Makefile (renamed from tests/run-make-fulldeps/issue-68794-textrel-on-minimal-lib/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/issue-68794-textrel-on-minimal-lib/bar.c (renamed from tests/run-make-fulldeps/issue-68794-textrel-on-minimal-lib/bar.c) | 0 | ||||
| -rw-r--r-- | tests/run-make/issue-68794-textrel-on-minimal-lib/foo.rs (renamed from tests/run-make-fulldeps/issue-68794-textrel-on-minimal-lib/foo.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/issue-69368/Makefile (renamed from tests/run-make-fulldeps/issue-69368/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/issue-69368/a.rs (renamed from tests/run-make-fulldeps/issue-69368/a.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/issue-69368/b.rs (renamed from tests/run-make-fulldeps/issue-69368/b.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/issue-69368/c.rs (renamed from tests/run-make-fulldeps/issue-69368/c.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/issue-71519/Makefile | 2 | ||||
| -rw-r--r-- | tests/run-make/issue-7349/Makefile (renamed from tests/run-make-fulldeps/issue-7349/Makefile) | 0 | ||||
| -rw-r--r-- | tests/run-make/issue-7349/foo.rs (renamed from tests/run-make-fulldeps/issue-7349/foo.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/issue-83045/Makefile (renamed from tests/run-make-fulldeps/issue-83045/Makefile) | 2 | ||||
| -rw-r--r-- | tests/run-make/issue-83045/a.rs (renamed from tests/run-make-fulldeps/issue-83045/a.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/issue-83045/b.rs (renamed from tests/run-make-fulldeps/issue-83045/b.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/issue-83045/c.rs (renamed from tests/run-make-fulldeps/issue-83045/c.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/issue-83112-incr-test-moved-file/Makefile | 2 | ||||
| -rw-r--r-- | tests/run-make/issue-84395-lto-embed-bitcode/Makefile (renamed from tests/run-make-fulldeps/issue-84395-lto-embed-bitcode/Makefile) | 2 | ||||
| -rw-r--r-- | tests/run-make/issue-84395-lto-embed-bitcode/test.rs (renamed from tests/run-make-fulldeps/issue-84395-lto-embed-bitcode/test.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/issue-85019-moved-src-dir/Makefile | 2 | ||||
| -rw-r--r-- | tests/run-make/issue-85401-static-mir/Makefile | 2 | ||||
| -rw-r--r-- | tests/run-make/issue-85441/Makefile | 2 | ||||
| -rw-r--r-- | tests/run-make/issue-88756-default-output/Makefile | 2 | ||||
| -rw-r--r-- | tests/run-make/issue-96498/Makefile | 2 | ||||
| -rw-r--r-- | tests/run-make/issue-97463-abi-param-passing/Makefile (renamed from tests/run-make-fulldeps/issue-97463-abi-param-passing/Makefile) | 3 | ||||
| -rw-r--r-- | tests/run-make/issue-97463-abi-param-passing/bad.c (renamed from tests/run-make-fulldeps/issue-97463-abi-param-passing/bad.c) | 0 | ||||
| -rw-r--r-- | tests/run-make/issue-97463-abi-param-passing/param_passing.rs (renamed from tests/run-make-fulldeps/issue-97463-abi-param-passing/param_passing.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/issue64319/Makefile (renamed from tests/run-make-fulldeps/issue64319/Makefile) | 3 | ||||
| -rw-r--r-- | tests/run-make/issue64319/bar.rs (renamed from tests/run-make-fulldeps/issue64319/bar.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/issue64319/foo.rs (renamed from tests/run-make-fulldeps/issue64319/foo.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/jobserver-error/Makefile | 2 | ||||
| -rw-r--r-- | tests/run-make/libs-through-symlinks/Makefile (renamed from tests/run-make-fulldeps/libs-through-symlinks/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/libs-through-symlinks/bar.rs (renamed from tests/run-make-fulldeps/libs-through-symlinks/bar.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/libs-through-symlinks/foo.rs (renamed from tests/run-make-fulldeps/libs-through-symlinks/foo.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/libtest-json/Makefile (renamed from tests/run-make-fulldeps/libtest-json/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/libtest-json/f.rs (renamed from tests/run-make-fulldeps/libtest-json/f.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/libtest-json/output-default.json (renamed from tests/run-make-fulldeps/libtest-json/output-default.json) | 0 | ||||
| -rw-r--r-- | tests/run-make/libtest-json/output-stdout-success.json (renamed from tests/run-make-fulldeps/libtest-json/output-stdout-success.json) | 0 | ||||
| -rwxr-xr-x | tests/run-make/libtest-json/validate_json.py (renamed from tests/run-make-fulldeps/libtest-json/validate_json.py) | 0 | ||||
| -rw-r--r-- | tests/run-make/libtest-thread-limit/Makefile | 2 | ||||
| -rw-r--r-- | tests/run-make/link-arg/Makefile (renamed from tests/run-make-fulldeps/link-arg/Makefile) | 0 | ||||
| -rw-r--r-- | tests/run-make/link-arg/empty.rs (renamed from tests/run-make-fulldeps/link-arg/empty.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/link-args-order/Makefile (renamed from tests/run-make-fulldeps/link-args-order/Makefile) | 0 | ||||
| -rw-r--r-- | tests/run-make/link-args-order/empty.rs (renamed from tests/run-make-fulldeps/link-args-order/empty.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/link-cfg/Makefile (renamed from tests/run-make-fulldeps/link-cfg/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/link-cfg/dep-with-staticlib.rs (renamed from tests/run-make-fulldeps/link-cfg/dep-with-staticlib.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/link-cfg/dep.rs (renamed from tests/run-make-fulldeps/link-cfg/dep.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/link-cfg/no-deps.rs (renamed from tests/run-make-fulldeps/link-cfg/no-deps.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/link-cfg/return1.c (renamed from tests/run-make-fulldeps/link-cfg/return1.c) | 0 | ||||
| -rw-r--r-- | tests/run-make/link-cfg/return2.c (renamed from tests/run-make-fulldeps/link-cfg/return2.c) | 0 | ||||
| -rw-r--r-- | tests/run-make/link-cfg/return3.c (renamed from tests/run-make-fulldeps/link-cfg/return3.c) | 0 | ||||
| -rw-r--r-- | tests/run-make/link-cfg/with-deps.rs (renamed from tests/run-make-fulldeps/link-cfg/with-deps.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/link-cfg/with-staticlib-deps.rs (renamed from tests/run-make-fulldeps/link-cfg/with-staticlib-deps.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/link-dedup/Makefile (renamed from tests/run-make-fulldeps/link-dedup/Makefile) | 0 | ||||
| -rw-r--r-- | tests/run-make/link-dedup/depa.rs (renamed from tests/run-make-fulldeps/link-dedup/depa.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/link-dedup/depb.rs (renamed from tests/run-make-fulldeps/link-dedup/depb.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/link-dedup/depc.rs (renamed from tests/run-make-fulldeps/link-dedup/depc.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/link-dedup/empty.rs (renamed from tests/run-make-fulldeps/link-dedup/empty.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/link-path-order/Makefile (renamed from tests/run-make-fulldeps/link-path-order/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/link-path-order/correct.c (renamed from tests/run-make-fulldeps/link-path-order/correct.c) | 0 | ||||
| -rw-r--r-- | tests/run-make/link-path-order/main.rs (renamed from tests/run-make-fulldeps/link-path-order/main.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/link-path-order/wrong.c (renamed from tests/run-make-fulldeps/link-path-order/wrong.c) | 0 | ||||
| -rw-r--r-- | tests/run-make/linkage-attr-on-static/Makefile (renamed from tests/run-make-fulldeps/linkage-attr-on-static/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/linkage-attr-on-static/bar.rs (renamed from tests/run-make-fulldeps/linkage-attr-on-static/bar.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/linkage-attr-on-static/foo.c (renamed from tests/run-make-fulldeps/linkage-attr-on-static/foo.c) | 0 | ||||
| -rw-r--r-- | tests/run-make/llvm-outputs/Makefile | 2 | ||||
| -rw-r--r-- | tests/run-make/long-linker-command-lines-cmd-exe/Makefile (renamed from tests/run-make-fulldeps/long-linker-command-lines-cmd-exe/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/long-linker-command-lines-cmd-exe/foo.bat (renamed from tests/run-make-fulldeps/long-linker-command-lines-cmd-exe/foo.bat) | 0 | ||||
| -rw-r--r-- | tests/run-make/long-linker-command-lines-cmd-exe/foo.rs (renamed from tests/run-make-fulldeps/long-linker-command-lines-cmd-exe/foo.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/long-linker-command-lines/Makefile (renamed from tests/run-make-fulldeps/long-linker-command-lines/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/long-linker-command-lines/foo.rs (renamed from tests/run-make-fulldeps/long-linker-command-lines/foo.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/longjmp-across-rust/Makefile (renamed from tests/run-make-fulldeps/longjmp-across-rust/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/longjmp-across-rust/foo.c (renamed from tests/run-make-fulldeps/longjmp-across-rust/foo.c) | 0 | ||||
| -rw-r--r-- | tests/run-make/longjmp-across-rust/main.rs (renamed from tests/run-make-fulldeps/longjmp-across-rust/main.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/ls-metadata/Makefile (renamed from tests/run-make-fulldeps/ls-metadata/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/ls-metadata/foo.rs (renamed from tests/run-make-fulldeps/ls-metadata/foo.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/lto-dylib-dep/Makefile (renamed from tests/run-make-fulldeps/lto-dylib-dep/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/lto-dylib-dep/a_dylib.rs (renamed from tests/run-make-fulldeps/lto-dylib-dep/a_dylib.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/lto-dylib-dep/main.rs (renamed from tests/run-make-fulldeps/lto-dylib-dep/main.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/lto-empty/Makefile (renamed from tests/run-make-fulldeps/lto-empty/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/lto-empty/lib.rs (renamed from tests/run-make-fulldeps/lto-empty/lib.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/lto-no-link-whole-rlib/Makefile (renamed from tests/run-make-fulldeps/lto-no-link-whole-rlib/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/lto-no-link-whole-rlib/bar.c (renamed from tests/run-make-fulldeps/lto-no-link-whole-rlib/bar.c) | 0 | ||||
| -rw-r--r-- | tests/run-make/lto-no-link-whole-rlib/foo.c (renamed from tests/run-make-fulldeps/lto-no-link-whole-rlib/foo.c) | 0 | ||||
| -rw-r--r-- | tests/run-make/lto-no-link-whole-rlib/lib1.rs (renamed from tests/run-make-fulldeps/lto-no-link-whole-rlib/lib1.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/lto-no-link-whole-rlib/lib2.rs (renamed from tests/run-make-fulldeps/lto-no-link-whole-rlib/lib2.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/lto-no-link-whole-rlib/main.rs (renamed from tests/run-make-fulldeps/lto-no-link-whole-rlib/main.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/lto-readonly-lib/Makefile (renamed from tests/run-make-fulldeps/lto-readonly-lib/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/lto-readonly-lib/lib.rs (renamed from tests/run-make-fulldeps/lto-readonly-lib/lib.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/lto-readonly-lib/main.rs (renamed from tests/run-make-fulldeps/lto-readonly-lib/main.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/lto-smoke-c/Makefile (renamed from tests/run-make-fulldeps/lto-smoke-c/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/lto-smoke-c/bar.c (renamed from tests/run-make-fulldeps/lto-smoke-c/bar.c) | 0 | ||||
| -rw-r--r-- | tests/run-make/lto-smoke-c/foo.rs (renamed from tests/run-make-fulldeps/lto-smoke-c/foo.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/lto-smoke/Makefile (renamed from tests/run-make-fulldeps/lto-smoke/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/lto-smoke/lib.rs (renamed from tests/run-make-fulldeps/lto-smoke/lib.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/lto-smoke/main.rs (renamed from tests/run-make-fulldeps/lto-smoke/main.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/macos-deployment-target/Makefile | 2 | ||||
| -rw-r--r-- | tests/run-make/macos-fat-archive/Makefile | 2 | ||||
| -rw-r--r-- | tests/run-make/manual-crate-name/Makefile (renamed from tests/run-make-fulldeps/manual-crate-name/Makefile) | 0 | ||||
| -rw-r--r-- | tests/run-make/manual-crate-name/bar.rs (renamed from tests/run-make-fulldeps/manual-crate-name/bar.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/manual-link/Makefile (renamed from tests/run-make-fulldeps/manual-link/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/manual-link/bar.c (renamed from tests/run-make-fulldeps/manual-link/bar.c) | 0 | ||||
| -rw-r--r-- | tests/run-make/manual-link/foo.c (renamed from tests/run-make-fulldeps/manual-link/foo.c) | 0 | ||||
| -rw-r--r-- | tests/run-make/manual-link/foo.rs (renamed from tests/run-make-fulldeps/manual-link/foo.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/manual-link/main.rs (renamed from tests/run-make-fulldeps/manual-link/main.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/many-crates-but-no-match/Makefile (renamed from tests/run-make-fulldeps/many-crates-but-no-match/Makefile) | 0 | ||||
| -rw-r--r-- | tests/run-make/many-crates-but-no-match/crateA1.rs (renamed from tests/run-make-fulldeps/many-crates-but-no-match/crateA1.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/many-crates-but-no-match/crateA2.rs (renamed from tests/run-make-fulldeps/many-crates-but-no-match/crateA2.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/many-crates-but-no-match/crateA3.rs (renamed from tests/run-make-fulldeps/many-crates-but-no-match/crateA3.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/many-crates-but-no-match/crateB.rs (renamed from tests/run-make-fulldeps/many-crates-but-no-match/crateB.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/many-crates-but-no-match/crateC.rs (renamed from tests/run-make-fulldeps/many-crates-but-no-match/crateC.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/metadata-flag-frobs-symbols/Makefile (renamed from tests/run-make-fulldeps/metadata-flag-frobs-symbols/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/metadata-flag-frobs-symbols/bar.rs (renamed from tests/run-make-fulldeps/metadata-flag-frobs-symbols/bar.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/metadata-flag-frobs-symbols/foo.rs (renamed from tests/run-make-fulldeps/metadata-flag-frobs-symbols/foo.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/min-global-align/Makefile (renamed from tests/run-make-fulldeps/min-global-align/Makefile) | 0 | ||||
| -rw-r--r-- | tests/run-make/min-global-align/min_global_align.rs (renamed from tests/run-make-fulldeps/min-global-align/min_global_align.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/mingw-export-call-convention/Makefile (renamed from tests/run-make-fulldeps/mingw-export-call-convention/Makefile) | 0 | ||||
| -rw-r--r-- | tests/run-make/mingw-export-call-convention/foo.rs (renamed from tests/run-make-fulldeps/mingw-export-call-convention/foo.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/mismatching-target-triples/Makefile (renamed from tests/run-make-fulldeps/mismatching-target-triples/Makefile) | 0 | ||||
| -rw-r--r-- | tests/run-make/mismatching-target-triples/bar.rs (renamed from tests/run-make-fulldeps/mismatching-target-triples/bar.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/mismatching-target-triples/foo.rs (renamed from tests/run-make-fulldeps/mismatching-target-triples/foo.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/missing-crate-dependency/Makefile (renamed from tests/run-make-fulldeps/missing-crate-dependency/Makefile) | 0 | ||||
| -rw-r--r-- | tests/run-make/missing-crate-dependency/crateA.rs (renamed from tests/run-make-fulldeps/missing-crate-dependency/crateA.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/missing-crate-dependency/crateB.rs (renamed from tests/run-make-fulldeps/missing-crate-dependency/crateB.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/missing-crate-dependency/crateC.rs (renamed from tests/run-make-fulldeps/missing-crate-dependency/crateC.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/mixing-deps/Makefile (renamed from tests/run-make-fulldeps/mixing-deps/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/mixing-deps/both.rs (renamed from tests/run-make-fulldeps/mixing-deps/both.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/mixing-deps/dylib.rs (renamed from tests/run-make-fulldeps/mixing-deps/dylib.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/mixing-deps/prog.rs (renamed from tests/run-make-fulldeps/mixing-deps/prog.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/mixing-formats/Makefile (renamed from tests/run-make-fulldeps/mixing-formats/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/mixing-formats/bar1.rs (renamed from tests/run-make-fulldeps/mixing-formats/bar1.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/mixing-formats/bar2.rs (renamed from tests/run-make-fulldeps/mixing-formats/bar2.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/mixing-formats/baz.rs (renamed from tests/run-make-fulldeps/mixing-formats/baz.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/mixing-formats/baz2.rs (renamed from tests/run-make-fulldeps/mixing-formats/baz2.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/mixing-formats/foo.rs (renamed from tests/run-make-fulldeps/mixing-formats/foo.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/mixing-libs/Makefile (renamed from tests/run-make-fulldeps/mixing-libs/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/mixing-libs/dylib.rs (renamed from tests/run-make-fulldeps/mixing-libs/dylib.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/mixing-libs/prog.rs (renamed from tests/run-make-fulldeps/mixing-libs/prog.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/mixing-libs/rlib.rs (renamed from tests/run-make-fulldeps/mixing-libs/rlib.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/msvc-opt-minsize/Makefile (renamed from tests/run-make-fulldeps/msvc-opt-minsize/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/msvc-opt-minsize/foo.rs (renamed from tests/run-make-fulldeps/msvc-opt-minsize/foo.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/multiple-emits/Makefile (renamed from tests/run-make-fulldeps/multiple-emits/Makefile) | 0 | ||||
| -rw-r--r-- | tests/run-make/multiple-emits/foo.rs (renamed from tests/run-make-fulldeps/multiple-emits/foo.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/native-link-modifier-bundle/Makefile | 2 | ||||
| -rw-r--r-- | tests/run-make/native-link-modifier-verbatim-linker/Makefile | 2 | ||||
| -rw-r--r-- | tests/run-make/native-link-modifier-verbatim-rustc/Makefile | 2 | ||||
| -rw-r--r-- | tests/run-make/native-link-modifier-whole-archive/Makefile | 2 | ||||
| -rw-r--r-- | tests/run-make/no-builtins-lto/Makefile (renamed from tests/run-make-fulldeps/no-builtins-lto/Makefile) | 0 | ||||
| -rw-r--r-- | tests/run-make/no-builtins-lto/main.rs (renamed from tests/run-make-fulldeps/no-builtins-lto/main.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/no-builtins-lto/no_builtins.rs (renamed from tests/run-make-fulldeps/no-builtins-lto/no_builtins.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/no-duplicate-libs/Makefile (renamed from tests/run-make-fulldeps/no-duplicate-libs/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/no-duplicate-libs/bar.c (renamed from tests/run-make-fulldeps/no-duplicate-libs/bar.c) | 0 | ||||
| -rw-r--r-- | tests/run-make/no-duplicate-libs/foo.c (renamed from tests/run-make-fulldeps/no-duplicate-libs/foo.c) | 0 | ||||
| -rw-r--r-- | tests/run-make/no-duplicate-libs/main.rs (renamed from tests/run-make-fulldeps/no-duplicate-libs/main.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/no-input-file/Makefile | 2 | ||||
| -rw-r--r-- | tests/run-make/no-intermediate-extras/Makefile (renamed from tests/run-make-fulldeps/no-intermediate-extras/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/no-intermediate-extras/foo.rs (renamed from tests/run-make-fulldeps/no-intermediate-extras/foo.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/obey-crate-type-flag/Makefile (renamed from tests/run-make-fulldeps/obey-crate-type-flag/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/obey-crate-type-flag/test.rs (renamed from tests/run-make-fulldeps/obey-crate-type-flag/test.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/output-filename-conflicts-with-directory/Makefile (renamed from tests/run-make-fulldeps/output-filename-conflicts-with-directory/Makefile) | 0 | ||||
| -rw-r--r-- | tests/run-make/output-filename-conflicts-with-directory/foo.rs (renamed from tests/run-make-fulldeps/output-filename-conflicts-with-directory/foo.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/output-filename-overwrites-input/Makefile (renamed from tests/run-make-fulldeps/output-filename-overwrites-input/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/output-filename-overwrites-input/bar.rs (renamed from tests/run-make-fulldeps/output-filename-overwrites-input/bar.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/output-filename-overwrites-input/foo.rs (renamed from tests/run-make-fulldeps/output-filename-overwrites-input/foo.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/output-type-permutations/Makefile (renamed from tests/run-make-fulldeps/output-type-permutations/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/output-type-permutations/foo.rs (renamed from tests/run-make-fulldeps/output-type-permutations/foo.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/output-with-hyphens/Makefile (renamed from tests/run-make-fulldeps/output-with-hyphens/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/output-with-hyphens/foo-bar.rs (renamed from tests/run-make-fulldeps/output-with-hyphens/foo-bar.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/override-aliased-flags/Makefile (renamed from tests/run-make-fulldeps/override-aliased-flags/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/override-aliased-flags/main.rs (renamed from tests/run-make-fulldeps/override-aliased-flags/main.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/overwrite-input/Makefile | 2 | ||||
| -rw-r--r-- | tests/run-make/panic-impl-transitive/Makefile (renamed from tests/run-make-fulldeps/panic-impl-transitive/Makefile) | 2 | ||||
| -rw-r--r-- | tests/run-make/panic-impl-transitive/panic-impl-consumer.rs (renamed from tests/run-make-fulldeps/panic-impl-transitive/panic-impl-consumer.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/panic-impl-transitive/panic-impl-provider.rs (renamed from tests/run-make-fulldeps/panic-impl-transitive/panic-impl-provider.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/pass-linker-flags-from-dep/Makefile | 2 | ||||
| -rw-r--r-- | tests/run-make/pass-linker-flags/Makefile | 2 | ||||
| -rw-r--r-- | tests/run-make/pass-non-c-like-enum-to-c/Makefile (renamed from tests/run-make-fulldeps/pass-non-c-like-enum-to-c/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/pass-non-c-like-enum-to-c/nonclike.rs (renamed from tests/run-make-fulldeps/pass-non-c-like-enum-to-c/nonclike.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/pass-non-c-like-enum-to-c/test.c (renamed from tests/run-make-fulldeps/pass-non-c-like-enum-to-c/test.c) | 0 | ||||
| -rw-r--r-- | tests/run-make/pgo-branch-weights/Makefile (renamed from tests/run-make-fulldeps/pgo-branch-weights/Makefile) | 0 | ||||
| -rw-r--r-- | tests/run-make/pgo-branch-weights/filecheck-patterns.txt (renamed from tests/run-make-fulldeps/pgo-branch-weights/filecheck-patterns.txt) | 0 | ||||
| -rw-r--r-- | tests/run-make/pgo-branch-weights/interesting.rs (renamed from tests/run-make-fulldeps/pgo-branch-weights/interesting.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/pgo-branch-weights/main.rs (renamed from tests/run-make-fulldeps/pgo-branch-weights/main.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/pgo-branch-weights/opaque.rs (renamed from tests/run-make-fulldeps/pgo-branch-weights/opaque.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/pgo-gen-lto/Makefile (renamed from tests/run-make-fulldeps/pgo-gen-lto/Makefile) | 0 | ||||
| -rw-r--r-- | tests/run-make/pgo-gen-lto/test.rs (renamed from tests/run-make-fulldeps/pgo-gen-lto/test.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/pgo-gen-no-imp-symbols/Makefile (renamed from tests/run-make-fulldeps/pgo-gen-no-imp-symbols/Makefile) | 0 | ||||
| -rw-r--r-- | tests/run-make/pgo-gen-no-imp-symbols/test.rs (renamed from tests/run-make-fulldeps/pgo-gen-no-imp-symbols/test.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/pgo-gen/Makefile (renamed from tests/run-make-fulldeps/pgo-gen/Makefile) | 0 | ||||
| -rw-r--r-- | tests/run-make/pgo-gen/test.rs (renamed from tests/run-make-fulldeps/pgo-gen/test.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/pgo-indirect-call-promotion/Makefile (renamed from tests/run-make-fulldeps/pgo-indirect-call-promotion/Makefile) | 0 | ||||
| -rw-r--r-- | tests/run-make/pgo-indirect-call-promotion/filecheck-patterns.txt (renamed from tests/run-make-fulldeps/pgo-indirect-call-promotion/filecheck-patterns.txt) | 0 | ||||
| -rw-r--r-- | tests/run-make/pgo-indirect-call-promotion/interesting.rs (renamed from tests/run-make-fulldeps/pgo-indirect-call-promotion/interesting.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/pgo-indirect-call-promotion/main.rs (renamed from tests/run-make-fulldeps/pgo-indirect-call-promotion/main.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/pgo-indirect-call-promotion/opaque.rs (renamed from tests/run-make-fulldeps/pgo-indirect-call-promotion/opaque.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/pgo-use/Makefile (renamed from tests/run-make-fulldeps/pgo-use/Makefile) | 0 | ||||
| -rw-r--r-- | tests/run-make/pgo-use/filecheck-patterns.txt (renamed from tests/run-make-fulldeps/pgo-use/filecheck-patterns.txt) | 0 | ||||
| -rw-r--r-- | tests/run-make/pgo-use/main.rs (renamed from tests/run-make-fulldeps/pgo-use/main.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/pointer-auth-link-with-c/Makefile (renamed from tests/run-make-fulldeps/pointer-auth-link-with-c/Makefile) | 0 | ||||
| -rw-r--r-- | tests/run-make/pointer-auth-link-with-c/test.c (renamed from tests/run-make-fulldeps/pointer-auth-link-with-c/test.c) | 0 | ||||
| -rw-r--r-- | tests/run-make/pointer-auth-link-with-c/test.rs (renamed from tests/run-make-fulldeps/pointer-auth-link-with-c/test.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/prefer-dylib/Makefile (renamed from tests/run-make-fulldeps/prefer-dylib/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/prefer-dylib/bar.rs (renamed from tests/run-make-fulldeps/prefer-dylib/bar.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/prefer-dylib/foo.rs (renamed from tests/run-make-fulldeps/prefer-dylib/foo.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/prefer-rlib/Makefile (renamed from tests/run-make-fulldeps/prefer-rlib/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/prefer-rlib/bar.rs (renamed from tests/run-make-fulldeps/prefer-rlib/bar.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/prefer-rlib/foo.rs (renamed from tests/run-make-fulldeps/prefer-rlib/foo.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/pretty-print-to-file/Makefile (renamed from tests/run-make-fulldeps/pretty-print-to-file/Makefile) | 0 | ||||
| -rw-r--r-- | tests/run-make/pretty-print-to-file/input.pp (renamed from tests/run-make-fulldeps/pretty-print-to-file/input.pp) | 0 | ||||
| -rw-r--r-- | tests/run-make/pretty-print-to-file/input.rs (renamed from tests/run-make-fulldeps/pretty-print-to-file/input.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/print-calling-conventions/Makefile (renamed from tests/run-make-fulldeps/print-calling-conventions/Makefile) | 2 | ||||
| -rw-r--r-- | tests/run-make/print-cfg/Makefile (renamed from tests/run-make-fulldeps/print-cfg/Makefile) | 0 | ||||
| -rw-r--r-- | tests/run-make/print-target-list/Makefile (renamed from tests/run-make-fulldeps/print-target-list/Makefile) | 0 | ||||
| -rw-r--r-- | tests/run-make/profile/Makefile (renamed from tests/run-make-fulldeps/profile/Makefile) | 0 | ||||
| -rw-r--r-- | tests/run-make/profile/test.rs (renamed from tests/run-make-fulldeps/profile/test.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/prune-link-args/Makefile (renamed from tests/run-make-fulldeps/prune-link-args/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/prune-link-args/empty.rs (renamed from tests/run-make-fulldeps/prune-link-args/empty.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/raw-dylib-alt-calling-convention/Makefile | 2 | ||||
| -rw-r--r-- | tests/run-make/raw-dylib-c/Makefile | 2 | ||||
| -rw-r--r-- | tests/run-make/raw-dylib-cross-compilation/Makefile | 2 | ||||
| -rw-r--r-- | tests/run-make/raw-dylib-import-name-type/Makefile | 2 | ||||
| -rw-r--r-- | tests/run-make/raw-dylib-inline-cross-dylib/Makefile | 2 | ||||
| -rw-r--r-- | tests/run-make/raw-dylib-link-ordinal/Makefile | 2 | ||||
| -rw-r--r-- | tests/run-make/raw-dylib-stdcall-ordinal/Makefile | 2 | ||||
| -rw-r--r-- | tests/run-make/redundant-libs/Makefile (renamed from tests/run-make-fulldeps/redundant-libs/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/redundant-libs/bar.c (renamed from tests/run-make-fulldeps/redundant-libs/bar.c) | 0 | ||||
| -rw-r--r-- | tests/run-make/redundant-libs/baz.c (renamed from tests/run-make-fulldeps/redundant-libs/baz.c) | 0 | ||||
| -rw-r--r-- | tests/run-make/redundant-libs/foo.c (renamed from tests/run-make-fulldeps/redundant-libs/foo.c) | 0 | ||||
| -rw-r--r-- | tests/run-make/redundant-libs/main.rs (renamed from tests/run-make-fulldeps/redundant-libs/main.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/relocation-model/Makefile (renamed from tests/run-make-fulldeps/relocation-model/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/relocation-model/foo.rs (renamed from tests/run-make-fulldeps/relocation-model/foo.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/relro-levels/Makefile (renamed from tests/run-make-fulldeps/relro-levels/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/relro-levels/hello.rs (renamed from tests/run-make-fulldeps/relro-levels/hello.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/remap-path-prefix-dwarf/Makefile | 2 | ||||
| -rw-r--r-- | tests/run-make/remap-path-prefix/Makefile (renamed from tests/run-make-fulldeps/remap-path-prefix/Makefile) | 0 | ||||
| -rw-r--r-- | tests/run-make/remap-path-prefix/auxiliary/lib.rs (renamed from tests/run-make-fulldeps/remap-path-prefix/auxiliary/lib.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/repr128-dwarf/Makefile | 2 | ||||
| -rw-r--r-- | tests/run-make/reproducible-build-2/Makefile (renamed from tests/run-make-fulldeps/reproducible-build-2/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/reproducible-build-2/linker.rs (renamed from tests/run-make-fulldeps/reproducible-build-2/linker.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/reproducible-build-2/reproducible-build-aux.rs (renamed from tests/run-make-fulldeps/reproducible-build-2/reproducible-build-aux.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/reproducible-build-2/reproducible-build.rs (renamed from tests/run-make-fulldeps/reproducible-build-2/reproducible-build.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/reproducible-build/Makefile (renamed from tests/run-make-fulldeps/reproducible-build/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/reproducible-build/linker.rs (renamed from tests/run-make-fulldeps/reproducible-build/linker.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/reproducible-build/reproducible-build-aux.rs (renamed from tests/run-make-fulldeps/reproducible-build/reproducible-build-aux.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/reproducible-build/reproducible-build.rs (renamed from tests/run-make-fulldeps/reproducible-build/reproducible-build.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/resolve-rename/Makefile (renamed from tests/run-make-fulldeps/resolve-rename/Makefile) | 0 | ||||
| -rw-r--r-- | tests/run-make/resolve-rename/bar.rs (renamed from tests/run-make-fulldeps/resolve-rename/bar.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/resolve-rename/baz.rs (renamed from tests/run-make-fulldeps/resolve-rename/baz.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/resolve-rename/foo.rs (renamed from tests/run-make-fulldeps/resolve-rename/foo.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/return-non-c-like-enum-from-c/Makefile (renamed from tests/run-make-fulldeps/return-non-c-like-enum-from-c/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/return-non-c-like-enum-from-c/nonclike.rs (renamed from tests/run-make-fulldeps/return-non-c-like-enum-from-c/nonclike.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/return-non-c-like-enum-from-c/test.c (renamed from tests/run-make-fulldeps/return-non-c-like-enum-from-c/test.c) | 0 | ||||
| -rw-r--r-- | tests/run-make/return-non-c-like-enum/Makefile (renamed from tests/run-make-fulldeps/return-non-c-like-enum/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/return-non-c-like-enum/nonclike.rs (renamed from tests/run-make-fulldeps/return-non-c-like-enum/nonclike.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/return-non-c-like-enum/test.c (renamed from tests/run-make-fulldeps/return-non-c-like-enum/test.c) | 0 | ||||
| -rw-r--r-- | tests/run-make/rlib-chain/Makefile (renamed from tests/run-make-fulldeps/rlib-chain/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/rlib-chain/m1.rs (renamed from tests/run-make-fulldeps/rlib-chain/m1.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/rlib-chain/m2.rs (renamed from tests/run-make-fulldeps/rlib-chain/m2.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/rlib-chain/m3.rs (renamed from tests/run-make-fulldeps/rlib-chain/m3.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/rlib-chain/m4.rs (renamed from tests/run-make-fulldeps/rlib-chain/m4.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/rlib-format-packed-bundled-libs-2/Makefile | 2 | ||||
| -rw-r--r-- | tests/run-make/rlib-format-packed-bundled-libs-3/Makefile | 2 | ||||
| -rw-r--r-- | tests/run-make/rlib-format-packed-bundled-libs/Makefile | 2 | ||||
| -rw-r--r-- | tests/run-make/rustc-macro-dep-files/Makefile | 2 | ||||
| -rw-r--r-- | tests/run-make/rustdoc-determinism/Makefile (renamed from tests/run-make-fulldeps/rustdoc-determinism/Makefile) | 0 | ||||
| -rw-r--r-- | tests/run-make/rustdoc-determinism/bar.rs (renamed from tests/run-make-fulldeps/rustdoc-determinism/bar.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/rustdoc-determinism/foo.rs (renamed from tests/run-make-fulldeps/rustdoc-determinism/foo.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/rustdoc-error-lines/Makefile (renamed from tests/run-make-fulldeps/rustdoc-error-lines/Makefile) | 0 | ||||
| -rw-r--r-- | tests/run-make/rustdoc-error-lines/input.rs (renamed from tests/run-make-fulldeps/rustdoc-error-lines/input.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/rustdoc-io-error/Makefile (renamed from tests/run-make-fulldeps/rustdoc-io-error/Makefile) | 0 | ||||
| -rw-r--r-- | tests/run-make/rustdoc-io-error/foo.rs (renamed from tests/run-make-fulldeps/rustdoc-io-error/foo.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/rustdoc-map-file/Makefile (renamed from tests/run-make-fulldeps/rustdoc-map-file/Makefile) | 0 | ||||
| -rw-r--r-- | tests/run-make/rustdoc-map-file/expected.json (renamed from tests/run-make-fulldeps/rustdoc-map-file/expected.json) | 0 | ||||
| -rw-r--r-- | tests/run-make/rustdoc-map-file/foo.rs (renamed from tests/run-make-fulldeps/rustdoc-map-file/foo.rs) | 0 | ||||
| -rwxr-xr-x | tests/run-make/rustdoc-map-file/validate_json.py (renamed from tests/run-make-fulldeps/rustdoc-map-file/validate_json.py) | 0 | ||||
| -rw-r--r-- | tests/run-make/rustdoc-output-path/Makefile (renamed from tests/run-make-fulldeps/rustdoc-output-path/Makefile) | 0 | ||||
| -rw-r--r-- | tests/run-make/rustdoc-output-path/foo.rs (renamed from tests/run-make-fulldeps/rustdoc-output-path/foo.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/rustdoc-scrape-examples-macros/Makefile (renamed from tests/run-make-fulldeps/rustdoc-scrape-examples-macros/Makefile) | 3 | ||||
| -rw-r--r-- | tests/run-make/rustdoc-scrape-examples-macros/examples/ex.rs (renamed from tests/run-make-fulldeps/rustdoc-scrape-examples-macros/examples/ex.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/rustdoc-scrape-examples-macros/src/lib.rs (renamed from tests/run-make-fulldeps/rustdoc-scrape-examples-macros/src/lib.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/rustdoc-scrape-examples-macros/src/proc.rs (renamed from tests/run-make-fulldeps/rustdoc-scrape-examples-macros/src/proc.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/rustdoc-scrape-examples-multiple/scrape.mk | 2 | ||||
| -rw-r--r-- | tests/run-make/rustdoc-target-spec-json-path/Makefile (renamed from tests/run-make-fulldeps/rustdoc-target-spec-json-path/Makefile) | 0 | ||||
| -rw-r--r-- | tests/run-make/rustdoc-target-spec-json-path/dummy_core.rs (renamed from tests/run-make-fulldeps/rustdoc-target-spec-json-path/dummy_core.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/rustdoc-target-spec-json-path/my_crate.rs (renamed from tests/run-make-fulldeps/rustdoc-target-spec-json-path/my_crate.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/rustdoc-target-spec-json-path/target.json (renamed from tests/run-make-fulldeps/rustdoc-target-spec-json-path/target.json) | 0 | ||||
| -rw-r--r-- | tests/run-make/rustdoc-themes/Makefile (renamed from tests/run-make-fulldeps/rustdoc-themes/Makefile) | 0 | ||||
| -rw-r--r-- | tests/run-make/rustdoc-themes/foo.rs (renamed from tests/run-make-fulldeps/rustdoc-themes/foo.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/rustdoc-verify-output-files/Makefile | 2 | ||||
| -rw-r--r-- | tests/run-make/rustdoc-with-out-dir-option/Makefile | 2 | ||||
| -rw-r--r-- | tests/run-make/rustdoc-with-output-option/Makefile | 2 | ||||
| -rw-r--r-- | tests/run-make/rustdoc-with-short-out-dir-option/Makefile | 2 | ||||
| -rw-r--r-- | tests/run-make/sanitizer-cdylib-link/Makefile (renamed from tests/run-make-fulldeps/sanitizer-cdylib-link/Makefile) | 0 | ||||
| -rw-r--r-- | tests/run-make/sanitizer-cdylib-link/library.rs (renamed from tests/run-make-fulldeps/sanitizer-cdylib-link/library.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/sanitizer-cdylib-link/program.rs (renamed from tests/run-make-fulldeps/sanitizer-cdylib-link/program.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/sanitizer-dylib-link/Makefile (renamed from tests/run-make-fulldeps/sanitizer-dylib-link/Makefile) | 0 | ||||
| -rw-r--r-- | tests/run-make/sanitizer-dylib-link/library.rs (renamed from tests/run-make-fulldeps/sanitizer-dylib-link/library.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/sanitizer-dylib-link/program.rs (renamed from tests/run-make-fulldeps/sanitizer-dylib-link/program.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/sanitizer-staticlib-link/Makefile (renamed from tests/run-make-fulldeps/sanitizer-staticlib-link/Makefile) | 0 | ||||
| -rw-r--r-- | tests/run-make/sanitizer-staticlib-link/library.rs (renamed from tests/run-make-fulldeps/sanitizer-staticlib-link/library.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/sanitizer-staticlib-link/program.c (renamed from tests/run-make-fulldeps/sanitizer-staticlib-link/program.c) | 0 | ||||
| -rw-r--r-- | tests/run-make/sanitizer-staticlib-link/program.rs (renamed from tests/run-make-fulldeps/sanitizer-staticlib-link/program.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/separate-link-fail/Makefile (renamed from tests/run-make-fulldeps/separate-link-fail/Makefile) | 0 | ||||
| -rw-r--r-- | tests/run-make/separate-link/Makefile (renamed from tests/run-make-fulldeps/separate-link/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/sepcomp-cci-copies/Makefile (renamed from tests/run-make-fulldeps/sepcomp-cci-copies/Makefile) | 0 | ||||
| -rw-r--r-- | tests/run-make/sepcomp-cci-copies/cci_lib.rs (renamed from tests/run-make-fulldeps/sepcomp-cci-copies/cci_lib.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/sepcomp-cci-copies/foo.rs (renamed from tests/run-make-fulldeps/sepcomp-cci-copies/foo.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/sepcomp-inlining/Makefile (renamed from tests/run-make-fulldeps/sepcomp-inlining/Makefile) | 0 | ||||
| -rw-r--r-- | tests/run-make/sepcomp-inlining/foo.rs (renamed from tests/run-make-fulldeps/sepcomp-inlining/foo.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/sepcomp-separate/Makefile (renamed from tests/run-make-fulldeps/sepcomp-separate/Makefile) | 0 | ||||
| -rw-r--r-- | tests/run-make/sepcomp-separate/foo.rs (renamed from tests/run-make-fulldeps/sepcomp-separate/foo.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/share-generics-dylib/Makefile (renamed from tests/run-make-fulldeps/share-generics-dylib/Makefile) | 3 | ||||
| -rw-r--r-- | tests/run-make/share-generics-dylib/instance_provider_a.rs (renamed from tests/run-make-fulldeps/share-generics-dylib/instance_provider_a.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/share-generics-dylib/instance_provider_b.rs (renamed from tests/run-make-fulldeps/share-generics-dylib/instance_provider_b.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/share-generics-dylib/instance_user_a_rlib.rs (renamed from tests/run-make-fulldeps/share-generics-dylib/instance_user_a_rlib.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/share-generics-dylib/instance_user_b_rlib.rs (renamed from tests/run-make-fulldeps/share-generics-dylib/instance_user_b_rlib.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/share-generics-dylib/instance_user_dylib.rs (renamed from tests/run-make-fulldeps/share-generics-dylib/instance_user_dylib.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/share-generics-dylib/linked_leaf.rs (renamed from tests/run-make-fulldeps/share-generics-dylib/linked_leaf.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/simd-ffi/Makefile (renamed from tests/run-make-fulldeps/simd-ffi/Makefile) | 0 | ||||
| -rw-r--r-- | tests/run-make/simd-ffi/simd.rs (renamed from tests/run-make-fulldeps/simd-ffi/simd.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/simple-dylib/Makefile (renamed from tests/run-make-fulldeps/simple-dylib/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/simple-dylib/bar.rs (renamed from tests/run-make-fulldeps/simple-dylib/bar.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/simple-dylib/foo.rs (renamed from tests/run-make-fulldeps/simple-dylib/foo.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/simple-rlib/Makefile (renamed from tests/run-make-fulldeps/simple-rlib/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/simple-rlib/bar.rs (renamed from tests/run-make-fulldeps/simple-rlib/bar.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/simple-rlib/foo.rs (renamed from tests/run-make-fulldeps/simple-rlib/foo.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/split-debuginfo/Makefile (renamed from tests/run-make-fulldeps/split-debuginfo/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/split-debuginfo/bar.rs (renamed from tests/run-make-fulldeps/split-debuginfo/bar.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/split-debuginfo/baz.rs (renamed from tests/run-make-fulldeps/split-debuginfo/baz.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/split-debuginfo/foo.rs (renamed from tests/run-make-fulldeps/split-debuginfo/foo.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/split-debuginfo/main.rs (renamed from tests/run-make-fulldeps/split-debuginfo/main.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/stable-symbol-names/Makefile (renamed from tests/run-make-fulldeps/stable-symbol-names/Makefile) | 0 | ||||
| -rw-r--r-- | tests/run-make/stable-symbol-names/stable-symbol-names1.rs (renamed from tests/run-make-fulldeps/stable-symbol-names/stable-symbol-names1.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/stable-symbol-names/stable-symbol-names2.rs (renamed from tests/run-make-fulldeps/stable-symbol-names/stable-symbol-names2.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/static-dylib-by-default/Makefile (renamed from tests/run-make-fulldeps/static-dylib-by-default/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/static-dylib-by-default/bar.rs (renamed from tests/run-make-fulldeps/static-dylib-by-default/bar.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/static-dylib-by-default/foo.rs (renamed from tests/run-make-fulldeps/static-dylib-by-default/foo.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/static-dylib-by-default/main.c (renamed from tests/run-make-fulldeps/static-dylib-by-default/main.c) | 0 | ||||
| -rw-r--r-- | tests/run-make/static-extern-type/Makefile (renamed from tests/run-make-fulldeps/static-extern-type/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/static-extern-type/define-foo.c (renamed from tests/run-make-fulldeps/static-extern-type/define-foo.c) | 0 | ||||
| -rw-r--r-- | tests/run-make/static-extern-type/use-foo.rs (renamed from tests/run-make-fulldeps/static-extern-type/use-foo.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/static-pie/Makefile | 2 | ||||
| -rw-r--r-- | tests/run-make/static-unwinding/Makefile (renamed from tests/run-make-fulldeps/static-unwinding/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/static-unwinding/lib.rs (renamed from tests/run-make-fulldeps/static-unwinding/lib.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/static-unwinding/main.rs (renamed from tests/run-make-fulldeps/static-unwinding/main.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/staticlib-blank-lib/Makefile (renamed from tests/run-make-fulldeps/staticlib-blank-lib/Makefile) | 0 | ||||
| -rw-r--r-- | tests/run-make/staticlib-blank-lib/foo.rs (renamed from tests/run-make-fulldeps/staticlib-blank-lib/foo.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/std-core-cycle/Makefile (renamed from tests/run-make-fulldeps/std-core-cycle/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/std-core-cycle/bar.rs (renamed from tests/run-make-fulldeps/std-core-cycle/bar.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/std-core-cycle/foo.rs (renamed from tests/run-make-fulldeps/std-core-cycle/foo.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/stdin-non-utf8/Makefile (renamed from tests/run-make-fulldeps/stdin-non-utf8/Makefile) | 0 | ||||
| -rw-r--r-- | tests/run-make/stdin-non-utf8/non-utf8 (renamed from tests/run-make-fulldeps/stdin-non-utf8/non-utf8) | 0 | ||||
| -rw-r--r-- | tests/run-make/suspicious-library/Makefile (renamed from tests/run-make-fulldeps/suspicious-library/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/suspicious-library/bar.rs (renamed from tests/run-make-fulldeps/suspicious-library/bar.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/suspicious-library/foo.rs (renamed from tests/run-make-fulldeps/suspicious-library/foo.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/symbol-visibility/Makefile (renamed from tests/run-make-fulldeps/symbol-visibility/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/symbol-visibility/a_cdylib.rs (renamed from tests/run-make-fulldeps/symbol-visibility/a_cdylib.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/symbol-visibility/a_proc_macro.rs (renamed from tests/run-make-fulldeps/symbol-visibility/a_proc_macro.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/symbol-visibility/a_rust_dylib.rs (renamed from tests/run-make-fulldeps/symbol-visibility/a_rust_dylib.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/symbol-visibility/an_executable.rs (renamed from tests/run-make-fulldeps/symbol-visibility/an_executable.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/symbol-visibility/an_rlib.rs (renamed from tests/run-make-fulldeps/symbol-visibility/an_rlib.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/symbols-include-type-name/Makefile (renamed from tests/run-make-fulldeps/symbols-include-type-name/Makefile) | 0 | ||||
| -rw-r--r-- | tests/run-make/symbols-include-type-name/lib.rs (renamed from tests/run-make-fulldeps/symbols-include-type-name/lib.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/symlinked-extern/Makefile (renamed from tests/run-make-fulldeps/symlinked-extern/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/symlinked-extern/bar.rs (renamed from tests/run-make-fulldeps/symlinked-extern/bar.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/symlinked-extern/baz.rs (renamed from tests/run-make-fulldeps/symlinked-extern/baz.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/symlinked-extern/foo.rs (renamed from tests/run-make-fulldeps/symlinked-extern/foo.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/symlinked-libraries/Makefile (renamed from tests/run-make-fulldeps/symlinked-libraries/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/symlinked-libraries/bar.rs (renamed from tests/run-make-fulldeps/symlinked-libraries/bar.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/symlinked-libraries/foo.rs (renamed from tests/run-make-fulldeps/symlinked-libraries/foo.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/symlinked-rlib/Makefile (renamed from tests/run-make-fulldeps/symlinked-rlib/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/symlinked-rlib/bar.rs (renamed from tests/run-make-fulldeps/symlinked-rlib/bar.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/symlinked-rlib/foo.rs (renamed from tests/run-make-fulldeps/symlinked-rlib/foo.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/sysroot-crates-are-unstable/Makefile (renamed from tests/run-make-fulldeps/sysroot-crates-are-unstable/Makefile) | 0 | ||||
| -rw-r--r-- | tests/run-make/sysroot-crates-are-unstable/test.py (renamed from tests/run-make-fulldeps/sysroot-crates-are-unstable/test.py) | 1 | ||||
| -rw-r--r-- | tests/run-make/target-cpu-native/Makefile (renamed from tests/run-make-fulldeps/target-cpu-native/Makefile) | 0 | ||||
| -rw-r--r-- | tests/run-make/target-cpu-native/foo.rs (renamed from tests/run-make-fulldeps/target-cpu-native/foo.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/target-specs/Makefile (renamed from tests/run-make-fulldeps/target-specs/Makefile) | 0 | ||||
| -rw-r--r-- | tests/run-make/target-specs/definitely-not-builtin-target.json (renamed from tests/run-make-fulldeps/target-specs/definitely-not-builtin-target.json) | 0 | ||||
| -rw-r--r-- | tests/run-make/target-specs/foo.rs (renamed from tests/run-make-fulldeps/target-specs/foo.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/target-specs/mismatching-data-layout.json (renamed from tests/run-make-fulldeps/target-specs/mismatching-data-layout.json) | 0 | ||||
| -rw-r--r-- | tests/run-make/target-specs/my-awesome-platform.json (renamed from tests/run-make-fulldeps/target-specs/my-awesome-platform.json) | 0 | ||||
| -rw-r--r-- | tests/run-make/target-specs/my-incomplete-platform.json (renamed from tests/run-make-fulldeps/target-specs/my-incomplete-platform.json) | 0 | ||||
| -rw-r--r-- | tests/run-make/target-specs/my-invalid-platform.json (renamed from tests/run-make-fulldeps/target-specs/my-invalid-platform.json) | 0 | ||||
| -rw-r--r-- | tests/run-make/target-specs/my-x86_64-unknown-linux-gnu-platform.json (renamed from tests/run-make-fulldeps/target-specs/my-x86_64-unknown-linux-gnu-platform.json) | 0 | ||||
| -rw-r--r-- | tests/run-make/target-without-atomic-cas/Makefile (renamed from tests/run-make-fulldeps/target-without-atomic-cas/Makefile) | 0 | ||||
| -rw-r--r-- | tests/run-make/test-benches/Makefile | 2 | ||||
| -rw-r--r-- | tests/run-make/test-harness/Makefile (renamed from tests/run-make-fulldeps/test-harness/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/test-harness/test-ignore-cfg.rs (renamed from tests/run-make-fulldeps/test-harness/test-ignore-cfg.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/thumb-none-cortex-m/Makefile | 2 | ||||
| -rw-r--r-- | tests/run-make/thumb-none-qemu/Makefile | 2 | ||||
| -rw-r--r-- | tests/run-make/tools.mk (renamed from tests/run-make-fulldeps/tools.mk) | 0 | ||||
| -rw-r--r-- | tests/run-make/track-path-dep-info/Makefile | 2 | ||||
| -rw-r--r-- | tests/run-make/track-pgo-dep-info/Makefile | 2 | ||||
| -rw-r--r-- | tests/run-make/translation/Makefile | 2 | ||||
| -rw-r--r-- | tests/run-make/type-mismatch-same-crate-name/Makefile (renamed from tests/run-make-fulldeps/type-mismatch-same-crate-name/Makefile) | 0 | ||||
| -rw-r--r-- | tests/run-make/type-mismatch-same-crate-name/crateA.rs (renamed from tests/run-make-fulldeps/type-mismatch-same-crate-name/crateA.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/type-mismatch-same-crate-name/crateB.rs (renamed from tests/run-make-fulldeps/type-mismatch-same-crate-name/crateB.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/type-mismatch-same-crate-name/crateC.rs (renamed from tests/run-make-fulldeps/type-mismatch-same-crate-name/crateC.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/unstable-flag-required/Makefile | 2 | ||||
| -rw-r--r-- | tests/run-make/use-extern-for-plugins/Makefile (renamed from tests/run-make-fulldeps/use-extern-for-plugins/Makefile) | 0 | ||||
| -rw-r--r-- | tests/run-make/use-extern-for-plugins/bar.rs (renamed from tests/run-make-fulldeps/use-extern-for-plugins/bar.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/use-extern-for-plugins/baz.rs (renamed from tests/run-make-fulldeps/use-extern-for-plugins/baz.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/use-extern-for-plugins/foo.rs (renamed from tests/run-make-fulldeps/use-extern-for-plugins/foo.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/use-suggestions-rust-2018/Makefile (renamed from tests/run-make-fulldeps/use-suggestions-rust-2018/Makefile) | 0 | ||||
| -rw-r--r-- | tests/run-make/use-suggestions-rust-2018/ep-nested-lib.rs (renamed from tests/run-make-fulldeps/use-suggestions-rust-2018/ep-nested-lib.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/use-suggestions-rust-2018/use-suggestions.rs (renamed from tests/run-make-fulldeps/use-suggestions-rust-2018/use-suggestions.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/used-cdylib-macos/Makefile (renamed from tests/run-make-fulldeps/used-cdylib-macos/Makefile) | 0 | ||||
| -rw-r--r-- | tests/run-make/used-cdylib-macos/dylib_used.rs (renamed from tests/run-make-fulldeps/used-cdylib-macos/dylib_used.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/used/Makefile (renamed from tests/run-make-fulldeps/used/Makefile) | 0 | ||||
| -rw-r--r-- | tests/run-make/used/used.rs (renamed from tests/run-make-fulldeps/used/used.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/valid-print-requests/Makefile | 2 | ||||
| -rw-r--r-- | tests/run-make/version/Makefile (renamed from tests/run-make-fulldeps/version/Makefile) | 0 | ||||
| -rw-r--r-- | tests/run-make/volatile-intrinsics/Makefile (renamed from tests/run-make-fulldeps/volatile-intrinsics/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/volatile-intrinsics/main.rs (renamed from tests/run-make-fulldeps/volatile-intrinsics/main.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/wasm-abi/Makefile | 2 | ||||
| -rw-r--r-- | tests/run-make/wasm-custom-section/Makefile | 2 | ||||
| -rw-r--r-- | tests/run-make/wasm-custom-sections-opt/Makefile | 2 | ||||
| -rw-r--r-- | tests/run-make/wasm-export-all-symbols/Makefile | 2 | ||||
| -rw-r--r-- | tests/run-make/wasm-import-module/Makefile | 2 | ||||
| -rw-r--r-- | tests/run-make/wasm-panic-small/Makefile | 2 | ||||
| -rw-r--r-- | tests/run-make/wasm-spurious-import/Makefile | 2 | ||||
| -rw-r--r-- | tests/run-make/wasm-stringify-ints-small/Makefile | 2 | ||||
| -rw-r--r-- | tests/run-make/wasm-symbols-different-module/Makefile | 2 | ||||
| -rw-r--r-- | tests/run-make/wasm-symbols-not-exported/Makefile | 2 | ||||
| -rw-r--r-- | tests/run-make/wasm-symbols-not-imported/Makefile | 2 | ||||
| -rw-r--r-- | tests/run-make/weird-output-filenames/Makefile (renamed from tests/run-make-fulldeps/weird-output-filenames/Makefile) | 0 | ||||
| -rw-r--r-- | tests/run-make/weird-output-filenames/foo.rs (renamed from tests/run-make-fulldeps/weird-output-filenames/foo.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/windows-binary-no-external-deps/Makefile (renamed from tests/run-make-fulldeps/windows-binary-no-external-deps/Makefile) | 0 | ||||
| -rw-r--r-- | tests/run-make/windows-binary-no-external-deps/hello.rs (renamed from tests/run-make-fulldeps/windows-binary-no-external-deps/hello.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/windows-spawn/Makefile (renamed from tests/run-make-fulldeps/windows-spawn/Makefile) | 0 | ||||
| -rw-r--r-- | tests/run-make/windows-spawn/hello.rs (renamed from tests/run-make-fulldeps/windows-spawn/hello.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/windows-spawn/spawn.rs (renamed from tests/run-make-fulldeps/windows-spawn/spawn.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/windows-subsystem/Makefile (renamed from tests/run-make-fulldeps/windows-subsystem/Makefile) | 1 | ||||
| -rw-r--r-- | tests/run-make/windows-subsystem/console.rs (renamed from tests/run-make-fulldeps/windows-subsystem/console.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/windows-subsystem/windows.rs (renamed from tests/run-make-fulldeps/windows-subsystem/windows.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/x86_64-fortanix-unknown-sgx-lvi/Makefile | 2 | ||||
| -rw-r--r-- | tests/rustdoc-gui/go-to-collapsed-elem.goml | 21 | ||||
| -rw-r--r-- | tests/rustdoc-json/impls/local_for_local_primitive.rs | 4 | ||||
| -rw-r--r-- | tests/rustdoc-json/primitives/local_primitive.rs | 2 | ||||
| -rw-r--r-- | tests/rustdoc-json/primitives/primitive_impls.rs | 2 | ||||
| -rw-r--r-- | tests/rustdoc-json/primitives/primitive_overloading.rs | 4 | ||||
| -rw-r--r-- | tests/rustdoc-json/primitives/use_primitive.rs | 4 | ||||
| -rw-r--r-- | tests/rustdoc-ui/c-help.stdout | 2 | ||||
| -rw-r--r-- | tests/rustdoc-ui/coverage/exotic.rs | 3 | ||||
| -rw-r--r-- | tests/rustdoc-ui/intra-doc/ambiguity.rs | 2 | ||||
| -rw-r--r-- | tests/rustdoc-ui/intra-doc/ambiguity.stderr | 54 | ||||
| -rw-r--r-- | tests/rustdoc-ui/intra-doc/errors.rs | 4 | ||||
| -rw-r--r-- | tests/rustdoc-ui/intra-doc/errors.stderr | 4 | ||||
| -rw-r--r-- | tests/rustdoc-ui/intra-doc/issue-108653-associated-items-10.rs | 22 | ||||
| -rw-r--r-- | tests/rustdoc-ui/intra-doc/issue-108653-associated-items-2.rs | 17 | ||||
| -rw-r--r-- | tests/rustdoc-ui/intra-doc/issue-108653-associated-items-2.stderr | 37 | ||||
| -rw-r--r-- | tests/rustdoc-ui/intra-doc/issue-108653-associated-items-3.rs | 16 | ||||
| -rw-r--r-- | tests/rustdoc-ui/intra-doc/issue-108653-associated-items-3.stderr | 37 | ||||
| -rw-r--r-- | tests/rustdoc-ui/intra-doc/issue-108653-associated-items-4.rs | 21 | ||||
| -rw-r--r-- | tests/rustdoc-ui/intra-doc/issue-108653-associated-items-4.stderr | 22 | ||||
| -rw-r--r-- | tests/rustdoc-ui/intra-doc/issue-108653-associated-items-5.rs | 8 | ||||
| -rw-r--r-- | tests/rustdoc-ui/intra-doc/issue-108653-associated-items-5.stderr | 22 | ||||
| -rw-r--r-- | tests/rustdoc-ui/intra-doc/issue-108653-associated-items-6.rs | 8 | ||||
| -rw-r--r-- | tests/rustdoc-ui/intra-doc/issue-108653-associated-items-6.stderr | 22 | ||||
| -rw-r--r-- | tests/rustdoc-ui/intra-doc/issue-108653-associated-items-7.rs | 12 | ||||
| -rw-r--r-- | tests/rustdoc-ui/intra-doc/issue-108653-associated-items-7.stderr | 22 | ||||
| -rw-r--r-- | tests/rustdoc-ui/intra-doc/issue-108653-associated-items-8.rs | 12 | ||||
| -rw-r--r-- | tests/rustdoc-ui/intra-doc/issue-108653-associated-items-8.stderr | 22 | ||||
| -rw-r--r-- | tests/rustdoc-ui/intra-doc/issue-108653-associated-items-9.rs | 11 | ||||
| -rw-r--r-- | tests/rustdoc-ui/intra-doc/issue-108653-associated-items.rs | 35 | ||||
| -rw-r--r-- | tests/rustdoc-ui/intra-doc/issue-108653-associated-items.stderr | 67 | ||||
| -rw-r--r-- | tests/rustdoc-ui/intra-doc/non-path-primitives.stderr | 8 | ||||
| -rw-r--r-- | tests/rustdoc-ui/intra-doc/prim-conflict.rs | 10 | ||||
| -rw-r--r-- | tests/rustdoc-ui/intra-doc/prim-conflict.stderr | 12 | ||||
| -rw-r--r-- | tests/rustdoc/async-fn-opaque-item.rs | 15 | ||||
| -rw-r--r-- | tests/rustdoc/auto-impl-primitive.rs | 4 | ||||
| -rw-r--r-- | tests/rustdoc/auxiliary/issue-15318.rs | 3 | ||||
| -rw-r--r-- | tests/rustdoc/auxiliary/primitive-doc.rs | 3 | ||||
| -rw-r--r-- | tests/rustdoc/check-source-code-urls-to-def.rs | 4 | ||||
| -rw-r--r-- | tests/rustdoc/generic-associated-types/issue-109488.rs | 18 | ||||
| -rw-r--r-- | tests/rustdoc/intra-doc/auxiliary/my-core.rs | 2 | ||||
| -rw-r--r-- | tests/rustdoc/intra-doc/no-doc-primitive.rs | 2 | ||||
| -rw-r--r-- | tests/rustdoc/intra-doc/prim-methods-local.rs | 2 | ||||
| -rw-r--r-- | tests/rustdoc/intra-doc/prim-self.rs | 2 | ||||
| -rw-r--r-- | tests/rustdoc/issue-15318-3.rs | 4 | ||||
| -rw-r--r-- | tests/rustdoc/issue-23511.rs | 2 | ||||
| -rw-r--r-- | tests/rustdoc/notable-trait/doc-notable_trait-mut_t_is_not_an_iterator.rs | 4 | ||||
| -rw-r--r-- | tests/rustdoc/notable-trait/doc-notable_trait-mut_t_is_not_ref_t.rs | 4 | ||||
| -rw-r--r-- | tests/rustdoc/primitive-reference.rs | 4 | ||||
| -rw-r--r-- | tests/rustdoc/primitive-slice-auto-trait.rs | 4 | ||||
| -rw-r--r-- | tests/rustdoc/primitive-tuple-auto-trait.rs | 4 | ||||
| -rw-r--r-- | tests/rustdoc/primitive-unit-auto-trait.rs | 4 | ||||
| -rw-r--r-- | tests/rustdoc/primitive/primitive-generic-impl.rs | 4 | ||||
| -rw-r--r-- | tests/rustdoc/primitive/primitive.rs | 6 | ||||
| -rw-r--r-- | tests/rustdoc/sidebar-all-page.rs | 4 | ||||
| -rw-r--r-- | tests/rustdoc/tab_title.rs | 3 | ||||
| -rw-r--r-- | tests/rustdoc/titles.rs | 4 | ||||
| -rw-r--r-- | tests/ui-fulldeps/fluent-messages/test.rs | 2 | ||||
| -rw-r--r-- | tests/ui-fulldeps/fluent-messages/test.stderr | 14 | ||||
| -rw-r--r-- | tests/ui/associated-type-bounds/return-type-notation/bad-inputs-and-output.rs | 22 | ||||
| -rw-r--r-- | tests/ui/associated-type-bounds/return-type-notation/bad-inputs-and-output.stderr | 56 | ||||
| -rw-r--r-- | tests/ui/associated-type-bounds/return-type-notation/basic.rs | 28 | ||||
| -rw-r--r-- | tests/ui/associated-type-bounds/return-type-notation/basic.with.stderr | 19 | ||||
| -rw-r--r-- | tests/ui/associated-type-bounds/return-type-notation/basic.without.stderr | 37 | ||||
| -rw-r--r-- | tests/ui/associated-type-bounds/return-type-notation/equality.rs | 16 | ||||
| -rw-r--r-- | tests/ui/associated-type-bounds/return-type-notation/equality.stderr | 25 | ||||
| -rw-r--r-- | tests/ui/associated-type-bounds/return-type-notation/missing.rs | 14 | ||||
| -rw-r--r-- | tests/ui/associated-type-bounds/return-type-notation/missing.stderr | 25 | ||||
| -rw-r--r-- | tests/ui/associated-type-bounds/return-type-notation/non-rpitit.rs | 11 | ||||
| -rw-r--r-- | tests/ui/associated-type-bounds/return-type-notation/non-rpitit.stderr | 22 | ||||
| -rw-r--r-- | tests/ui/associated-type-bounds/return-type-notation/unpretty-parenthesized.rs | 11 | ||||
| -rw-r--r-- | tests/ui/associated-type-bounds/return-type-notation/unpretty-parenthesized.stderr | 12 | ||||
| -rw-r--r-- | tests/ui/associated-type-bounds/return-type-notation/unpretty-parenthesized.stdout | 15 | ||||
| -rw-r--r-- | tests/ui/async-await/missed-capture-issue-107414.rs | 24 | ||||
| -rw-r--r-- | tests/ui/autoref-autoderef/issue-38940.rs | 52 | ||||
| -rw-r--r-- | tests/ui/autoref-autoderef/issue-38940.stderr | 23 | ||||
| -rw-r--r-- | tests/ui/closures/2229_closure_analysis/array_subslice.rs | 13 | ||||
| -rw-r--r-- | tests/ui/closures/2229_closure_analysis/array_subslice.stderr | 26 | ||||
| -rw-r--r-- | tests/ui/did_you_mean/recursion_limit_deref.stderr | 6 | ||||
| -rw-r--r-- | tests/ui/feature-gates/feature-gate-return_type_notation.cfg.stderr | 21 | ||||
| -rw-r--r-- | tests/ui/feature-gates/feature-gate-return_type_notation.no.stderr | 21 | ||||
| -rw-r--r-- | tests/ui/feature-gates/feature-gate-return_type_notation.rs | 15 | ||||
| -rw-r--r-- | tests/ui/fn/fn-ptr-trait-int-float-infer-var.rs | 10 | ||||
| -rw-r--r-- | tests/ui/generics/slightly-nice-generic-literal-messages.rs (renamed from tests/ui/slightly-nice-generic-literal-messages.rs) | 0 | ||||
| -rw-r--r-- | tests/ui/generics/slightly-nice-generic-literal-messages.stderr (renamed from tests/ui/slightly-nice-generic-literal-messages.stderr) | 0 | ||||
| -rw-r--r-- | tests/ui/implied-bounds/normalization-nested.lifetime.stderr | 18 | ||||
| -rw-r--r-- | tests/ui/implied-bounds/normalization-nested.rs | 39 | ||||
| -rw-r--r-- | tests/ui/lexer/unterminated-comment.rs (renamed from tests/ui/unterminated-comment.rs) | 0 | ||||
| -rw-r--r-- | tests/ui/lexer/unterminated-comment.stderr (renamed from tests/ui/unterminated-comment.stderr) | 0 | ||||
| -rw-r--r-- | tests/ui/lexer/unterminated-nested-comment.rs (renamed from tests/ui/unterminated-nested-comment.rs) | 0 | ||||
| -rw-r--r-- | tests/ui/lexer/unterminated-nested-comment.stderr (renamed from tests/ui/unterminated-nested-comment.stderr) | 0 | ||||
| -rw-r--r-- | tests/ui/lifetimes/issue-93911.rs | 18 | ||||
| -rw-r--r-- | tests/ui/lint/lint-temporary-cstring-as-ptr.rs | 8 | ||||
| -rw-r--r-- | tests/ui/lint/lint-temporary-cstring-as-ptr.stderr | 19 | ||||
| -rw-r--r-- | tests/ui/lint/use-redundant/issue-92904.rs | 17 | ||||
| -rw-r--r-- | tests/ui/lint/use-redundant/use-redundant-glob-parent.rs | 16 | ||||
| -rw-r--r-- | tests/ui/lint/use-redundant/use-redundant-glob-parent.stderr | 17 | ||||
| -rw-r--r-- | tests/ui/lint/use-redundant/use-redundant-glob.rs | 15 | ||||
| -rw-r--r-- | tests/ui/lint/use-redundant/use-redundant-glob.stderr | 16 | ||||
| -rw-r--r-- | tests/ui/lint/use-redundant/use-redundant-multiple-namespaces.rs | 21 | ||||
| -rw-r--r-- | tests/ui/lint/use-redundant/use-redundant-not-parent.rs | 19 | ||||
| -rw-r--r-- | tests/ui/lint/use-redundant/use-redundant.rs (renamed from tests/ui/lint/use-redundant.rs) | 0 | ||||
| -rw-r--r-- | tests/ui/lint/use-redundant/use-redundant.stderr (renamed from tests/ui/lint/use-redundant.stderr) | 0 | ||||
| -rw-r--r-- | tests/ui/mir/issue-109004-drop-large-array.rs | 16 | ||||
| -rw-r--r-- | tests/ui/mir/issue-109743.rs | 51 | ||||
| -rw-r--r-- | tests/ui/nll/user-annotations/region-error-ice-109072.rs | 14 | ||||
| -rw-r--r-- | tests/ui/nll/user-annotations/region-error-ice-109072.stderr | 26 | ||||
| -rw-r--r-- | tests/ui/privacy/auxiliary/xc-private-method-lib.rs (renamed from tests/ui/auxiliary/xc-private-method-lib.rs) | 0 | ||||
| -rw-r--r-- | tests/ui/privacy/xc-private-method.rs (renamed from tests/ui/xc-private-method.rs) | 0 | ||||
| -rw-r--r-- | tests/ui/privacy/xc-private-method.stderr (renamed from tests/ui/xc-private-method.stderr) | 0 | ||||
| -rw-r--r-- | tests/ui/privacy/xc-private-method2.rs (renamed from tests/ui/xc-private-method2.rs) | 0 | ||||
| -rw-r--r-- | tests/ui/privacy/xc-private-method2.stderr (renamed from tests/ui/xc-private-method2.stderr) | 0 | ||||
| -rw-r--r-- | tests/ui/reachable/reachable-unnameable-type-alias.rs (renamed from tests/ui/reachable-unnameable-type-alias.rs) | 0 | ||||
| -rw-r--r-- | tests/ui/resolve/disambiguate-identical-names.rs (renamed from tests/ui/disambiguate-identical-names.rs) | 0 | ||||
| -rw-r--r-- | tests/ui/resolve/disambiguate-identical-names.stderr (renamed from tests/ui/disambiguate-identical-names.stderr) | 0 | ||||
| -rw-r--r-- | tests/ui/rfc-2008-non-exhaustive/omitted-patterns.rs | 24 | ||||
| -rw-r--r-- | tests/ui/rfc-2008-non-exhaustive/omitted-patterns.stderr | 31 | ||||
| -rw-r--r-- | tests/ui/rustdoc/doc-primitive.rs | 8 | ||||
| -rw-r--r-- | tests/ui/rustdoc/doc-primitive.stderr | 16 | ||||
| -rw-r--r-- | tests/ui/rustdoc/feature-gate-doc_primitive.rs | 6 | ||||
| -rw-r--r-- | tests/ui/rustdoc/feature-gate-doc_primitive.stderr | 15 | ||||
| -rw-r--r-- | tests/ui/stats/hir-stats.stderr | 86 | ||||
| -rw-r--r-- | tests/ui/thread-local/thread-local-mutation.rs (renamed from tests/ui/thread-local-mutation.rs) | 0 | ||||
| -rw-r--r-- | tests/ui/thread-local/thread-local-mutation.stderr (renamed from tests/ui/thread-local-mutation.stderr) | 0 | ||||
| -rw-r--r-- | tests/ui/thread-local/thread-local-static.rs (renamed from tests/ui/thread-local-static.rs) | 0 | ||||
| -rw-r--r-- | tests/ui/thread-local/thread-local-static.stderr (renamed from tests/ui/thread-local-static.stderr) | 0 | ||||
| -rw-r--r-- | tests/ui/traits/wrong-mul-method-signature.rs (renamed from tests/ui/wrong-mul-method-signature.rs) | 0 | ||||
| -rw-r--r-- | tests/ui/traits/wrong-mul-method-signature.stderr (renamed from tests/ui/wrong-mul-method-signature.stderr) | 0 | ||||
| -rw-r--r-- | tests/ui/tuple/tuple-index.rs (renamed from tests/ui/tuple-index.rs) | 0 | ||||
| -rw-r--r-- | tests/ui/typeck/output-type-mismatch.rs (renamed from tests/ui/output-type-mismatch.rs) | 0 | ||||
| -rw-r--r-- | tests/ui/typeck/output-type-mismatch.stderr (renamed from tests/ui/output-type-mismatch.stderr) | 0 | ||||
| -rw-r--r-- | tests/ui/typeck/suppressed-error.rs (renamed from tests/ui/suppressed-error.rs) | 0 | ||||
| -rw-r--r-- | tests/ui/typeck/suppressed-error.stderr (renamed from tests/ui/suppressed-error.stderr) | 0 | ||||
| -rw-r--r-- | tests/ui/typeck/tag-that-dare-not-speak-its-name.rs (renamed from tests/ui/tag-that-dare-not-speak-its-name.rs) | 0 | ||||
| -rw-r--r-- | tests/ui/typeck/tag-that-dare-not-speak-its-name.stderr (renamed from tests/ui/tag-that-dare-not-speak-its-name.stderr) | 0 | ||||
| -rw-r--r-- | tests/ui/typeck/terr-in-field.rs (renamed from tests/ui/terr-in-field.rs) | 0 | ||||
| -rw-r--r-- | tests/ui/typeck/terr-in-field.stderr (renamed from tests/ui/terr-in-field.stderr) | 0 | ||||
| -rw-r--r-- | tests/ui/typeck/terr-sorts.rs (renamed from tests/ui/terr-sorts.rs) | 0 | ||||
| -rw-r--r-- | tests/ui/typeck/terr-sorts.stderr (renamed from tests/ui/terr-sorts.stderr) | 0 | ||||
| -rw-r--r-- | tests/ui/typeck/while-type-error.rs (renamed from tests/ui/while-type-error.rs) | 0 | ||||
| -rw-r--r-- | tests/ui/typeck/while-type-error.stderr (renamed from tests/ui/while-type-error.stderr) | 0 | ||||
| -rw-r--r-- | tests/ui/typeck/wrong-ret-type.rs (renamed from tests/ui/wrong-ret-type.rs) | 0 | ||||
| -rw-r--r-- | tests/ui/typeck/wrong-ret-type.stderr (renamed from tests/ui/wrong-ret-type.stderr) | 0 | ||||
| -rw-r--r-- | tests/ui/ufcs/ufcs-polymorphic-paths.rs (renamed from tests/ui/ufcs-polymorphic-paths.rs) | 0 | ||||
| -rw-r--r-- | tests/ui/unique/expr-block-generic-unique1.rs (renamed from tests/ui/expr-block-generic-unique1.rs) | 0 | ||||
| -rw-r--r-- | tests/ui/unique/expr-block-generic-unique2.rs (renamed from tests/ui/expr-block-generic-unique2.rs) | 0 | ||||
| -rw-r--r-- | tests/ui/unique/expr-if-unique.rs (renamed from tests/ui/expr-if-unique.rs) | 0 | ||||
| -rw-r--r-- | tests/ui/unique/unique-object-noncopyable.rs (renamed from tests/ui/unique-object-noncopyable.rs) | 0 | ||||
| -rw-r--r-- | tests/ui/unique/unique-object-noncopyable.stderr (renamed from tests/ui/unique-object-noncopyable.stderr) | 0 | ||||
| -rw-r--r-- | tests/ui/unique/unique-pinned-nocopy.rs (renamed from tests/ui/unique-pinned-nocopy.rs) | 0 | ||||
| -rw-r--r-- | tests/ui/unique/unique-pinned-nocopy.stderr (renamed from tests/ui/unique-pinned-nocopy.stderr) | 0 | ||||
| -rw-r--r-- | tests/ui/unique/unwind-unique.rs (renamed from tests/ui/unwind-unique.rs) | 0 | ||||
| -rw-r--r-- | tests/ui/unpretty/mir-unpretty.rs (renamed from tests/ui/mir-unpretty.rs) | 0 | ||||
| -rw-r--r-- | tests/ui/unpretty/mir-unpretty.stderr (renamed from tests/ui/mir-unpretty.stderr) | 0 | ||||
| -rw-r--r-- | tests/ui/unpretty/unpretty-expr-fn-arg.rs (renamed from tests/ui/unpretty-expr-fn-arg.rs) | 0 | ||||
| -rw-r--r-- | tests/ui/unpretty/unpretty-expr-fn-arg.stdout (renamed from tests/ui/unpretty-expr-fn-arg.stdout) | 0 | ||||
| -rw-r--r-- | tests/ui/unsafe/foreign-unsafe-fn-called.mir.stderr (renamed from tests/ui/foreign-unsafe-fn-called.mir.stderr) | 0 | ||||
| -rw-r--r-- | tests/ui/unsafe/foreign-unsafe-fn-called.rs (renamed from tests/ui/foreign-unsafe-fn-called.rs) | 0 | ||||
| -rw-r--r-- | tests/ui/unsafe/foreign-unsafe-fn-called.thir.stderr (renamed from tests/ui/foreign-unsafe-fn-called.thir.stderr) | 0 | ||||
| -rw-r--r-- | tests/ui/unsafe/new-unsafe-pointers.rs (renamed from tests/ui/new-unsafe-pointers.rs) | 0 | ||||
| -rw-r--r-- | tests/ui/unsafe/unsafe-fn-called-from-unsafe-blk.rs (renamed from tests/ui/unsafe-fn-called-from-unsafe-blk.rs) | 0 | ||||
| -rw-r--r-- | tests/ui/unsafe/unsafe-fn-called-from-unsafe-fn.rs (renamed from tests/ui/unsafe-fn-called-from-unsafe-fn.rs) | 0 | ||||
| -rw-r--r-- | tests/ui/unsafe/unsafe-pointer-assignability.rs (renamed from tests/ui/unsafe-pointer-assignability.rs) | 0 | ||||
| -rw-r--r-- | tests/ui/variance/variance-intersection-of-ref-and-opt-ref.rs (renamed from tests/ui/variance-intersection-of-ref-and-opt-ref.rs) | 0 | ||||
| -rw-r--r-- | tests/ui/variance/variance-iterators-in-libcore.rs (renamed from tests/ui/variance-iterators-in-libcore.rs) | 0 | ||||
| -rw-r--r-- | tests/ui/wasm/wasm-custom-section-relocations.rs (renamed from tests/ui/wasm-custom-section-relocations.rs) | 0 | ||||
| -rw-r--r-- | tests/ui/wasm/wasm-custom-section-relocations.stderr (renamed from tests/ui/wasm-custom-section-relocations.stderr) | 0 | ||||
| -rw-r--r-- | triagebot.toml | 2 |
1153 files changed, 3938 insertions, 1743 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b45246eb4ea..a917d9a7d55 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,7 +34,7 @@ jobs: pr: permissions: actions: write - name: PR + name: "PR - ${{ matrix.name }}" env: CI_JOB_NAME: "${{ matrix.name }}" CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse @@ -159,7 +159,7 @@ jobs: auto: permissions: actions: write - name: auto + name: "auto - ${{ matrix.name }}" env: CI_JOB_NAME: "${{ matrix.name }}" CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse @@ -578,7 +578,7 @@ jobs: try: permissions: actions: write - name: try + name: "try - ${{ matrix.name }}" env: CI_JOB_NAME: "${{ matrix.name }}" CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse diff --git a/.mailmap b/.mailmap index 9148b79e980..92be3174750 100644 --- a/.mailmap +++ b/.mailmap @@ -102,6 +102,7 @@ Carol Willing <carolcode@willingconsulting.com> Chandler Deng <chandde@microsoft.com> Charles Lew <crlf0710@gmail.com> CrLF0710 <crlf0710@gmail.com> Chris C Cerami <chrisccerami@users.noreply.github.com> Chris C Cerami <chrisccerami@gmail.com> +Chris Denton <chris@chrisdenton.dev> Chris Denton <ChrisDenton@users.noreply.github.com> Chris Gregory <czipperz@gmail.com> Chris Pardy <chrispardy36@gmail.com> Chris Pressey <cpressey@gmail.com> @@ -415,6 +416,7 @@ Nick Platt <platt.nicholas@gmail.com> Niclas Schwarzlose <15schnic@gmail.com> Nicolas Abram <abramlujan@gmail.com> Nicole Mazzuca <npmazzuca@gmail.com> +Nilstrieb <48135649+Nilstrieb@users.noreply.github.com> nils <48135649+Nilstrieb@users.noreply.github.com> Nif Ward <nif.ward@gmail.com> Nika Layzell <nika@thelayzells.com> <michael@thelayzells.com> NODA Kai <nodakai@gmail.com> diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d732075fb2d..dfaa70bb9db 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -33,7 +33,6 @@ find a mentor! You can learn more about asking questions and getting help in the Did a compiler error message tell you to come here? If you want to create an ICE report, refer to [this section][contributing-bug-reports] and [open an issue][issue template]. -[Contributing to Rust]: https://rustc-dev-guide.rust-lang.org/contributing.html#contributing-to-rust [rustc-dev-guide]: https://rustc-dev-guide.rust-lang.org/ [std-dev-guide]: https://std-dev-guide.rust-lang.org/ [contributing-bug-reports]: https://rustc-dev-guide.rust-lang.org/contributing.html#bug-reports diff --git a/Cargo.lock b/Cargo.lock index 561f29abec4..c7bd689b2d8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -99,6 +99,46 @@ dependencies = [ ] [[package]] +name = "anstream" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "342258dd14006105c2b75ab1bd7543a03bdf0cfc94383303ac212a04939dff6f" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-wincon", + "concolor-override", + "concolor-query 0.3.3", + "is-terminal", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23ea9e81bd02e310c216d080f6223c179012256e5151c41db88d12c88a1684d2" + +[[package]] +name = "anstyle-parse" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7d1bb534e9efed14f3e5f44e7dd1a4f709384023a4165199a4241e18dff0116" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-wincon" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3127af6145b149f3287bb9a0d10ad9c5692dba8c53ad48285e5bec4063834fa" +dependencies = [ + "anstyle", + "windows-sys 0.45.0", +] + +[[package]] name = "anyhow" version = "1.0.65" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -362,7 +402,7 @@ dependencies = [ "cargo-test-macro", "cargo-test-support", "cargo-util", - "clap 4.1.4", + "clap 4.2.1", "crates-io", "curl", "curl-sys", @@ -398,6 +438,7 @@ dependencies = [ "pasetors", "pathdiff", "pretty_env_logger", + "rand", "rustc-workspace-hack", "rustfix", "same-file", @@ -669,17 +710,27 @@ dependencies = [ [[package]] name = "clap" -version = "4.1.4" +version = "4.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "046ae530c528f252094e4a77886ee1374437744b2bff1497aa898bbddbbb29b3" +dependencies = [ + "clap_builder", + "clap_derive 4.2.0", + "once_cell", +] + +[[package]] +name = "clap_builder" +version = "4.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f13b9c79b5d1dd500d20ef541215a6423c75829ef43117e1b4d17fd8af0b5d76" +checksum = "223163f58c9a40c3b0a43e1c4b50a9ce09f007ea2cb1ec258a687945b4b7929f" dependencies = [ + "anstream", + "anstyle", "bitflags", - "clap_derive 4.1.0", - "clap_lex 0.3.0", - "is-terminal", + "clap_lex 0.4.1", "once_cell", "strsim", - "termcolor", "terminal_size", ] @@ -689,7 +740,7 @@ version = "4.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "10861370d2ba66b0f5989f83ebf35db6421713fd92351790e7fdd6c36774c56b" dependencies = [ - "clap 4.1.4", + "clap 4.2.1", ] [[package]] @@ -707,15 +758,14 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.1.0" +version = "4.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "684a277d672e91966334af371f1a7b5833f9aa00b07c84e92fbce95e00208ce8" +checksum = "3f9644cd56d6b87dbe899ef8b053e331c0637664e9e21a33dfcdc36093f5c5c4" dependencies = [ "heck", - "proc-macro-error", "proc-macro2", "quote", - "syn 1.0.102", + "syn 2.0.8", ] [[package]] @@ -729,18 +779,15 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.3.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d4198f73e42b4936b35b5bb248d81d2b595ecb170da0bac7655c54eedfa8da8" -dependencies = [ - "os_str_bytes", -] +checksum = "8a2dd5a6fe8c6e3502f568a6353e5273bbb15193ad9a89e457b9970798efbea1" [[package]] name = "clippy" version = "0.1.70" dependencies = [ - "clap 4.1.4", + "clap 4.2.1", "clippy_lints", "clippy_utils", "compiletest_rs", @@ -771,7 +818,7 @@ name = "clippy_dev" version = "0.0.1" dependencies = [ "aho-corasick", - "clap 4.1.4", + "clap 4.2.1", "indoc", "itertools", "opener", @@ -868,9 +915,9 @@ dependencies = [ [[package]] name = "compiler_builtins" -version = "0.1.89" +version = "0.1.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fc9c2080d347a2c316518840ac9194644a9993dfa1e9778ef38979a339f5d8b" +checksum = "571298a3cce7e2afbd3d61abb91a18667d5ab25993ec577a88ee8ac45f00cc3a" dependencies = [ "cc", "rustc-std-workspace-core", @@ -932,16 +979,31 @@ checksum = "b90f9dcd9490a97db91a85ccd79e38a87e14323f0bb824659ee3274e9143ba37" dependencies = [ "atty", "bitflags", - "concolor-query", + "concolor-query 0.1.0", ] [[package]] +name = "concolor-override" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a855d4a1978dc52fb0536a04d384c2c0c1aa273597f08b77c8c4d3b2eec6037f" + +[[package]] name = "concolor-query" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "82a90734b3d5dcf656e7624cca6bce9c3a90ee11f900e80141a7427ccfb3d317" [[package]] +name = "concolor-query" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88d11d52c3d7ca2e6d0040212be9e4dbbcd78b6447f535b6b561f449427944cf" +dependencies = [ + "windows-sys 0.45.0", +] + +[[package]] name = "const-oid" version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -2844,7 +2906,7 @@ name = "jsondoclint" version = "0.1.0" dependencies = [ "anyhow", - "clap 4.1.4", + "clap 4.2.1", "fs-err", "rustc-hash", "rustdoc-json-types", @@ -2888,9 +2950,9 @@ dependencies = [ [[package]] name = "libffi" -version = "3.0.1" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e454b3efb16fba3b17810ae5e41df02b649e564ab3c5a34b3b93ed07ad287e6" +checksum = "ce826c243048e3d5cec441799724de52e2d42f820468431fc3fceee2341871e2" dependencies = [ "libc", "libffi-sys", @@ -2898,9 +2960,9 @@ dependencies = [ [[package]] name = "libffi-sys" -version = "2.0.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab4106b7f09d7b87d021334d5618fac1dfcfb824d4c5fe111ff0074dfd242e15" +checksum = "dc65067b78c0fc069771e8b9a9e02df71e08858bec92c1f101377c67b9dca7c7" dependencies = [ "cc", ] @@ -3110,7 +3172,7 @@ dependencies = [ "ammonia", "anyhow", "chrono", - "clap 4.1.4", + "clap 4.2.1", "clap_complete", "elasticlunr-rs", "env_logger 0.10.0", @@ -4115,7 +4177,7 @@ dependencies = [ name = "rustbook" version = "0.1.0" dependencies = [ - "clap 4.1.4", + "clap 4.2.1", "env_logger 0.7.1", "mdbook", ] @@ -6748,9 +6810,9 @@ checksum = "05e42f7c18b8f902290b009cde6d651262f956c98bc51bca4cd1d511c9cd85c7" [[package]] name = "utf8parse" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "936e4b492acfd135421d8dca4b1aa80a7bfc26e702ef3af710e0752684df5372" +checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" [[package]] name = "uuid" diff --git a/compiler/rustc_abi/src/layout.rs b/compiler/rustc_abi/src/layout.rs index 343f27326ad..aea59ee6aea 100644 --- a/compiler/rustc_abi/src/layout.rs +++ b/compiler/rustc_abi/src/layout.rs @@ -289,7 +289,7 @@ pub trait LayoutCalculator { fn layout_of_struct_or_enum( &self, repr: &ReprOptions, - variants: &IndexVec<VariantIdx, Vec<Layout<'_>>>, + variants: &IndexSlice<VariantIdx, Vec<Layout<'_>>>, is_enum: bool, is_unsafe_cell: bool, scalar_valid_range: (Bound<u128>, Bound<u128>), @@ -883,7 +883,7 @@ pub trait LayoutCalculator { fn layout_of_union( &self, repr: &ReprOptions, - variants: &IndexVec<VariantIdx, Vec<Layout<'_>>>, + variants: &IndexSlice<VariantIdx, Vec<Layout<'_>>>, ) -> Option<LayoutS> { let dl = self.current_data_layout(); let dl = dl.borrow(); diff --git a/compiler/rustc_abi/src/lib.rs b/compiler/rustc_abi/src/lib.rs index 428191bc8b9..7b5732b488b 100644 --- a/compiler/rustc_abi/src/lib.rs +++ b/compiler/rustc_abi/src/lib.rs @@ -11,7 +11,7 @@ use bitflags::bitflags; use rustc_data_structures::intern::Interned; #[cfg(feature = "nightly")] use rustc_data_structures::stable_hasher::StableOrd; -use rustc_index::vec::{Idx, IndexVec}; +use rustc_index::vec::{Idx, IndexSlice, IndexVec}; #[cfg(feature = "nightly")] use rustc_macros::HashStable_Generic; #[cfg(feature = "nightly")] diff --git a/compiler/rustc_ast/src/ast.rs b/compiler/rustc_ast/src/ast.rs index cc0fc7b8358..fb9d71b52a8 100644 --- a/compiler/rustc_ast/src/ast.rs +++ b/compiler/rustc_ast/src/ast.rs @@ -167,6 +167,9 @@ pub enum GenericArgs { AngleBracketed(AngleBracketedArgs), /// The `(A, B)` and `C` in `Foo(A, B) -> C`. Parenthesized(ParenthesizedArgs), + /// Associated return type bounds, like `T: Trait<method(..): Send>` + /// which applies the `Send` bound to the return-type of `method`. + ReturnTypeNotation(Span), } impl GenericArgs { @@ -178,6 +181,7 @@ impl GenericArgs { match self { AngleBracketed(data) => data.span, Parenthesized(data) => data.span, + ReturnTypeNotation(span) => *span, } } } @@ -231,15 +235,15 @@ impl AngleBracketedArg { } } -impl Into<Option<P<GenericArgs>>> for AngleBracketedArgs { - fn into(self) -> Option<P<GenericArgs>> { - Some(P(GenericArgs::AngleBracketed(self))) +impl Into<P<GenericArgs>> for AngleBracketedArgs { + fn into(self) -> P<GenericArgs> { + P(GenericArgs::AngleBracketed(self)) } } -impl Into<Option<P<GenericArgs>>> for ParenthesizedArgs { - fn into(self) -> Option<P<GenericArgs>> { - Some(P(GenericArgs::Parenthesized(self))) +impl Into<P<GenericArgs>> for ParenthesizedArgs { + fn into(self) -> P<GenericArgs> { + P(GenericArgs::Parenthesized(self)) } } @@ -2887,6 +2891,20 @@ pub struct Fn { } #[derive(Clone, Encodable, Decodable, Debug)] +pub struct StaticItem { + pub ty: P<Ty>, + pub mutability: Mutability, + pub expr: Option<P<Expr>>, +} + +#[derive(Clone, Encodable, Decodable, Debug)] +pub struct ConstItem { + pub defaultness: Defaultness, + pub ty: P<Ty>, + pub expr: Option<P<Expr>>, +} + +#[derive(Clone, Encodable, Decodable, Debug)] pub enum ItemKind { /// An `extern crate` item, with the optional *original* crate name if the crate was renamed. /// @@ -2899,11 +2917,11 @@ pub enum ItemKind { /// A static item (`static`). /// /// E.g., `static FOO: i32 = 42;` or `static FOO: &'static str = "bar";`. - Static(P<Ty>, Mutability, Option<P<Expr>>), + Static(Box<StaticItem>), /// A constant item (`const`). /// /// E.g., `const FOO: i32 = 42;`. - Const(Defaultness, P<Ty>, Option<P<Expr>>), + Const(Box<ConstItem>), /// A function declaration (`fn`). /// /// E.g., `fn foo(bar: usize) -> usize { .. }`. @@ -3019,7 +3037,7 @@ pub type AssocItem = Item<AssocItemKind>; pub enum AssocItemKind { /// An associated constant, `const $ident: $ty $def?;` where `def ::= "=" $expr? ;`. /// If `def` is parsed, then the constant is provided, and otherwise required. - Const(Defaultness, P<Ty>, Option<P<Expr>>), + Const(Box<ConstItem>), /// An associated function. Fn(Box<Fn>), /// An associated type. @@ -3031,7 +3049,7 @@ pub enum AssocItemKind { impl AssocItemKind { pub fn defaultness(&self) -> Defaultness { match *self { - Self::Const(defaultness, ..) + Self::Const(box ConstItem { defaultness, .. }) | Self::Fn(box Fn { defaultness, .. }) | Self::Type(box TyAlias { defaultness, .. }) => defaultness, Self::MacCall(..) => Defaultness::Final, @@ -3042,7 +3060,7 @@ impl AssocItemKind { impl From<AssocItemKind> for ItemKind { fn from(assoc_item_kind: AssocItemKind) -> ItemKind { match assoc_item_kind { - AssocItemKind::Const(a, b, c) => ItemKind::Const(a, b, c), + AssocItemKind::Const(item) => ItemKind::Const(item), AssocItemKind::Fn(fn_kind) => ItemKind::Fn(fn_kind), AssocItemKind::Type(ty_alias_kind) => ItemKind::TyAlias(ty_alias_kind), AssocItemKind::MacCall(a) => ItemKind::MacCall(a), @@ -3055,7 +3073,7 @@ impl TryFrom<ItemKind> for AssocItemKind { fn try_from(item_kind: ItemKind) -> Result<AssocItemKind, ItemKind> { Ok(match item_kind { - ItemKind::Const(a, b, c) => AssocItemKind::Const(a, b, c), + ItemKind::Const(item) => AssocItemKind::Const(item), ItemKind::Fn(fn_kind) => AssocItemKind::Fn(fn_kind), ItemKind::TyAlias(ty_kind) => AssocItemKind::Type(ty_kind), ItemKind::MacCall(a) => AssocItemKind::MacCall(a), @@ -3080,7 +3098,9 @@ pub enum ForeignItemKind { impl From<ForeignItemKind> for ItemKind { fn from(foreign_item_kind: ForeignItemKind) -> ItemKind { match foreign_item_kind { - ForeignItemKind::Static(a, b, c) => ItemKind::Static(a, b, c), + ForeignItemKind::Static(a, b, c) => { + ItemKind::Static(StaticItem { ty: a, mutability: b, expr: c }.into()) + } ForeignItemKind::Fn(fn_kind) => ItemKind::Fn(fn_kind), ForeignItemKind::TyAlias(ty_alias_kind) => ItemKind::TyAlias(ty_alias_kind), ForeignItemKind::MacCall(a) => ItemKind::MacCall(a), @@ -3093,7 +3113,9 @@ impl TryFrom<ItemKind> for ForeignItemKind { fn try_from(item_kind: ItemKind) -> Result<ForeignItemKind, ItemKind> { Ok(match item_kind { - ItemKind::Static(a, b, c) => ForeignItemKind::Static(a, b, c), + ItemKind::Static(box StaticItem { ty: a, mutability: b, expr: c }) => { + ForeignItemKind::Static(a, b, c) + } ItemKind::Fn(fn_kind) => ForeignItemKind::Fn(fn_kind), ItemKind::TyAlias(ty_alias_kind) => ForeignItemKind::TyAlias(ty_alias_kind), ItemKind::MacCall(a) => ForeignItemKind::MacCall(a), @@ -3110,8 +3132,8 @@ mod size_asserts { use super::*; use rustc_data_structures::static_assert_size; // tidy-alphabetical-start - static_assert_size!(AssocItem, 104); - static_assert_size!(AssocItemKind, 32); + static_assert_size!(AssocItem, 88); + static_assert_size!(AssocItemKind, 16); static_assert_size!(Attribute, 32); static_assert_size!(Block, 32); static_assert_size!(Expr, 72); diff --git a/compiler/rustc_ast/src/mut_visit.rs b/compiler/rustc_ast/src/mut_visit.rs index 46e46ab575e..2424073ae53 100644 --- a/compiler/rustc_ast/src/mut_visit.rs +++ b/compiler/rustc_ast/src/mut_visit.rs @@ -7,10 +7,10 @@ //! a `MutVisitor` renaming item names in a module will miss all of those //! that are created by the expansion of a macro. -use crate::ast::*; use crate::ptr::P; use crate::token::{self, Token}; use crate::tokenstream::*; +use crate::{ast::*, StaticItem}; use rustc_data_structures::flat_map_in_place::FlatMapInPlace; use rustc_data_structures::sync::Lrc; @@ -561,6 +561,7 @@ pub fn noop_visit_generic_args<T: MutVisitor>(generic_args: &mut GenericArgs, vi match generic_args { GenericArgs::AngleBracketed(data) => vis.visit_angle_bracketed_parameter_data(data), GenericArgs::Parenthesized(data) => vis.visit_parenthesized_parameter_data(data), + GenericArgs::ReturnTypeNotation(_span) => {} } } @@ -1029,14 +1030,12 @@ pub fn noop_visit_item_kind<T: MutVisitor>(kind: &mut ItemKind, vis: &mut T) { match kind { ItemKind::ExternCrate(_orig_name) => {} ItemKind::Use(use_tree) => vis.visit_use_tree(use_tree), - ItemKind::Static(ty, _, expr) => { + ItemKind::Static(box StaticItem { ty, mutability: _, expr }) => { vis.visit_ty(ty); visit_opt(expr, |expr| vis.visit_expr(expr)); } - ItemKind::Const(defaultness, ty, expr) => { - visit_defaultness(defaultness, vis); - vis.visit_ty(ty); - visit_opt(expr, |expr| vis.visit_expr(expr)); + ItemKind::Const(item) => { + visit_const_item(item, vis); } ItemKind::Fn(box Fn { defaultness, generics, sig, body }) => { visit_defaultness(defaultness, vis); @@ -1119,10 +1118,8 @@ pub fn noop_flat_map_assoc_item<T: MutVisitor>( visitor.visit_vis(vis); visit_attrs(attrs, visitor); match kind { - AssocItemKind::Const(defaultness, ty, expr) => { - visit_defaultness(defaultness, visitor); - visitor.visit_ty(ty); - visit_opt(expr, |expr| visitor.visit_expr(expr)); + AssocItemKind::Const(item) => { + visit_const_item(item, visitor); } AssocItemKind::Fn(box Fn { defaultness, generics, sig, body }) => { visit_defaultness(defaultness, visitor); @@ -1152,6 +1149,15 @@ pub fn noop_flat_map_assoc_item<T: MutVisitor>( smallvec![item] } +fn visit_const_item<T: MutVisitor>( + ConstItem { defaultness, ty, expr }: &mut ConstItem, + visitor: &mut T, +) { + visit_defaultness(defaultness, visitor); + visitor.visit_ty(ty); + visit_opt(expr, |expr| visitor.visit_expr(expr)); +} + pub fn noop_visit_fn_header<T: MutVisitor>(header: &mut FnHeader, vis: &mut T) { let FnHeader { unsafety, asyncness, constness, ext: _ } = header; visit_constness(constness, vis); diff --git a/compiler/rustc_ast/src/visit.rs b/compiler/rustc_ast/src/visit.rs index 608f87ab6eb..3b08467fde2 100644 --- a/compiler/rustc_ast/src/visit.rs +++ b/compiler/rustc_ast/src/visit.rs @@ -13,7 +13,7 @@ //! instance, a walker looking for item names in a module will miss all of //! those that are created by the expansion of a macro. -use crate::ast::*; +use crate::{ast::*, StaticItem}; use rustc_span::symbol::Ident; use rustc_span::Span; @@ -305,8 +305,9 @@ pub fn walk_item<'a, V: Visitor<'a>>(visitor: &mut V, item: &'a Item) { match &item.kind { ItemKind::ExternCrate(_) => {} ItemKind::Use(use_tree) => visitor.visit_use_tree(use_tree, item.id, false), - ItemKind::Static(typ, _, expr) | ItemKind::Const(_, typ, expr) => { - visitor.visit_ty(typ); + ItemKind::Static(box StaticItem { ty, mutability: _, expr }) + | ItemKind::Const(box ConstItem { ty, expr, .. }) => { + visitor.visit_ty(ty); walk_list!(visitor, visit_expr, expr); } ItemKind::Fn(box Fn { defaultness: _, generics, sig, body }) => { @@ -481,6 +482,7 @@ where walk_list!(visitor, visit_ty, &data.inputs); walk_fn_ret_ty(visitor, &data.output); } + GenericArgs::ReturnTypeNotation(_span) => {} } } @@ -673,7 +675,7 @@ pub fn walk_assoc_item<'a, V: Visitor<'a>>(visitor: &mut V, item: &'a AssocItem, visitor.visit_ident(ident); walk_list!(visitor, visit_attribute, attrs); match kind { - AssocItemKind::Const(_, ty, expr) => { + AssocItemKind::Const(box ConstItem { ty, expr, .. }) => { visitor.visit_ty(ty); walk_list!(visitor, visit_expr, expr); } diff --git a/compiler/rustc_ast_lowering/messages.ftl b/compiler/rustc_ast_lowering/messages.ftl index 3ccd84398ec..21b2a3c22fa 100644 --- a/compiler/rustc_ast_lowering/messages.ftl +++ b/compiler/rustc_ast_lowering/messages.ftl @@ -139,3 +139,15 @@ ast_lowering_trait_fn_async = .label = `async` because of this .note = `async` trait functions are not currently supported .note2 = consider using the `async-trait` crate: https://crates.io/crates/async-trait + +ast_lowering_bad_return_type_notation_inputs = + argument types not allowed with return type notation + .suggestion = remove the input types + +ast_lowering_bad_return_type_notation_needs_dots = + return type notation arguments must be elided with `..` + .suggestion = add `..` + +ast_lowering_bad_return_type_notation_output = + return type not allowed with return type notation + .suggestion = remove the return type diff --git a/compiler/rustc_ast_lowering/src/errors.rs b/compiler/rustc_ast_lowering/src/errors.rs index 5e6b6050bc0..f4e55619ebb 100644 --- a/compiler/rustc_ast_lowering/src/errors.rs +++ b/compiler/rustc_ast_lowering/src/errors.rs @@ -347,3 +347,25 @@ pub struct TraitFnAsync { #[label] pub span: Span, } + +#[derive(Diagnostic)] +pub enum BadReturnTypeNotation { + #[diag(ast_lowering_bad_return_type_notation_inputs)] + Inputs { + #[primary_span] + #[suggestion(code = "(..)", applicability = "maybe-incorrect")] + span: Span, + }, + #[diag(ast_lowering_bad_return_type_notation_needs_dots)] + NeedsDots { + #[primary_span] + #[suggestion(code = "(..)", applicability = "maybe-incorrect")] + span: Span, + }, + #[diag(ast_lowering_bad_return_type_notation_output)] + Output { + #[primary_span] + #[suggestion(code = "", applicability = "maybe-incorrect")] + span: Span, + }, +} diff --git a/compiler/rustc_ast_lowering/src/item.rs b/compiler/rustc_ast_lowering/src/item.rs index cc879982abc..f89e254a2f5 100644 --- a/compiler/rustc_ast_lowering/src/item.rs +++ b/compiler/rustc_ast_lowering/src/item.rs @@ -12,7 +12,7 @@ use rustc_hir as hir; use rustc_hir::def::{DefKind, Res}; use rustc_hir::def_id::{LocalDefId, CRATE_DEF_ID}; use rustc_hir::PredicateOrigin; -use rustc_index::vec::{Idx, IndexVec}; +use rustc_index::vec::{Idx, IndexSlice, IndexVec}; use rustc_middle::ty::{ResolverAstLowering, TyCtxt}; use rustc_span::edit_distance::find_best_match_for_name; use rustc_span::source_map::DesugaringKind; @@ -25,7 +25,7 @@ use thin_vec::ThinVec; pub(super) struct ItemLowerer<'a, 'hir> { pub(super) tcx: TyCtxt<'hir>, pub(super) resolver: &'a mut ResolverAstLowering, - pub(super) ast_index: &'a IndexVec<LocalDefId, AstOwner<'a>>, + pub(super) ast_index: &'a IndexSlice<LocalDefId, AstOwner<'a>>, pub(super) owners: &'a mut IndexVec<LocalDefId, hir::MaybeOwner<&'hir hir::OwnerInfo<'hir>>>, } @@ -229,12 +229,12 @@ impl<'hir> LoweringContext<'_, 'hir> { self.lower_use_tree(use_tree, &prefix, id, vis_span, ident, attrs) } - ItemKind::Static(t, m, e) => { + ItemKind::Static(box ast::StaticItem { ty: t, mutability: m, expr: e }) => { let (ty, body_id) = self.lower_const_item(t, span, e.as_deref()); hir::ItemKind::Static(ty, *m, body_id) } - ItemKind::Const(_, t, e) => { - let (ty, body_id) = self.lower_const_item(t, span, e.as_deref()); + ItemKind::Const(box ast::ConstItem { ty, expr, .. }) => { + let (ty, body_id) = self.lower_const_item(ty, span, expr.as_deref()); hir::ItemKind::Const(ty, body_id) } ItemKind::Fn(box Fn { @@ -708,10 +708,10 @@ impl<'hir> LoweringContext<'_, 'hir> { let trait_item_def_id = hir_id.expect_owner(); let (generics, kind, has_default) = match &i.kind { - AssocItemKind::Const(_, ty, default) => { + AssocItemKind::Const(box ConstItem { ty, expr, .. }) => { let ty = self.lower_ty(ty, &ImplTraitContext::Disallowed(ImplTraitPosition::ConstTy)); - let body = default.as_ref().map(|x| self.lower_const_body(i.span, Some(x))); + let body = expr.as_ref().map(|x| self.lower_const_body(i.span, Some(x))); (hir::Generics::empty(), hir::TraitItemKind::Const(ty, body), body.is_some()) } AssocItemKind::Fn(box Fn { sig, generics, body: None, .. }) => { @@ -809,7 +809,7 @@ impl<'hir> LoweringContext<'_, 'hir> { self.lower_attrs(hir_id, &i.attrs); let (generics, kind) = match &i.kind { - AssocItemKind::Const(_, ty, expr) => { + AssocItemKind::Const(box ConstItem { ty, expr, .. }) => { let ty = self.lower_ty(ty, &ImplTraitContext::Disallowed(ImplTraitPosition::ConstTy)); ( diff --git a/compiler/rustc_ast_lowering/src/lib.rs b/compiler/rustc_ast_lowering/src/lib.rs index 0b6b02ba00f..ca659db4dbe 100644 --- a/compiler/rustc_ast_lowering/src/lib.rs +++ b/compiler/rustc_ast_lowering/src/lib.rs @@ -60,13 +60,13 @@ use rustc_hir::def::{DefKind, LifetimeRes, Namespace, PartialRes, PerNS, Res}; use rustc_hir::def_id::{LocalDefId, CRATE_DEF_ID}; use rustc_hir::definitions::DefPathData; use rustc_hir::{ConstArg, GenericArg, ItemLocalId, ParamName, TraitCandidate}; -use rustc_index::vec::{Idx, IndexVec}; +use rustc_index::vec::{Idx, IndexSlice, IndexVec}; use rustc_macros::fluent_messages; use rustc_middle::{ span_bug, ty::{ResolverAstLowering, TyCtxt}, }; -use rustc_session::parse::feature_err; +use rustc_session::parse::{add_feature_diagnostics, feature_err}; use rustc_span::hygiene::MacroKind; use rustc_span::source_map::DesugaringKind; use rustc_span::symbol::{kw, sym, Ident, Symbol}; @@ -414,7 +414,7 @@ fn index_crate<'a>( /// This hash will then be part of the crate_hash which is stored in the metadata. fn compute_hir_hash( tcx: TyCtxt<'_>, - owners: &IndexVec<LocalDefId, hir::MaybeOwner<&hir::OwnerInfo<'_>>>, + owners: &IndexSlice<LocalDefId, hir::MaybeOwner<&hir::OwnerInfo<'_>>>, ) -> Fingerprint { let mut hir_body_nodes: Vec<_> = owners .iter_enumerated() @@ -482,7 +482,7 @@ enum ParamMode { } enum ParenthesizedGenericArgs { - Ok, + ParenSugar, Err, } @@ -987,14 +987,56 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> { GenericArgs::AngleBracketed(data) => { self.lower_angle_bracketed_parameter_data(data, ParamMode::Explicit, itctx).0 } + &GenericArgs::ReturnTypeNotation(span) => GenericArgsCtor { + args: Default::default(), + bindings: &[], + parenthesized: hir::GenericArgsParentheses::ReturnTypeNotation, + span, + }, GenericArgs::Parenthesized(data) => { - self.emit_bad_parenthesized_trait_in_assoc_ty(data); - self.lower_angle_bracketed_parameter_data( - &data.as_angle_bracketed_args(), - ParamMode::Explicit, - itctx, - ) - .0 + if let Some(start_char) = constraint.ident.as_str().chars().next() + && start_char.is_ascii_lowercase() + { + let mut err = if !data.inputs.is_empty() { + self.tcx.sess.create_err(errors::BadReturnTypeNotation::Inputs { + span: data.inputs_span, + }) + } else if let FnRetTy::Ty(ty) = &data.output { + self.tcx.sess.create_err(errors::BadReturnTypeNotation::Output { + span: data.inputs_span.shrink_to_hi().to(ty.span), + }) + } else { + self.tcx.sess.create_err(errors::BadReturnTypeNotation::NeedsDots { + span: data.inputs_span, + }) + }; + if !self.tcx.features().return_type_notation + && self.tcx.sess.is_nightly_build() + { + add_feature_diagnostics( + &mut err, + &self.tcx.sess.parse_sess, + sym::return_type_notation, + ); + } + err.emit(); + GenericArgsCtor { + args: Default::default(), + bindings: &[], + parenthesized: hir::GenericArgsParentheses::ReturnTypeNotation, + span: data.span, + } + } else { + self.emit_bad_parenthesized_trait_in_assoc_ty(data); + // FIXME(return_type_notation): we could issue a feature error + // if the parens are empty and there's no return type. + self.lower_angle_bracketed_parameter_data( + &data.as_angle_bracketed_args(), + ParamMode::Explicit, + itctx, + ) + .0 + } } }; gen_args_ctor.into_generic_args(self) @@ -2075,7 +2117,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> { let future_args = self.arena.alloc(hir::GenericArgs { args: &[], bindings: arena_vec![self; self.output_ty_binding(span, output_ty)], - parenthesized: false, + parenthesized: hir::GenericArgsParentheses::No, span_ext: DUMMY_SP, }); @@ -2595,13 +2637,15 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> { struct GenericArgsCtor<'hir> { args: SmallVec<[hir::GenericArg<'hir>; 4]>, bindings: &'hir [hir::TypeBinding<'hir>], - parenthesized: bool, + parenthesized: hir::GenericArgsParentheses, span: Span, } impl<'hir> GenericArgsCtor<'hir> { fn is_empty(&self) -> bool { - self.args.is_empty() && self.bindings.is_empty() && !self.parenthesized + self.args.is_empty() + && self.bindings.is_empty() + && self.parenthesized == hir::GenericArgsParentheses::No } fn into_generic_args(self, this: &LoweringContext<'_, 'hir>) -> &'hir hir::GenericArgs<'hir> { diff --git a/compiler/rustc_ast_lowering/src/path.rs b/compiler/rustc_ast_lowering/src/path.rs index 592fc5aa645..1c47a969696 100644 --- a/compiler/rustc_ast_lowering/src/path.rs +++ b/compiler/rustc_ast_lowering/src/path.rs @@ -13,6 +13,7 @@ use rustc_span::symbol::{kw, sym, Ident}; use rustc_span::{BytePos, Span, DUMMY_SP}; use smallvec::{smallvec, SmallVec}; +use thin_vec::ThinVec; impl<'a, 'hir> LoweringContext<'a, 'hir> { #[instrument(level = "trace", skip(self))] @@ -51,7 +52,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> { let parenthesized_generic_args = match base_res { // `a::b::Trait(Args)` Res::Def(DefKind::Trait, _) if i + 1 == proj_start => { - ParenthesizedGenericArgs::Ok + ParenthesizedGenericArgs::ParenSugar } // `a::b::Trait(Args)::TraitItem` Res::Def(DefKind::AssocFn, _) @@ -59,10 +60,10 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> { | Res::Def(DefKind::AssocTy, _) if i + 2 == proj_start => { - ParenthesizedGenericArgs::Ok + ParenthesizedGenericArgs::ParenSugar } // Avoid duplicated errors. - Res::Err => ParenthesizedGenericArgs::Ok, + Res::Err => ParenthesizedGenericArgs::ParenSugar, // An error _ => ParenthesizedGenericArgs::Err, }; @@ -180,7 +181,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> { self.lower_angle_bracketed_parameter_data(data, param_mode, itctx) } GenericArgs::Parenthesized(data) => match parenthesized_generic_args { - ParenthesizedGenericArgs::Ok => { + ParenthesizedGenericArgs::ParenSugar => { self.lower_parenthesized_parameter_data(data, itctx) } ParenthesizedGenericArgs::Err => { @@ -218,13 +219,25 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> { ) } }, + &GenericArgs::ReturnTypeNotation(span) => { + self.tcx.sess.emit_err(GenericTypeWithParentheses { span, sub: None }); + ( + self.lower_angle_bracketed_parameter_data( + &AngleBracketedArgs { span, args: ThinVec::default() }, + param_mode, + itctx, + ) + .0, + false, + ) + } } } else { ( GenericArgsCtor { args: Default::default(), bindings: &[], - parenthesized: false, + parenthesized: hir::GenericArgsParentheses::No, span: path_span.shrink_to_hi(), }, param_mode == ParamMode::Optional, @@ -233,7 +246,9 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> { let has_lifetimes = generic_args.args.iter().any(|arg| matches!(arg, GenericArg::Lifetime(_))); - if !generic_args.parenthesized && !has_lifetimes { + + // FIXME(return_type_notation): Is this correct? I think so. + if generic_args.parenthesized != hir::GenericArgsParentheses::ParenSugar && !has_lifetimes { self.maybe_insert_elided_lifetimes_in_path( path_span, segment.id, @@ -328,7 +343,12 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> { AngleBracketedArg::Constraint(c) => Some(self.lower_assoc_ty_constraint(c, itctx)), AngleBracketedArg::Arg(_) => None, })); - let ctor = GenericArgsCtor { args, bindings, parenthesized: false, span: data.span }; + let ctor = GenericArgsCtor { + args, + bindings, + parenthesized: hir::GenericArgsParentheses::No, + span: data.span, + }; (ctor, !has_non_lt_args && param_mode == ParamMode::Optional) } @@ -376,7 +396,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> { GenericArgsCtor { args, bindings: arena_vec![self; binding], - parenthesized: true, + parenthesized: hir::GenericArgsParentheses::ParenSugar, span: data.inputs_span, }, false, @@ -396,7 +416,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> { let gen_args = self.arena.alloc(hir::GenericArgs { args, bindings, - parenthesized: false, + parenthesized: hir::GenericArgsParentheses::No, span_ext: DUMMY_SP, }); hir::TypeBinding { diff --git a/compiler/rustc_ast_passes/src/ast_validation.rs b/compiler/rustc_ast_passes/src/ast_validation.rs index 93c854cc809..236ebd04ae8 100644 --- a/compiler/rustc_ast_passes/src/ast_validation.rs +++ b/compiler/rustc_ast_passes/src/ast_validation.rs @@ -9,8 +9,8 @@ use itertools::{Either, Itertools}; use rustc_ast::ptr::P; use rustc_ast::visit::{self, AssocCtxt, BoundKind, FnCtxt, FnKind, Visitor}; -use rustc_ast::walk_list; use rustc_ast::*; +use rustc_ast::{walk_list, StaticItem}; use rustc_ast_pretty::pprust::{self, State}; use rustc_data_structures::fx::FxIndexMap; use rustc_macros::Subdiagnostic; @@ -983,14 +983,14 @@ impl<'a> Visitor<'a> for AstValidator<'a> { self.err_handler().emit_err(errors::FieldlessUnion { span: item.span }); } } - ItemKind::Const(def, .., None) => { - self.check_defaultness(item.span, *def); + ItemKind::Const(box ConstItem { defaultness, expr: None, .. }) => { + self.check_defaultness(item.span, *defaultness); self.session.emit_err(errors::ConstWithoutBody { span: item.span, replace_span: self.ending_semi_or_hi(item.span), }); } - ItemKind::Static(.., None) => { + ItemKind::Static(box StaticItem { expr: None, .. }) => { self.session.emit_err(errors::StaticWithoutBody { span: item.span, replace_span: self.ending_semi_or_hi(item.span), @@ -1075,6 +1075,7 @@ impl<'a> Visitor<'a> for AstValidator<'a> { self.with_impl_trait(None, |this| this.visit_ty(ty)); } } + GenericArgs::ReturnTypeNotation(_span) => {} } } @@ -1258,13 +1259,11 @@ impl<'a> Visitor<'a> for AstValidator<'a> { if ctxt == AssocCtxt::Impl { match &item.kind { - AssocItemKind::Const(_, _, body) => { - if body.is_none() { - self.session.emit_err(errors::AssocConstWithoutBody { - span: item.span, - replace_span: self.ending_semi_or_hi(item.span), - }); - } + AssocItemKind::Const(box ConstItem { expr: None, .. }) => { + self.session.emit_err(errors::AssocConstWithoutBody { + span: item.span, + replace_span: self.ending_semi_or_hi(item.span), + }); } AssocItemKind::Fn(box Fn { body, .. }) => { if body.is_none() { @@ -1387,16 +1386,19 @@ fn deny_equality_constraints( match &mut assoc_path.segments[len].args { Some(args) => match args.deref_mut() { GenericArgs::Parenthesized(_) => continue, + GenericArgs::ReturnTypeNotation(_span) => continue, GenericArgs::AngleBracketed(args) => { args.args.push(arg); } }, empty_args => { - *empty_args = AngleBracketedArgs { - span: ident.span, - args: thin_vec![arg], - } - .into(); + *empty_args = Some( + AngleBracketedArgs { + span: ident.span, + args: thin_vec![arg], + } + .into(), + ); } } err.assoc = Some(errors::AssociatedSuggestion { diff --git a/compiler/rustc_ast_passes/src/feature_gate.rs b/compiler/rustc_ast_passes/src/feature_gate.rs index 344a1e7f5e7..b3923b651eb 100644 --- a/compiler/rustc_ast_passes/src/feature_gate.rs +++ b/compiler/rustc_ast_passes/src/feature_gate.rs @@ -482,12 +482,21 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> { fn visit_assoc_constraint(&mut self, constraint: &'a AssocConstraint) { if let AssocConstraintKind::Bound { .. } = constraint.kind { - gate_feature_post!( - &self, - associated_type_bounds, - constraint.span, - "associated type bounds are unstable" - ) + if let Some(args) = constraint.gen_args.as_ref() + && matches!( + args, + ast::GenericArgs::ReturnTypeNotation(..) + ) + { + // RTN is gated below with a `gate_all`. + } else { + gate_feature_post!( + &self, + associated_type_bounds, + constraint.span, + "associated type bounds are unstable" + ) + } } visit::walk_assoc_constraint(self, constraint) } @@ -577,6 +586,7 @@ pub fn check_crate(krate: &ast::Crate, sess: &Session) { gate_all!(yeet_expr, "`do yeet` expression is experimental"); gate_all!(dyn_star, "`dyn*` trait objects are experimental"); gate_all!(const_closures, "const closures are experimental"); + gate_all!(return_type_notation, "return type notation is experimental"); // All uses of `gate_all!` below this point were added in #65742, // and subsequently disabled (with the non-early gating readded). diff --git a/compiler/rustc_ast_pretty/src/pprust/state.rs b/compiler/rustc_ast_pretty/src/pprust/state.rs index 694d688bf1f..80c451d6753 100644 --- a/compiler/rustc_ast_pretty/src/pprust/state.rs +++ b/compiler/rustc_ast_pretty/src/pprust/state.rs @@ -936,6 +936,10 @@ impl<'a> PrintState<'a> for State<'a> { self.word(")"); self.print_fn_ret_ty(&data.output); } + + ast::GenericArgs::ReturnTypeNotation(_span) => { + self.word("(..)"); + } } } } diff --git a/compiler/rustc_ast_pretty/src/pprust/state/item.rs b/compiler/rustc_ast_pretty/src/pprust/state/item.rs index bf2c73a66a2..c465f8c948a 100644 --- a/compiler/rustc_ast_pretty/src/pprust/state/item.rs +++ b/compiler/rustc_ast_pretty/src/pprust/state/item.rs @@ -2,6 +2,7 @@ use crate::pp::Breaks::Inconsistent; use crate::pprust::state::delimited::IterDelimited; use crate::pprust::state::{AnnNode, PrintState, State, INDENT_UNIT}; +use ast::StaticItem; use rustc_ast as ast; use rustc_ast::GenericBound; use rustc_ast::ModKind; @@ -156,7 +157,7 @@ impl<'a> State<'a> { self.print_use_tree(tree); self.word(";"); } - ast::ItemKind::Static(ty, mutbl, body) => { + ast::ItemKind::Static(box StaticItem { ty, mutability: mutbl, expr: body }) => { let def = ast::Defaultness::Final; self.print_item_const( item.ident, @@ -167,8 +168,15 @@ impl<'a> State<'a> { def, ); } - ast::ItemKind::Const(def, ty, body) => { - self.print_item_const(item.ident, None, ty, body.as_deref(), &item.vis, *def); + ast::ItemKind::Const(box ast::ConstItem { defaultness, ty, expr }) => { + self.print_item_const( + item.ident, + None, + ty, + expr.as_deref(), + &item.vis, + *defaultness, + ); } ast::ItemKind::Fn(box ast::Fn { defaultness, sig, generics, body }) => { self.print_fn_full( @@ -507,8 +515,8 @@ impl<'a> State<'a> { ast::AssocItemKind::Fn(box ast::Fn { defaultness, sig, generics, body }) => { self.print_fn_full(sig, ident, generics, vis, *defaultness, body.as_deref(), attrs); } - ast::AssocItemKind::Const(def, ty, body) => { - self.print_item_const(ident, None, ty, body.as_deref(), vis, *def); + ast::AssocItemKind::Const(box ast::ConstItem { defaultness, ty, expr }) => { + self.print_item_const(ident, None, ty, expr.as_deref(), vis, *defaultness); } ast::AssocItemKind::Type(box ast::TyAlias { defaultness, diff --git a/compiler/rustc_borrowck/src/constraints/mod.rs b/compiler/rustc_borrowck/src/constraints/mod.rs index f370c02161b..d2d9779dbea 100644 --- a/compiler/rustc_borrowck/src/constraints/mod.rs +++ b/compiler/rustc_borrowck/src/constraints/mod.rs @@ -2,7 +2,7 @@ #![deny(rustc::diagnostic_outside_of_impl)] use rustc_data_structures::graph::scc::Sccs; -use rustc_index::vec::IndexVec; +use rustc_index::vec::{IndexSlice, IndexVec}; use rustc_middle::mir::ConstraintCategory; use rustc_middle::ty::{RegionVid, VarianceDiagInfo}; use rustc_span::Span; @@ -60,7 +60,9 @@ impl<'tcx> OutlivesConstraintSet<'tcx> { Sccs::new(region_graph) } - pub(crate) fn outlives(&self) -> &IndexVec<OutlivesConstraintIndex, OutlivesConstraint<'tcx>> { + pub(crate) fn outlives( + &self, + ) -> &IndexSlice<OutlivesConstraintIndex, OutlivesConstraint<'tcx>> { &self.outlives } } diff --git a/compiler/rustc_borrowck/src/consumers.rs b/compiler/rustc_borrowck/src/consumers.rs index 055b281bc2e..cb1a6522223 100644 --- a/compiler/rustc_borrowck/src/consumers.rs +++ b/compiler/rustc_borrowck/src/consumers.rs @@ -3,7 +3,7 @@ //! This file provides API for compiler consumers. use rustc_hir::def_id::LocalDefId; -use rustc_index::vec::IndexVec; +use rustc_index::vec::IndexSlice; use rustc_infer::infer::{DefiningAnchor, TyCtxtInferExt}; use rustc_middle::mir::Body; use rustc_middle::ty::{self, TyCtxt}; @@ -35,6 +35,6 @@ pub fn get_body_with_borrowck_facts( let (input_body, promoted) = tcx.mir_promoted(def); let infcx = tcx.infer_ctxt().with_opaque_type_inference(DefiningAnchor::Bind(def.did)).build(); let input_body: &Body<'_> = &input_body.borrow(); - let promoted: &IndexVec<_, _> = &promoted.borrow(); + let promoted: &IndexSlice<_, _> = &promoted.borrow(); *super::do_mir_borrowck(&infcx, input_body, promoted, true).1.unwrap() } diff --git a/compiler/rustc_borrowck/src/diagnostics/explain_borrow.rs b/compiler/rustc_borrowck/src/diagnostics/explain_borrow.rs index 62b3f3ecfc3..8860395e71c 100644 --- a/compiler/rustc_borrowck/src/diagnostics/explain_borrow.rs +++ b/compiler/rustc_borrowck/src/diagnostics/explain_borrow.rs @@ -3,7 +3,7 @@ use rustc_errors::{Applicability, Diagnostic}; use rustc_hir as hir; use rustc_hir::intravisit::Visitor; -use rustc_index::vec::IndexVec; +use rustc_index::vec::IndexSlice; use rustc_infer::infer::NllRegionVariableOrigin; use rustc_middle::mir::{ Body, CastKind, ConstraintCategory, FakeReadCause, Local, LocalInfo, Location, Operand, Place, @@ -60,7 +60,7 @@ impl<'tcx> BorrowExplanation<'tcx> { &self, tcx: TyCtxt<'tcx>, body: &Body<'tcx>, - local_names: &IndexVec<Local, Option<Symbol>>, + local_names: &IndexSlice<Local, Option<Symbol>>, err: &mut Diagnostic, borrow_desc: &str, borrow_span: Option<Span>, diff --git a/compiler/rustc_borrowck/src/diagnostics/mod.rs b/compiler/rustc_borrowck/src/diagnostics/mod.rs index da0456856ac..7bd4331c5ed 100644 --- a/compiler/rustc_borrowck/src/diagnostics/mod.rs +++ b/compiler/rustc_borrowck/src/diagnostics/mod.rs @@ -6,6 +6,7 @@ use rustc_errors::{Applicability, Diagnostic}; use rustc_hir as hir; use rustc_hir::def::{CtorKind, Namespace}; use rustc_hir::GeneratorKind; +use rustc_index::vec::IndexSlice; use rustc_infer::infer::{LateBoundRegionConversionTime, TyCtxtInferExt}; use rustc_middle::mir::tcx::PlaceTy; use rustc_middle::mir::{ @@ -825,7 +826,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> { debug!("move_spans: def_id={:?} place={:?}", closure_def_id, place); let places = &[Operand::Move(place)]; if let Some((args_span, generator_kind, capture_kind_span, path_span)) = - self.closure_span(closure_def_id, moved_place, places) + self.closure_span(closure_def_id, moved_place, IndexSlice::from_raw(places)) { return ClosureUse { generator_kind, @@ -975,7 +976,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> { &self, def_id: LocalDefId, target_place: PlaceRef<'tcx>, - places: &[Operand<'tcx>], + places: &IndexSlice<FieldIdx, Operand<'tcx>>, ) -> Option<(Span, Option<GeneratorKind>, Span, Span)> { debug!( "closure_span: def_id={:?} target_place={:?} places={:?}", diff --git a/compiler/rustc_borrowck/src/diagnostics/var_name.rs b/compiler/rustc_borrowck/src/diagnostics/var_name.rs index ada3310d807..80b2787ce0c 100644 --- a/compiler/rustc_borrowck/src/diagnostics/var_name.rs +++ b/compiler/rustc_borrowck/src/diagnostics/var_name.rs @@ -3,7 +3,7 @@ use crate::Upvar; use crate::{nll::ToRegionVid, region_infer::RegionInferenceContext}; -use rustc_index::vec::{Idx, IndexVec}; +use rustc_index::vec::{Idx, IndexSlice}; use rustc_middle::mir::{Body, Local}; use rustc_middle::ty::{RegionVid, TyCtxt}; use rustc_span::source_map::Span; @@ -14,7 +14,7 @@ impl<'tcx> RegionInferenceContext<'tcx> { &self, tcx: TyCtxt<'tcx>, body: &Body<'tcx>, - local_names: &IndexVec<Local, Option<Symbol>>, + local_names: &IndexSlice<Local, Option<Symbol>>, upvars: &[Upvar<'tcx>], fr: RegionVid, ) -> Option<(Option<Symbol>, Span)> { @@ -113,7 +113,7 @@ impl<'tcx> RegionInferenceContext<'tcx> { pub(crate) fn get_argument_name_and_span_for_region( &self, body: &Body<'tcx>, - local_names: &IndexVec<Local, Option<Symbol>>, + local_names: &IndexSlice<Local, Option<Symbol>>, argument_index: usize, ) -> (Option<Symbol>, Span) { let implicit_inputs = self.universal_regions().defining_ty.implicit_inputs(); diff --git a/compiler/rustc_borrowck/src/lib.rs b/compiler/rustc_borrowck/src/lib.rs index 8b463a018a8..1d4d1406239 100644 --- a/compiler/rustc_borrowck/src/lib.rs +++ b/compiler/rustc_borrowck/src/lib.rs @@ -23,7 +23,7 @@ use rustc_errors::{Diagnostic, DiagnosticBuilder, DiagnosticMessage, Subdiagnost use rustc_hir as hir; use rustc_hir::def_id::LocalDefId; use rustc_index::bit_set::ChunkedBitSet; -use rustc_index::vec::IndexVec; +use rustc_index::vec::{IndexSlice, IndexVec}; use rustc_infer::infer::{ DefiningAnchor, InferCtxt, NllRegionVariableOrigin, RegionVariableOrigin, TyCtxtInferExt, }; @@ -154,7 +154,7 @@ fn mir_borrowck(tcx: TyCtxt<'_>, def: ty::WithOptConstParam<LocalDefId>) -> &Bor let infcx = tcx.infer_ctxt().with_opaque_type_inference(DefiningAnchor::Bind(hir_owner.def_id)).build(); let input_body: &Body<'_> = &input_body.borrow(); - let promoted: &IndexVec<_, _> = &promoted.borrow(); + let promoted: &IndexSlice<_, _> = &promoted.borrow(); let opt_closure_req = do_mir_borrowck(&infcx, input_body, promoted, false).0; debug!("mir_borrowck done"); @@ -170,7 +170,7 @@ fn mir_borrowck(tcx: TyCtxt<'_>, def: ty::WithOptConstParam<LocalDefId>) -> &Bor fn do_mir_borrowck<'tcx>( infcx: &InferCtxt<'tcx>, input_body: &Body<'tcx>, - input_promoted: &IndexVec<Promoted, Body<'tcx>>, + input_promoted: &IndexSlice<Promoted, Body<'tcx>>, return_body_with_facts: bool, ) -> (BorrowCheckResult<'tcx>, Option<Box<BodyWithBorrowckFacts<'tcx>>>) { let def = input_body.source.with_opt_param().as_local().unwrap(); @@ -223,7 +223,7 @@ fn do_mir_borrowck<'tcx>( // be modified (in place) to contain non-lexical lifetimes. It // will have a lifetime tied to the inference context. let mut body_owned = input_body.clone(); - let mut promoted = input_promoted.clone(); + let mut promoted = input_promoted.to_owned(); let free_regions = nll::replace_regions_in_mir(&infcx, param_env, &mut body_owned, &mut promoted); let body = &body_owned; // no further changes @@ -1343,7 +1343,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> { self.infcx.tcx.mir_borrowck(def_id); debug!("{:?} used_mut_upvars={:?}", def_id, used_mut_upvars); for field in used_mut_upvars { - self.propagate_closure_used_mut_upvar(&operands[field.index()]); + self.propagate_closure_used_mut_upvar(&operands[*field]); } } AggregateKind::Adt(..) diff --git a/compiler/rustc_borrowck/src/member_constraints.rs b/compiler/rustc_borrowck/src/member_constraints.rs index b6c5d4245d7..f637e6a95ac 100644 --- a/compiler/rustc_borrowck/src/member_constraints.rs +++ b/compiler/rustc_borrowck/src/member_constraints.rs @@ -2,7 +2,7 @@ #![deny(rustc::diagnostic_outside_of_impl)] use rustc_data_structures::captures::Captures; use rustc_data_structures::fx::FxIndexMap; -use rustc_index::vec::IndexVec; +use rustc_index::vec::{IndexSlice, IndexVec}; use rustc_middle::infer::MemberConstraint; use rustc_middle::ty::{self, Ty}; use rustc_span::Span; @@ -215,7 +215,7 @@ where /// target_list: A -> B -> C -> D -> E -> F -> (None) /// ``` fn append_list( - constraints: &mut IndexVec<NllMemberConstraintIndex, NllMemberConstraint<'_>>, + constraints: &mut IndexSlice<NllMemberConstraintIndex, NllMemberConstraint<'_>>, target_list: NllMemberConstraintIndex, source_list: NllMemberConstraintIndex, ) { diff --git a/compiler/rustc_borrowck/src/nll.rs b/compiler/rustc_borrowck/src/nll.rs index f0068fc9226..06ecbdb1707 100644 --- a/compiler/rustc_borrowck/src/nll.rs +++ b/compiler/rustc_borrowck/src/nll.rs @@ -4,7 +4,7 @@ use rustc_data_structures::fx::FxIndexMap; use rustc_hir::def_id::LocalDefId; -use rustc_index::vec::IndexVec; +use rustc_index::vec::IndexSlice; use rustc_middle::mir::{create_dump_file, dump_enabled, dump_mir, PassWhere}; use rustc_middle::mir::{ BasicBlock, Body, ClosureOutlivesSubject, ClosureRegionRequirements, LocalKind, Location, @@ -59,7 +59,7 @@ pub(crate) fn replace_regions_in_mir<'tcx>( infcx: &BorrowckInferCtxt<'_, 'tcx>, param_env: ty::ParamEnv<'tcx>, body: &mut Body<'tcx>, - promoted: &mut IndexVec<Promoted, Body<'tcx>>, + promoted: &mut IndexSlice<Promoted, Body<'tcx>>, ) -> UniversalRegions<'tcx> { let def = body.source.with_opt_param().as_local().unwrap(); @@ -158,7 +158,7 @@ pub(crate) fn compute_regions<'cx, 'tcx>( infcx: &BorrowckInferCtxt<'_, 'tcx>, universal_regions: UniversalRegions<'tcx>, body: &Body<'tcx>, - promoted: &IndexVec<Promoted, Body<'tcx>>, + promoted: &IndexSlice<Promoted, Body<'tcx>>, location_table: &LocationTable, param_env: ty::ParamEnv<'tcx>, flow_inits: &mut ResultsCursor<'cx, 'tcx, MaybeInitializedPlaces<'cx, 'tcx>>, diff --git a/compiler/rustc_borrowck/src/region_infer/mod.rs b/compiler/rustc_borrowck/src/region_infer/mod.rs index 03f175daca9..f67af4584a4 100644 --- a/compiler/rustc_borrowck/src/region_infer/mod.rs +++ b/compiler/rustc_borrowck/src/region_infer/mod.rs @@ -7,7 +7,7 @@ use rustc_data_structures::fx::{FxIndexMap, FxIndexSet}; use rustc_data_structures::graph::scc::Sccs; use rustc_errors::Diagnostic; use rustc_hir::def_id::CRATE_DEF_ID; -use rustc_index::vec::IndexVec; +use rustc_index::vec::{IndexSlice, IndexVec}; use rustc_infer::infer::outlives::test_type_match; use rustc_infer::infer::region_constraints::{GenericKind, VarInfos, VerifyBound, VerifyIfEq}; use rustc_infer::infer::{InferCtxt, NllRegionVariableOrigin, RegionVariableOrigin}; @@ -399,7 +399,7 @@ impl<'tcx> RegionInferenceContext<'tcx> { /// the minimum, or narrowest, universe. fn compute_scc_universes( constraint_sccs: &Sccs<RegionVid, ConstraintSccIndex>, - definitions: &IndexVec<RegionVid, RegionDefinition<'tcx>>, + definitions: &IndexSlice<RegionVid, RegionDefinition<'tcx>>, ) -> IndexVec<ConstraintSccIndex, ty::UniverseIndex> { let num_sccs = constraint_sccs.num_sccs(); let mut scc_universes = IndexVec::from_elem_n(ty::UniverseIndex::MAX, num_sccs); @@ -486,7 +486,7 @@ impl<'tcx> RegionInferenceContext<'tcx> { /// more details. fn compute_scc_representatives( constraints_scc: &Sccs<RegionVid, ConstraintSccIndex>, - definitions: &IndexVec<RegionVid, RegionDefinition<'tcx>>, + definitions: &IndexSlice<RegionVid, RegionDefinition<'tcx>>, ) -> IndexVec<ConstraintSccIndex, ty::RegionVid> { let num_sccs = constraints_scc.num_sccs(); let next_region_vid = definitions.next_index(); diff --git a/compiler/rustc_borrowck/src/renumber.rs b/compiler/rustc_borrowck/src/renumber.rs index 016f6f78dfa..0fbf01dbe44 100644 --- a/compiler/rustc_borrowck/src/renumber.rs +++ b/compiler/rustc_borrowck/src/renumber.rs @@ -1,7 +1,7 @@ #![deny(rustc::untranslatable_diagnostic)] #![deny(rustc::diagnostic_outside_of_impl)] use crate::BorrowckInferCtxt; -use rustc_index::vec::IndexVec; +use rustc_index::vec::IndexSlice; use rustc_infer::infer::NllRegionVariableOrigin; use rustc_middle::mir::visit::{MutVisitor, TyContext}; use rustc_middle::mir::Constant; @@ -16,7 +16,7 @@ use rustc_span::{Span, Symbol}; pub fn renumber_mir<'tcx>( infcx: &BorrowckInferCtxt<'_, 'tcx>, body: &mut Body<'tcx>, - promoted: &mut IndexVec<Promoted, Body<'tcx>>, + promoted: &mut IndexSlice<Promoted, Body<'tcx>>, ) { debug!(?body.arg_count); diff --git a/compiler/rustc_borrowck/src/type_check/liveness/local_use_map.rs b/compiler/rustc_borrowck/src/type_check/liveness/local_use_map.rs index 8023ef60d20..2c387edfef0 100644 --- a/compiler/rustc_borrowck/src/type_check/liveness/local_use_map.rs +++ b/compiler/rustc_borrowck/src/type_check/liveness/local_use_map.rs @@ -63,7 +63,7 @@ impl LocalUseMap { elements: &RegionValueElements, body: &Body<'_>, ) -> Self { - let nones = IndexVec::from_elem_n(None, body.local_decls.len()); + let nones = IndexVec::from_elem(None, &body.local_decls); let mut local_use_map = LocalUseMap { first_def_at: nones.clone(), first_use_at: nones.clone(), @@ -76,7 +76,7 @@ impl LocalUseMap { } let mut locals_with_use_data: IndexVec<Local, bool> = - IndexVec::from_elem_n(false, body.local_decls.len()); + IndexVec::from_elem(false, &body.local_decls); live_locals.iter().for_each(|&local| locals_with_use_data[local] = true); LocalUseMapBuild { local_use_map: &mut local_use_map, elements, locals_with_use_data } diff --git a/compiler/rustc_borrowck/src/type_check/mod.rs b/compiler/rustc_borrowck/src/type_check/mod.rs index 10bbce37760..2fc4e32ecb2 100644 --- a/compiler/rustc_borrowck/src/type_check/mod.rs +++ b/compiler/rustc_borrowck/src/type_check/mod.rs @@ -14,7 +14,7 @@ use rustc_hir as hir; use rustc_hir::def::DefKind; use rustc_hir::def_id::LocalDefId; use rustc_hir::lang_items::LangItem; -use rustc_index::vec::IndexVec; +use rustc_index::vec::{IndexSlice, IndexVec}; use rustc_infer::infer::canonical::QueryRegionConstraints; use rustc_infer::infer::outlives::env::RegionBoundPairs; use rustc_infer::infer::region_constraints::RegionConstraintData; @@ -125,7 +125,7 @@ pub(crate) fn type_check<'mir, 'tcx>( infcx: &BorrowckInferCtxt<'_, 'tcx>, param_env: ty::ParamEnv<'tcx>, body: &Body<'tcx>, - promoted: &IndexVec<Promoted, Body<'tcx>>, + promoted: &IndexSlice<Promoted, Body<'tcx>>, universal_regions: &Rc<UniversalRegions<'tcx>>, location_table: &LocationTable, borrow_set: &BorrowSet<'tcx>, @@ -292,7 +292,7 @@ enum FieldAccessError { /// is a problem. struct TypeVerifier<'a, 'b, 'tcx> { cx: &'a mut TypeChecker<'b, 'tcx>, - promoted: &'b IndexVec<Promoted, Body<'tcx>>, + promoted: &'b IndexSlice<Promoted, Body<'tcx>>, last_span: Span, errors_reported: bool, } @@ -493,7 +493,7 @@ impl<'a, 'b, 'tcx> Visitor<'tcx> for TypeVerifier<'a, 'b, 'tcx> { impl<'a, 'b, 'tcx> TypeVerifier<'a, 'b, 'tcx> { fn new( cx: &'a mut TypeChecker<'b, 'tcx>, - promoted: &'b IndexVec<Promoted, Body<'tcx>>, + promoted: &'b IndexSlice<Promoted, Body<'tcx>>, ) -> Self { TypeVerifier { promoted, last_span: cx.body.span, cx, errors_reported: false } } @@ -1716,7 +1716,7 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> { fn aggregate_field_ty( &mut self, ak: &AggregateKind<'tcx>, - field_index: usize, + field_index: FieldIdx, location: Location, ) -> Result<Ty<'tcx>, FieldAccessError> { let tcx = self.tcx(); @@ -1725,8 +1725,7 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> { AggregateKind::Adt(adt_did, variant_index, substs, _, active_field_index) => { let def = tcx.adt_def(adt_did); let variant = &def.variant(variant_index); - let adj_field_index = - FieldIdx::from_usize(active_field_index.unwrap_or(field_index)); + let adj_field_index = active_field_index.unwrap_or(field_index); if let Some(field) = variant.fields.get(adj_field_index) { Ok(self.normalize(field.ty(tcx, substs), location)) } else { @@ -1734,7 +1733,7 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> { } } AggregateKind::Closure(_, substs) => { - match substs.as_closure().upvar_tys().nth(field_index) { + match substs.as_closure().upvar_tys().nth(field_index.as_usize()) { Some(ty) => Ok(ty), None => Err(FieldAccessError::OutOfRange { field_count: substs.as_closure().upvar_tys().count(), @@ -1745,7 +1744,7 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> { // It doesn't make sense to look at a field beyond the prefix; // these require a variant index, and are not initialized in // aggregate rvalues. - match substs.as_generator().prefix_tys().nth(field_index) { + match substs.as_generator().prefix_tys().nth(field_index.as_usize()) { Some(ty) => Ok(ty), None => Err(FieldAccessError::OutOfRange { field_count: substs.as_generator().prefix_tys().count(), @@ -2350,7 +2349,7 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> { body: &Body<'tcx>, rvalue: &Rvalue<'tcx>, aggregate_kind: &AggregateKind<'tcx>, - operands: &[Operand<'tcx>], + operands: &IndexSlice<FieldIdx, Operand<'tcx>>, location: Location, ) { let tcx = self.tcx(); @@ -2362,7 +2361,7 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> { return; } - for (i, operand) in operands.iter().enumerate() { + for (i, operand) in operands.iter_enumerated() { let field_ty = match self.aggregate_field_ty(aggregate_kind, i, location) { Ok(field_ty) => field_ty, Err(FieldAccessError::OutOfRange { field_count }) => { @@ -2370,8 +2369,8 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> { self, rvalue, "accessed field #{} but variant only has {}", - i, - field_count + i.as_u32(), + field_count, ); continue; } diff --git a/compiler/rustc_builtin_macros/src/global_allocator.rs b/compiler/rustc_builtin_macros/src/global_allocator.rs index 41b51bae736..866cc5adbf3 100644 --- a/compiler/rustc_builtin_macros/src/global_allocator.rs +++ b/compiler/rustc_builtin_macros/src/global_allocator.rs @@ -25,12 +25,12 @@ pub fn expand( // FIXME - if we get deref patterns, use them to reduce duplication here let (item, is_stmt, ty_span) = if let Annotatable::Item(item) = &item - && let ItemKind::Static(ty, ..) = &item.kind + && let ItemKind::Static(box ast::StaticItem { ty, ..}) = &item.kind { (item, false, ecx.with_def_site_ctxt(ty.span)) } else if let Annotatable::Stmt(stmt) = &item && let StmtKind::Item(item) = &stmt.kind - && let ItemKind::Static(ty, ..) = &item.kind + && let ItemKind::Static(box ast::StaticItem { ty, ..}) = &item.kind { (item, true, ecx.with_def_site_ctxt(ty.span)) } else { diff --git a/compiler/rustc_builtin_macros/src/test.rs b/compiler/rustc_builtin_macros/src/test.rs index 44b9c4718a7..a76ed4ee6ce 100644 --- a/compiler/rustc_builtin_macros/src/test.rs +++ b/compiler/rustc_builtin_macros/src/test.rs @@ -254,25 +254,27 @@ pub fn expand_test_or_bench( let location_info = get_location_info(cx, &item); - let mut test_const = cx.item( - sp, - Ident::new(item.ident.name, sp), - thin_vec![ - // #[cfg(test)] - cx.attr_nested_word(sym::cfg, sym::test, attr_sp), - // #[rustc_test_marker = "test_case_sort_key"] - cx.attr_name_value_str(sym::rustc_test_marker, test_path_symbol, attr_sp), - ], - // const $ident: test::TestDescAndFn = - ast::ItemKind::Const( - ast::Defaultness::Final, - cx.ty(sp, ast::TyKind::Path(None, test_path("TestDescAndFn"))), - // test::TestDescAndFn { - Some( - cx.expr_struct( - sp, - test_path("TestDescAndFn"), - thin_vec![ + let mut test_const = + cx.item( + sp, + Ident::new(item.ident.name, sp), + thin_vec![ + // #[cfg(test)] + cx.attr_nested_word(sym::cfg, sym::test, attr_sp), + // #[rustc_test_marker = "test_case_sort_key"] + cx.attr_name_value_str(sym::rustc_test_marker, test_path_symbol, attr_sp), + ], + // const $ident: test::TestDescAndFn = + ast::ItemKind::Const( + ast::ConstItem { + defaultness: ast::Defaultness::Final, + ty: cx.ty(sp, ast::TyKind::Path(None, test_path("TestDescAndFn"))), + // test::TestDescAndFn { + expr: Some( + cx.expr_struct( + sp, + test_path("TestDescAndFn"), + thin_vec![ // desc: test::TestDesc { field( "desc", @@ -359,10 +361,12 @@ pub fn expand_test_or_bench( // testfn: test::StaticTestFn(...) | test::StaticBenchFn(...) field("testfn", test_fn), // } ], - ), // } + ), // } + ), + } + .into(), ), - ), - ); + ); test_const = test_const.map(|mut tc| { tc.vis.kind = ast::VisibilityKind::Public; tc diff --git a/compiler/rustc_codegen_cranelift/src/base.rs b/compiler/rustc_codegen_cranelift/src/base.rs index 98112fe0830..2630f02e6eb 100644 --- a/compiler/rustc_codegen_cranelift/src/base.rs +++ b/compiler/rustc_codegen_cranelift/src/base.rs @@ -802,14 +802,15 @@ fn codegen_stmt<'tcx>( if active_field_index.is_some() { assert_eq!(operands.len(), 1); } - for (i, operand) in operands.iter().enumerate() { + for (i, operand) in operands.iter_enumerated() { let operand = codegen_operand(fx, operand); let field_index = active_field_index.unwrap_or(i); let to = if let mir::AggregateKind::Array(_) = **kind { - let index = fx.bcx.ins().iconst(fx.pointer_type, field_index as i64); + let array_index = i64::from(field_index.as_u32()); + let index = fx.bcx.ins().iconst(fx.pointer_type, array_index); variant_dest.place_index(fx, index) } else { - variant_dest.place_field(fx, FieldIdx::new(field_index)) + variant_dest.place_field(fx, field_index) }; to.write_cvalue(fx, operand); } diff --git a/compiler/rustc_codegen_llvm/src/builder.rs b/compiler/rustc_codegen_llvm/src/builder.rs index 580451ba265..63e8a67db53 100644 --- a/compiler/rustc_codegen_llvm/src/builder.rs +++ b/compiler/rustc_codegen_llvm/src/builder.rs @@ -1190,8 +1190,8 @@ impl<'a, 'll, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'll, 'tcx> { // Set KCFI operand bundle let is_indirect_call = unsafe { llvm::LLVMIsAFunction(llfn).is_none() }; let kcfi_bundle = - if self.tcx.sess.is_sanitizer_kcfi_enabled() && fn_abi.is_some() && is_indirect_call { - let kcfi_typeid = kcfi_typeid_for_fnabi(self.tcx, fn_abi.unwrap()); + if let Some(fn_abi) = fn_abi && self.tcx.sess.is_sanitizer_kcfi_enabled() && is_indirect_call { + let kcfi_typeid = kcfi_typeid_for_fnabi(self.tcx, fn_abi); Some(llvm::OperandBundleDef::new("kcfi", &[self.const_u32(kcfi_typeid)])) } else { None diff --git a/compiler/rustc_codegen_llvm/src/common.rs b/compiler/rustc_codegen_llvm/src/common.rs index efa0c13226e..4f8b5abd901 100644 --- a/compiler/rustc_codegen_llvm/src/common.rs +++ b/compiler/rustc_codegen_llvm/src/common.rs @@ -378,8 +378,7 @@ pub(crate) fn get_dllimport<'tcx>( name: &str, ) -> Option<&'tcx DllImport> { tcx.native_library(id) - .map(|lib| lib.dll_imports.iter().find(|di| di.name.as_str() == name)) - .flatten() + .and_then(|lib| lib.dll_imports.iter().find(|di| di.name.as_str() == name)) } pub(crate) fn is_mingw_gnu_toolchain(target: &Target) -> bool { diff --git a/compiler/rustc_codegen_llvm/src/debuginfo/metadata.rs b/compiler/rustc_codegen_llvm/src/debuginfo/metadata.rs index e2a592d851a..4bf6762d1f6 100644 --- a/compiler/rustc_codegen_llvm/src/debuginfo/metadata.rs +++ b/compiler/rustc_codegen_llvm/src/debuginfo/metadata.rs @@ -830,24 +830,7 @@ pub fn build_compile_unit_di_node<'ll, 'tcx>( } .unwrap_or_default(); let split_name = split_name.to_str().unwrap(); - - // FIXME(#60020): - // - // This should actually be - // - // let kind = DebugEmissionKind::from_generic(tcx.sess.opts.debuginfo); - // - // That is, we should set LLVM's emission kind to `LineTablesOnly` if - // we are compiling with "limited" debuginfo. However, some of the - // existing tools relied on slightly more debuginfo being generated than - // would be the case with `LineTablesOnly`, and we did not want to break - // these tools in a "drive-by fix", without a good idea or plan about - // what limited debuginfo should exactly look like. So for now we keep - // the emission kind as `FullDebug`. - // - // See https://github.com/rust-lang/rust/issues/60020 for details. - let kind = DebugEmissionKind::FullDebug; - assert!(tcx.sess.opts.debuginfo != DebugInfo::None); + let kind = DebugEmissionKind::from_generic(tcx.sess.opts.debuginfo); unsafe { let compile_unit_file = llvm::LLVMRustDIBuilderCreateFile( diff --git a/compiler/rustc_codegen_llvm/src/debuginfo/metadata/enums/mod.rs b/compiler/rustc_codegen_llvm/src/debuginfo/metadata/enums/mod.rs index c3439591b92..55a217f59f9 100644 --- a/compiler/rustc_codegen_llvm/src/debuginfo/metadata/enums/mod.rs +++ b/compiler/rustc_codegen_llvm/src/debuginfo/metadata/enums/mod.rs @@ -3,7 +3,7 @@ use rustc_codegen_ssa::debuginfo::{ wants_c_like_enum_debuginfo, }; use rustc_hir::def::CtorKind; -use rustc_index::vec::IndexVec; +use rustc_index::vec::IndexSlice; use rustc_middle::{ bug, mir::{GeneratorLayout, GeneratorSavedLocal}, @@ -323,7 +323,7 @@ pub fn build_generator_variant_struct_type_di_node<'ll, 'tcx>( generator_type_and_layout: TyAndLayout<'tcx>, generator_type_di_node: &'ll DIType, generator_layout: &GeneratorLayout<'tcx>, - state_specific_upvar_names: &IndexVec<GeneratorSavedLocal, Option<Symbol>>, + state_specific_upvar_names: &IndexSlice<GeneratorSavedLocal, Option<Symbol>>, common_upvar_names: &[String], ) -> &'ll DIType { let variant_name = GeneratorSubsts::variant_name(variant_index); diff --git a/compiler/rustc_codegen_llvm/src/debuginfo/mod.rs b/compiler/rustc_codegen_llvm/src/debuginfo/mod.rs index 5392534cfcb..41a75c9d775 100644 --- a/compiler/rustc_codegen_llvm/src/debuginfo/mod.rs +++ b/compiler/rustc_codegen_llvm/src/debuginfo/mod.rs @@ -402,7 +402,7 @@ impl<'ll, 'tcx> DebugInfoMethods<'tcx> for CodegenCx<'ll, 'tcx> { cx: &CodegenCx<'ll, 'tcx>, fn_abi: &FnAbi<'tcx, Ty<'tcx>>, ) -> &'ll DIArray { - if cx.sess().opts.debuginfo == DebugInfo::Limited { + if cx.sess().opts.debuginfo != DebugInfo::Full { return create_DIArray(DIB(cx), &[]); } diff --git a/compiler/rustc_codegen_llvm/src/llvm/ffi.rs b/compiler/rustc_codegen_llvm/src/llvm/ffi.rs index 0d63e634ad8..556c6602ff4 100644 --- a/compiler/rustc_codegen_llvm/src/llvm/ffi.rs +++ b/compiler/rustc_codegen_llvm/src/llvm/ffi.rs @@ -946,15 +946,27 @@ pub mod debuginfo { NoDebug, FullDebug, LineTablesOnly, + DebugDirectivesOnly, } impl DebugEmissionKind { pub fn from_generic(kind: rustc_session::config::DebugInfo) -> Self { + // We should be setting LLVM's emission kind to `LineTablesOnly` if + // we are compiling with "limited" debuginfo. However, some of the + // existing tools relied on slightly more debuginfo being generated than + // would be the case with `LineTablesOnly`, and we did not want to break + // these tools in a "drive-by fix", without a good idea or plan about + // what limited debuginfo should exactly look like. So for now we are + // instead adding a new debuginfo option "line-tables-only" so as to + // not break anything and to allow users to have 'limited' debug info. + // + // See https://github.com/rust-lang/rust/issues/60020 for details. use rustc_session::config::DebugInfo; match kind { DebugInfo::None => DebugEmissionKind::NoDebug, - DebugInfo::Limited => DebugEmissionKind::LineTablesOnly, - DebugInfo::Full => DebugEmissionKind::FullDebug, + DebugInfo::LineDirectivesOnly => DebugEmissionKind::DebugDirectivesOnly, + DebugInfo::LineTablesOnly => DebugEmissionKind::LineTablesOnly, + DebugInfo::Limited | DebugInfo::Full => DebugEmissionKind::FullDebug, } } } diff --git a/compiler/rustc_codegen_ssa/src/back/linker.rs b/compiler/rustc_codegen_ssa/src/back/linker.rs index 69bb00f804d..65dfc325a11 100644 --- a/compiler/rustc_codegen_ssa/src/back/linker.rs +++ b/compiler/rustc_codegen_ssa/src/back/linker.rs @@ -1121,9 +1121,12 @@ impl<'a> Linker for EmLinker<'a> { fn debuginfo(&mut self, _strip: Strip, _: &[PathBuf]) { // Preserve names or generate source maps depending on debug info + // For more information see https://emscripten.org/docs/tools_reference/emcc.html#emcc-g self.cmd.arg(match self.sess.opts.debuginfo { DebugInfo::None => "-g0", - DebugInfo::Limited => "--profiling-funcs", + DebugInfo::Limited | DebugInfo::LineTablesOnly | DebugInfo::LineDirectivesOnly => { + "--profiling-funcs" + } DebugInfo::Full => "-g", }); } diff --git a/compiler/rustc_codegen_ssa/src/base.rs b/compiler/rustc_codegen_ssa/src/base.rs index 6c4ca8f7fb1..c5ca7936a2b 100644 --- a/compiler/rustc_codegen_ssa/src/base.rs +++ b/compiler/rustc_codegen_ssa/src/base.rs @@ -306,9 +306,9 @@ pub fn coerce_unsized_into<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>>( (&ty::Adt(def_a, _), &ty::Adt(def_b, _)) => { assert_eq!(def_a, def_b); - for i in 0..def_a.variant(FIRST_VARIANT).fields.len() { - let src_f = src.project_field(bx, i); - let dst_f = dst.project_field(bx, i); + for i in def_a.variant(FIRST_VARIANT).fields.indices() { + let src_f = src.project_field(bx, i.as_usize()); + let dst_f = dst.project_field(bx, i.as_usize()); if dst_f.layout.is_zst() { continue; diff --git a/compiler/rustc_codegen_ssa/src/coverageinfo/map.rs b/compiler/rustc_codegen_ssa/src/coverageinfo/map.rs index 1a6495cb15c..1ea13040072 100644 --- a/compiler/rustc_codegen_ssa/src/coverageinfo/map.rs +++ b/compiler/rustc_codegen_ssa/src/coverageinfo/map.rs @@ -1,6 +1,6 @@ pub use super::ffi::*; -use rustc_index::vec::IndexVec; +use rustc_index::vec::{IndexSlice, IndexVec}; use rustc_middle::mir::coverage::{ CodeRegion, CounterValueReference, ExpressionOperandId, InjectedExpressionId, InjectedExpressionIndex, MappedExpressionIndex, Op, @@ -205,7 +205,7 @@ impl<'tcx> FunctionCoverage<'tcx> { // `expression_index`s lower than the referencing `Expression`. Therefore, it is // reasonable to look up the new index of an expression operand while the `new_indexes` // vector is only complete up to the current `ExpressionIndex`. - let id_to_counter = |new_indexes: &IndexVec< + let id_to_counter = |new_indexes: &IndexSlice< InjectedExpressionIndex, Option<MappedExpressionIndex>, >, diff --git a/compiler/rustc_codegen_ssa/src/mir/analyze.rs b/compiler/rustc_codegen_ssa/src/mir/analyze.rs index 0ce395e912d..dcf533dc39c 100644 --- a/compiler/rustc_codegen_ssa/src/mir/analyze.rs +++ b/compiler/rustc_codegen_ssa/src/mir/analyze.rs @@ -5,7 +5,7 @@ use super::FunctionCx; use crate::traits::*; use rustc_data_structures::graph::dominators::Dominators; use rustc_index::bit_set::BitSet; -use rustc_index::vec::IndexVec; +use rustc_index::vec::{IndexSlice, IndexVec}; use rustc_middle::mir::traversal; use rustc_middle::mir::visit::{MutatingUseContext, NonMutatingUseContext, PlaceContext, Visitor}; use rustc_middle::mir::{self, Location, TerminatorKind}; @@ -277,7 +277,7 @@ impl CleanupKind { /// Recover that structure in an analyze pass. pub fn cleanup_kinds(mir: &mir::Body<'_>) -> IndexVec<mir::BasicBlock, CleanupKind> { fn discover_masters<'tcx>( - result: &mut IndexVec<mir::BasicBlock, CleanupKind>, + result: &mut IndexSlice<mir::BasicBlock, CleanupKind>, mir: &mir::Body<'tcx>, ) { for (bb, data) in mir.basic_blocks.iter_enumerated() { @@ -308,7 +308,10 @@ pub fn cleanup_kinds(mir: &mir::Body<'_>) -> IndexVec<mir::BasicBlock, CleanupKi } } - fn propagate<'tcx>(result: &mut IndexVec<mir::BasicBlock, CleanupKind>, mir: &mir::Body<'tcx>) { + fn propagate<'tcx>( + result: &mut IndexSlice<mir::BasicBlock, CleanupKind>, + mir: &mir::Body<'tcx>, + ) { let mut funclet_succs = IndexVec::from_elem(None, &mir.basic_blocks); let mut set_successor = |funclet: mir::BasicBlock, succ| match funclet_succs[funclet] { diff --git a/compiler/rustc_codegen_ssa/src/mir/debuginfo.rs b/compiler/rustc_codegen_ssa/src/mir/debuginfo.rs index ff25d1e3823..280f0207116 100644 --- a/compiler/rustc_codegen_ssa/src/mir/debuginfo.rs +++ b/compiler/rustc_codegen_ssa/src/mir/debuginfo.rs @@ -165,11 +165,15 @@ fn calculate_debuginfo_offset< mir::ProjectionElem::Downcast(_, variant) => { place = place.downcast(bx, variant); } - _ => span_bug!( - var.source_info.span, - "unsupported var debuginfo place `{:?}`", - mir::Place { local, projection: var.projection }, - ), + _ => { + // Sanity check for `can_use_in_debuginfo`. + debug_assert!(!elem.can_use_in_debuginfo()); + span_bug!( + var.source_info.span, + "unsupported var debuginfo place `{:?}`", + mir::Place { local, projection: var.projection }, + ) + } } } diff --git a/compiler/rustc_codegen_ssa/src/mir/rvalue.rs b/compiler/rustc_codegen_ssa/src/mir/rvalue.rs index 3b4522a99dd..400512fe4e9 100644 --- a/compiler/rustc_codegen_ssa/src/mir/rvalue.rs +++ b/compiler/rustc_codegen_ssa/src/mir/rvalue.rs @@ -123,16 +123,16 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> { if active_field_index.is_some() { assert_eq!(operands.len(), 1); } - for (i, operand) in operands.iter().enumerate() { + for (i, operand) in operands.iter_enumerated() { let op = self.codegen_operand(bx, operand); // Do not generate stores and GEPis for zero-sized fields. if !op.layout.is_zst() { let field_index = active_field_index.unwrap_or(i); let field = if let mir::AggregateKind::Array(_) = **kind { - let llindex = bx.cx().const_usize(field_index as u64); + let llindex = bx.cx().const_usize(field_index.as_u32().into()); variant_dest.project_index(bx, llindex) } else { - variant_dest.project_field(bx, field_index) + variant_dest.project_field(bx, field_index.as_usize()) }; op.val.store(bx, field); } diff --git a/compiler/rustc_const_eval/src/interpret/operand.rs b/compiler/rustc_const_eval/src/interpret/operand.rs index 8d5192bca67..5310ef0bb3e 100644 --- a/compiler/rustc_const_eval/src/interpret/operand.rs +++ b/compiler/rustc_const_eval/src/interpret/operand.rs @@ -612,14 +612,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> { span: Option<Span>, layout: Option<TyAndLayout<'tcx>>, ) -> InterpResult<'tcx, OpTy<'tcx, M::Provenance>> { - // FIXME(const_prop): normalization needed b/c const prop lint in - // `mir_drops_elaborated_and_const_checked`, which happens before - // optimized MIR. Only after optimizing the MIR can we guarantee - // that the `RevealAll` pass has happened and that the body's consts - // are normalized, so any call to resolve before that needs to be - // manually normalized. - let val = self.tcx.normalize_erasing_regions(self.param_env, *val); - match val { + match *val { mir::ConstantKind::Ty(ct) => { let ty = ct.ty(); let valtree = self.eval_ty_constant(ct, span)?; diff --git a/compiler/rustc_const_eval/src/interpret/place.rs b/compiler/rustc_const_eval/src/interpret/place.rs index a95bcaa3f99..03b09cf830b 100644 --- a/compiler/rustc_const_eval/src/interpret/place.rs +++ b/compiler/rustc_const_eval/src/interpret/place.rs @@ -5,10 +5,11 @@ use either::{Either, Left, Right}; use rustc_ast::Mutability; +use rustc_index::vec::IndexSlice; use rustc_middle::mir; use rustc_middle::ty; use rustc_middle::ty::layout::{LayoutOf, TyAndLayout}; -use rustc_target::abi::{self, Abi, Align, HasDataLayout, Size, FIRST_VARIANT}; +use rustc_target::abi::{self, Abi, Align, FieldIdx, HasDataLayout, Size, FIRST_VARIANT}; use super::{ alloc_range, mir_assign_valid_types, AllocId, AllocRef, AllocRefMut, CheckInAllocMsg, @@ -787,7 +788,7 @@ where pub fn write_aggregate( &mut self, kind: &mir::AggregateKind<'tcx>, - operands: &[mir::Operand<'tcx>], + operands: &IndexSlice<FieldIdx, mir::Operand<'tcx>>, dest: &PlaceTy<'tcx, M::Provenance>, ) -> InterpResult<'tcx> { self.write_uninit(&dest)?; @@ -801,9 +802,9 @@ where if active_field_index.is_some() { assert_eq!(operands.len(), 1); } - for (field_index, operand) in operands.iter().enumerate() { + for (field_index, operand) in operands.iter_enumerated() { let field_index = active_field_index.unwrap_or(field_index); - let field_dest = self.place_field(&variant_dest, field_index)?; + let field_dest = self.place_field(&variant_dest, field_index.as_usize())?; let op = self.eval_operand(operand, Some(field_dest.layout))?; self.copy_op(&op, &field_dest, /*allow_transmute*/ false)?; } diff --git a/compiler/rustc_const_eval/src/transform/promote_consts.rs b/compiler/rustc_const_eval/src/transform/promote_consts.rs index 40c848de2be..6774e5a5837 100644 --- a/compiler/rustc_const_eval/src/transform/promote_consts.rs +++ b/compiler/rustc_const_eval/src/transform/promote_consts.rs @@ -21,7 +21,7 @@ use rustc_middle::ty::subst::InternalSubsts; use rustc_middle::ty::{self, List, TyCtxt, TypeVisitableExt}; use rustc_span::Span; -use rustc_index::vec::{Idx, IndexVec}; +use rustc_index::vec::{Idx, IndexSlice, IndexVec}; use std::cell::Cell; use std::{cmp, iter, mem}; @@ -184,7 +184,7 @@ pub fn collect_temps_and_candidates<'tcx>( /// This wraps an `Item`, and has access to all fields of that `Item` via `Deref` coercion. struct Validator<'a, 'tcx> { ccx: &'a ConstCx<'a, 'tcx>, - temps: &'a mut IndexVec<Local, TempState>, + temps: &'a mut IndexSlice<Local, TempState>, } impl<'a, 'tcx> std::ops::Deref for Validator<'a, 'tcx> { @@ -669,7 +669,7 @@ impl<'tcx> Validator<'_, 'tcx> { // FIXME(eddyb) remove the differences for promotability in `static`, `const`, `const fn`. pub fn validate_candidates( ccx: &ConstCx<'_, '_>, - temps: &mut IndexVec<Local, TempState>, + temps: &mut IndexSlice<Local, TempState>, candidates: &[Candidate], ) -> Vec<Candidate> { let mut validator = Validator { ccx, temps }; diff --git a/compiler/rustc_const_eval/src/transform/validate.rs b/compiler/rustc_const_eval/src/transform/validate.rs index cd5c92f7342..e798c9d236e 100644 --- a/compiler/rustc_const_eval/src/transform/validate.rs +++ b/compiler/rustc_const_eval/src/transform/validate.rs @@ -5,13 +5,12 @@ use rustc_index::bit_set::BitSet; use rustc_index::vec::IndexVec; use rustc_infer::traits::Reveal; use rustc_middle::mir::interpret::Scalar; -use rustc_middle::mir::visit::NonUseContext::VarDebugInfo; -use rustc_middle::mir::visit::{PlaceContext, Visitor}; +use rustc_middle::mir::visit::{NonUseContext, PlaceContext, Visitor}; use rustc_middle::mir::{ traversal, BasicBlock, BinOp, Body, BorrowKind, CastKind, CopyNonOverlapping, Local, Location, MirPass, MirPhase, NonDivergingIntrinsic, Operand, Place, PlaceElem, PlaceRef, ProjectionElem, RetagKind, RuntimePhase, Rvalue, SourceScope, Statement, StatementKind, Terminator, - TerminatorKind, UnOp, START_BLOCK, + TerminatorKind, UnOp, VarDebugInfo, VarDebugInfoContents, START_BLOCK, }; use rustc_middle::ty::{self, InstanceDef, ParamEnv, Ty, TyCtxt, TypeVisitableExt}; use rustc_mir_dataflow::impls::MaybeStorageLive; @@ -419,13 +418,49 @@ impl<'a, 'tcx> Visitor<'tcx> for TypeChecker<'a, 'tcx> { self.super_projection_elem(local, proj_base, elem, context, location); } + fn visit_var_debug_info(&mut self, debuginfo: &VarDebugInfo<'tcx>) { + let check_place = |place: Place<'_>| { + if place.projection.iter().any(|p| !p.can_use_in_debuginfo()) { + self.fail( + START_BLOCK.start_location(), + format!("illegal place {:?} in debuginfo for {:?}", place, debuginfo.name), + ); + } + }; + match debuginfo.value { + VarDebugInfoContents::Const(_) => {} + VarDebugInfoContents::Place(place) => check_place(place), + VarDebugInfoContents::Composite { ty, ref fragments } => { + for f in fragments { + check_place(f.contents); + if ty.is_union() || ty.is_enum() { + self.fail( + START_BLOCK.start_location(), + format!("invalid type {:?} for composite debuginfo", ty), + ); + } + if f.projection.iter().any(|p| !matches!(p, PlaceElem::Field(..))) { + self.fail( + START_BLOCK.start_location(), + format!( + "illegal projection {:?} in debuginfo for {:?}", + f.projection, debuginfo.name + ), + ); + } + } + } + } + self.super_var_debug_info(debuginfo); + } + fn visit_place(&mut self, place: &Place<'tcx>, cntxt: PlaceContext, location: Location) { // Set off any `bug!`s in the type computation code let _ = place.ty(&self.body.local_decls, self.tcx); if self.mir_phase >= MirPhase::Runtime(RuntimePhase::Initial) && place.projection.len() > 1 - && cntxt != PlaceContext::NonUse(VarDebugInfo) + && cntxt != PlaceContext::NonUse(NonUseContext::VarDebugInfo) && place.projection[1..].contains(&ProjectionElem::Deref) { self.fail(location, format!("{:?}, has deref at the wrong place", place)); @@ -677,8 +712,7 @@ impl<'a, 'tcx> Visitor<'tcx> for TypeChecker<'a, 'tcx> { ); } if let Rvalue::CopyForDeref(place) = rvalue { - if !place.ty(&self.body.local_decls, self.tcx).ty.builtin_deref(true).is_some() - { + if place.ty(&self.body.local_decls, self.tcx).ty.builtin_deref(true).is_none() { self.fail( location, "`CopyForDeref` should only be used for dereferenceable types", diff --git a/compiler/rustc_data_structures/src/graph/dominators/mod.rs b/compiler/rustc_data_structures/src/graph/dominators/mod.rs index 0a21a4249c8..0df9dc112ee 100644 --- a/compiler/rustc_data_structures/src/graph/dominators/mod.rs +++ b/compiler/rustc_data_structures/src/graph/dominators/mod.rs @@ -10,7 +10,7 @@ //! <https://www.cs.princeton.edu/courses/archive/spr03/cs423/download/dominators.pdf> use super::ControlFlowGraph; -use rustc_index::vec::{Idx, IndexVec}; +use rustc_index::vec::{Idx, IndexSlice, IndexVec}; use std::cmp::Ordering; #[cfg(test)] @@ -256,10 +256,10 @@ pub fn dominators<G: ControlFlowGraph>(graph: G) -> Dominators<G::Node> { /// where `+>` is a proper ancestor and `*>` is just an ancestor. #[inline] fn eval( - ancestor: &mut IndexVec<PreorderIndex, PreorderIndex>, + ancestor: &mut IndexSlice<PreorderIndex, PreorderIndex>, lastlinked: Option<PreorderIndex>, - semi: &IndexVec<PreorderIndex, PreorderIndex>, - label: &mut IndexVec<PreorderIndex, PreorderIndex>, + semi: &IndexSlice<PreorderIndex, PreorderIndex>, + label: &mut IndexSlice<PreorderIndex, PreorderIndex>, node: PreorderIndex, ) -> PreorderIndex { if is_processed(node, lastlinked) { @@ -277,10 +277,10 @@ fn is_processed(v: PreorderIndex, lastlinked: Option<PreorderIndex>) -> bool { #[inline] fn compress( - ancestor: &mut IndexVec<PreorderIndex, PreorderIndex>, + ancestor: &mut IndexSlice<PreorderIndex, PreorderIndex>, lastlinked: Option<PreorderIndex>, - semi: &IndexVec<PreorderIndex, PreorderIndex>, - label: &mut IndexVec<PreorderIndex, PreorderIndex>, + semi: &IndexSlice<PreorderIndex, PreorderIndex>, + label: &mut IndexSlice<PreorderIndex, PreorderIndex>, v: PreorderIndex, ) { assert!(is_processed(v, lastlinked)); diff --git a/compiler/rustc_data_structures/src/graph/iterate/mod.rs b/compiler/rustc_data_structures/src/graph/iterate/mod.rs index 8a9af300c06..01a83b40a75 100644 --- a/compiler/rustc_data_structures/src/graph/iterate/mod.rs +++ b/compiler/rustc_data_structures/src/graph/iterate/mod.rs @@ -1,6 +1,6 @@ use super::{DirectedGraph, WithNumNodes, WithStartNode, WithSuccessors}; use rustc_index::bit_set::BitSet; -use rustc_index::vec::IndexVec; +use rustc_index::vec::{IndexSlice, IndexVec}; use std::ops::ControlFlow; #[cfg(test)] @@ -31,7 +31,7 @@ fn post_order_walk<G: DirectedGraph + WithSuccessors + WithNumNodes>( graph: &G, node: G::Node, result: &mut Vec<G::Node>, - visited: &mut IndexVec<G::Node, bool>, + visited: &mut IndexSlice<G::Node, bool>, ) { struct PostOrderFrame<Node, Iter> { node: Node, diff --git a/compiler/rustc_data_structures/src/graph/scc/mod.rs b/compiler/rustc_data_structures/src/graph/scc/mod.rs index c4b11951ab7..28c357e54dd 100644 --- a/compiler/rustc_data_structures/src/graph/scc/mod.rs +++ b/compiler/rustc_data_structures/src/graph/scc/mod.rs @@ -8,7 +8,7 @@ use crate::fx::FxHashSet; use crate::graph::vec_graph::VecGraph; use crate::graph::{DirectedGraph, GraphSuccessors, WithNumEdges, WithNumNodes, WithSuccessors}; -use rustc_index::vec::{Idx, IndexVec}; +use rustc_index::vec::{Idx, IndexSlice, IndexVec}; use std::ops::Range; #[cfg(test)] @@ -43,7 +43,7 @@ impl<N: Idx, S: Idx + Ord> Sccs<N, S> { SccsConstruction::construct(graph) } - pub fn scc_indices(&self) -> &IndexVec<N, S> { + pub fn scc_indices(&self) -> &IndexSlice<N, S> { &self.scc_indices } @@ -123,7 +123,7 @@ impl<S: Idx> SccData<S> { self.ranges.len() } - pub fn ranges(&self) -> &IndexVec<S, Range<usize>> { + pub fn ranges(&self) -> &IndexSlice<S, Range<usize>> { &self.ranges } diff --git a/compiler/rustc_errors/src/emitter.rs b/compiler/rustc_errors/src/emitter.rs index d6fd057c5a4..4b1ff0e1df9 100644 --- a/compiler/rustc_errors/src/emitter.rs +++ b/compiler/rustc_errors/src/emitter.rs @@ -2235,7 +2235,7 @@ impl EmitterWriter { } } else if is_multiline { buffer.puts(*row_num, 0, &self.maybe_anonymized(line_num), Style::LineNumber); - match &highlight_parts[..] { + match &highlight_parts { [SubstitutionHighlight { start: 0, end }] if *end == line_to_add.len() => { buffer.puts(*row_num, max_line_num_len + 1, "+ ", Style::Addition); } diff --git a/compiler/rustc_expand/src/build.rs b/compiler/rustc_expand/src/build.rs index 8a78c3296f9..264f30fb10a 100644 --- a/compiler/rustc_expand/src/build.rs +++ b/compiler/rustc_expand/src/build.rs @@ -36,7 +36,7 @@ impl<'a> ExtCtxt<'a> { ); let args = if !args.is_empty() { let args = args.into_iter().map(ast::AngleBracketedArg::Arg).collect(); - ast::AngleBracketedArgs { args, span }.into() + Some(ast::AngleBracketedArgs { args, span }.into()) } else { None }; @@ -620,10 +620,15 @@ impl<'a> ExtCtxt<'a> { span: Span, name: Ident, ty: P<ast::Ty>, - mutbl: ast::Mutability, + mutability: ast::Mutability, expr: P<ast::Expr>, ) -> P<ast::Item> { - self.item(span, name, AttrVec::new(), ast::ItemKind::Static(ty, mutbl, Some(expr))) + self.item( + span, + name, + AttrVec::new(), + ast::ItemKind::Static(ast::StaticItem { ty, mutability, expr: Some(expr) }.into()), + ) } pub fn item_const( @@ -633,8 +638,13 @@ impl<'a> ExtCtxt<'a> { ty: P<ast::Ty>, expr: P<ast::Expr>, ) -> P<ast::Item> { - let def = ast::Defaultness::Final; - self.item(span, name, AttrVec::new(), ast::ItemKind::Const(def, ty, Some(expr))) + let defaultness = ast::Defaultness::Final; + self.item( + span, + name, + AttrVec::new(), + ast::ItemKind::Const(ast::ConstItem { defaultness, ty, expr: Some(expr) }.into()), + ) } // Builds `#[name]`. diff --git a/compiler/rustc_expand/src/proc_macro.rs b/compiler/rustc_expand/src/proc_macro.rs index ddba1441719..26bc216f678 100644 --- a/compiler/rustc_expand/src/proc_macro.rs +++ b/compiler/rustc_expand/src/proc_macro.rs @@ -54,7 +54,7 @@ impl base::BangProcMacro for BangProcMacro { ) -> Result<TokenStream, ErrorGuaranteed> { let _timer = ecx.sess.prof.generic_activity_with_arg_recorder("expand_proc_macro", |recorder| { - recorder.record_arg_with_span(ecx.expansion_descr(), span); + recorder.record_arg_with_span(ecx.sess.source_map(), ecx.expansion_descr(), span); }); let proc_macro_backtrace = ecx.ecfg.proc_macro_backtrace; @@ -85,7 +85,7 @@ impl base::AttrProcMacro for AttrProcMacro { ) -> Result<TokenStream, ErrorGuaranteed> { let _timer = ecx.sess.prof.generic_activity_with_arg_recorder("expand_proc_macro", |recorder| { - recorder.record_arg_with_span(ecx.expansion_descr(), span); + recorder.record_arg_with_span(ecx.sess.source_map(), ecx.expansion_descr(), span); }); let proc_macro_backtrace = ecx.ecfg.proc_macro_backtrace; @@ -134,7 +134,11 @@ impl MultiItemModifier for DeriveProcMacro { let stream = { let _timer = ecx.sess.prof.generic_activity_with_arg_recorder("expand_proc_macro", |recorder| { - recorder.record_arg_with_span(ecx.expansion_descr(), span); + recorder.record_arg_with_span( + ecx.sess.source_map(), + ecx.expansion_descr(), + span, + ); }); let proc_macro_backtrace = ecx.ecfg.proc_macro_backtrace; let strategy = exec_strategy(ecx); diff --git a/compiler/rustc_feature/src/active.rs b/compiler/rustc_feature/src/active.rs index b7d280b8751..84114b27f41 100644 --- a/compiler/rustc_feature/src/active.rs +++ b/compiler/rustc_feature/src/active.rs @@ -225,7 +225,7 @@ declare_features! ( (active, rustc_allow_const_fn_unstable, "1.49.0", Some(69399), None), /// Allows using compiler's own crates. (active, rustc_private, "1.0.0", Some(27812), None), - /// Allows using internal rustdoc features like `doc(primitive)` or `doc(keyword)`. + /// Allows using internal rustdoc features like `doc(keyword)`. (active, rustdoc_internals, "1.58.0", Some(90418), None), /// Allows using the `rustdoc::missing_doc_code_examples` lint (active, rustdoc_missing_doc_code_examples, "1.31.0", Some(101730), None), @@ -495,6 +495,8 @@ declare_features! ( (active, repr_simd, "1.4.0", Some(27731), None), /// Allows return-position `impl Trait` in traits. (incomplete, return_position_impl_trait_in_trait, "1.65.0", Some(91611), None), + /// Allows bounding the return type of AFIT/RPITIT. + (incomplete, return_type_notation, "CURRENT_RUSTC_VERSION", Some(109417), None), /// Allows `extern "rust-cold"`. (active, rust_cold_cc, "1.63.0", Some(97544), None), /// Allows the use of SIMD types in functions declared in `extern` blocks. diff --git a/compiler/rustc_feature/src/builtin_attrs.rs b/compiler/rustc_feature/src/builtin_attrs.rs index 493a9cd89e3..c77292fdd16 100644 --- a/compiler/rustc_feature/src/builtin_attrs.rs +++ b/compiler/rustc_feature/src/builtin_attrs.rs @@ -778,6 +778,10 @@ pub const BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[ definition of a trait, it's currently in experimental form and should be changed before \ being exposed outside of the std" ), + rustc_attr!( + rustc_doc_primitive, Normal, template!(NameValueStr: "primitive name"), ErrorFollowing, + r#"`rustc_doc_primitive` is a rustc internal attribute"#, + ), // ========================================================================== // Internal attributes, Testing: diff --git a/compiler/rustc_hir/src/hir.rs b/compiler/rustc_hir/src/hir.rs index f4b46b9a131..35a72f868fb 100644 --- a/compiler/rustc_hir/src/hir.rs +++ b/compiler/rustc_hir/src/hir.rs @@ -328,7 +328,7 @@ pub struct GenericArgs<'hir> { /// Were arguments written in parenthesized form `Fn(T) -> U`? /// This is required mostly for pretty-printing and diagnostics, /// but also for changing lifetime elision rules to be "function-like". - pub parenthesized: bool, + pub parenthesized: GenericArgsParentheses, /// The span encompassing arguments and the surrounding brackets `<>` or `()` /// Foo<A, B, AssocTy = D> Fn(T, U, V) -> W /// ^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^ @@ -340,11 +340,16 @@ pub struct GenericArgs<'hir> { impl<'hir> GenericArgs<'hir> { pub const fn none() -> Self { - Self { args: &[], bindings: &[], parenthesized: false, span_ext: DUMMY_SP } + Self { + args: &[], + bindings: &[], + parenthesized: GenericArgsParentheses::No, + span_ext: DUMMY_SP, + } } pub fn inputs(&self) -> &[Ty<'hir>] { - if self.parenthesized { + if self.parenthesized == GenericArgsParentheses::ParenSugar { for arg in self.args { match arg { GenericArg::Lifetime(_) => {} @@ -417,6 +422,17 @@ impl<'hir> GenericArgs<'hir> { } } +#[derive(Copy, Clone, PartialEq, Eq, Encodable, Hash, Debug)] +#[derive(HashStable_Generic)] +pub enum GenericArgsParentheses { + No, + /// Bounds for `feature(return_type_notation)`, like `T: Trait<method(..): Send>`, + /// where the args are explicitly elided with `..` + ReturnTypeNotation, + /// parenthesized function-family traits, like `T: Fn(u32) -> i32` + ParenSugar, +} + /// A modifier on a bound, currently this is only used for `?Sized`, where the /// modifier is `Maybe`. Negative bounds should also be handled here. #[derive(Copy, Clone, PartialEq, Eq, Encodable, Hash, Debug)] diff --git a/compiler/rustc_hir_analysis/messages.ftl b/compiler/rustc_hir_analysis/messages.ftl index 0105cbf36de..a57f3987849 100644 --- a/compiler/rustc_hir_analysis/messages.ftl +++ b/compiler/rustc_hir_analysis/messages.ftl @@ -178,3 +178,14 @@ hir_analysis_invalid_union_field = hir_analysis_invalid_union_field_sugg = wrap the field type in `ManuallyDrop<...>` + +hir_analysis_return_type_notation_on_non_rpitit = + return type notation used on function that is not `async` and does not return `impl Trait` + .note = function returns `{$ty}`, which is not compatible with associated type return bounds + .label = this function must be `async` or return `impl Trait` + +hir_analysis_return_type_notation_equality_bound = + return type notation is not allowed to use type equality + +hir_analysis_return_type_notation_missing_method = + cannot find associated function `{$assoc_name}` in trait `{$trait_name}` diff --git a/compiler/rustc_hir_analysis/src/astconv/errors.rs b/compiler/rustc_hir_analysis/src/astconv/errors.rs index 156334fe785..113c3f08ab9 100644 --- a/compiler/rustc_hir_analysis/src/astconv/errors.rs +++ b/compiler/rustc_hir_analysis/src/astconv/errors.rs @@ -55,7 +55,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o { let trait_def = self.tcx().trait_def(trait_def_id); if !trait_def.paren_sugar { - if trait_segment.args().parenthesized { + if trait_segment.args().parenthesized == hir::GenericArgsParentheses::ParenSugar { // For now, require that parenthetical notation be used only with `Fn()` etc. let mut err = feature_err( &self.tcx().sess.parse_sess, @@ -71,7 +71,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o { let sess = self.tcx().sess; - if !trait_segment.args().parenthesized { + if trait_segment.args().parenthesized != hir::GenericArgsParentheses::ParenSugar { // For now, require that parenthetical notation be used only with `Fn()` etc. let mut err = feature_err( &sess.parse_sess, @@ -483,8 +483,8 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o { [segment] if segment.args.is_none() => { trait_bound_spans = vec![segment.ident.span]; associated_types = associated_types - .into_iter() - .map(|(_, items)| (segment.ident.span, items)) + .into_values() + .map(|items| (segment.ident.span, items)) .collect(); } _ => {} @@ -607,11 +607,19 @@ pub fn prohibit_assoc_ty_binding( span: Span, segment: Option<(&hir::PathSegment<'_>, Span)>, ) { - tcx.sess.emit_err(AssocTypeBindingNotAllowed { span, fn_trait_expansion: if let Some((segment, span)) = segment && segment.args().parenthesized { - Some(ParenthesizedFnTraitExpansion { span, expanded_type: fn_trait_to_string(tcx, segment, false) }) - } else { - None - }}); + tcx.sess.emit_err(AssocTypeBindingNotAllowed { + span, + fn_trait_expansion: if let Some((segment, span)) = segment + && segment.args().parenthesized == hir::GenericArgsParentheses::ParenSugar + { + Some(ParenthesizedFnTraitExpansion { + span, + expanded_type: fn_trait_to_string(tcx, segment, false), + }) + } else { + None + }, + }); } pub(crate) fn fn_trait_to_string( diff --git a/compiler/rustc_hir_analysis/src/astconv/mod.rs b/compiler/rustc_hir_analysis/src/astconv/mod.rs index 4ab6bb5908b..e25b07d9392 100644 --- a/compiler/rustc_hir_analysis/src/astconv/mod.rs +++ b/compiler/rustc_hir_analysis/src/astconv/mod.rs @@ -854,16 +854,15 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o { ) } - fn trait_defines_associated_type_named(&self, trait_def_id: DefId, assoc_name: Ident) -> bool { - self.tcx() - .associated_items(trait_def_id) - .find_by_name_and_kind(self.tcx(), assoc_name, ty::AssocKind::Type, trait_def_id) - .is_some() - } - fn trait_defines_associated_const_named(&self, trait_def_id: DefId, assoc_name: Ident) -> bool { + fn trait_defines_associated_item_named( + &self, + trait_def_id: DefId, + assoc_kind: ty::AssocKind, + assoc_name: Ident, + ) -> bool { self.tcx() .associated_items(trait_def_id) - .find_by_name_and_kind(self.tcx(), assoc_name, ty::AssocKind::Const, trait_def_id) + .find_by_name_and_kind(self.tcx(), assoc_name, assoc_kind, trait_def_id) .is_some() } @@ -1087,24 +1086,44 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o { let tcx = self.tcx(); - let candidate = - if self.trait_defines_associated_type_named(trait_ref.def_id(), binding.item_name) { - // Simple case: X is defined in the current trait. + let return_type_notation = + binding.gen_args.parenthesized == hir::GenericArgsParentheses::ReturnTypeNotation; + + let candidate = if return_type_notation { + if self.trait_defines_associated_item_named( + trait_ref.def_id(), + ty::AssocKind::Fn, + binding.item_name, + ) { trait_ref } else { - // Otherwise, we have to walk through the supertraits to find - // those that do. - self.one_bound_for_assoc_type( - || traits::supertraits(tcx, trait_ref), - trait_ref.print_only_trait_path(), - binding.item_name, - path_span, - match binding.kind { - ConvertedBindingKind::Equality(term) => Some(term), - _ => None, - }, - )? - }; + return Err(tcx.sess.emit_err(crate::errors::ReturnTypeNotationMissingMethod { + span: binding.span, + trait_name: tcx.item_name(trait_ref.def_id()), + assoc_name: binding.item_name.name, + })); + } + } else if self.trait_defines_associated_item_named( + trait_ref.def_id(), + ty::AssocKind::Type, + binding.item_name, + ) { + // Simple case: X is defined in the current trait. + trait_ref + } else { + // Otherwise, we have to walk through the supertraits to find + // those that do. + self.one_bound_for_assoc_type( + || traits::supertraits(tcx, trait_ref), + trait_ref.print_only_trait_path(), + binding.item_name, + path_span, + match binding.kind { + ConvertedBindingKind::Equality(term) => Some(term), + _ => None, + }, + )? + }; let (assoc_ident, def_scope) = tcx.adjust_ident_and_get_scope(binding.item_name, candidate.def_id(), hir_ref_id); @@ -1116,9 +1135,13 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o { .filter_by_name_unhygienic(assoc_ident.name) .find(|i| i.kind == kind && i.ident(tcx).normalize_to_macros_2_0() == assoc_ident) }; - let assoc_item = find_item_of_kind(ty::AssocKind::Type) - .or_else(|| find_item_of_kind(ty::AssocKind::Const)) - .expect("missing associated type"); + let assoc_item = if return_type_notation { + find_item_of_kind(ty::AssocKind::Fn) + } else { + find_item_of_kind(ty::AssocKind::Type) + .or_else(|| find_item_of_kind(ty::AssocKind::Const)) + } + .expect("missing associated type"); if !assoc_item.visibility(tcx).is_accessible_from(def_scope, tcx) { tcx.sess @@ -1135,7 +1158,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o { dup_bindings .entry(assoc_item.def_id) .and_modify(|prev_span| { - self.tcx().sess.emit_err(ValueOfAssociatedStructAlreadySpecified { + tcx.sess.emit_err(ValueOfAssociatedStructAlreadySpecified { span: binding.span, prev_span: *prev_span, item_name: binding.item_name, @@ -1145,28 +1168,100 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o { .or_insert(binding.span); } - // Include substitutions for generic parameters of associated types - let projection_ty = candidate.map_bound(|trait_ref| { - let ident = Ident::new(assoc_item.name, binding.item_name.span); - let item_segment = hir::PathSegment { - ident, - hir_id: binding.hir_id, - res: Res::Err, - args: Some(binding.gen_args), - infer_args: false, + let projection_ty = if return_type_notation { + // If we have an method return type bound, then we need to substitute + // the method's early bound params with suitable late-bound params. + let mut num_bound_vars = candidate.bound_vars().len(); + let substs = + candidate.skip_binder().substs.extend_to(tcx, assoc_item.def_id, |param, _| { + let subst = match param.kind { + GenericParamDefKind::Lifetime => tcx + .mk_re_late_bound( + ty::INNERMOST, + ty::BoundRegion { + var: ty::BoundVar::from_usize(num_bound_vars), + kind: ty::BoundRegionKind::BrNamed(param.def_id, param.name), + }, + ) + .into(), + GenericParamDefKind::Type { .. } => tcx + .mk_bound( + ty::INNERMOST, + ty::BoundTy { + var: ty::BoundVar::from_usize(num_bound_vars), + kind: ty::BoundTyKind::Param(param.def_id, param.name), + }, + ) + .into(), + GenericParamDefKind::Const { .. } => { + let ty = tcx + .type_of(param.def_id) + .no_bound_vars() + .expect("ct params cannot have early bound vars"); + tcx.mk_const( + ty::ConstKind::Bound( + ty::INNERMOST, + ty::BoundVar::from_usize(num_bound_vars), + ), + ty, + ) + .into() + } + }; + num_bound_vars += 1; + subst + }); + + // Next, we need to check that the return-type notation is being used on + // an RPITIT (return-position impl trait in trait) or AFIT (async fn in trait). + let output = tcx.fn_sig(assoc_item.def_id).skip_binder().output(); + let output = if let ty::Alias(ty::Projection, alias_ty) = *output.skip_binder().kind() + && tcx.def_kind(alias_ty.def_id) == DefKind::ImplTraitPlaceholder + { + alias_ty + } else { + return Err(self.tcx().sess.emit_err( + crate::errors::ReturnTypeNotationOnNonRpitit { + span: binding.span, + ty: tcx.liberate_late_bound_regions(assoc_item.def_id, output), + fn_span: tcx.hir().span_if_local(assoc_item.def_id), + note: (), + }, + )); }; - let substs_trait_ref_and_assoc_item = self.create_substs_for_associated_item( - path_span, - assoc_item.def_id, - &item_segment, - trait_ref.substs, - ); + // Finally, move the fn return type's bound vars over to account for the early bound + // params (and trait ref's late bound params). This logic is very similar to + // `Predicate::subst_supertrait`, and it's no coincidence why. + let shifted_output = tcx.shift_bound_var_indices(num_bound_vars, output); + let subst_output = ty::EarlyBinder(shifted_output).subst(tcx, substs); + + let bound_vars = tcx.late_bound_vars(binding.hir_id); + ty::Binder::bind_with_vars(subst_output, bound_vars) + } else { + // Include substitutions for generic parameters of associated types + candidate.map_bound(|trait_ref| { + let ident = Ident::new(assoc_item.name, binding.item_name.span); + let item_segment = hir::PathSegment { + ident, + hir_id: binding.hir_id, + res: Res::Err, + args: Some(binding.gen_args), + infer_args: false, + }; - debug!(?substs_trait_ref_and_assoc_item); + let substs_trait_ref_and_assoc_item = self.create_substs_for_associated_item( + path_span, + assoc_item.def_id, + &item_segment, + trait_ref.substs, + ); - self.tcx().mk_alias_ty(assoc_item.def_id, substs_trait_ref_and_assoc_item) - }); + debug!(?substs_trait_ref_and_assoc_item); + + tcx.mk_alias_ty(assoc_item.def_id, substs_trait_ref_and_assoc_item) + }) + }; if !speculative { // Find any late-bound regions declared in `ty` that are not @@ -1206,6 +1301,11 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o { } match binding.kind { + ConvertedBindingKind::Equality(..) if return_type_notation => { + return Err(self.tcx().sess.emit_err( + crate::errors::ReturnTypeNotationEqualityBound { span: binding.span }, + )); + } ConvertedBindingKind::Equality(mut term) => { // "Desugar" a constraint like `T: Iterator<Item = u32>` this to // the "projection predicate" for: @@ -1267,7 +1367,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o { // Calling `skip_binder` is okay, because `add_bounds` expects the `param_ty` // parameter to have a skipped binder. let param_ty = tcx.mk_alias(ty::Projection, projection_ty.skip_binder()); - self.add_bounds(param_ty, ast_bounds.iter(), bounds, candidate.bound_vars()); + self.add_bounds(param_ty, ast_bounds.iter(), bounds, projection_ty.bound_vars()); } } Ok(()) @@ -1808,10 +1908,12 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o { where I: Iterator<Item = ty::PolyTraitRef<'tcx>>, { - let mut matching_candidates = all_candidates() - .filter(|r| self.trait_defines_associated_type_named(r.def_id(), assoc_name)); - let mut const_candidates = all_candidates() - .filter(|r| self.trait_defines_associated_const_named(r.def_id(), assoc_name)); + let mut matching_candidates = all_candidates().filter(|r| { + self.trait_defines_associated_item_named(r.def_id(), ty::AssocKind::Type, assoc_name) + }); + let mut const_candidates = all_candidates().filter(|r| { + self.trait_defines_associated_item_named(r.def_id(), ty::AssocKind::Const, assoc_name) + }); let (bound, next_cand) = match (matching_candidates.next(), const_candidates.next()) { (Some(bound), _) => (bound, matching_candidates.next()), diff --git a/compiler/rustc_hir_analysis/src/check/dropck.rs b/compiler/rustc_hir_analysis/src/check/dropck.rs index 2bb724138f5..111bf5e5455 100644 --- a/compiler/rustc_hir_analysis/src/check/dropck.rs +++ b/compiler/rustc_hir_analysis/src/check/dropck.rs @@ -253,10 +253,6 @@ impl<'tcx> TypeRelation<'tcx> for SimpleEqRelation<'tcx> { self.tcx } - fn intercrate(&self) -> bool { - false - } - fn param_env(&self) -> ty::ParamEnv<'tcx> { self.param_env } @@ -269,10 +265,6 @@ impl<'tcx> TypeRelation<'tcx> for SimpleEqRelation<'tcx> { true } - fn mark_ambiguous(&mut self) { - bug!() - } - fn relate_with_variance<T: Relate<'tcx>>( &mut self, _: ty::Variance, diff --git a/compiler/rustc_hir_analysis/src/collect/resolve_bound_vars.rs b/compiler/rustc_hir_analysis/src/collect/resolve_bound_vars.rs index f1769415797..5e4f377a1e7 100644 --- a/compiler/rustc_hir_analysis/src/collect/resolve_bound_vars.rs +++ b/compiler/rustc_hir_analysis/src/collect/resolve_bound_vars.rs @@ -1461,7 +1461,7 @@ impl<'a, 'tcx> BoundVarContext<'a, 'tcx> { depth: usize, generic_args: &'tcx hir::GenericArgs<'tcx>, ) { - if generic_args.parenthesized { + if generic_args.parenthesized == hir::GenericArgsParentheses::ParenSugar { self.visit_fn_like_elision( generic_args.inputs(), Some(generic_args.bindings[0].ty()), @@ -1640,7 +1640,59 @@ impl<'a, 'tcx> BoundVarContext<'a, 'tcx> { }, s: self.scope, }; - if let Some(type_def_id) = type_def_id { + // If the binding is parenthesized, then this must be `feature(return_type_notation)`. + // In that case, introduce a binder over all of the function's early and late bound vars. + // + // For example, given + // ``` + // trait Foo { + // async fn x<'r, T>(); + // } + // ``` + // and a bound that looks like: + // `for<'a> T::Trait<'a, x(): for<'b> Other<'b>>` + // this is going to expand to something like: + // `for<'a> for<'r, T> <T as Trait<'a>>::x::<'r, T>::{opaque#0}: for<'b> Other<'b>`. + if binding.gen_args.parenthesized == hir::GenericArgsParentheses::ReturnTypeNotation { + let bound_vars = if let Some(type_def_id) = type_def_id + && self.tcx.def_kind(type_def_id) == DefKind::Trait + // FIXME(return_type_notation): We could bound supertrait methods. + && let Some(assoc_fn) = self + .tcx + .associated_items(type_def_id) + .find_by_name_and_kind(self.tcx, binding.ident, ty::AssocKind::Fn, type_def_id) + { + self.tcx + .generics_of(assoc_fn.def_id) + .params + .iter() + .map(|param| match param.kind { + ty::GenericParamDefKind::Lifetime => ty::BoundVariableKind::Region( + ty::BoundRegionKind::BrNamed(param.def_id, param.name), + ), + ty::GenericParamDefKind::Type { .. } => ty::BoundVariableKind::Ty( + ty::BoundTyKind::Param(param.def_id, param.name), + ), + ty::GenericParamDefKind::Const { .. } => ty::BoundVariableKind::Const, + }) + .chain(self.tcx.fn_sig(assoc_fn.def_id).subst_identity().bound_vars()) + .collect() + } else { + self.tcx.sess.delay_span_bug( + binding.ident.span, + "bad return type notation here", + ); + vec![] + }; + self.with(scope, |this| { + let scope = Scope::Supertrait { bound_vars, s: this.scope }; + this.with(scope, |this| { + let (bound_vars, _) = this.poly_trait_ref_binder_info(); + this.record_late_bound_vars(binding.hir_id, bound_vars); + this.visit_assoc_type_binding(binding) + }); + }); + } else if let Some(type_def_id) = type_def_id { let bound_vars = BoundVarContext::supertrait_hrtb_vars(self.tcx, type_def_id, binding.ident); self.with(scope, |this| { diff --git a/compiler/rustc_hir_analysis/src/errors.rs b/compiler/rustc_hir_analysis/src/errors.rs index f57197edeb7..c71ce9a0bc7 100644 --- a/compiler/rustc_hir_analysis/src/errors.rs +++ b/compiler/rustc_hir_analysis/src/errors.rs @@ -471,6 +471,18 @@ pub(crate) struct InvalidUnionField { pub note: (), } +#[derive(Diagnostic)] +#[diag(hir_analysis_return_type_notation_on_non_rpitit)] +pub(crate) struct ReturnTypeNotationOnNonRpitit<'tcx> { + #[primary_span] + pub span: Span, + pub ty: Ty<'tcx>, + #[label] + pub fn_span: Option<Span>, + #[note] + pub note: (), +} + #[derive(Subdiagnostic)] #[multipart_suggestion(hir_analysis_invalid_union_field_sugg, applicability = "machine-applicable")] pub(crate) struct InvalidUnionFieldSuggestion { @@ -479,3 +491,19 @@ pub(crate) struct InvalidUnionFieldSuggestion { #[suggestion_part(code = ">")] pub hi: Span, } + +#[derive(Diagnostic)] +#[diag(hir_analysis_return_type_notation_equality_bound)] +pub(crate) struct ReturnTypeNotationEqualityBound { + #[primary_span] + pub span: Span, +} + +#[derive(Diagnostic)] +#[diag(hir_analysis_return_type_notation_missing_method)] +pub(crate) struct ReturnTypeNotationMissingMethod { + #[primary_span] + pub span: Span, + pub trait_name: Symbol, + pub assoc_name: Symbol, +} diff --git a/compiler/rustc_hir_analysis/src/structured_errors/wrong_number_of_generic_args.rs b/compiler/rustc_hir_analysis/src/structured_errors/wrong_number_of_generic_args.rs index cae884ae8fb..8f4d81ec3a9 100644 --- a/compiler/rustc_hir_analysis/src/structured_errors/wrong_number_of_generic_args.rs +++ b/compiler/rustc_hir_analysis/src/structured_errors/wrong_number_of_generic_args.rs @@ -565,7 +565,7 @@ impl<'a, 'tcx> WrongNumberOfGenericArgs<'a, 'tcx> { /// type Map = HashMap<String>; /// ``` fn suggest_adding_args(&self, err: &mut Diagnostic) { - if self.gen_args.parenthesized { + if self.gen_args.parenthesized != hir::GenericArgsParentheses::No { return; } @@ -962,7 +962,11 @@ impl<'a, 'tcx> WrongNumberOfGenericArgs<'a, 'tcx> { let msg = format!( "remove these {}generics", - if self.gen_args.parenthesized { "parenthetical " } else { "" }, + if self.gen_args.parenthesized == hir::GenericArgsParentheses::ParenSugar { + "parenthetical " + } else { + "" + }, ); err.span_suggestion(span, &msg, "", Applicability::MaybeIncorrect); diff --git a/compiler/rustc_hir_pretty/src/lib.rs b/compiler/rustc_hir_pretty/src/lib.rs index 63ea6c90477..4f27c01fad2 100644 --- a/compiler/rustc_hir_pretty/src/lib.rs +++ b/compiler/rustc_hir_pretty/src/lib.rs @@ -1652,61 +1652,65 @@ impl<'a> State<'a> { generic_args: &hir::GenericArgs<'_>, colons_before_params: bool, ) { - if generic_args.parenthesized { - self.word("("); - self.commasep(Inconsistent, generic_args.inputs(), |s, ty| s.print_type(ty)); - self.word(")"); + match generic_args.parenthesized { + hir::GenericArgsParentheses::No => { + let start = if colons_before_params { "::<" } else { "<" }; + let empty = Cell::new(true); + let start_or_comma = |this: &mut Self| { + if empty.get() { + empty.set(false); + this.word(start) + } else { + this.word_space(",") + } + }; + + let mut nonelided_generic_args: bool = false; + let elide_lifetimes = generic_args.args.iter().all(|arg| match arg { + GenericArg::Lifetime(lt) if lt.is_elided() => true, + GenericArg::Lifetime(_) => { + nonelided_generic_args = true; + false + } + _ => { + nonelided_generic_args = true; + true + } + }); - self.space_if_not_bol(); - self.word_space("->"); - self.print_type(generic_args.bindings[0].ty()); - } else { - let start = if colons_before_params { "::<" } else { "<" }; - let empty = Cell::new(true); - let start_or_comma = |this: &mut Self| { - if empty.get() { - empty.set(false); - this.word(start) - } else { - this.word_space(",") + if nonelided_generic_args { + start_or_comma(self); + self.commasep(Inconsistent, generic_args.args, |s, generic_arg| { + match generic_arg { + GenericArg::Lifetime(lt) if !elide_lifetimes => s.print_lifetime(lt), + GenericArg::Lifetime(_) => {} + GenericArg::Type(ty) => s.print_type(ty), + GenericArg::Const(ct) => s.print_anon_const(&ct.value), + GenericArg::Infer(_inf) => s.word("_"), + } + }); } - }; - let mut nonelided_generic_args: bool = false; - let elide_lifetimes = generic_args.args.iter().all(|arg| match arg { - GenericArg::Lifetime(lt) if lt.is_elided() => true, - GenericArg::Lifetime(_) => { - nonelided_generic_args = true; - false + for binding in generic_args.bindings { + start_or_comma(self); + self.print_type_binding(binding); } - _ => { - nonelided_generic_args = true; - true - } - }); - - if nonelided_generic_args { - start_or_comma(self); - self.commasep( - Inconsistent, - generic_args.args, - |s, generic_arg| match generic_arg { - GenericArg::Lifetime(lt) if !elide_lifetimes => s.print_lifetime(lt), - GenericArg::Lifetime(_) => {} - GenericArg::Type(ty) => s.print_type(ty), - GenericArg::Const(ct) => s.print_anon_const(&ct.value), - GenericArg::Infer(_inf) => s.word("_"), - }, - ); - } - for binding in generic_args.bindings { - start_or_comma(self); - self.print_type_binding(binding); + if !empty.get() { + self.word(">") + } } + hir::GenericArgsParentheses::ParenSugar => { + self.word("("); + self.commasep(Inconsistent, generic_args.inputs(), |s, ty| s.print_type(ty)); + self.word(")"); - if !empty.get() { - self.word(">") + self.space_if_not_bol(); + self.word_space("->"); + self.print_type(generic_args.bindings[0].ty()); + } + hir::GenericArgsParentheses::ReturnTypeNotation => { + self.word("(..)"); } } } diff --git a/compiler/rustc_hir_typeck/src/expr_use_visitor.rs b/compiler/rustc_hir_typeck/src/expr_use_visitor.rs index 58902cd292c..ee1c6fbfd65 100644 --- a/compiler/rustc_hir_typeck/src/expr_use_visitor.rs +++ b/compiler/rustc_hir_typeck/src/expr_use_visitor.rs @@ -559,7 +559,7 @@ impl<'a, 'tcx> ExprUseVisitor<'a, 'tcx> { // struct; however, when EUV is run during typeck, it // may not. This will generate an error earlier in typeck, // so we can just ignore it. - if !self.tcx().sess.has_errors().is_some() { + if self.tcx().sess.has_errors().is_none() { span_bug!(with_expr.span, "with expression doesn't evaluate to a struct"); } } diff --git a/compiler/rustc_hir_typeck/src/upvar.rs b/compiler/rustc_hir_typeck/src/upvar.rs index 504da7dc090..41a6ad80b65 100644 --- a/compiler/rustc_hir_typeck/src/upvar.rs +++ b/compiler/rustc_hir_typeck/src/upvar.rs @@ -1893,14 +1893,13 @@ fn restrict_capture_precision( for (i, proj) in place.projections.iter().enumerate() { match proj.kind { - ProjectionKind::Index => { - // Arrays are completely captured, so we drop Index projections + ProjectionKind::Index | ProjectionKind::Subslice => { + // Arrays are completely captured, so we drop Index and Subslice projections truncate_place_to_len_and_update_capture_kind(&mut place, &mut curr_mode, i); return (place, curr_mode); } ProjectionKind::Deref => {} ProjectionKind::Field(..) => {} // ignore - ProjectionKind::Subslice => {} // We never capture this } } diff --git a/compiler/rustc_index/src/vec.rs b/compiler/rustc_index/src/vec.rs index 596849bd456..16cf9ae5cfc 100644 --- a/compiler/rustc_index/src/vec.rs +++ b/compiler/rustc_index/src/vec.rs @@ -1,6 +1,7 @@ #[cfg(feature = "rustc_serialize")] use rustc_serialize::{Decodable, Decoder, Encodable, Encoder}; +use std::borrow::{Borrow, BorrowMut}; use std::fmt; use std::fmt::Debug; use std::hash::Hash; @@ -51,6 +52,12 @@ impl Idx for u32 { } } +/// An owned contiguous collection of `T`s, indexed by `I` rather than by `usize`. +/// +/// While it's possible to use `u32` or `usize` directly for `I`, +/// you almost certainly want to use a [`newtype_index!`]-generated type instead. +/// +/// [`newtype_index!`]: ../macro.newtype_index.html #[derive(Clone, PartialEq, Eq, Hash)] #[repr(transparent)] pub struct IndexVec<I: Idx, T> { @@ -58,6 +65,13 @@ pub struct IndexVec<I: Idx, T> { _marker: PhantomData<fn(&I)>, } +/// A view into contiguous `T`s, indexed by `I` rather than by `usize`. +/// +/// One common pattern you'll see is code that uses [`IndexVec::from_elem`] +/// to create the storage needed for a particular "universe" (aka the set of all +/// the possible keys that need an associated value) then passes that working +/// area as `&mut IndexSlice<I, T>` to clarify that nothing will be added nor +/// removed during processing (and, as a bonus, to chase fewer pointers). #[derive(PartialEq, Eq, Hash)] #[repr(transparent)] pub struct IndexSlice<I: Idx, T> { @@ -93,6 +107,12 @@ impl<I: Idx, T: fmt::Debug> fmt::Debug for IndexVec<I, T> { } } +impl<I: Idx, T: fmt::Debug> fmt::Debug for IndexSlice<I, T> { + fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result { + fmt::Debug::fmt(&self.raw, fmt) + } +} + impl<I: Idx, T> IndexVec<I, T> { #[inline] pub fn new() -> Self { @@ -109,8 +129,19 @@ impl<I: Idx, T> IndexVec<I, T> { IndexVec { raw: Vec::with_capacity(capacity), _marker: PhantomData } } + /// Creates a new vector with a copy of `elem` for each index in `universe`. + /// + /// Thus `IndexVec::from_elem(elem, &universe)` is equivalent to + /// `IndexVec::<I, _>::from_elem_n(elem, universe.len())`. That can help + /// type inference as it ensures that the resulting vector uses the same + /// index type as `universe`, rather than something potentially surprising. + /// + /// For example, if you want to store data for each local in a MIR body, + /// using `let mut uses = IndexVec::from_elem(vec![], &body.local_decls);` + /// ensures that `uses` is an `IndexVec<Local, _>`, and thus can give + /// better error messages later if one accidentally mismatches indices. #[inline] - pub fn from_elem<S>(elem: T, universe: &IndexVec<I, S>) -> Self + pub fn from_elem<S>(elem: T, universe: &IndexSlice<I, S>) -> Self where T: Clone, { @@ -238,6 +269,30 @@ impl<I: Idx, T> DerefMut for IndexVec<I, T> { } } +impl<I: Idx, T> Borrow<IndexSlice<I, T>> for IndexVec<I, T> { + fn borrow(&self) -> &IndexSlice<I, T> { + self + } +} + +impl<I: Idx, T> BorrowMut<IndexSlice<I, T>> for IndexVec<I, T> { + fn borrow_mut(&mut self) -> &mut IndexSlice<I, T> { + self + } +} + +impl<I: Idx, T: Clone> ToOwned for IndexSlice<I, T> { + type Owned = IndexVec<I, T>; + + fn to_owned(&self) -> IndexVec<I, T> { + IndexVec::from_raw(self.raw.to_owned()) + } + + fn clone_into(&self, target: &mut IndexVec<I, T>) { + self.raw.clone_into(&mut target.raw) + } +} + impl<I: Idx, T> IndexSlice<I, T> { #[inline] pub fn from_raw(raw: &[T]) -> &Self { @@ -382,7 +437,7 @@ impl<I: Idx, T: Clone> IndexVec<I, T> { } } -impl<I: Idx, T: Ord> IndexVec<I, T> { +impl<I: Idx, T: Ord> IndexSlice<I, T> { #[inline] pub fn binary_search(&self, value: &T) -> Result<I, I> { match self.raw.binary_search(value) { diff --git a/compiler/rustc_infer/src/infer/canonical/canonicalizer.rs b/compiler/rustc_infer/src/infer/canonical/canonicalizer.rs index 96a5f6532fe..3bbd01f8273 100644 --- a/compiler/rustc_infer/src/infer/canonical/canonicalizer.rs +++ b/compiler/rustc_infer/src/infer/canonical/canonicalizer.rs @@ -230,9 +230,9 @@ impl CanonicalizeMode for CanonicalizeUserTypeAnnotation { r: ty::Region<'tcx>, ) -> ty::Region<'tcx> { match *r { - ty::ReEarlyBound(_) | ty::ReFree(_) | ty::ReErased | ty::ReStatic => r, + ty::ReEarlyBound(_) | ty::ReFree(_) | ty::ReErased | ty::ReStatic | ty::ReError(_) => r, ty::ReVar(_) => canonicalizer.canonical_var_for_region_in_root_universe(r), - _ => { + ty::RePlaceholder(..) | ty::ReLateBound(..) => { // We only expect region names that the user can type. bug!("unexpected region in query response: `{:?}`", r) } diff --git a/compiler/rustc_infer/src/infer/combine.rs b/compiler/rustc_infer/src/infer/combine.rs index 88a28e26005..fe45b5ebe61 100644 --- a/compiler/rustc_infer/src/infer/combine.rs +++ b/compiler/rustc_infer/src/infer/combine.rs @@ -137,6 +137,18 @@ impl<'tcx> InferCtxt<'tcx> { Err(TypeError::Sorts(ty::relate::expected_found(relation, a, b))) } + // During coherence, opaque types should be treated as *possibly* + // equal to each other, even if their generic params differ, as + // they could resolve to the same hidden type, even for different + // generic params. + ( + &ty::Alias(ty::Opaque, ty::AliasTy { def_id: a_def_id, .. }), + &ty::Alias(ty::Opaque, ty::AliasTy { def_id: b_def_id, .. }), + ) if self.intercrate && a_def_id == b_def_id => { + relation.register_predicates([ty::Binder::dummy(ty::PredicateKind::Ambiguous)]); + Ok(a) + } + _ => ty::relate::super_relate_tys(relation, a, b), } } @@ -505,10 +517,6 @@ impl<'infcx, 'tcx> CombineFields<'infcx, 'tcx> { Obligation::new(self.infcx.tcx, self.trace.cause.clone(), self.param_env, to_pred) })) } - - pub fn mark_ambiguous(&mut self) { - self.register_predicates([ty::Binder::dummy(ty::PredicateKind::Ambiguous)]); - } } struct Generalizer<'cx, 'tcx> { @@ -581,10 +589,6 @@ impl<'tcx> TypeRelation<'tcx> for Generalizer<'_, 'tcx> { self.infcx.tcx } - fn intercrate(&self) -> bool { - self.infcx.intercrate - } - fn param_env(&self) -> ty::ParamEnv<'tcx> { self.param_env } @@ -597,10 +601,6 @@ impl<'tcx> TypeRelation<'tcx> for Generalizer<'_, 'tcx> { true } - fn mark_ambiguous(&mut self) { - span_bug!(self.cause.span, "opaque types are handled in `tys`"); - } - fn binders<T>( &mut self, a: ty::Binder<'tcx, T>, diff --git a/compiler/rustc_infer/src/infer/equate.rs b/compiler/rustc_infer/src/infer/equate.rs index 38002357cde..fe4a2dd3800 100644 --- a/compiler/rustc_infer/src/infer/equate.rs +++ b/compiler/rustc_infer/src/infer/equate.rs @@ -35,10 +35,6 @@ impl<'tcx> TypeRelation<'tcx> for Equate<'_, '_, 'tcx> { self.fields.tcx() } - fn intercrate(&self) -> bool { - self.fields.infcx.intercrate - } - fn param_env(&self) -> ty::ParamEnv<'tcx> { self.fields.param_env } @@ -47,10 +43,6 @@ impl<'tcx> TypeRelation<'tcx> for Equate<'_, '_, 'tcx> { self.a_is_expected } - fn mark_ambiguous(&mut self) { - self.fields.mark_ambiguous(); - } - fn relate_item_substs( &mut self, _item_def_id: DefId, diff --git a/compiler/rustc_infer/src/infer/error_reporting/mod.rs b/compiler/rustc_infer/src/infer/error_reporting/mod.rs index 75c3d9f641d..c9956b60a56 100644 --- a/compiler/rustc_infer/src/infer/error_reporting/mod.rs +++ b/compiler/rustc_infer/src/infer/error_reporting/mod.rs @@ -978,7 +978,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> { let (_, sig, reg) = ty::print::FmtPrinter::new(self.tcx, Namespace::TypeNS) .name_all_regions(sig) .unwrap(); - let lts: Vec<String> = reg.into_iter().map(|(_, kind)| kind.to_string()).collect(); + let lts: Vec<String> = reg.into_values().map(|kind| kind.to_string()).collect(); (if lts.is_empty() { String::new() } else { format!("for<{}> ", lts.join(", ")) }, sig) }; @@ -2399,10 +2399,8 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> { let suggestion = if has_lifetimes { format!(" + {}", sub) } else { format!(": {}", sub) }; let mut suggestions = vec![(sp, suggestion)]; - for add_lt_sugg in add_lt_suggs { - if let Some(add_lt_sugg) = add_lt_sugg { - suggestions.push(add_lt_sugg); - } + for add_lt_sugg in add_lt_suggs.into_iter().flatten() { + suggestions.push(add_lt_sugg); } err.multipart_suggestion_verbose( format!("{msg}..."), @@ -2426,11 +2424,9 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> { }; let mut sugg = vec![(sp, suggestion), (span.shrink_to_hi(), format!(" + {}", new_lt))]; - for add_lt_sugg in add_lt_suggs.clone() { - if let Some(lt) = add_lt_sugg { - sugg.push(lt); - sugg.rotate_right(1); - } + for lt in add_lt_suggs.clone().into_iter().flatten() { + sugg.push(lt); + sugg.rotate_right(1); } // `MaybeIncorrect` due to issue #41966. err.multipart_suggestion(msg, sugg, Applicability::MaybeIncorrect); @@ -2701,11 +2697,6 @@ impl<'tcx> TypeRelation<'tcx> for SameTypeModuloInfer<'_, 'tcx> { self.0.tcx } - fn intercrate(&self) -> bool { - assert!(!self.0.intercrate); - false - } - fn param_env(&self) -> ty::ParamEnv<'tcx> { // Unused, only for consts which we treat as always equal ty::ParamEnv::empty() @@ -2719,10 +2710,6 @@ impl<'tcx> TypeRelation<'tcx> for SameTypeModuloInfer<'_, 'tcx> { true } - fn mark_ambiguous(&mut self) { - bug!() - } - fn relate_with_variance<T: relate::Relate<'tcx>>( &mut self, _variance: ty::Variance, diff --git a/compiler/rustc_infer/src/infer/glb.rs b/compiler/rustc_infer/src/infer/glb.rs index 6395c4d4b20..2f659d9a665 100644 --- a/compiler/rustc_infer/src/infer/glb.rs +++ b/compiler/rustc_infer/src/infer/glb.rs @@ -29,11 +29,6 @@ impl<'tcx> TypeRelation<'tcx> for Glb<'_, '_, 'tcx> { "Glb" } - fn intercrate(&self) -> bool { - assert!(!self.fields.infcx.intercrate); - false - } - fn tcx(&self) -> TyCtxt<'tcx> { self.fields.tcx() } @@ -46,10 +41,6 @@ impl<'tcx> TypeRelation<'tcx> for Glb<'_, '_, 'tcx> { self.a_is_expected } - fn mark_ambiguous(&mut self) { - bug!("mark_ambiguous used outside of coherence"); - } - fn relate_with_variance<T: Relate<'tcx>>( &mut self, variance: ty::Variance, diff --git a/compiler/rustc_infer/src/infer/lexical_region_resolve/mod.rs b/compiler/rustc_infer/src/infer/lexical_region_resolve/mod.rs index cf657756ff5..f298b95ca35 100644 --- a/compiler/rustc_infer/src/infer/lexical_region_resolve/mod.rs +++ b/compiler/rustc_infer/src/infer/lexical_region_resolve/mod.rs @@ -13,7 +13,7 @@ use rustc_data_structures::graph::implementation::{ Direction, Graph, NodeIndex, INCOMING, OUTGOING, }; use rustc_data_structures::intern::Interned; -use rustc_index::vec::IndexVec; +use rustc_index::vec::{IndexSlice, IndexVec}; use rustc_middle::ty::fold::TypeFoldable; use rustc_middle::ty::PlaceholderRegion; use rustc_middle::ty::{self, Ty, TyCtxt}; @@ -203,7 +203,7 @@ impl<'cx, 'tcx> LexicalResolver<'cx, 'tcx> { // Tracks the `VarSubVar` constraints generated for each region vid. We // later use this to expand across vids. - let mut constraints = IndexVec::from_elem_n(Vec::new(), var_values.values.len()); + let mut constraints = IndexVec::from_elem(Vec::new(), &var_values.values); // Tracks the changed region vids. let mut changes = Vec::new(); for constraint in self.data.constraints.keys() { @@ -723,7 +723,7 @@ impl<'cx, 'tcx> LexicalResolver<'cx, 'tcx> { fn collect_error_for_expanding_node( &self, graph: &RegionGraph<'tcx>, - dup_vec: &mut IndexVec<RegionVid, Option<RegionVid>>, + dup_vec: &mut IndexSlice<RegionVid, Option<RegionVid>>, node_idx: RegionVid, errors: &mut Vec<RegionResolutionError<'tcx>>, ) { @@ -846,7 +846,7 @@ impl<'cx, 'tcx> LexicalResolver<'cx, 'tcx> { graph: &RegionGraph<'tcx>, orig_node_idx: RegionVid, dir: Direction, - mut dup_vec: Option<&mut IndexVec<RegionVid, Option<RegionVid>>>, + mut dup_vec: Option<&mut IndexSlice<RegionVid, Option<RegionVid>>>, ) -> (Vec<RegionAndOrigin<'tcx>>, FxHashSet<RegionVid>, bool) { struct WalkState<'tcx> { set: FxHashSet<RegionVid>, diff --git a/compiler/rustc_infer/src/infer/lub.rs b/compiler/rustc_infer/src/infer/lub.rs index 98cbd4c561c..e41ec7e6c01 100644 --- a/compiler/rustc_infer/src/infer/lub.rs +++ b/compiler/rustc_infer/src/infer/lub.rs @@ -29,11 +29,6 @@ impl<'tcx> TypeRelation<'tcx> for Lub<'_, '_, 'tcx> { "Lub" } - fn intercrate(&self) -> bool { - assert!(!self.fields.infcx.intercrate); - false - } - fn tcx(&self) -> TyCtxt<'tcx> { self.fields.tcx() } @@ -46,10 +41,6 @@ impl<'tcx> TypeRelation<'tcx> for Lub<'_, '_, 'tcx> { self.a_is_expected } - fn mark_ambiguous(&mut self) { - bug!("mark_ambiguous used outside of coherence"); - } - fn relate_with_variance<T: Relate<'tcx>>( &mut self, variance: ty::Variance, diff --git a/compiler/rustc_infer/src/infer/nll_relate/mod.rs b/compiler/rustc_infer/src/infer/nll_relate/mod.rs index f5d20cb7ebf..7616a996da1 100644 --- a/compiler/rustc_infer/src/infer/nll_relate/mod.rs +++ b/compiler/rustc_infer/src/infer/nll_relate/mod.rs @@ -443,10 +443,6 @@ where self.infcx.tcx } - fn intercrate(&self) -> bool { - self.infcx.intercrate - } - fn param_env(&self) -> ty::ParamEnv<'tcx> { self.delegate.param_env() } @@ -459,17 +455,6 @@ where true } - fn mark_ambiguous(&mut self) { - let cause = ObligationCause::dummy_with_span(self.delegate.span()); - let param_env = self.delegate.param_env(); - self.delegate.register_obligations(vec![Obligation::new( - self.tcx(), - cause, - param_env, - ty::Binder::dummy(ty::PredicateKind::Ambiguous), - )]); - } - #[instrument(skip(self, info), level = "trace", ret)] fn relate_with_variance<T: Relate<'tcx>>( &mut self, @@ -834,11 +819,6 @@ where self.infcx.tcx } - fn intercrate(&self) -> bool { - assert!(!self.infcx.intercrate); - false - } - fn param_env(&self) -> ty::ParamEnv<'tcx> { self.delegate.param_env() } @@ -851,10 +831,6 @@ where true } - fn mark_ambiguous(&mut self) { - bug!() - } - fn relate_with_variance<T: Relate<'tcx>>( &mut self, variance: ty::Variance, diff --git a/compiler/rustc_infer/src/infer/outlives/test_type_match.rs b/compiler/rustc_infer/src/infer/outlives/test_type_match.rs index 3c6cc2b9001..01f900f050e 100644 --- a/compiler/rustc_infer/src/infer/outlives/test_type_match.rs +++ b/compiler/rustc_infer/src/infer/outlives/test_type_match.rs @@ -137,10 +137,6 @@ impl<'tcx> TypeRelation<'tcx> for Match<'tcx> { "Match" } - fn intercrate(&self) -> bool { - false - } - fn tcx(&self) -> TyCtxt<'tcx> { self.tcx } @@ -151,10 +147,6 @@ impl<'tcx> TypeRelation<'tcx> for Match<'tcx> { true } // irrelevant - fn mark_ambiguous(&mut self) { - bug!() - } - #[instrument(level = "trace", skip(self))] fn relate_with_variance<T: Relate<'tcx>>( &mut self, diff --git a/compiler/rustc_infer/src/infer/sub.rs b/compiler/rustc_infer/src/infer/sub.rs index fc73ca7606d..0dd73a6e999 100644 --- a/compiler/rustc_infer/src/infer/sub.rs +++ b/compiler/rustc_infer/src/infer/sub.rs @@ -35,10 +35,6 @@ impl<'tcx> TypeRelation<'tcx> for Sub<'_, '_, 'tcx> { "Sub" } - fn intercrate(&self) -> bool { - self.fields.infcx.intercrate - } - fn tcx(&self) -> TyCtxt<'tcx> { self.fields.infcx.tcx } @@ -51,10 +47,6 @@ impl<'tcx> TypeRelation<'tcx> for Sub<'_, '_, 'tcx> { self.a_is_expected } - fn mark_ambiguous(&mut self) { - self.fields.mark_ambiguous() - } - fn with_cause<F, R>(&mut self, cause: Cause, f: F) -> R where F: FnOnce(&mut Self) -> R, diff --git a/compiler/rustc_interface/src/interface.rs b/compiler/rustc_interface/src/interface.rs index 5e38ca034ac..be7fa9378ca 100644 --- a/compiler/rustc_interface/src/interface.rs +++ b/compiler/rustc_interface/src/interface.rs @@ -292,7 +292,7 @@ pub fn run_compiler<R: Send>(config: Config, f: impl FnOnce(&Compiler) -> R + Se override_queries: config.override_queries, }; - rustc_span::with_source_map(compiler.sess.parse_sess.clone_source_map(), move || { + rustc_span::set_source_map(compiler.sess.parse_sess.clone_source_map(), move || { let r = { let _sess_abort_error = OnDrop(|| { compiler.sess.finish_diagnostics(registry); diff --git a/compiler/rustc_interface/src/tests.rs b/compiler/rustc_interface/src/tests.rs index eb5990507fb..10dfd32d418 100644 --- a/compiler/rustc_interface/src/tests.rs +++ b/compiler/rustc_interface/src/tests.rs @@ -5,6 +5,7 @@ use rustc_data_structures::fx::FxHashSet; use rustc_data_structures::profiling::TimePassesFormat; use rustc_errors::{emitter::HumanReadableErrorType, registry, ColorConfig}; use rustc_session::config::rustc_optgroups; +use rustc_session::config::DebugInfo; use rustc_session::config::Input; use rustc_session::config::InstrumentXRay; use rustc_session::config::TraitSolver; @@ -574,7 +575,7 @@ fn test_codegen_options_tracking_hash() { tracked!(code_model, Some(CodeModel::Large)); tracked!(control_flow_guard, CFGuard::Checks); tracked!(debug_assertions, Some(true)); - tracked!(debuginfo, 0xdeadbeef); + tracked!(debuginfo, DebugInfo::Limited); tracked!(embed_bitcode, false); tracked!(force_frame_pointers, Some(false)); tracked!(force_unwind_tables, Some(true)); diff --git a/compiler/rustc_lint/src/methods.rs b/compiler/rustc_lint/src/methods.rs index 3045fc1a476..4c25d94a1f3 100644 --- a/compiler/rustc_lint/src/methods.rs +++ b/compiler/rustc_lint/src/methods.rs @@ -2,9 +2,9 @@ use crate::lints::CStringPtr; use crate::LateContext; use crate::LateLintPass; use crate::LintContext; -use rustc_hir::{Expr, ExprKind, PathSegment}; +use rustc_hir::{Expr, ExprKind}; use rustc_middle::ty; -use rustc_span::{symbol::sym, ExpnKind, Span}; +use rustc_span::{symbol::sym, Span}; declare_lint! { /// The `temporary_cstring_as_ptr` lint detects getting the inner pointer of @@ -34,47 +34,14 @@ declare_lint! { declare_lint_pass!(TemporaryCStringAsPtr => [TEMPORARY_CSTRING_AS_PTR]); -fn in_macro(span: Span) -> bool { - if span.from_expansion() { - !matches!(span.ctxt().outer_expn_data().kind, ExpnKind::Desugaring(..)) - } else { - false - } -} - -fn first_method_call<'tcx>( - expr: &'tcx Expr<'tcx>, -) -> Option<(&'tcx PathSegment<'tcx>, &'tcx Expr<'tcx>)> { - if let ExprKind::MethodCall(path, receiver, args, ..) = &expr.kind { - if args.iter().any(|e| e.span.from_expansion()) || receiver.span.from_expansion() { - None - } else { - Some((path, *receiver)) - } - } else { - None - } -} - impl<'tcx> LateLintPass<'tcx> for TemporaryCStringAsPtr { fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { - if in_macro(expr.span) { - return; - } - - match first_method_call(expr) { - Some((path, unwrap_arg)) if path.ident.name == sym::as_ptr => { - let as_ptr_span = path.ident.span; - match first_method_call(unwrap_arg) { - Some((path, receiver)) - if path.ident.name == sym::unwrap || path.ident.name == sym::expect => - { - lint_cstring_as_ptr(cx, as_ptr_span, receiver, unwrap_arg); - } - _ => return, - } - } - _ => return, + if let ExprKind::MethodCall(as_ptr_path, as_ptr_receiver, ..) = expr.kind + && as_ptr_path.ident.name == sym::as_ptr + && let ExprKind::MethodCall(unwrap_path, unwrap_receiver, ..) = as_ptr_receiver.kind + && (unwrap_path.ident.name == sym::unwrap || unwrap_path.ident.name == sym::expect) + { + lint_cstring_as_ptr(cx, as_ptr_path.ident.span, unwrap_receiver, as_ptr_receiver); } } } diff --git a/compiler/rustc_lint/src/unused.rs b/compiler/rustc_lint/src/unused.rs index 42e59f92840..ad328006051 100644 --- a/compiler/rustc_lint/src/unused.rs +++ b/compiler/rustc_lint/src/unused.rs @@ -805,7 +805,9 @@ trait UnusedDelimLint { fn check_item(&mut self, cx: &EarlyContext<'_>, item: &ast::Item) { use ast::ItemKind::*; - if let Const(.., Some(expr)) | Static(.., Some(expr)) = &item.kind { + if let Const(box ast::ConstItem { expr: Some(expr), .. }) + | Static(box ast::StaticItem { expr: Some(expr), .. }) = &item.kind + { self.check_unused_delims_expr( cx, expr, diff --git a/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp index e3493caaaf7..6a2fd5aa6e6 100644 --- a/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp +++ b/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp @@ -682,6 +682,7 @@ enum class LLVMRustDebugEmissionKind { NoDebug, FullDebug, LineTablesOnly, + DebugDirectivesOnly, }; static DICompileUnit::DebugEmissionKind fromRust(LLVMRustDebugEmissionKind Kind) { @@ -692,6 +693,8 @@ static DICompileUnit::DebugEmissionKind fromRust(LLVMRustDebugEmissionKind Kind) return DICompileUnit::DebugEmissionKind::FullDebug; case LLVMRustDebugEmissionKind::LineTablesOnly: return DICompileUnit::DebugEmissionKind::LineTablesOnly; + case LLVMRustDebugEmissionKind::DebugDirectivesOnly: + return DICompileUnit::DebugEmissionKind::DebugDirectivesOnly; default: report_fatal_error("bad DebugEmissionKind."); } diff --git a/compiler/rustc_macros/src/diagnostics/fluent.rs b/compiler/rustc_macros/src/diagnostics/fluent.rs index 3b2f5cfdc73..9f96a041487 100644 --- a/compiler/rustc_macros/src/diagnostics/fluent.rs +++ b/compiler/rustc_macros/src/diagnostics/fluent.rs @@ -15,8 +15,7 @@ use proc_macro2::TokenStream; use quote::quote; use std::{ collections::{HashMap, HashSet}, - fs::File, - io::Read, + fs::read_to_string, path::{Path, PathBuf}, }; use syn::{parse_macro_input, Ident, LitStr}; @@ -95,22 +94,18 @@ pub(crate) fn fluent_messages(input: proc_macro::TokenStream) -> proc_macro::Tok // As this macro also outputs an `include_str!` for this file, the macro will always be // re-executed when the file changes. - let mut resource_file = match File::open(absolute_ftl_path) { - Ok(resource_file) => resource_file, + let resource_contents = match read_to_string(absolute_ftl_path) { + Ok(resource_contents) => resource_contents, Err(e) => { - Diagnostic::spanned(resource_span, Level::Error, "could not open Fluent resource") - .note(e.to_string()) - .emit(); + Diagnostic::spanned( + resource_span, + Level::Error, + format!("could not open Fluent resource: {}", e.to_string()), + ) + .emit(); return failed(&crate_name); } }; - let mut resource_contents = String::new(); - if let Err(e) = resource_file.read_to_string(&mut resource_contents) { - Diagnostic::spanned(resource_span, Level::Error, "could not read Fluent resource") - .note(e.to_string()) - .emit(); - return failed(&crate_name); - } let mut bad = false; for esc in ["\\n", "\\\"", "\\'"] { for _ in resource_contents.matches(esc) { diff --git a/compiler/rustc_middle/messages.ftl b/compiler/rustc_middle/messages.ftl index 4f4e5c6a2c9..bd9d89deee1 100644 --- a/compiler/rustc_middle/messages.ftl +++ b/compiler/rustc_middle/messages.ftl @@ -16,6 +16,10 @@ middle_limit_invalid = `limit` must be a non-negative integer .label = {$error_str} +middle_recursion_limit_reached = + reached the recursion limit finding the struct tail for `{$ty}` + .help = consider increasing the recursion limit by adding a `#![recursion_limit = "{$suggested_limit}"]` + middle_const_eval_non_int = constant evaluation of enum discriminant resulted in non-integer diff --git a/compiler/rustc_middle/src/error.rs b/compiler/rustc_middle/src/error.rs index 5e94da8cb4d..dc4aa18640f 100644 --- a/compiler/rustc_middle/src/error.rs +++ b/compiler/rustc_middle/src/error.rs @@ -50,6 +50,14 @@ pub struct LimitInvalid<'a> { } #[derive(Diagnostic)] +#[diag(middle_recursion_limit_reached)] +#[help] +pub struct RecursionLimitReached<'tcx> { + pub ty: Ty<'tcx>, + pub suggested_limit: rustc_session::Limit, +} + +#[derive(Diagnostic)] #[diag(middle_const_eval_non_int)] pub struct ConstEvalNonIntError { #[primary_span] diff --git a/compiler/rustc_middle/src/middle/mod.rs b/compiler/rustc_middle/src/middle/mod.rs index 0b6774f1b1f..9c25f3009ba 100644 --- a/compiler/rustc_middle/src/middle/mod.rs +++ b/compiler/rustc_middle/src/middle/mod.rs @@ -19,7 +19,7 @@ pub mod lib_features { .stable .iter() .map(|(f, (s, _))| (*f, Some(*s))) - .chain(self.unstable.iter().map(|(f, _)| (*f, None))) + .chain(self.unstable.keys().map(|f| (*f, None))) .collect(); all_features.sort_unstable_by(|a, b| a.0.as_str().partial_cmp(b.0.as_str()).unwrap()); all_features diff --git a/compiler/rustc_middle/src/mir/basic_blocks.rs b/compiler/rustc_middle/src/mir/basic_blocks.rs index b93871769b7..3fb46837935 100644 --- a/compiler/rustc_middle/src/mir/basic_blocks.rs +++ b/compiler/rustc_middle/src/mir/basic_blocks.rs @@ -6,7 +6,7 @@ use rustc_data_structures::graph; use rustc_data_structures::graph::dominators::{dominators, Dominators}; use rustc_data_structures::stable_hasher::{HashStable, StableHasher}; use rustc_data_structures::sync::OnceCell; -use rustc_index::vec::IndexVec; +use rustc_index::vec::{IndexSlice, IndexVec}; use rustc_serialize::{Decodable, Decoder, Encodable, Encoder}; use smallvec::SmallVec; @@ -124,10 +124,10 @@ impl<'tcx> BasicBlocks<'tcx> { } impl<'tcx> std::ops::Deref for BasicBlocks<'tcx> { - type Target = IndexVec<BasicBlock, BasicBlockData<'tcx>>; + type Target = IndexSlice<BasicBlock, BasicBlockData<'tcx>>; #[inline] - fn deref(&self) -> &IndexVec<BasicBlock, BasicBlockData<'tcx>> { + fn deref(&self) -> &IndexSlice<BasicBlock, BasicBlockData<'tcx>> { &self.basic_blocks } } diff --git a/compiler/rustc_middle/src/mir/mod.rs b/compiler/rustc_middle/src/mir/mod.rs index de7e8bc861d..b88a315cec1 100644 --- a/compiler/rustc_middle/src/mir/mod.rs +++ b/compiler/rustc_middle/src/mir/mod.rs @@ -27,7 +27,7 @@ use polonius_engine::Atom; pub use rustc_ast::Mutability; use rustc_data_structures::fx::FxHashSet; use rustc_data_structures::graph::dominators::Dominators; -use rustc_index::vec::{Idx, IndexVec}; +use rustc_index::vec::{Idx, IndexSlice, IndexVec}; use rustc_serialize::{Decodable, Encodable}; use rustc_span::symbol::Symbol; use rustc_span::{Span, DUMMY_SP}; @@ -70,12 +70,19 @@ pub use self::pretty::{ }; /// Types for locals -pub type LocalDecls<'tcx> = IndexVec<Local, LocalDecl<'tcx>>; +pub type LocalDecls<'tcx> = IndexSlice<Local, LocalDecl<'tcx>>; pub trait HasLocalDecls<'tcx> { fn local_decls(&self) -> &LocalDecls<'tcx>; } +impl<'tcx> HasLocalDecls<'tcx> for IndexVec<Local, LocalDecl<'tcx>> { + #[inline] + fn local_decls(&self) -> &LocalDecls<'tcx> { + self + } +} + impl<'tcx> HasLocalDecls<'tcx> for LocalDecls<'tcx> { #[inline] fn local_decls(&self) -> &LocalDecls<'tcx> { @@ -250,7 +257,7 @@ pub struct Body<'tcx> { /// The first local is the return value pointer, followed by `arg_count` /// locals for the function arguments, followed by any user-declared /// variables and temporaries. - pub local_decls: LocalDecls<'tcx>, + pub local_decls: IndexVec<Local, LocalDecl<'tcx>>, /// User type annotations. pub user_type_annotations: ty::CanonicalUserTypeAnnotations<'tcx>, @@ -311,7 +318,7 @@ impl<'tcx> Body<'tcx> { source: MirSource<'tcx>, basic_blocks: IndexVec<BasicBlock, BasicBlockData<'tcx>>, source_scopes: IndexVec<SourceScope, SourceScopeData<'tcx>>, - local_decls: LocalDecls<'tcx>, + local_decls: IndexVec<Local, LocalDecl<'tcx>>, user_type_annotations: ty::CanonicalUserTypeAnnotations<'tcx>, arg_count: usize, var_debug_info: Vec<VarDebugInfo<'tcx>>, @@ -1029,8 +1036,7 @@ impl<'tcx> LocalDecl<'tcx> { #[derive(Clone, TyEncodable, TyDecodable, HashStable, TypeFoldable, TypeVisitable)] pub enum VarDebugInfoContents<'tcx> { - /// NOTE(eddyb) There's an unenforced invariant that this `Place` is - /// based on a `Local`, not a `Static`, and contains no indexing. + /// This `Place` only contains projection which satisfy `can_use_in_debuginfo`. Place(Place<'tcx>), Const(Constant<'tcx>), /// The user variable's data is split across several fragments, @@ -1040,6 +1046,7 @@ pub enum VarDebugInfoContents<'tcx> { /// the underlying debuginfo feature this relies on. Composite { /// Type of the original user variable. + /// This cannot contain a union or an enum. ty: Ty<'tcx>, /// All the parts of the original user variable, which ended /// up in disjoint places, due to optimizations. @@ -1068,17 +1075,16 @@ pub struct VarDebugInfoFragment<'tcx> { /// Where in the composite user variable this fragment is, /// represented as a "projection" into the composite variable. /// At lower levels, this corresponds to a byte/bit range. - // NOTE(eddyb) there's an unenforced invariant that this contains - // only `Field`s, and not into `enum` variants or `union`s. - // FIXME(eddyb) support this for `enum`s by either using DWARF's + /// + /// This can only contain `PlaceElem::Field`. + // FIXME support this for `enum`s by either using DWARF's // more advanced control-flow features (unsupported by LLVM?) // to match on the discriminant, or by using custom type debuginfo // with non-overlapping variants for the composite variable. pub projection: Vec<PlaceElem<'tcx>>, /// Where the data for this fragment can be found. - // NOTE(eddyb) There's an unenforced invariant that this `Place` is - // contains no indexing (with a non-constant index). + /// This `Place` only contains projection which satisfy `can_use_in_debuginfo`. pub contents: Place<'tcx>, } @@ -1531,6 +1537,17 @@ impl<V, T> ProjectionElem<V, T> { pub fn is_field_to(&self, f: FieldIdx) -> bool { matches!(*self, Self::Field(x, _) if x == f) } + + /// Returns `true` if this is accepted inside `VarDebugInfoContents::Place`. + pub fn can_use_in_debuginfo(&self) -> bool { + match self { + Self::Deref | Self::Downcast(_, _) | Self::Field(_, _) => true, + Self::ConstantIndex { .. } + | Self::Index(_) + | Self::OpaqueCast(_) + | Self::Subslice { .. } => false, + } + } } /// Alias for projections as they appear in `UserTypeProjection`, where we @@ -1779,7 +1796,7 @@ impl SourceScope { /// from the function that was inlined instead of the function call site. pub fn lint_root( self, - source_scopes: &IndexVec<SourceScope, SourceScopeData<'_>>, + source_scopes: &IndexSlice<SourceScope, SourceScopeData<'_>>, ) -> Option<HirId> { let mut data = &source_scopes[self]; // FIXME(oli-obk): we should be able to just walk the `inlined_parent_scope`, but it @@ -1799,7 +1816,7 @@ impl SourceScope { #[inline] pub fn inlined_instance<'tcx>( self, - source_scopes: &IndexVec<SourceScope, SourceScopeData<'tcx>>, + source_scopes: &IndexSlice<SourceScope, SourceScopeData<'tcx>>, ) -> Option<ty::Instance<'tcx>> { let scope_data = &source_scopes[self]; if let Some((inlined_instance, _)) = scope_data.inlined { diff --git a/compiler/rustc_middle/src/mir/syntax.rs b/compiler/rustc_middle/src/mir/syntax.rs index 413a7629b9a..cc35e6106e2 100644 --- a/compiler/rustc_middle/src/mir/syntax.rs +++ b/compiler/rustc_middle/src/mir/syntax.rs @@ -16,6 +16,7 @@ use rustc_ast::{InlineAsmOptions, InlineAsmTemplatePiece}; use rustc_hir::def_id::DefId; use rustc_hir::{self as hir}; use rustc_hir::{self, GeneratorKind}; +use rustc_index::vec::IndexVec; use rustc_target::abi::{FieldIdx, VariantIdx}; use rustc_ast::Mutability; @@ -1125,7 +1126,7 @@ pub enum Rvalue<'tcx> { /// /// Disallowed after deaggregation for all aggregate kinds except `Array` and `Generator`. After /// generator lowering, `Generator` aggregate kinds are disallowed too. - Aggregate(Box<AggregateKind<'tcx>>, Vec<Operand<'tcx>>), + Aggregate(Box<AggregateKind<'tcx>>, IndexVec<FieldIdx, Operand<'tcx>>), /// Transmutes a `*mut u8` into shallow-initialized `Box<T>`. /// @@ -1186,7 +1187,7 @@ pub enum AggregateKind<'tcx> { /// active field number and is present only for union expressions /// -- e.g., for a union expression `SomeUnion { c: .. }`, the /// active field index would identity the field `c` - Adt(DefId, VariantIdx, SubstsRef<'tcx>, Option<UserTypeAnnotationIndex>, Option<usize>), + Adt(DefId, VariantIdx, SubstsRef<'tcx>, Option<UserTypeAnnotationIndex>, Option<FieldIdx>), Closure(DefId, SubstsRef<'tcx>), Generator(DefId, SubstsRef<'tcx>, hir::Movability), @@ -1263,7 +1264,7 @@ pub enum BinOp { mod size_asserts { use super::*; // tidy-alphabetical-start - static_assert_size!(AggregateKind<'_>, 40); + static_assert_size!(AggregateKind<'_>, 32); static_assert_size!(Operand<'_>, 24); static_assert_size!(Place<'_>, 16); static_assert_size!(PlaceElem<'_>, 24); diff --git a/compiler/rustc_middle/src/mir/tcx.rs b/compiler/rustc_middle/src/mir/tcx.rs index ac28ef5276c..0092401470f 100644 --- a/compiler/rustc_middle/src/mir/tcx.rs +++ b/compiler/rustc_middle/src/mir/tcx.rs @@ -116,7 +116,7 @@ impl<'tcx> PlaceTy<'tcx> { } impl<'tcx> Place<'tcx> { - pub fn ty_from<D>( + pub fn ty_from<D: ?Sized>( local: Local, projection: &[PlaceElem<'tcx>], local_decls: &D, @@ -132,7 +132,7 @@ impl<'tcx> Place<'tcx> { }) } - pub fn ty<D>(&self, local_decls: &D, tcx: TyCtxt<'tcx>) -> PlaceTy<'tcx> + pub fn ty<D: ?Sized>(&self, local_decls: &D, tcx: TyCtxt<'tcx>) -> PlaceTy<'tcx> where D: HasLocalDecls<'tcx>, { @@ -141,7 +141,7 @@ impl<'tcx> Place<'tcx> { } impl<'tcx> PlaceRef<'tcx> { - pub fn ty<D>(&self, local_decls: &D, tcx: TyCtxt<'tcx>) -> PlaceTy<'tcx> + pub fn ty<D: ?Sized>(&self, local_decls: &D, tcx: TyCtxt<'tcx>) -> PlaceTy<'tcx> where D: HasLocalDecls<'tcx>, { @@ -155,7 +155,7 @@ pub enum RvalueInitializationState { } impl<'tcx> Rvalue<'tcx> { - pub fn ty<D>(&self, local_decls: &D, tcx: TyCtxt<'tcx>) -> Ty<'tcx> + pub fn ty<D: ?Sized>(&self, local_decls: &D, tcx: TyCtxt<'tcx>) -> Ty<'tcx> where D: HasLocalDecls<'tcx>, { @@ -217,7 +217,7 @@ impl<'tcx> Rvalue<'tcx> { } impl<'tcx> Operand<'tcx> { - pub fn ty<D>(&self, local_decls: &D, tcx: TyCtxt<'tcx>) -> Ty<'tcx> + pub fn ty<D: ?Sized>(&self, local_decls: &D, tcx: TyCtxt<'tcx>) -> Ty<'tcx> where D: HasLocalDecls<'tcx>, { diff --git a/compiler/rustc_middle/src/mir/traversal.rs b/compiler/rustc_middle/src/mir/traversal.rs index f37222cb297..62cdf794b1e 100644 --- a/compiler/rustc_middle/src/mir/traversal.rs +++ b/compiler/rustc_middle/src/mir/traversal.rs @@ -101,7 +101,7 @@ impl<'a, 'tcx> Iterator for Preorder<'a, 'tcx> { /// /// A Postorder traversal of this graph is `D B C A` or `D C B A` pub struct Postorder<'a, 'tcx> { - basic_blocks: &'a IndexVec<BasicBlock, BasicBlockData<'tcx>>, + basic_blocks: &'a IndexSlice<BasicBlock, BasicBlockData<'tcx>>, visited: BitSet<BasicBlock>, visit_stack: Vec<(BasicBlock, Successors<'a>)>, root_is_start_block: bool, @@ -109,7 +109,7 @@ pub struct Postorder<'a, 'tcx> { impl<'a, 'tcx> Postorder<'a, 'tcx> { pub fn new( - basic_blocks: &'a IndexVec<BasicBlock, BasicBlockData<'tcx>>, + basic_blocks: &'a IndexSlice<BasicBlock, BasicBlockData<'tcx>>, root: BasicBlock, ) -> Postorder<'a, 'tcx> { let mut po = Postorder { diff --git a/compiler/rustc_middle/src/ty/_match.rs b/compiler/rustc_middle/src/ty/_match.rs index df9aa765dc1..468c2c818b2 100644 --- a/compiler/rustc_middle/src/ty/_match.rs +++ b/compiler/rustc_middle/src/ty/_match.rs @@ -37,10 +37,6 @@ impl<'tcx> TypeRelation<'tcx> for Match<'tcx> { self.tcx } - fn intercrate(&self) -> bool { - false - } - fn param_env(&self) -> ty::ParamEnv<'tcx> { self.param_env } @@ -48,10 +44,6 @@ impl<'tcx> TypeRelation<'tcx> for Match<'tcx> { true } // irrelevant - fn mark_ambiguous(&mut self) { - bug!() - } - fn relate_with_variance<T: Relate<'tcx>>( &mut self, _: ty::Variance, diff --git a/compiler/rustc_middle/src/ty/adt.rs b/compiler/rustc_middle/src/ty/adt.rs index 50d7fb1813a..3a03c0901d7 100644 --- a/compiler/rustc_middle/src/ty/adt.rs +++ b/compiler/rustc_middle/src/ty/adt.rs @@ -10,7 +10,7 @@ use rustc_data_structures::stable_hasher::{HashStable, StableHasher}; use rustc_hir as hir; use rustc_hir::def::{CtorKind, DefKind, Res}; use rustc_hir::def_id::DefId; -use rustc_index::vec::IndexVec; +use rustc_index::vec::{IndexSlice, IndexVec}; use rustc_query_system::ich::StableHashingContext; use rustc_session::DataTypeKind; use rustc_span::symbol::sym; @@ -168,7 +168,7 @@ impl<'tcx> AdtDef<'tcx> { } #[inline] - pub fn variants(self) -> &'tcx IndexVec<VariantIdx, VariantDef> { + pub fn variants(self) -> &'tcx IndexSlice<VariantIdx, VariantDef> { &self.0.0.variants } diff --git a/compiler/rustc_middle/src/ty/consts/valtree.rs b/compiler/rustc_middle/src/ty/consts/valtree.rs index 5ed4af2e922..8b96864ddd7 100644 --- a/compiler/rustc_middle/src/ty/consts/valtree.rs +++ b/compiler/rustc_middle/src/ty/consts/valtree.rs @@ -79,7 +79,7 @@ impl<'tcx> ValTree<'tcx> { } pub fn try_to_target_usize(self, tcx: TyCtxt<'tcx>) -> Option<u64> { - self.try_to_scalar_int().map(|s| s.try_to_target_usize(tcx).ok()).flatten() + self.try_to_scalar_int().and_then(|s| s.try_to_target_usize(tcx).ok()) } /// Get the values inside the ValTree as a slice of bytes. This only works for diff --git a/compiler/rustc_middle/src/ty/normalize_erasing_regions.rs b/compiler/rustc_middle/src/ty/normalize_erasing_regions.rs index 578cd82aa4c..7c59879a187 100644 --- a/compiler/rustc_middle/src/ty/normalize_erasing_regions.rs +++ b/compiler/rustc_middle/src/ty/normalize_erasing_regions.rs @@ -193,9 +193,9 @@ impl<'tcx> NormalizeAfterErasingRegionsFolder<'tcx> { let arg = self.param_env.and(arg); self.tcx.try_normalize_generic_arg_after_erasing_regions(arg).unwrap_or_else(|_| bug!( - "Failed to normalize {:?}, maybe try to call `try_normalize_erasing_regions` instead", - arg.value - )) + "Failed to normalize {:?}, maybe try to call `try_normalize_erasing_regions` instead", + arg.value + )) } } diff --git a/compiler/rustc_middle/src/ty/relate.rs b/compiler/rustc_middle/src/ty/relate.rs index 3fc5f5bed8f..46c931d61dc 100644 --- a/compiler/rustc_middle/src/ty/relate.rs +++ b/compiler/rustc_middle/src/ty/relate.rs @@ -22,8 +22,6 @@ pub enum Cause { pub trait TypeRelation<'tcx>: Sized { fn tcx(&self) -> TyCtxt<'tcx>; - fn intercrate(&self) -> bool; - fn param_env(&self) -> ty::ParamEnv<'tcx>; /// Returns a static string we can use for printouts. @@ -33,9 +31,6 @@ pub trait TypeRelation<'tcx>: Sized { /// relation. Just affects error messages. fn a_is_expected(&self) -> bool; - /// Used during coherence. If called, must emit an always-ambiguous obligation. - fn mark_ambiguous(&mut self); - fn with_cause<F, R>(&mut self, _cause: Cause, f: F) -> R where F: FnOnce(&mut Self) -> R, @@ -559,23 +554,16 @@ pub fn super_relate_tys<'tcx, R: TypeRelation<'tcx>>( &ty::Alias(ty::Opaque, ty::AliasTy { def_id: a_def_id, substs: a_substs, .. }), &ty::Alias(ty::Opaque, ty::AliasTy { def_id: b_def_id, substs: b_substs, .. }), ) if a_def_id == b_def_id => { - if relation.intercrate() { - // During coherence, opaque types should be treated as equal to each other, even if their generic params - // differ, as they could resolve to the same hidden type, even for different generic params. - relation.mark_ambiguous(); - Ok(a) - } else { - let opt_variances = tcx.variances_of(a_def_id); - let substs = relate_substs_with_variances( - relation, - a_def_id, - opt_variances, - a_substs, - b_substs, - false, // do not fetch `type_of(a_def_id)`, as it will cause a cycle - )?; - Ok(tcx.mk_opaque(a_def_id, substs)) - } + let opt_variances = tcx.variances_of(a_def_id); + let substs = relate_substs_with_variances( + relation, + a_def_id, + opt_variances, + a_substs, + b_substs, + false, // do not fetch `type_of(a_def_id)`, as it will cause a cycle + )?; + Ok(tcx.mk_opaque(a_def_id, substs)) } _ => Err(TypeError::Sorts(expected_found(relation, a, b))), diff --git a/compiler/rustc_middle/src/ty/util.rs b/compiler/rustc_middle/src/ty/util.rs index d3565b28ae5..4411bcd927d 100644 --- a/compiler/rustc_middle/src/ty/util.rs +++ b/compiler/rustc_middle/src/ty/util.rs @@ -19,7 +19,8 @@ use rustc_hir::def_id::{DefId, LocalDefId}; use rustc_index::bit_set::GrowableBitSet; use rustc_index::vec::{Idx, IndexVec}; use rustc_macros::HashStable; -use rustc_span::{sym, DUMMY_SP}; +use rustc_session::Limit; +use rustc_span::sym; use rustc_target::abi::{Integer, IntegerType, Size, TargetDataLayout}; use rustc_target::spec::abi::Abi; use smallvec::SmallVec; @@ -225,10 +226,13 @@ impl<'tcx> TyCtxt<'tcx> { let recursion_limit = self.recursion_limit(); for iteration in 0.. { if !recursion_limit.value_within_limit(iteration) { - return self.ty_error_with_message( - DUMMY_SP, - &format!("reached the recursion limit finding the struct tail for {}", ty), - ); + let suggested_limit = match recursion_limit { + Limit(0) => Limit(2), + limit => limit * 2, + }; + let reported = + self.sess.emit_err(crate::error::RecursionLimitReached { ty, suggested_limit }); + return self.ty_error(reported); } match *ty.kind() { ty::Adt(def, substs) => { diff --git a/compiler/rustc_mir_build/src/build/custom/mod.rs b/compiler/rustc_mir_build/src/build/custom/mod.rs index 33fdc1901cd..d385153ba94 100644 --- a/compiler/rustc_mir_build/src/build/custom/mod.rs +++ b/compiler/rustc_mir_build/src/build/custom/mod.rs @@ -21,7 +21,7 @@ use rustc_ast::Attribute; use rustc_data_structures::fx::FxHashMap; use rustc_hir::def_id::DefId; use rustc_hir::HirId; -use rustc_index::vec::IndexVec; +use rustc_index::vec::{IndexSlice, IndexVec}; use rustc_middle::{ mir::*, thir::*, @@ -37,7 +37,7 @@ pub(super) fn build_custom_mir<'tcx>( hir_id: HirId, thir: &Thir<'tcx>, expr: ExprId, - params: &IndexVec<ParamId, Param<'tcx>>, + params: &IndexSlice<ParamId, Param<'tcx>>, return_ty: Ty<'tcx>, return_ty_span: Span, span: Span, @@ -49,7 +49,7 @@ pub(super) fn build_custom_mir<'tcx>( phase: MirPhase::Built, source_scopes: IndexVec::new(), generator: None, - local_decls: LocalDecls::new(), + local_decls: IndexVec::new(), user_type_annotations: IndexVec::new(), arg_count: params.len(), spread_arg: None, diff --git a/compiler/rustc_mir_build/src/build/custom/parse.rs b/compiler/rustc_mir_build/src/build/custom/parse.rs index d72770e70c7..12b2f5d8077 100644 --- a/compiler/rustc_mir_build/src/build/custom/parse.rs +++ b/compiler/rustc_mir_build/src/build/custom/parse.rs @@ -1,4 +1,4 @@ -use rustc_index::vec::IndexVec; +use rustc_index::vec::IndexSlice; use rustc_middle::{mir::*, thir::*, ty::Ty}; use rustc_span::Span; @@ -81,7 +81,7 @@ impl<'tcx, 'body> ParseCtxt<'tcx, 'body> { } } - pub fn parse_args(&mut self, params: &IndexVec<ParamId, Param<'tcx>>) -> PResult<()> { + pub fn parse_args(&mut self, params: &IndexSlice<ParamId, Param<'tcx>>) -> PResult<()> { for param in params.iter() { let (var, span) = { let pat = param.pat.as_ref().unwrap(); diff --git a/compiler/rustc_mir_build/src/build/custom/parse/instruction.rs b/compiler/rustc_mir_build/src/build/custom/parse/instruction.rs index 77a5017b363..33b73928704 100644 --- a/compiler/rustc_mir_build/src/build/custom/parse/instruction.rs +++ b/compiler/rustc_mir_build/src/build/custom/parse/instruction.rs @@ -185,7 +185,7 @@ impl<'tcx, 'body> ParseCtxt<'tcx, 'body> { }, ExprKind::Adt(box AdtExpr{ adt_def, variant_index, substs, fields, .. }) => { let is_union = adt_def.is_union(); - let active_field_index = is_union.then(|| fields[0].name.index()); + let active_field_index = is_union.then(|| fields[0].name); Ok(Rvalue::Aggregate( Box::new(AggregateKind::Adt(adt_def.did(), *variant_index, substs, None, active_field_index)), diff --git a/compiler/rustc_mir_build/src/build/expr/as_constant.rs b/compiler/rustc_mir_build/src/build/expr/as_constant.rs index cfacb5ea327..99291740ac8 100644 --- a/compiler/rustc_mir_build/src/build/expr/as_constant.rs +++ b/compiler/rustc_mir_build/src/build/expr/as_constant.rs @@ -62,21 +62,21 @@ pub fn as_constant_inner<'tcx>( Constant { span, user_ty: None, literal } } ExprKind::NonHirLiteral { lit, ref user_ty } => { - let user_ty = user_ty.as_ref().map(push_cuta).flatten(); + let user_ty = user_ty.as_ref().and_then(push_cuta); let literal = ConstantKind::Val(ConstValue::Scalar(Scalar::Int(lit)), ty); Constant { span, user_ty, literal } } ExprKind::ZstLiteral { ref user_ty } => { - let user_ty = user_ty.as_ref().map(push_cuta).flatten(); + let user_ty = user_ty.as_ref().and_then(push_cuta); let literal = ConstantKind::Val(ConstValue::ZeroSized, ty); Constant { span, user_ty, literal } } ExprKind::NamedConst { def_id, substs, ref user_ty } => { - let user_ty = user_ty.as_ref().map(push_cuta).flatten(); + let user_ty = user_ty.as_ref().and_then(push_cuta); let uneval = mir::UnevaluatedConst::new(ty::WithOptConstParam::unknown(def_id), substs); let literal = ConstantKind::Unevaluated(uneval, ty); diff --git a/compiler/rustc_mir_build/src/build/expr/as_rvalue.rs b/compiler/rustc_mir_build/src/build/expr/as_rvalue.rs index d1878bf77ef..baa12ec11c3 100644 --- a/compiler/rustc_mir_build/src/build/expr/as_rvalue.rs +++ b/compiler/rustc_mir_build/src/build/expr/as_rvalue.rs @@ -1,8 +1,8 @@ //! See docs in `build/expr/mod.rs`. -use rustc_index::vec::Idx; +use rustc_index::vec::{Idx, IndexVec}; use rustc_middle::ty::util::IntTypeExt; -use rustc_target::abi::{Abi, Primitive}; +use rustc_target::abi::{Abi, FieldIdx, Primitive}; use crate::build::expr::as_place::PlaceBase; use crate::build::expr::category::{Category, RvalueFunc}; @@ -17,7 +17,6 @@ use rustc_middle::thir::*; use rustc_middle::ty::cast::{mir_cast_kind, CastTy}; use rustc_middle::ty::{self, Ty, UpvarSubsts}; use rustc_span::Span; -use rustc_target::abi::FieldIdx; impl<'a, 'tcx> Builder<'a, 'tcx> { /// Returns an rvalue suitable for use until the end of the current @@ -327,7 +326,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> { // first process the set of fields let el_ty = expr.ty.sequence_element_type(this.tcx); - let fields: Vec<_> = fields + let fields: IndexVec<FieldIdx, _> = fields .into_iter() .copied() .map(|f| { @@ -348,7 +347,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> { ExprKind::Tuple { ref fields } => { // see (*) above // first process the set of fields - let fields: Vec<_> = fields + let fields: IndexVec<FieldIdx, _> = fields .into_iter() .copied() .map(|f| { @@ -402,7 +401,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> { } // see (*) above - let operands: Vec<_> = upvars + let operands: IndexVec<FieldIdx, _> = upvars .into_iter() .copied() .map(|upvar| { @@ -710,7 +709,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> { } this.record_operands_moved(&[value_operand]); } - block.and(Rvalue::Aggregate(Box::new(AggregateKind::Array(elem_ty)), Vec::new())) + block.and(Rvalue::Aggregate(Box::new(AggregateKind::Array(elem_ty)), IndexVec::new())) } fn limit_capture_mutability( diff --git a/compiler/rustc_mir_build/src/build/expr/into.rs b/compiler/rustc_mir_build/src/build/expr/into.rs index b8260c719c8..8efaba1f602 100644 --- a/compiler/rustc_mir_build/src/build/expr/into.rs +++ b/compiler/rustc_mir_build/src/build/expr/into.rs @@ -6,11 +6,9 @@ use rustc_ast::InlineAsmOptions; use rustc_data_structures::fx::FxHashMap; use rustc_data_structures::stack::ensure_sufficient_stack; use rustc_hir as hir; -use rustc_index::vec::Idx; use rustc_middle::mir::*; use rustc_middle::thir::*; use rustc_middle::ty::CanonicalUserTypeAnnotation; -use rustc_target::abi::FieldIdx; use std::iter; impl<'a, 'tcx> Builder<'a, 'tcx> { @@ -320,7 +318,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> { // See the notes for `ExprKind::Array` in `as_rvalue` and for // `ExprKind::Borrow` above. let is_union = adt_def.is_union(); - let active_field_index = is_union.then(|| fields[0].name.index()); + let active_field_index = is_union.then(|| fields[0].name); let scope = this.local_scope(); @@ -344,10 +342,9 @@ impl<'a, 'tcx> Builder<'a, 'tcx> { }) .collect(); - let field_names: Vec<_> = - (0..adt_def.variant(variant_index).fields.len()).map(FieldIdx::new).collect(); + let field_names = adt_def.variant(variant_index).fields.indices(); - let fields: Vec<_> = if let Some(FruInfo { base, field_types }) = base { + let fields = if let Some(FruInfo { base, field_types }) = base { let place_builder = unpack!(block = this.as_place_builder(block, &this.thir[*base])); @@ -364,7 +361,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> { }) .collect() } else { - field_names.iter().filter_map(|n| fields_map.get(n).cloned()).collect() + field_names.filter_map(|n| fields_map.get(&n).cloned()).collect() }; let inferred_ty = expr.ty; diff --git a/compiler/rustc_mir_build/src/build/mod.rs b/compiler/rustc_mir_build/src/build/mod.rs index e87e38fd04c..ac645cce5c6 100644 --- a/compiler/rustc_mir_build/src/build/mod.rs +++ b/compiler/rustc_mir_build/src/build/mod.rs @@ -11,7 +11,7 @@ use rustc_hir as hir; use rustc_hir::def::DefKind; use rustc_hir::def_id::{DefId, LocalDefId}; use rustc_hir::{GeneratorKind, Node}; -use rustc_index::vec::{Idx, IndexVec}; +use rustc_index::vec::{Idx, IndexSlice, IndexVec}; use rustc_infer::infer::{InferCtxt, TyCtxtInferExt}; use rustc_middle::hir::place::PlaceBase as HirPlaceBase; use rustc_middle::middle::region; @@ -821,7 +821,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> { fn args_and_body( &mut self, mut block: BasicBlock, - arguments: &IndexVec<ParamId, Param<'tcx>>, + arguments: &IndexSlice<ParamId, Param<'tcx>>, argument_scope: region::Scope, expr: &Expr<'tcx>, ) -> BlockAnd<()> { diff --git a/compiler/rustc_mir_build/src/build/scope.rs b/compiler/rustc_mir_build/src/build/scope.rs index 4bc2c0ca791..25af221bf36 100644 --- a/compiler/rustc_mir_build/src/build/scope.rs +++ b/compiler/rustc_mir_build/src/build/scope.rs @@ -86,7 +86,7 @@ use std::mem; use crate::build::{BlockAnd, BlockAndExtension, BlockFrame, Builder, CFG}; use rustc_data_structures::fx::FxHashMap; use rustc_hir::HirId; -use rustc_index::vec::IndexVec; +use rustc_index::vec::{IndexSlice, IndexVec}; use rustc_middle::middle::region; use rustc_middle::mir::*; use rustc_middle::thir::{Expr, LintLevel}; @@ -360,7 +360,7 @@ impl DropTree { fn link_blocks<'tcx>( &self, cfg: &mut CFG<'tcx>, - blocks: &IndexVec<DropIdx, Option<BasicBlock>>, + blocks: &IndexSlice<DropIdx, Option<BasicBlock>>, ) { for (drop_idx, drop_data) in self.drops.iter_enumerated().rev() { let Some(block) = blocks[drop_idx] else { continue }; diff --git a/compiler/rustc_mir_build/src/thir/pattern/deconstruct_pat.rs b/compiler/rustc_mir_build/src/thir/pattern/deconstruct_pat.rs index e619e095496..29f7cae3d3f 100644 --- a/compiler/rustc_mir_build/src/thir/pattern/deconstruct_pat.rs +++ b/compiler/rustc_mir_build/src/thir/pattern/deconstruct_pat.rs @@ -1154,8 +1154,9 @@ impl<'p, 'tcx> Fields<'p, 'tcx> { fn wildcards_from_tys( cx: &MatchCheckCtxt<'p, 'tcx>, tys: impl IntoIterator<Item = Ty<'tcx>>, + span: Span, ) -> Self { - Fields::from_iter(cx, tys.into_iter().map(DeconstructedPat::wildcard)) + Fields::from_iter(cx, tys.into_iter().map(|ty| DeconstructedPat::wildcard(ty, span))) } // In the cases of either a `#[non_exhaustive]` field list or a non-public field, we hide @@ -1191,18 +1192,18 @@ impl<'p, 'tcx> Fields<'p, 'tcx> { pub(super) fn wildcards(pcx: &PatCtxt<'_, 'p, 'tcx>, constructor: &Constructor<'tcx>) -> Self { let ret = match constructor { Single | Variant(_) => match pcx.ty.kind() { - ty::Tuple(fs) => Fields::wildcards_from_tys(pcx.cx, fs.iter()), - ty::Ref(_, rty, _) => Fields::wildcards_from_tys(pcx.cx, once(*rty)), + ty::Tuple(fs) => Fields::wildcards_from_tys(pcx.cx, fs.iter(), pcx.span), + ty::Ref(_, rty, _) => Fields::wildcards_from_tys(pcx.cx, once(*rty), pcx.span), ty::Adt(adt, substs) => { if adt.is_box() { // The only legal patterns of type `Box` (outside `std`) are `_` and box // patterns. If we're here we can assume this is a box pattern. - Fields::wildcards_from_tys(pcx.cx, once(substs.type_at(0))) + Fields::wildcards_from_tys(pcx.cx, once(substs.type_at(0)), pcx.span) } else { let variant = &adt.variant(constructor.variant_index_for_adt(*adt)); let tys = Fields::list_variant_nonhidden_fields(pcx.cx, pcx.ty, variant) .map(|(_, ty)| ty); - Fields::wildcards_from_tys(pcx.cx, tys) + Fields::wildcards_from_tys(pcx.cx, tys, pcx.span) } } _ => bug!("Unexpected type for `Single` constructor: {:?}", pcx), @@ -1210,7 +1211,7 @@ impl<'p, 'tcx> Fields<'p, 'tcx> { Slice(slice) => match *pcx.ty.kind() { ty::Slice(ty) | ty::Array(ty, _) => { let arity = slice.arity(); - Fields::wildcards_from_tys(pcx.cx, (0..arity).map(|_| ty)) + Fields::wildcards_from_tys(pcx.cx, (0..arity).map(|_| ty), pcx.span) } _ => bug!("bad slice pattern {:?} {:?}", constructor, pcx), }, @@ -1251,8 +1252,8 @@ pub(crate) struct DeconstructedPat<'p, 'tcx> { } impl<'p, 'tcx> DeconstructedPat<'p, 'tcx> { - pub(super) fn wildcard(ty: Ty<'tcx>) -> Self { - Self::new(Wildcard, Fields::empty(), ty, DUMMY_SP) + pub(super) fn wildcard(ty: Ty<'tcx>, span: Span) -> Self { + Self::new(Wildcard, Fields::empty(), ty, span) } pub(super) fn new( @@ -1269,7 +1270,7 @@ impl<'p, 'tcx> DeconstructedPat<'p, 'tcx> { /// `Some(_)`. pub(super) fn wild_from_ctor(pcx: &PatCtxt<'_, 'p, 'tcx>, ctor: Constructor<'tcx>) -> Self { let fields = Fields::wildcards(pcx, &ctor); - DeconstructedPat::new(ctor, fields, pcx.ty, DUMMY_SP) + DeconstructedPat::new(ctor, fields, pcx.ty, pcx.span) } /// Clone this value. This method emphasizes that cloning loses reachability information and @@ -1298,7 +1299,7 @@ impl<'p, 'tcx> DeconstructedPat<'p, 'tcx> { ty::Tuple(fs) => { ctor = Single; let mut wilds: SmallVec<[_; 2]> = - fs.iter().map(DeconstructedPat::wildcard).collect(); + fs.iter().map(|ty| DeconstructedPat::wildcard(ty, pat.span)).collect(); for pat in subpatterns { wilds[pat.field.index()] = mkpat(&pat.pattern); } @@ -1317,11 +1318,11 @@ impl<'p, 'tcx> DeconstructedPat<'p, 'tcx> { // normally or through box-patterns. We'll have to figure out a proper // solution when we introduce generalized deref patterns. Also need to // prevent mixing of those two options. - let pat = subpatterns.into_iter().find(|pat| pat.field.index() == 0); - let pat = if let Some(pat) = pat { + let pattern = subpatterns.into_iter().find(|pat| pat.field.index() == 0); + let pat = if let Some(pat) = pattern { mkpat(&pat.pattern) } else { - DeconstructedPat::wildcard(substs.type_at(0)) + DeconstructedPat::wildcard(substs.type_at(0), pat.span) }; ctor = Single; fields = Fields::singleton(cx, pat); @@ -1343,7 +1344,7 @@ impl<'p, 'tcx> DeconstructedPat<'p, 'tcx> { ty }); let mut wilds: SmallVec<[_; 2]> = - tys.map(DeconstructedPat::wildcard).collect(); + tys.map(|ty| DeconstructedPat::wildcard(ty, pat.span)).collect(); for pat in subpatterns { if let Some(i) = field_id_to_id[pat.field.index()] { wilds[i] = mkpat(&pat.pattern); @@ -1566,8 +1567,10 @@ impl<'p, 'tcx> DeconstructedPat<'p, 'tcx> { }; let prefix = &self.fields.fields[..prefix]; let suffix = &self.fields.fields[self_slice.arity() - suffix..]; - let wildcard: &_ = - pcx.cx.pattern_arena.alloc(DeconstructedPat::wildcard(inner_ty)); + let wildcard: &_ = pcx + .cx + .pattern_arena + .alloc(DeconstructedPat::wildcard(inner_ty, pcx.span)); let extra_wildcards = other_slice.arity() - self_slice.arity(); let extra_wildcards = (0..extra_wildcards).map(|_| wildcard); prefix.iter().chain(extra_wildcards).chain(suffix).collect() diff --git a/compiler/rustc_mir_build/src/thir/pattern/usefulness.rs b/compiler/rustc_mir_build/src/thir/pattern/usefulness.rs index be66d0d4765..a324c3a6228 100644 --- a/compiler/rustc_mir_build/src/thir/pattern/usefulness.rs +++ b/compiler/rustc_mir_build/src/thir/pattern/usefulness.rs @@ -300,6 +300,7 @@ use rustc_arena::TypedArena; use rustc_data_structures::stack::ensure_sufficient_stack; use rustc_hir::def_id::DefId; use rustc_hir::HirId; +use rustc_hir::Node; use rustc_middle::ty::{self, Ty, TyCtxt}; use rustc_session::lint::builtin::NON_EXHAUSTIVE_OMITTED_PATTERNS; use rustc_span::{Span, DUMMY_SP}; @@ -603,7 +604,7 @@ impl<'p, 'tcx> Usefulness<'p, 'tcx> { let new_patterns = if pcx.is_non_exhaustive { // Here we don't want the user to try to list all variants, we want them to add // a wildcard, so we only suggest that. - vec![DeconstructedPat::wildcard(pcx.ty)] + vec![DeconstructedPat::wildcard(pcx.ty, pcx.span)] } else { let mut split_wildcard = SplitWildcard::new(pcx); split_wildcard.split(pcx, matrix.heads().map(DeconstructedPat::ctor)); @@ -630,7 +631,7 @@ impl<'p, 'tcx> Usefulness<'p, 'tcx> { .collect(); if hide_variant_show_wild { - new.push(DeconstructedPat::wildcard(pcx.ty)); + new.push(DeconstructedPat::wildcard(pcx.ty, pcx.span)); } new @@ -733,7 +734,7 @@ impl<'p, 'tcx> Witness<'p, 'tcx> { let arity = ctor.arity(pcx); let pats = self.0.drain((len - arity)..).rev(); let fields = Fields::from_iter(pcx.cx, pats); - DeconstructedPat::new(ctor.clone(), fields, pcx.ty, DUMMY_SP) + DeconstructedPat::new(ctor.clone(), fields, pcx.ty, pcx.span) }; self.0.push(pat); @@ -867,6 +868,8 @@ fn is_useful<'p, 'tcx>( &ctor, Constructor::Missing { nonexhaustive_enum_missing_real_variants: true } ) + // We don't want to lint patterns which are function arguments or locals + && !matches!(cx.tcx.hir().find_parent(hir_id), Some(Node::Param(_)|Node::Local(_))) { let patterns = { let mut split_wildcard = SplitWildcard::new(pcx); @@ -974,7 +977,7 @@ pub(crate) fn compute_match_usefulness<'p, 'tcx>( }) .collect(); - let wild_pattern = cx.pattern_arena.alloc(DeconstructedPat::wildcard(scrut_ty)); + let wild_pattern = cx.pattern_arena.alloc(DeconstructedPat::wildcard(scrut_ty, DUMMY_SP)); let v = PatStack::from_pattern(wild_pattern); let usefulness = is_useful(cx, &matrix, &v, FakeExtraWildcard, scrut_hir_id, false, true); let non_exhaustiveness_witnesses = match usefulness { diff --git a/compiler/rustc_mir_dataflow/src/elaborate_drops.rs b/compiler/rustc_mir_dataflow/src/elaborate_drops.rs index c8661bbcc44..7ef3d41ac48 100644 --- a/compiler/rustc_mir_dataflow/src/elaborate_drops.rs +++ b/compiler/rustc_mir_dataflow/src/elaborate_drops.rs @@ -729,23 +729,59 @@ where let tcx = self.tcx(); if let Some(size) = opt_size { - let fields: Vec<(Place<'tcx>, Option<D::Path>)> = (0..size) - .map(|i| { - ( - tcx.mk_place_elem( - self.place, - ProjectionElem::ConstantIndex { - offset: i, - min_length: size, - from_end: false, - }, - ), - self.elaborator.array_subpath(self.path, i, size), - ) - }) - .collect(); - - if fields.iter().any(|(_, path)| path.is_some()) { + enum ProjectionKind<Path> { + Drop(std::ops::Range<u64>), + Keep(u64, Path), + } + // Previously, we'd make a projection for every element in the array and create a drop + // ladder if any `array_subpath` was `Some`, i.e. moving out with an array pattern. + // This caused huge memory usage when generating the drops for large arrays, so we instead + // record the *subslices* which are dropped and the *indexes* which are kept + let mut drop_ranges = vec![]; + let mut dropping = true; + let mut start = 0; + for i in 0..size { + let path = self.elaborator.array_subpath(self.path, i, size); + if dropping && path.is_some() { + drop_ranges.push(ProjectionKind::Drop(start..i)); + dropping = false; + } else if !dropping && path.is_none() { + dropping = true; + start = i; + } + if let Some(path) = path { + drop_ranges.push(ProjectionKind::Keep(i, path)); + } + } + if !drop_ranges.is_empty() { + if dropping { + drop_ranges.push(ProjectionKind::Drop(start..size)); + } + let fields = drop_ranges + .iter() + .rev() + .map(|p| { + let (project, path) = match p { + ProjectionKind::Drop(r) => ( + ProjectionElem::Subslice { + from: r.start, + to: r.end, + from_end: false, + }, + None, + ), + &ProjectionKind::Keep(offset, path) => ( + ProjectionElem::ConstantIndex { + offset, + min_length: size, + from_end: false, + }, + Some(path), + ), + }; + (tcx.mk_place_elem(self.place, project), path) + }) + .collect::<Vec<_>>(); let (succ, unwind) = self.drop_ladder_bottom(); return self.drop_ladder(fields, succ, unwind).0; } @@ -824,7 +860,7 @@ where let size = size.try_eval_target_usize(self.tcx(), self.elaborator.param_env()); self.open_drop_for_array(*ety, size) } - ty::Slice(ety) => self.open_drop_for_array(*ety, None), + ty::Slice(ety) => self.drop_loop_pair(*ety), _ => span_bug!(self.source_info.span, "open drop from non-ADT `{:?}`", ty), } diff --git a/compiler/rustc_mir_dataflow/src/move_paths/mod.rs b/compiler/rustc_mir_dataflow/src/move_paths/mod.rs index 5f22a418de8..257a42cddc8 100644 --- a/compiler/rustc_mir_dataflow/src/move_paths/mod.rs +++ b/compiler/rustc_mir_dataflow/src/move_paths/mod.rs @@ -1,6 +1,6 @@ use crate::move_paths::builder::MoveDat; use rustc_data_structures::fx::FxHashMap; -use rustc_index::vec::IndexVec; +use rustc_index::vec::{IndexSlice, IndexVec}; use rustc_middle::mir::*; use rustc_middle::ty::{ParamEnv, Ty, TyCtxt}; use rustc_span::Span; @@ -64,7 +64,7 @@ impl<'tcx> MovePath<'tcx> { /// Returns an iterator over the parents of `self`. pub fn parents<'a>( &self, - move_paths: &'a IndexVec<MovePathIndex, MovePath<'tcx>>, + move_paths: &'a IndexSlice<MovePathIndex, MovePath<'tcx>>, ) -> impl 'a + Iterator<Item = (MovePathIndex, &'a MovePath<'tcx>)> { let first = self.parent.map(|mpi| (mpi, &move_paths[mpi])); MovePathLinearIter { @@ -78,7 +78,7 @@ impl<'tcx> MovePath<'tcx> { /// Returns an iterator over the immediate children of `self`. pub fn children<'a>( &self, - move_paths: &'a IndexVec<MovePathIndex, MovePath<'tcx>>, + move_paths: &'a IndexSlice<MovePathIndex, MovePath<'tcx>>, ) -> impl 'a + Iterator<Item = (MovePathIndex, &'a MovePath<'tcx>)> { let first = self.first_child.map(|mpi| (mpi, &move_paths[mpi])); MovePathLinearIter { @@ -95,7 +95,7 @@ impl<'tcx> MovePath<'tcx> { /// `f` will **not** be called on `self`. pub fn find_descendant( &self, - move_paths: &IndexVec<MovePathIndex, MovePath<'_>>, + move_paths: &IndexSlice<MovePathIndex, MovePath<'_>>, f: impl Fn(MovePathIndex) -> bool, ) -> Option<MovePathIndex> { let mut todo = if let Some(child) = self.first_child { diff --git a/compiler/rustc_mir_dataflow/src/value_analysis.rs b/compiler/rustc_mir_dataflow/src/value_analysis.rs index 63e553bec53..33a15a8d224 100644 --- a/compiler/rustc_mir_dataflow/src/value_analysis.rs +++ b/compiler/rustc_mir_dataflow/src/value_analysis.rs @@ -36,7 +36,7 @@ use std::fmt::{Debug, Formatter}; use rustc_data_structures::fx::FxHashMap; use rustc_index::bit_set::BitSet; -use rustc_index::vec::IndexVec; +use rustc_index::vec::{IndexSlice, IndexVec}; use rustc_middle::mir::visit::{MutatingUseContext, PlaceContext, Visitor}; use rustc_middle::mir::*; use rustc_middle::ty::{self, Ty, TyCtxt}; @@ -1028,8 +1028,8 @@ where fn debug_with_context_rec<V: Debug + Eq>( place: PlaceIndex, place_str: &str, - new: &IndexVec<ValueIndex, V>, - old: Option<&IndexVec<ValueIndex, V>>, + new: &IndexSlice<ValueIndex, V>, + old: Option<&IndexSlice<ValueIndex, V>>, map: &Map, f: &mut Formatter<'_>, ) -> std::fmt::Result { @@ -1069,8 +1069,8 @@ fn debug_with_context_rec<V: Debug + Eq>( } fn debug_with_context<V: Debug + Eq>( - new: &IndexVec<ValueIndex, V>, - old: Option<&IndexVec<ValueIndex, V>>, + new: &IndexSlice<ValueIndex, V>, + old: Option<&IndexSlice<ValueIndex, V>>, map: &Map, f: &mut Formatter<'_>, ) -> std::fmt::Result { diff --git a/compiler/rustc_mir_transform/src/check_alignment.rs b/compiler/rustc_mir_transform/src/check_alignment.rs index 996416ef22e..5815887e5bb 100644 --- a/compiler/rustc_mir_transform/src/check_alignment.rs +++ b/compiler/rustc_mir_transform/src/check_alignment.rs @@ -128,7 +128,7 @@ fn split_block( fn insert_alignment_check<'tcx>( tcx: TyCtxt<'tcx>, - local_decls: &mut LocalDecls<'tcx>, + local_decls: &mut IndexVec<Local, LocalDecl<'tcx>>, block_data: &mut BasicBlockData<'tcx>, pointer: Place<'tcx>, pointee_ty: Ty<'tcx>, diff --git a/compiler/rustc_mir_transform/src/const_prop.rs b/compiler/rustc_mir_transform/src/const_prop.rs index e7075d5e791..ac55948e61b 100644 --- a/compiler/rustc_mir_transform/src/const_prop.rs +++ b/compiler/rustc_mir_transform/src/const_prop.rs @@ -7,7 +7,7 @@ use rustc_const_eval::const_eval::CheckAlignment; use rustc_data_structures::fx::FxHashSet; use rustc_hir::def::DefKind; use rustc_index::bit_set::BitSet; -use rustc_index::vec::IndexVec; +use rustc_index::vec::{IndexSlice, IndexVec}; use rustc_middle::mir::visit::{ MutVisitor, MutatingUseContext, NonMutatingUseContext, PlaceContext, Visitor, }; @@ -127,7 +127,7 @@ impl<'tcx> MirPass<'tcx> for ConstProp { let dummy_body = &Body::new( body.source, - (*body.basic_blocks).clone(), + (*body.basic_blocks).to_owned(), body.source_scopes.clone(), body.local_decls.clone(), Default::default(), @@ -319,7 +319,7 @@ struct ConstPropagator<'mir, 'tcx> { ecx: InterpCx<'mir, 'tcx, ConstPropMachine<'mir, 'tcx>>, tcx: TyCtxt<'tcx>, param_env: ParamEnv<'tcx>, - local_decls: &'mir IndexVec<Local, LocalDecl<'tcx>>, + local_decls: &'mir IndexSlice<Local, LocalDecl<'tcx>>, } impl<'tcx> LayoutOfHelpers<'tcx> for ConstPropagator<'_, 'tcx> { diff --git a/compiler/rustc_mir_transform/src/const_prop_lint.rs b/compiler/rustc_mir_transform/src/const_prop_lint.rs index 60401b05492..176027b3b93 100644 --- a/compiler/rustc_mir_transform/src/const_prop_lint.rs +++ b/compiler/rustc_mir_transform/src/const_prop_lint.rs @@ -9,7 +9,7 @@ use rustc_const_eval::interpret::{ }; use rustc_hir::def::DefKind; use rustc_hir::HirId; -use rustc_index::vec::IndexVec; +use rustc_index::vec::IndexSlice; use rustc_middle::mir::visit::Visitor; use rustc_middle::mir::*; use rustc_middle::ty::layout::{LayoutError, LayoutOf, LayoutOfHelpers, TyAndLayout}; @@ -103,7 +103,7 @@ impl<'tcx> MirLint<'tcx> for ConstProp { let dummy_body = &Body::new( body.source, - (*body.basic_blocks).clone(), + (*body.basic_blocks).to_owned(), body.source_scopes.clone(), body.local_decls.clone(), Default::default(), @@ -130,8 +130,8 @@ struct ConstPropagator<'mir, 'tcx> { ecx: InterpCx<'mir, 'tcx, ConstPropMachine<'mir, 'tcx>>, tcx: TyCtxt<'tcx>, param_env: ParamEnv<'tcx>, - source_scopes: &'mir IndexVec<SourceScope, SourceScopeData<'tcx>>, - local_decls: &'mir IndexVec<Local, LocalDecl<'tcx>>, + source_scopes: &'mir IndexSlice<SourceScope, SourceScopeData<'tcx>>, + local_decls: &'mir IndexSlice<Local, LocalDecl<'tcx>>, // Because we have `MutVisitor` we can't obtain the `SourceInfo` from a `Location`. So we store // the last known `SourceInfo` here and just keep revisiting it. source_info: Option<SourceInfo>, @@ -284,7 +284,15 @@ impl<'mir, 'tcx> ConstPropagator<'mir, 'tcx> { return None; } - self.use_ecx(source_info, |this| this.ecx.eval_mir_constant(&c.literal, Some(c.span), None)) + // Normalization needed b/c const prop lint runs in + // `mir_drops_elaborated_and_const_checked`, which happens before + // optimized MIR. Only after optimizing the MIR can we guarantee + // that the `RevealAll` pass has happened and that the body's consts + // are normalized, so any call to resolve before that needs to be + // manually normalized. + let val = self.tcx.try_normalize_erasing_regions(self.param_env, c.literal).ok()?; + + self.use_ecx(source_info, |this| this.ecx.eval_mir_constant(&val, Some(c.span), None)) } /// Returns the value, if any, of evaluating `place`. diff --git a/compiler/rustc_mir_transform/src/copy_prop.rs b/compiler/rustc_mir_transform/src/copy_prop.rs index f27beb64a14..c155048c98b 100644 --- a/compiler/rustc_mir_transform/src/copy_prop.rs +++ b/compiler/rustc_mir_transform/src/copy_prop.rs @@ -1,5 +1,5 @@ use rustc_index::bit_set::BitSet; -use rustc_index::vec::IndexVec; +use rustc_index::vec::IndexSlice; use rustc_middle::mir::visit::*; use rustc_middle::mir::*; use rustc_middle::ty::TyCtxt; @@ -102,7 +102,7 @@ struct Replacer<'a, 'tcx> { fully_moved: BitSet<Local>, storage_to_remove: BitSet<Local>, borrowed_locals: BitSet<Local>, - copy_classes: &'a IndexVec<Local, Local>, + copy_classes: &'a IndexSlice<Local, Local>, } impl<'tcx> MutVisitor<'tcx> for Replacer<'_, 'tcx> { diff --git a/compiler/rustc_mir_transform/src/coverage/graph.rs b/compiler/rustc_mir_transform/src/coverage/graph.rs index 49028ca4e5e..6a73f2a6578 100644 --- a/compiler/rustc_mir_transform/src/coverage/graph.rs +++ b/compiler/rustc_mir_transform/src/coverage/graph.rs @@ -5,7 +5,7 @@ use rustc_data_structures::fx::FxHashMap; use rustc_data_structures::graph::dominators::{self, Dominators}; use rustc_data_structures::graph::{self, GraphSuccessors, WithNumNodes, WithStartNode}; use rustc_index::bit_set::BitSet; -use rustc_index::vec::IndexVec; +use rustc_index::vec::{IndexSlice, IndexVec}; use rustc_middle::mir::coverage::*; use rustc_middle::mir::{self, BasicBlock, BasicBlockData, Terminator, TerminatorKind}; @@ -37,8 +37,7 @@ impl CoverageGraph { // `SwitchInt` to have multiple targets to the same destination `BasicBlock`, so // de-duplication is required. This is done without reordering the successors. - let bcbs_len = bcbs.len(); - let mut seen = IndexVec::from_elem_n(false, bcbs_len); + let mut seen = IndexVec::from_elem(false, &bcbs); let successors = IndexVec::from_fn_n( |bcb| { for b in seen.iter_mut() { @@ -60,7 +59,7 @@ impl CoverageGraph { bcbs.len(), ); - let mut predecessors = IndexVec::from_elem_n(Vec::new(), bcbs.len()); + let mut predecessors = IndexVec::from_elem(Vec::new(), &bcbs); for (bcb, bcb_successors) in successors.iter_enumerated() { for &successor in bcb_successors { predecessors[successor].push(bcb); @@ -176,10 +175,10 @@ impl CoverageGraph { fn add_basic_coverage_block( bcbs: &mut IndexVec<BasicCoverageBlock, BasicCoverageBlockData>, - bb_to_bcb: &mut IndexVec<BasicBlock, Option<BasicCoverageBlock>>, + bb_to_bcb: &mut IndexSlice<BasicBlock, Option<BasicCoverageBlock>>, basic_blocks: Vec<BasicBlock>, ) { - let bcb = BasicCoverageBlock::from_usize(bcbs.len()); + let bcb = bcbs.next_index(); for &bb in basic_blocks.iter() { bb_to_bcb[bb] = Some(bcb); } diff --git a/compiler/rustc_mir_transform/src/generator.rs b/compiler/rustc_mir_transform/src/generator.rs index 50538248d91..af6422c7246 100644 --- a/compiler/rustc_mir_transform/src/generator.rs +++ b/compiler/rustc_mir_transform/src/generator.rs @@ -274,7 +274,7 @@ impl<'tcx> TransformVisitor<'tcx> { statements.push(Statement { kind: StatementKind::Assign(Box::new(( Place::return_place(), - Rvalue::Aggregate(Box::new(kind), vec![]), + Rvalue::Aggregate(Box::new(kind), IndexVec::new()), ))), source_info, }); @@ -287,7 +287,7 @@ impl<'tcx> TransformVisitor<'tcx> { statements.push(Statement { kind: StatementKind::Assign(Box::new(( Place::return_place(), - Rvalue::Aggregate(Box::new(kind), vec![val]), + Rvalue::Aggregate(Box::new(kind), IndexVec::from_iter([val])), ))), source_info, }); diff --git a/compiler/rustc_mir_transform/src/lower_slice_len.rs b/compiler/rustc_mir_transform/src/lower_slice_len.rs index c6e7468aab4..101fae2f08c 100644 --- a/compiler/rustc_mir_transform/src/lower_slice_len.rs +++ b/compiler/rustc_mir_transform/src/lower_slice_len.rs @@ -3,7 +3,7 @@ use crate::MirPass; use rustc_hir::def_id::DefId; -use rustc_index::vec::IndexVec; +use rustc_index::vec::IndexSlice; use rustc_middle::mir::*; use rustc_middle::ty::{self, TyCtxt}; @@ -42,7 +42,7 @@ struct SliceLenPatchInformation<'tcx> { fn lower_slice_len_call<'tcx>( tcx: TyCtxt<'tcx>, block: &mut BasicBlockData<'tcx>, - local_decls: &IndexVec<Local, LocalDecl<'tcx>>, + local_decls: &IndexSlice<Local, LocalDecl<'tcx>>, slice_len_fn_item_def_id: DefId, ) { let mut patch_found: Option<SliceLenPatchInformation<'_>> = None; diff --git a/compiler/rustc_mir_transform/src/simplify.rs b/compiler/rustc_mir_transform/src/simplify.rs index 5bdb8ab6bfc..c79e1cf0805 100644 --- a/compiler/rustc_mir_transform/src/simplify.rs +++ b/compiler/rustc_mir_transform/src/simplify.rs @@ -29,7 +29,7 @@ use crate::MirPass; use rustc_data_structures::fx::{FxHashSet, FxIndexSet}; -use rustc_index::vec::{Idx, IndexVec}; +use rustc_index::vec::{Idx, IndexSlice, IndexVec}; use rustc_middle::mir::coverage::*; use rustc_middle::mir::visit::{MutVisitor, MutatingUseContext, PlaceContext, Visitor}; use rustc_middle::mir::*; @@ -67,7 +67,7 @@ impl<'tcx> MirPass<'tcx> for SimplifyCfg { } pub struct CfgSimplifier<'a, 'tcx> { - basic_blocks: &'a mut IndexVec<BasicBlock, BasicBlockData<'tcx>>, + basic_blocks: &'a mut IndexSlice<BasicBlock, BasicBlockData<'tcx>>, pred_count: IndexVec<BasicBlock, u32>, } @@ -369,8 +369,8 @@ pub fn remove_dead_blocks<'tcx>(tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) { /// instances in a single body, so the strategy described above is applied to /// coverage counters from each instance individually. fn save_unreachable_coverage( - basic_blocks: &mut IndexVec<BasicBlock, BasicBlockData<'_>>, - source_scopes: &IndexVec<SourceScope, SourceScopeData<'_>>, + basic_blocks: &mut IndexSlice<BasicBlock, BasicBlockData<'_>>, + source_scopes: &IndexSlice<SourceScope, SourceScopeData<'_>>, first_dead_block: usize, ) { // Identify instances that still have some live coverage counters left. @@ -489,7 +489,7 @@ fn make_local_map<V>( local_decls: &mut IndexVec<Local, V>, used_locals: &UsedLocals, ) -> IndexVec<Local, Option<Local>> { - let mut map: IndexVec<Local, Option<Local>> = IndexVec::from_elem(None, &*local_decls); + let mut map: IndexVec<Local, Option<Local>> = IndexVec::from_elem(None, local_decls); let mut used = Local::new(0); for alive_index in local_decls.indices() { diff --git a/compiler/rustc_mir_transform/src/ssa.rs b/compiler/rustc_mir_transform/src/ssa.rs index 73168652f8f..be026402dd5 100644 --- a/compiler/rustc_mir_transform/src/ssa.rs +++ b/compiler/rustc_mir_transform/src/ssa.rs @@ -1,7 +1,7 @@ use either::Either; use rustc_data_structures::graph::dominators::Dominators; use rustc_index::bit_set::BitSet; -use rustc_index::vec::IndexVec; +use rustc_index::vec::{IndexSlice, IndexVec}; use rustc_middle::middle::resolve_bound_vars::Set1; use rustc_middle::mir::visit::*; use rustc_middle::mir::*; @@ -135,7 +135,7 @@ impl SsaLocals { /// _d => _a // transitively through _c /// /// Exception: we do not see through the return place, as it cannot be substituted. - pub fn copy_classes(&self) -> &IndexVec<Local, Local> { + pub fn copy_classes(&self) -> &IndexSlice<Local, Local> { &self.copy_classes } diff --git a/compiler/rustc_monomorphize/src/collector.rs b/compiler/rustc_monomorphize/src/collector.rs index d34fa39352f..f41edff8513 100644 --- a/compiler/rustc_monomorphize/src/collector.rs +++ b/compiler/rustc_monomorphize/src/collector.rs @@ -651,8 +651,8 @@ fn check_type_length_limit<'tcx>(tcx: TyCtxt<'tcx>, instance: Instance<'tcx>) { let (shrunk, written_to_path) = shrunk_instance_name(tcx, &instance); let span = tcx.def_span(instance.def_id()); let mut path = PathBuf::new(); - let was_written = if written_to_path.is_some() { - path = written_to_path.unwrap(); + let was_written = if let Some(path2) = written_to_path { + path = path2; Some(()) } else { None diff --git a/compiler/rustc_monomorphize/src/partitioning/default.rs b/compiler/rustc_monomorphize/src/partitioning/default.rs index 50bcc3336d6..482b78d42e3 100644 --- a/compiler/rustc_monomorphize/src/partitioning/default.rs +++ b/compiler/rustc_monomorphize/src/partitioning/default.rs @@ -89,10 +89,7 @@ impl<'tcx> Partitioner<'tcx> for DefaultPartitioning { } PreInliningPartitioning { - codegen_units: codegen_units - .into_iter() - .map(|(_, codegen_unit)| codegen_unit) - .collect(), + codegen_units: codegen_units.into_values().map(|codegen_unit| codegen_unit).collect(), roots, internalization_candidates, } diff --git a/compiler/rustc_parse/messages.ftl b/compiler/rustc_parse/messages.ftl index 96765c296e7..e21bbd0217b 100644 --- a/compiler/rustc_parse/messages.ftl +++ b/compiler/rustc_parse/messages.ftl @@ -734,3 +734,7 @@ parse_unknown_start_of_token = unknown start of token: {$escaped} parse_box_syntax_removed = `box_syntax` has been removed .suggestion = use `Box::new()` instead + +parse_bad_return_type_notation_output = + return type not allowed with return type notation + .suggestion = remove the return type diff --git a/compiler/rustc_parse/src/errors.rs b/compiler/rustc_parse/src/errors.rs index a9d116012ae..aead216b61c 100644 --- a/compiler/rustc_parse/src/errors.rs +++ b/compiler/rustc_parse/src/errors.rs @@ -2316,3 +2316,11 @@ pub struct BoxSyntaxRemoved<'a> { pub span: Span, pub code: &'a str, } + +#[derive(Diagnostic)] +#[diag(parse_bad_return_type_notation_output)] +pub(crate) struct BadReturnTypeNotationOutput { + #[primary_span] + #[suggestion(code = "", applicability = "maybe-incorrect")] + pub span: Span, +} diff --git a/compiler/rustc_parse/src/parser/diagnostics.rs b/compiler/rustc_parse/src/parser/diagnostics.rs index 9544afd3d6d..5210b8fe69d 100644 --- a/compiler/rustc_parse/src/parser/diagnostics.rs +++ b/compiler/rustc_parse/src/parser/diagnostics.rs @@ -989,8 +989,7 @@ impl<'a> Parser<'a> { } if self.token.kind == token::OpenDelim(Delimiter::Parenthesis) { // Recover from bad turbofish: `foo.collect::Vec<_>()`. - let args = AngleBracketedArgs { args, span }.into(); - segment.args = args; + segment.args = Some(AngleBracketedArgs { args, span }.into()); self.sess.emit_err(GenericParamsWithoutAngleBrackets { span, diff --git a/compiler/rustc_parse/src/parser/item.rs b/compiler/rustc_parse/src/parser/item.rs index ae8fe90e9d6..6422b8ac1ba 100644 --- a/compiler/rustc_parse/src/parser/item.rs +++ b/compiler/rustc_parse/src/parser/item.rs @@ -3,6 +3,7 @@ use crate::errors; use super::diagnostics::{dummy_arg, ConsumeClosingDelim}; use super::ty::{AllowPlus, RecoverQPath, RecoverReturnSign}; use super::{AttrWrapper, FollowedByType, ForceCollect, Parser, PathStyle, TrailingToken}; +use ast::StaticItem; use rustc_ast::ast::*; use rustc_ast::ptr::P; use rustc_ast::token::{self, Delimiter, TokenKind}; @@ -227,7 +228,7 @@ impl<'a> Parser<'a> { self.bump(); // `static` let m = self.parse_mutability(); let (ident, ty, expr) = self.parse_item_global(Some(m))?; - (ident, ItemKind::Static(ty, m, expr)) + (ident, ItemKind::Static(Box::new(StaticItem { ty, mutability: m, expr }))) } else if let Const::Yes(const_span) = self.parse_constness(Case::Sensitive) { // CONST ITEM if self.token.is_keyword(kw::Impl) { @@ -236,7 +237,7 @@ impl<'a> Parser<'a> { } else { self.recover_const_mut(const_span); let (ident, ty, expr) = self.parse_item_global(None)?; - (ident, ItemKind::Const(def_(), ty, expr)) + (ident, ItemKind::Const(Box::new(ConstItem { defaultness: def_(), ty, expr }))) } } else if self.check_keyword(kw::Trait) || self.check_auto_or_unsafe_trait_item() { // TRAIT ITEM @@ -862,9 +863,13 @@ impl<'a> Parser<'a> { let kind = match AssocItemKind::try_from(kind) { Ok(kind) => kind, Err(kind) => match kind { - ItemKind::Static(a, _, b) => { + ItemKind::Static(box StaticItem { ty, mutability: _, expr }) => { self.sess.emit_err(errors::AssociatedStaticItemNotAllowed { span }); - AssocItemKind::Const(Defaultness::Final, a, b) + AssocItemKind::Const(Box::new(ConstItem { + defaultness: Defaultness::Final, + ty, + expr, + })) } _ => return self.error_bad_item_kind(span, &kind, "`trait`s or `impl`s"), }, @@ -1114,12 +1119,12 @@ impl<'a> Parser<'a> { let kind = match ForeignItemKind::try_from(kind) { Ok(kind) => kind, Err(kind) => match kind { - ItemKind::Const(_, a, b) => { + ItemKind::Const(box ConstItem { ty, expr, .. }) => { self.sess.emit_err(errors::ExternItemCannotBeConst { ident_span: ident.span, const_span: span.with_hi(ident.span.lo()), }); - ForeignItemKind::Static(a, Mutability::Not, b) + ForeignItemKind::Static(ty, Mutability::Not, expr) } _ => return self.error_bad_item_kind(span, &kind, "`extern` blocks"), }, diff --git a/compiler/rustc_parse/src/parser/path.rs b/compiler/rustc_parse/src/parser/path.rs index b50d2984a4e..f1c9f0109f8 100644 --- a/compiler/rustc_parse/src/parser/path.rs +++ b/compiler/rustc_parse/src/parser/path.rs @@ -1,6 +1,6 @@ use super::ty::{AllowPlus, RecoverQPath, RecoverReturnSign}; use super::{Parser, Restrictions, TokenType}; -use crate::maybe_whole; +use crate::{errors, maybe_whole}; use rustc_ast::ptr::P; use rustc_ast::token::{self, Delimiter, Token, TokenKind}; use rustc_ast::{ @@ -290,6 +290,25 @@ impl<'a> Parser<'a> { })?; let span = lo.to(self.prev_token.span); AngleBracketedArgs { args, span }.into() + } else if self.token.kind == token::OpenDelim(Delimiter::Parenthesis) + // FIXME(return_type_notation): Could also recover `...` here. + && self.look_ahead(1, |tok| tok.kind == token::DotDot) + { + let lo = self.token.span; + self.bump(); + self.bump(); + self.expect(&token::CloseDelim(Delimiter::Parenthesis))?; + let span = lo.to(self.prev_token.span); + self.sess.gated_spans.gate(sym::return_type_notation, span); + + if self.eat_noexpect(&token::RArrow) { + let lo = self.prev_token.span; + let ty = self.parse_ty()?; + self.sess + .emit_err(errors::BadReturnTypeNotationOutput { span: lo.to(ty.span) }); + } + + P(GenericArgs::ReturnTypeNotation(span)) } else { // `(T, U) -> R` let (inputs, _) = self.parse_paren_comma_seq(|p| p.parse_ty())?; @@ -300,7 +319,7 @@ impl<'a> Parser<'a> { ParenthesizedArgs { span, inputs, inputs_span, output }.into() }; - PathSegment { ident, args, id: ast::DUMMY_NODE_ID } + PathSegment { ident, args: Some(args), id: ast::DUMMY_NODE_ID } } else { // Generic arguments are not found. PathSegment::from_ident(ident) @@ -550,7 +569,13 @@ impl<'a> Parser<'a> { // Gate associated type bounds, e.g., `Iterator<Item: Ord>`. if let AssocConstraintKind::Bound { .. } = kind { - self.sess.gated_spans.gate(sym::associated_type_bounds, span); + if gen_args.as_ref().map_or(false, |args| { + matches!(args, GenericArgs::ReturnTypeNotation(..)) + }) { + // This is already gated in `parse_path_segment` + } else { + self.sess.gated_spans.gate(sym::associated_type_bounds, span); + } } let constraint = AssocConstraint { id: ast::DUMMY_NODE_ID, ident, gen_args, kind, span }; diff --git a/compiler/rustc_parse/src/parser/ty.rs b/compiler/rustc_parse/src/parser/ty.rs index 3d9d2cc62e3..400c8dbe9bc 100644 --- a/compiler/rustc_parse/src/parser/ty.rs +++ b/compiler/rustc_parse/src/parser/ty.rs @@ -1059,8 +1059,11 @@ impl<'a> Parser<'a> { output, } .into(); - *fn_path_segment = - ast::PathSegment { ident: fn_path_segment.ident, args, id: ast::DUMMY_NODE_ID }; + *fn_path_segment = ast::PathSegment { + ident: fn_path_segment.ident, + args: Some(args), + id: ast::DUMMY_NODE_ID, + }; // Convert parsed `<'a>` in `Fn<'a>` into `for<'a>`. let mut generic_params = lifetimes diff --git a/compiler/rustc_passes/messages.ftl b/compiler/rustc_passes/messages.ftl index d063b51c8b8..b354dca7cc4 100644 --- a/compiler/rustc_passes/messages.ftl +++ b/compiler/rustc_passes/messages.ftl @@ -148,9 +148,6 @@ passes_doc_test_unknown = passes_doc_test_takes_list = `#[doc(test(...)]` takes a list of attributes -passes_doc_primitive = - `doc(primitive)` should never have been stable - passes_doc_cfg_hide_takes_list = `#[doc(cfg_hide(...)]` takes a list of attributes diff --git a/compiler/rustc_passes/src/check_attr.rs b/compiler/rustc_passes/src/check_attr.rs index 1c459edabb8..80a93da2b45 100644 --- a/compiler/rustc_passes/src/check_attr.rs +++ b/compiler/rustc_passes/src/check_attr.rs @@ -1109,17 +1109,6 @@ impl CheckAttrVisitor<'_> { } } - sym::primitive => { - if !self.tcx.features().rustdoc_internals { - self.tcx.emit_spanned_lint( - INVALID_DOC_ATTRIBUTES, - hir_id, - i_meta.span, - errors::DocPrimitive, - ); - } - } - _ => { let path = rustc_ast_pretty::pprust::path_to_string(&i_meta.path); if i_meta.has_name(sym::spotlight) { diff --git a/compiler/rustc_passes/src/entry.rs b/compiler/rustc_passes/src/entry.rs index f3e683f4b3a..8c3dff23b27 100644 --- a/compiler/rustc_passes/src/entry.rs +++ b/compiler/rustc_passes/src/entry.rs @@ -206,7 +206,7 @@ fn no_main_err(tcx: TyCtxt<'_>, visitor: &EntryContext<'_>) { // The file may be empty, which leads to the diagnostic machinery not emitting this // note. This is a relatively simple way to detect that case and emit a span-less // note instead. - let file_empty = !tcx.sess.source_map().lookup_line(sp.hi()).is_ok(); + let file_empty = tcx.sess.source_map().lookup_line(sp.hi()).is_err(); tcx.sess.emit_err(NoMainErr { sp, diff --git a/compiler/rustc_passes/src/errors.rs b/compiler/rustc_passes/src/errors.rs index 1b0cd5d91ab..139ba8c9677 100644 --- a/compiler/rustc_passes/src/errors.rs +++ b/compiler/rustc_passes/src/errors.rs @@ -289,10 +289,6 @@ pub struct DocTestTakesList; pub struct DocCfgHideTakesList; #[derive(LintDiagnostic)] -#[diag(passes_doc_primitive)] -pub struct DocPrimitive; - -#[derive(LintDiagnostic)] #[diag(passes_doc_test_unknown_any)] pub struct DocTestUnknownAny { pub path: String, diff --git a/compiler/rustc_passes/src/hir_stats.rs b/compiler/rustc_passes/src/hir_stats.rs index 47e032758f2..ce44f709f3b 100644 --- a/compiler/rustc_passes/src/hir_stats.rs +++ b/compiler/rustc_passes/src/hir_stats.rs @@ -666,7 +666,7 @@ impl<'v> ast_visit::Visitor<'v> for StatCollector<'v> { fn visit_generic_args(&mut self, g: &'v ast::GenericArgs) { record_variants!( (self, g, g, Id::None, ast, GenericArgs, GenericArgs), - [AngleBracketed, Parenthesized] + [AngleBracketed, Parenthesized, ReturnTypeNotation] ); ast_visit::walk_generic_args(self, g) } diff --git a/compiler/rustc_resolve/src/build_reduced_graph.rs b/compiler/rustc_resolve/src/build_reduced_graph.rs index 19ccb3a6484..49c41470a15 100644 --- a/compiler/rustc_resolve/src/build_reduced_graph.rs +++ b/compiler/rustc_resolve/src/build_reduced_graph.rs @@ -688,8 +688,8 @@ impl<'a, 'b, 'tcx> BuildReducedGraphVisitor<'a, 'b, 'tcx> { } // These items live in the value namespace. - ItemKind::Static(_, mt, _) => { - let res = Res::Def(DefKind::Static(mt), def_id); + ItemKind::Static(box ast::StaticItem { mutability, .. }) => { + let res = Res::Def(DefKind::Static(mutability), def_id); self.r.define(parent, ident, ValueNS, (res, vis, sp, expansion)); } ItemKind::Const(..) => { diff --git a/compiler/rustc_resolve/src/diagnostics.rs b/compiler/rustc_resolve/src/diagnostics.rs index 44a3d4e628e..e69a9d0aeca 100644 --- a/compiler/rustc_resolve/src/diagnostics.rs +++ b/compiler/rustc_resolve/src/diagnostics.rs @@ -1669,8 +1669,8 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> { ) -> Option<Symbol> { let mut candidates = self .extern_prelude - .iter() - .map(|(ident, _)| ident.name) + .keys() + .map(|ident| ident.name) .chain( self.module_map .iter() @@ -2007,7 +2007,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> { // 1) some consistent ordering for emitted diagnostics, and // 2) `std` suggestions before `core` suggestions. let mut extern_crate_names = - self.extern_prelude.iter().map(|(ident, _)| ident.name).collect::<Vec<_>>(); + self.extern_prelude.keys().map(|ident| ident.name).collect::<Vec<_>>(); extern_crate_names.sort_by(|a, b| b.as_str().partial_cmp(a.as_str()).unwrap()); for name in extern_crate_names.into_iter() { diff --git a/compiler/rustc_resolve/src/ident.rs b/compiler/rustc_resolve/src/ident.rs index 52f0b65fad6..7ff440e49aa 100644 --- a/compiler/rustc_resolve/src/ident.rs +++ b/compiler/rustc_resolve/src/ident.rs @@ -389,7 +389,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> { } } - assert!(force || !finalize.is_some()); // `finalize` implies `force` + assert!(force || finalize.is_none()); // `finalize` implies `force` // Make sure `self`, `super` etc produce an error when passed to here. if orig_ident.is_path_segment_keyword() { @@ -869,17 +869,19 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> { let resolution = self.resolution(module, key).try_borrow_mut().map_err(|_| (Determined, Weak::No))?; // This happens when there is a cycle of imports. - if let Some(Finalize { path_span, report_private, .. }) = finalize { - // If the primary binding is unusable, search further and return the shadowed glob - // binding if it exists. What we really want here is having two separate scopes in - // a module - one for non-globs and one for globs, but until that's done use this - // hack to avoid inconsistent resolution ICEs during import validation. - let binding = [resolution.binding, resolution.shadowed_glob].into_iter().find_map( - |binding| match (binding, ignore_binding) { + // If the primary binding is unusable, search further and return the shadowed glob + // binding if it exists. What we really want here is having two separate scopes in + // a module - one for non-globs and one for globs, but until that's done use this + // hack to avoid inconsistent resolution ICEs during import validation. + let binding = + [resolution.binding, resolution.shadowed_glob].into_iter().find_map(|binding| { + match (binding, ignore_binding) { (Some(binding), Some(ignored)) if ptr::eq(binding, ignored) => None, _ => binding, - }, - ); + } + }); + + if let Some(Finalize { path_span, report_private, .. }) = finalize { let Some(binding) = binding else { return Err((Determined, Weak::No)); }; @@ -927,15 +929,12 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> { } let check_usable = |this: &mut Self, binding: &'a NameBinding<'a>| { - if let Some(ignored) = ignore_binding && ptr::eq(binding, ignored) { - return Err((Determined, Weak::No)); - } let usable = this.is_accessible_from(binding.vis, parent_scope.module); if usable { Ok(binding) } else { Err((Determined, Weak::No)) } }; // Items and single imports are not shadowable, if we have one, then it's determined. - if let Some(binding) = resolution.binding { + if let Some(binding) = binding { if !binding.is_glob_import() { return check_usable(self, binding); } @@ -952,6 +951,14 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> { if !self.is_accessible_from(import_vis, parent_scope.module) { continue; } + if let Some(ignored) = ignore_binding && + let NameBindingKind::Import { import, .. } = ignored.kind && + ptr::eq(import, &**single_import) { + // Ignore not just the binding itself, but if it has a shadowed_glob, + // ignore that, too, because this loop is supposed to only process + // named imports. + continue; + } let Some(module) = single_import.imported_module.get() else { return Err((Undetermined, Weak::No)); }; @@ -989,7 +996,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> { // and prohibit access to macro-expanded `macro_export` macros instead (unless restricted // shadowing is enabled, see `macro_expanded_macro_export_errors`). let unexpanded_macros = !module.unexpanded_invocations.borrow().is_empty(); - if let Some(binding) = resolution.binding { + if let Some(binding) = binding { if !unexpanded_macros || ns == MacroNS || restricted_shadowing { return check_usable(self, binding); } else { diff --git a/compiler/rustc_resolve/src/late.rs b/compiler/rustc_resolve/src/late.rs index 4ca54bab31a..19f46d45af6 100644 --- a/compiler/rustc_resolve/src/late.rs +++ b/compiler/rustc_resolve/src/late.rs @@ -1110,6 +1110,7 @@ impl<'a: 'ast, 'ast, 'tcx> Visitor<'ast> for LateResolutionVisitor<'a, '_, 'ast, } } } + GenericArgs::ReturnTypeNotation(_span) => {} } } } @@ -2345,7 +2346,8 @@ impl<'a: 'ast, 'b, 'ast, 'tcx> LateResolutionVisitor<'a, 'b, 'ast, 'tcx> { }); } - ItemKind::Static(ref ty, _, ref expr) | ItemKind::Const(_, ref ty, ref expr) => { + ItemKind::Static(box ast::StaticItem { ref ty, ref expr, .. }) + | ItemKind::Const(box ast::ConstItem { ref ty, ref expr, .. }) => { self.with_static_rib(|this| { this.with_lifetime_rib(LifetimeRibKind::Elided(LifetimeRes::Static), |this| { this.visit_ty(ty); @@ -2420,8 +2422,7 @@ impl<'a: 'ast, 'b, 'ast, 'tcx> LateResolutionVisitor<'a, 'b, 'ast, 'tcx> { .iter() .rfind(|r| matches!(r.kind, ItemRibKind(_))) .expect("associated item outside of an item"); - seen_bindings - .extend(parent_rib.bindings.iter().map(|(ident, _)| (*ident, ident.span))); + seen_bindings.extend(parent_rib.bindings.keys().map(|ident| (*ident, ident.span))); }; add_bindings_for_ns(ValueNS); add_bindings_for_ns(TypeNS); @@ -2624,11 +2625,11 @@ impl<'a: 'ast, 'b, 'ast, 'tcx> LateResolutionVisitor<'a, 'b, 'ast, 'tcx> { for item in trait_items { self.resolve_doc_links(&item.attrs, MaybeExported::Ok(item.id)); match &item.kind { - AssocItemKind::Const(_, ty, default) => { + AssocItemKind::Const(box ast::ConstItem { ty, expr, .. }) => { self.visit_ty(ty); // Only impose the restrictions of `ConstRibKind` for an // actual constant expression in a provided default. - if let Some(expr) = default { + if let Some(expr) = expr { // We allow arbitrary const expressions inside of associated consts, // even if they are potentially not const evaluatable. // @@ -2799,7 +2800,7 @@ impl<'a: 'ast, 'b, 'ast, 'tcx> LateResolutionVisitor<'a, 'b, 'ast, 'tcx> { use crate::ResolutionError::*; self.resolve_doc_links(&item.attrs, MaybeExported::ImplItem(trait_id.ok_or(&item.vis))); match &item.kind { - AssocItemKind::Const(_, ty, default) => { + AssocItemKind::Const(box ast::ConstItem { ty, expr, .. }) => { debug!("resolve_implementation AssocItemKind::Const"); // If this is a trait impl, ensure the const // exists in trait @@ -2814,7 +2815,7 @@ impl<'a: 'ast, 'b, 'ast, 'tcx> LateResolutionVisitor<'a, 'b, 'ast, 'tcx> { ); self.visit_ty(ty); - if let Some(expr) = default { + if let Some(expr) = expr { // We allow arbitrary const expressions inside of associated consts, // even if they are potentially not const evaluatable. // diff --git a/compiler/rustc_resolve/src/lib.rs b/compiler/rustc_resolve/src/lib.rs index 0e84432a5b4..99fad22d4a1 100644 --- a/compiler/rustc_resolve/src/lib.rs +++ b/compiler/rustc_resolve/src/lib.rs @@ -312,6 +312,7 @@ impl<'a> From<&'a ast::PathSegment> for Segment { (args.span, found_lifetimes) } GenericArgs::Parenthesized(args) => (args.span, true), + GenericArgs::ReturnTypeNotation(span) => (*span, false), } } else { (DUMMY_SP, false) diff --git a/compiler/rustc_resolve/src/rustdoc.rs b/compiler/rustc_resolve/src/rustdoc.rs index 44a27bbc175..9eae99be2e9 100644 --- a/compiler/rustc_resolve/src/rustdoc.rs +++ b/compiler/rustc_resolve/src/rustdoc.rs @@ -339,12 +339,14 @@ pub fn inner_docs(attrs: &[ast::Attribute]) -> bool { attrs.iter().find(|a| a.doc_str().is_some()).map_or(true, |a| a.style == ast::AttrStyle::Inner) } -/// Has `#[doc(primitive)]` or `#[doc(keyword)]`. +/// Has `#[rustc_doc_primitive]` or `#[doc(keyword)]`. pub fn has_primitive_or_keyword_docs(attrs: &[ast::Attribute]) -> bool { for attr in attrs { - if attr.has_name(sym::doc) && let Some(items) = attr.meta_item_list() { + if attr.has_name(sym::rustc_doc_primitive) { + return true; + } else if attr.has_name(sym::doc) && let Some(items) = attr.meta_item_list() { for item in items { - if item.has_name(sym::primitive) || item.has_name(sym::keyword) { + if item.has_name(sym::keyword) { return true; } } diff --git a/compiler/rustc_session/src/config.rs b/compiler/rustc_session/src/config.rs index 485c3f55462..1d8fedb8bd7 100644 --- a/compiler/rustc_session/src/config.rs +++ b/compiler/rustc_session/src/config.rs @@ -260,6 +260,8 @@ pub enum SymbolManglingVersion { #[derive(Clone, Copy, Debug, PartialEq, Hash)] pub enum DebugInfo { None, + LineDirectivesOnly, + LineTablesOnly, Limited, Full, } @@ -1979,11 +1981,7 @@ fn parse_opt_level( } } -fn select_debuginfo( - matches: &getopts::Matches, - cg: &CodegenOptions, - error_format: ErrorOutputType, -) -> DebugInfo { +fn select_debuginfo(matches: &getopts::Matches, cg: &CodegenOptions) -> DebugInfo { let max_g = matches.opt_positions("g").into_iter().max(); let max_c = matches .opt_strs_pos("C") @@ -1993,24 +1991,7 @@ fn select_debuginfo( if let Some("debuginfo") = s.split('=').next() { Some(i) } else { None } }) .max(); - if max_g > max_c { - DebugInfo::Full - } else { - match cg.debuginfo { - 0 => DebugInfo::None, - 1 => DebugInfo::Limited, - 2 => DebugInfo::Full, - arg => { - early_error( - error_format, - &format!( - "debug info level needs to be between \ - 0-2 (instead was `{arg}`)" - ), - ); - } - } - } + if max_g > max_c { DebugInfo::Full } else { cg.debuginfo } } pub(crate) fn parse_assert_incr_state( @@ -2498,7 +2479,7 @@ pub fn build_session_options(matches: &getopts::Matches) -> Options { // to use them interchangeably. See the note above (regarding `-O` and `-C opt-level`) // for more details. let debug_assertions = cg.debug_assertions.unwrap_or(opt_level == OptLevel::No); - let debuginfo = select_debuginfo(matches, &cg, error_format); + let debuginfo = select_debuginfo(matches, &cg); let mut search_paths = vec![]; for s in &matches.opt_strs("L") { diff --git a/compiler/rustc_session/src/options.rs b/compiler/rustc_session/src/options.rs index c75af48e80a..631dd0a2146 100644 --- a/compiler/rustc_session/src/options.rs +++ b/compiler/rustc_session/src/options.rs @@ -377,6 +377,7 @@ mod desc { pub const parse_cfguard: &str = "either a boolean (`yes`, `no`, `on`, `off`, etc), `checks`, or `nochecks`"; pub const parse_cfprotection: &str = "`none`|`no`|`n` (default), `branch`, `return`, or `full`|`yes`|`y` (equivalent to `branch` and `return`)"; + pub const parse_debuginfo: &str = "either an integer (0, 1, 2), `none`, `line-directives-only`, `line-tables-only`, `limited`, or `full`"; pub const parse_strip: &str = "either `none`, `debuginfo`, or `symbols`"; pub const parse_linker_flavor: &str = ::rustc_target::spec::LinkerFlavorCli::one_of(); pub const parse_optimization_fuel: &str = "crate=integer"; @@ -767,6 +768,18 @@ mod parse { true } + pub(crate) fn parse_debuginfo(slot: &mut DebugInfo, v: Option<&str>) -> bool { + match v { + Some("0") | Some("none") => *slot = DebugInfo::None, + Some("line-directives-only") => *slot = DebugInfo::LineDirectivesOnly, + Some("line-tables-only") => *slot = DebugInfo::LineTablesOnly, + Some("1") | Some("limited") => *slot = DebugInfo::Limited, + Some("2") | Some("full") => *slot = DebugInfo::Full, + _ => return false, + } + true + } + pub(crate) fn parse_linker_flavor(slot: &mut Option<LinkerFlavorCli>, v: Option<&str>) -> bool { match v.and_then(LinkerFlavorCli::from_str) { Some(lf) => *slot = Some(lf), @@ -911,7 +924,7 @@ mod parse { let mut seen_instruction_threshold = false; let mut seen_skip_entry = false; let mut seen_skip_exit = false; - for option in v.into_iter().map(|v| v.split(',')).flatten() { + for option in v.into_iter().flat_map(|v| v.split(',')) { match option { "always" if !seen_always && !seen_never => { options.always = true; @@ -1217,9 +1230,9 @@ options! { "use Windows Control Flow Guard (default: no)"), debug_assertions: Option<bool> = (None, parse_opt_bool, [TRACKED], "explicitly enable the `cfg(debug_assertions)` directive"), - debuginfo: usize = (0, parse_number, [TRACKED], - "debug info emission level (0 = no debug info, 1 = line tables only, \ - 2 = full debug info with variable and type information; default: 0)"), + debuginfo: DebugInfo = (DebugInfo::None, parse_debuginfo, [TRACKED], + "debug info emission level (0-2, none, line-directives-only, \ + line-tables-only, limited, or full; default: 0)"), default_linker_libraries: bool = (false, parse_bool, [UNTRACKED], "allow the linker to link its default libraries (default: no)"), embed_bitcode: bool = (true, parse_bool, [TRACKED], diff --git a/compiler/rustc_span/src/hygiene.rs b/compiler/rustc_span/src/hygiene.rs index d727aba6de5..0bb42a3a71f 100644 --- a/compiler/rustc_span/src/hygiene.rs +++ b/compiler/rustc_span/src/hygiene.rs @@ -109,7 +109,7 @@ fn assert_default_hashing_controls<CTX: HashStableContext>(ctx: &CTX, msg: &str) // This is the case for instance when building a hash for name mangling. // Such configuration must not be used for metadata. HashingControls { hash_spans } - if hash_spans == !ctx.unstable_opts_incremental_ignore_spans() => {} + if hash_spans != ctx.unstable_opts_incremental_ignore_spans() => {} other => panic!("Attempted hashing of {msg} with non-default HashingControls: {other:?}"), } } diff --git a/compiler/rustc_span/src/lib.rs b/compiler/rustc_span/src/lib.rs index 02cffc762be..e14760aa018 100644 --- a/compiler/rustc_span/src/lib.rs +++ b/compiler/rustc_span/src/lib.rs @@ -87,6 +87,14 @@ pub struct SessionGlobals { symbol_interner: symbol::Interner, span_interner: Lock<span_encoding::SpanInterner>, hygiene_data: Lock<hygiene::HygieneData>, + + /// A reference to the source map in the `Session`. It's an `Option` + /// because it can't be initialized until `Session` is created, which + /// happens after `SessionGlobals`. `set_source_map` does the + /// initialization. + /// + /// This field should only be used in places where the `Session` is truly + /// not available, such as `<Span as Debug>::fmt`. source_map: Lock<Option<Lrc<SourceMap>>>, } @@ -1013,16 +1021,9 @@ impl<D: Decoder> Decodable<D> for Span { } } -/// Calls the provided closure, using the provided `SourceMap` to format -/// any spans that are debug-printed during the closure's execution. -/// -/// Normally, the global `TyCtxt` is used to retrieve the `SourceMap` -/// (see `rustc_interface::callbacks::span_debug1`). However, some parts -/// of the compiler (e.g. `rustc_parse`) may debug-print `Span`s before -/// a `TyCtxt` is available. In this case, we fall back to -/// the `SourceMap` provided to this function. If that is not available, -/// we fall back to printing the raw `Span` field values. -pub fn with_source_map<T, F: FnOnce() -> T>(source_map: Lrc<SourceMap>, f: F) -> T { +/// Insert `source_map` into the session globals for the duration of the +/// closure's execution. +pub fn set_source_map<T, F: FnOnce() -> T>(source_map: Lrc<SourceMap>, f: F) -> T { with_session_globals(|session_globals| { *session_globals.source_map.borrow_mut() = Some(source_map); }); @@ -1041,6 +1042,8 @@ pub fn with_source_map<T, F: FnOnce() -> T>(source_map: Lrc<SourceMap>, f: F) -> impl fmt::Debug for Span { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + // Use the global `SourceMap` to print the span. If that's not + // available, fall back to printing the raw values. with_session_globals(|session_globals| { if let Some(source_map) = &*session_globals.source_map.borrow() { write!(f, "{} ({:?})", source_map.span_to_diagnostic_string(*self), self.ctxt()) diff --git a/compiler/rustc_span/src/profiling.rs b/compiler/rustc_span/src/profiling.rs index 0ab890b9f01..66e5369da3a 100644 --- a/compiler/rustc_span/src/profiling.rs +++ b/compiler/rustc_span/src/profiling.rs @@ -1,3 +1,5 @@ +use crate::source_map::SourceMap; + use std::borrow::Borrow; use rustc_data_structures::profiling::EventArgRecorder; @@ -11,25 +13,17 @@ pub trait SpannedEventArgRecorder { /// /// Note: when self-profiling with costly event arguments, at least one argument /// needs to be recorded. A panic will be triggered if that doesn't happen. - fn record_arg_with_span<A>(&mut self, event_arg: A, span: crate::Span) + fn record_arg_with_span<A>(&mut self, source_map: &SourceMap, event_arg: A, span: crate::Span) where A: Borrow<str> + Into<String>; } impl SpannedEventArgRecorder for EventArgRecorder<'_> { - fn record_arg_with_span<A>(&mut self, event_arg: A, span: crate::Span) + fn record_arg_with_span<A>(&mut self, source_map: &SourceMap, event_arg: A, span: crate::Span) where A: Borrow<str> + Into<String>, { self.record_arg(event_arg); - - let span_arg = crate::with_session_globals(|session_globals| { - if let Some(source_map) = &*session_globals.source_map.borrow() { - source_map.span_to_embeddable_string(span) - } else { - format!("{span:?}") - } - }); - self.record_arg(span_arg); + self.record_arg(source_map.span_to_embeddable_string(span)); } } diff --git a/compiler/rustc_span/src/symbol.rs b/compiler/rustc_span/src/symbol.rs index d5dc1d0b315..0e55e81143d 100644 --- a/compiler/rustc_span/src/symbol.rs +++ b/compiler/rustc_span/src/symbol.rs @@ -1196,6 +1196,7 @@ symbols! { residual, result, return_position_impl_trait_in_trait, + return_type_notation, rhs, rintf32, rintf64, @@ -1246,6 +1247,7 @@ symbols! { rustc_diagnostic_macros, rustc_dirty, rustc_do_not_const_check, + rustc_doc_primitive, rustc_dummy, rustc_dump_env_program_clauses, rustc_dump_program_clauses, diff --git a/compiler/rustc_target/src/spec/armv4t_none_eabi.rs b/compiler/rustc_target/src/spec/armv4t_none_eabi.rs index 28b109889e9..d0f988b278f 100644 --- a/compiler/rustc_target/src/spec/armv4t_none_eabi.rs +++ b/compiler/rustc_target/src/spec/armv4t_none_eabi.rs @@ -4,13 +4,6 @@ //! //! Please ping @Lokathor if changes are needed. //! -//! This target profile assumes that you have the ARM binutils in your path -//! (specifically the linker, `arm-none-eabi-ld`). They can be obtained for free -//! for all major OSes from the ARM developer's website, and they may also be -//! available in your system's package manager. Unfortunately, the standard -//! linker that Rust uses (`lld`) only supports as far back as `ARMv5TE`, so we -//! must use the GNU `ld` linker. -//! //! **Important:** This target profile **does not** specify a linker script. You //! just get the default link script when you build a binary for this target. //! The default link script is very likely wrong, so you should use @@ -35,8 +28,8 @@ pub fn target() -> Target { data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(), options: TargetOptions { abi: "eabi".into(), - linker_flavor: LinkerFlavor::Gnu(Cc::No, Lld::No), - linker: Some("arm-none-eabi-ld".into()), + linker_flavor: LinkerFlavor::Gnu(Cc::No, Lld::Yes), + linker: Some("rust-lld".into()), asm_args: cvs!["-mthumb-interwork", "-march=armv4t", "-mlittle-endian",], // Force-enable 32-bit atomics, which allows the use of atomic load/store only. // The resulting atomics are ABI incompatible with atomics backed by libatomic. diff --git a/compiler/rustc_target/src/spec/thumbv4t_none_eabi.rs b/compiler/rustc_target/src/spec/thumbv4t_none_eabi.rs index e3734932f88..9c59bb9114e 100644 --- a/compiler/rustc_target/src/spec/thumbv4t_none_eabi.rs +++ b/compiler/rustc_target/src/spec/thumbv4t_none_eabi.rs @@ -4,19 +4,12 @@ //! //! Please ping @Lokathor if changes are needed. //! -//! This target profile assumes that you have the ARM binutils in your path -//! (specifically the linker, `arm-none-eabi-ld`). They can be obtained for free -//! for all major OSes from the ARM developer's website, and they may also be -//! available in your system's package manager. Unfortunately, the standard -//! linker that Rust uses (`lld`) only supports as far back as `ARMv5TE`, so we -//! must use the GNU `ld` linker. -//! //! **Important:** This target profile **does not** specify a linker script. You //! just get the default link script when you build a binary for this target. //! The default link script is very likely wrong, so you should use //! `-Clink-arg=-Tmy_script.ld` to override that with a correct linker script. -use crate::spec::{cvs, Cc, FramePointer, LinkerFlavor, Lld}; +use crate::spec::{cvs, FramePointer}; use crate::spec::{PanicStrategy, RelocModel, Target, TargetOptions}; pub fn target() -> Target { @@ -36,8 +29,6 @@ pub fn target() -> Target { data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(), options: TargetOptions { abi: "eabi".into(), - linker_flavor: LinkerFlavor::Gnu(Cc::No, Lld::No), - linker: Some("arm-none-eabi-ld".into()), // extra args passed to the external assembler (assuming `arm-none-eabi-as`): // * activate t32/a32 interworking diff --git a/compiler/rustc_trait_selection/src/traits/error_reporting/method_chain.rs b/compiler/rustc_trait_selection/src/traits/error_reporting/method_chain.rs index 13607b9079a..7e1dba4ed26 100644 --- a/compiler/rustc_trait_selection/src/traits/error_reporting/method_chain.rs +++ b/compiler/rustc_trait_selection/src/traits/error_reporting/method_chain.rs @@ -21,10 +21,6 @@ impl<'a, 'tcx> TypeRelation<'tcx> for CollectAllMismatches<'a, 'tcx> { self.infcx.tcx } - fn intercrate(&self) -> bool { - false - } - fn param_env(&self) -> ty::ParamEnv<'tcx> { self.param_env } @@ -33,10 +29,6 @@ impl<'a, 'tcx> TypeRelation<'tcx> for CollectAllMismatches<'a, 'tcx> { true } - fn mark_ambiguous(&mut self) { - bug!() - } - fn relate_with_variance<T: Relate<'tcx>>( &mut self, _: ty::Variance, diff --git a/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs b/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs index be0817472ea..fb75ec76729 100644 --- a/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs +++ b/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs @@ -3888,8 +3888,7 @@ impl<'tcx> TypeErrCtxtExt<'tcx> for TypeErrCtxt<'_, 'tcx> { if let Some(slice_ty) = candidate_impls .iter() .map(|trait_ref| trait_ref.trait_ref.self_ty()) - .filter(|t| is_slice(*t)) - .next() + .find(|t| is_slice(*t)) { let msg = &format!("convert the array to a `{}` slice instead", slice_ty); @@ -3936,7 +3935,7 @@ fn hint_missing_borrow<'tcx>( // This could be a variant constructor, for example. let Some(fn_decl) = found_node.fn_decl() else { return; }; - let args = fn_decl.inputs.iter().map(|ty| ty); + let args = fn_decl.inputs.iter(); fn get_deref_type_and_refs(mut ty: Ty<'_>) -> (Ty<'_>, Vec<hir::Mutability>) { let mut refs = vec![]; diff --git a/compiler/rustc_trait_selection/src/traits/outlives_bounds.rs b/compiler/rustc_trait_selection/src/traits/outlives_bounds.rs index 6d2dc94845d..cff3d277a78 100644 --- a/compiler/rustc_trait_selection/src/traits/outlives_bounds.rs +++ b/compiler/rustc_trait_selection/src/traits/outlives_bounds.rs @@ -110,8 +110,6 @@ impl<'a, 'tcx: 'a> InferCtxtExt<'a, 'tcx> for InferCtxt<'tcx> { body_id: LocalDefId, tys: FxIndexSet<Ty<'tcx>>, ) -> Bounds<'a, 'tcx> { - tys.into_iter() - .map(move |ty| self.implied_outlives_bounds(param_env, body_id, ty)) - .flatten() + tys.into_iter().flat_map(move |ty| self.implied_outlives_bounds(param_env, body_id, ty)) } } diff --git a/compiler/rustc_trait_selection/src/traits/select/candidate_assembly.rs b/compiler/rustc_trait_selection/src/traits/select/candidate_assembly.rs index 47a351590b1..090312338e0 100644 --- a/compiler/rustc_trait_selection/src/traits/select/candidate_assembly.rs +++ b/compiler/rustc_trait_selection/src/traits/select/candidate_assembly.rs @@ -998,8 +998,14 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> { | ty::Alias(..) | ty::Param(..) | ty::Bound(..) - | ty::Error(_) => {} - ty::Infer(_) => { + | ty::Error(_) + | ty::Infer( + ty::InferTy::IntVar(_) + | ty::InferTy::FloatVar(_) + | ty::InferTy::FreshIntTy(_) + | ty::InferTy::FreshFloatTy(_), + ) => {} + ty::Infer(ty::InferTy::TyVar(_) | ty::InferTy::FreshTy(_)) => { candidates.ambiguous = true; } } diff --git a/compiler/rustc_trait_selection/src/traits/select/mod.rs b/compiler/rustc_trait_selection/src/traits/select/mod.rs index 3ed3dd2d20d..b58e62536d6 100644 --- a/compiler/rustc_trait_selection/src/traits/select/mod.rs +++ b/compiler/rustc_trait_selection/src/traits/select/mod.rs @@ -177,14 +177,14 @@ struct TraitObligationStack<'prev, 'tcx> { } struct SelectionCandidateSet<'tcx> { - // A list of candidates that definitely apply to the current - // obligation (meaning: types unify). + /// A list of candidates that definitely apply to the current + /// obligation (meaning: types unify). vec: Vec<SelectionCandidate<'tcx>>, - // If `true`, then there were candidates that might or might - // not have applied, but we couldn't tell. This occurs when some - // of the input types are type variables, in which case there are - // various "builtin" rules that might or might not trigger. + /// If `true`, then there were candidates that might or might + /// not have applied, but we couldn't tell. This occurs when some + /// of the input types are type variables, in which case there are + /// various "builtin" rules that might or might not trigger. ambiguous: bool, } diff --git a/compiler/rustc_traits/src/chalk/lowering.rs b/compiler/rustc_traits/src/chalk/lowering.rs index 0e9bccba8d4..527f6013a15 100644 --- a/compiler/rustc_traits/src/chalk/lowering.rs +++ b/compiler/rustc_traits/src/chalk/lowering.rs @@ -909,8 +909,7 @@ pub(crate) fn collect_bound_vars<'tcx, T: TypeFoldable<TyCtxt<'tcx>>>( .or_else(|| bug!("Skipped bound var index: parameters={:?}", parameters)); }); - let binders = - chalk_ir::VariableKinds::from_iter(interner, parameters.into_iter().map(|(_, v)| v)); + let binders = chalk_ir::VariableKinds::from_iter(interner, parameters.into_values()); (new_ty, binders, named_parameters) } diff --git a/compiler/rustc_ty_utils/src/layout.rs b/compiler/rustc_ty_utils/src/layout.rs index 73f86f74d14..e8155520c9b 100644 --- a/compiler/rustc_ty_utils/src/layout.rs +++ b/compiler/rustc_ty_utils/src/layout.rs @@ -522,7 +522,7 @@ fn generator_saved_local_eligibility( use SavedLocalEligibility::*; let mut assignments: IndexVec<GeneratorSavedLocal, SavedLocalEligibility> = - IndexVec::from_elem_n(Unassigned, info.field_tys.len()); + IndexVec::from_elem(Unassigned, &info.field_tys); // The saved locals not eligible for overlap. These will get // "promoted" to the prefix of our generator. diff --git a/library/alloc/src/collections/binary_heap/mod.rs b/library/alloc/src/collections/binary_heap/mod.rs index d0a87e3fb9f..bc86125c7c3 100644 --- a/library/alloc/src/collections/binary_heap/mod.rs +++ b/library/alloc/src/collections/binary_heap/mod.rs @@ -154,8 +154,6 @@ use crate::collections::TryReserveError; use crate::slice; use crate::vec::{self, AsVecIntoIter, Vec}; -use super::SpecExtend; - #[cfg(test)] mod tests; @@ -400,6 +398,17 @@ impl<T: fmt::Debug> fmt::Debug for BinaryHeap<T> { } } +struct RebuildOnDrop<'a, T: Ord> { + heap: &'a mut BinaryHeap<T>, + rebuild_from: usize, +} + +impl<'a, T: Ord> Drop for RebuildOnDrop<'a, T> { + fn drop(&mut self) { + self.heap.rebuild_tail(self.rebuild_from); + } +} + impl<T: Ord> BinaryHeap<T> { /// Creates an empty `BinaryHeap` as a max-heap. /// @@ -837,7 +846,6 @@ impl<T: Ord> BinaryHeap<T> { /// Basic usage: /// /// ``` - /// #![feature(binary_heap_retain)] /// use std::collections::BinaryHeap; /// /// let mut heap = BinaryHeap::from([-10, -5, 1, 2, 4, 13]); @@ -846,35 +854,24 @@ impl<T: Ord> BinaryHeap<T> { /// /// assert_eq!(heap.into_sorted_vec(), [-10, 2, 4]) /// ``` - #[unstable(feature = "binary_heap_retain", issue = "71503")] + #[stable(feature = "binary_heap_retain", since = "CURRENT_RUSTC_VERSION")] pub fn retain<F>(&mut self, mut f: F) where F: FnMut(&T) -> bool, { - struct RebuildOnDrop<'a, T: Ord> { - heap: &'a mut BinaryHeap<T>, - first_removed: usize, - } - - let mut guard = RebuildOnDrop { first_removed: self.len(), heap: self }; - + // rebuild_start will be updated to the first touched element below, and the rebuild will + // only be done for the tail. + let mut guard = RebuildOnDrop { rebuild_from: self.len(), heap: self }; let mut i = 0; + guard.heap.data.retain(|e| { let keep = f(e); - if !keep && i < guard.first_removed { - guard.first_removed = i; + if !keep && i < guard.rebuild_from { + guard.rebuild_from = i; } i += 1; keep }); - - impl<'a, T: Ord> Drop for RebuildOnDrop<'a, T> { - fn drop(&mut self) { - // data[..first_removed] is untouched, so we only need to - // rebuild the tail: - self.heap.rebuild_tail(self.first_removed); - } - } } } @@ -1729,7 +1726,8 @@ impl<'a, T> IntoIterator for &'a BinaryHeap<T> { impl<T: Ord> Extend<T> for BinaryHeap<T> { #[inline] fn extend<I: IntoIterator<Item = T>>(&mut self, iter: I) { - <Self as SpecExtend<I>>::spec_extend(self, iter); + let guard = RebuildOnDrop { rebuild_from: self.len(), heap: self }; + guard.heap.data.extend(iter); } #[inline] @@ -1743,37 +1741,6 @@ impl<T: Ord> Extend<T> for BinaryHeap<T> { } } -impl<T: Ord, I: IntoIterator<Item = T>> SpecExtend<I> for BinaryHeap<T> { - default fn spec_extend(&mut self, iter: I) { - self.extend_desugared(iter.into_iter()); - } -} - -impl<T: Ord> SpecExtend<Vec<T>> for BinaryHeap<T> { - fn spec_extend(&mut self, ref mut other: Vec<T>) { - let start = self.data.len(); - self.data.append(other); - self.rebuild_tail(start); - } -} - -impl<T: Ord> SpecExtend<BinaryHeap<T>> for BinaryHeap<T> { - fn spec_extend(&mut self, ref mut other: BinaryHeap<T>) { - self.append(other); - } -} - -impl<T: Ord> BinaryHeap<T> { - fn extend_desugared<I: IntoIterator<Item = T>>(&mut self, iter: I) { - let iterator = iter.into_iter(); - let (lower, _) = iterator.size_hint(); - - self.reserve(lower); - - iterator.for_each(move |elem| self.push(elem)); - } -} - #[stable(feature = "extend_ref", since = "1.2.0")] impl<'a, T: 'a + Ord + Copy> Extend<&'a T> for BinaryHeap<T> { fn extend<I: IntoIterator<Item = &'a T>>(&mut self, iter: I) { diff --git a/library/alloc/tests/lib.rs b/library/alloc/tests/lib.rs index cd5301ee77f..0667cd7bc07 100644 --- a/library/alloc/tests/lib.rs +++ b/library/alloc/tests/lib.rs @@ -24,7 +24,6 @@ #![feature(binary_heap_into_iter_sorted)] #![feature(binary_heap_drain_sorted)] #![feature(slice_ptr_get)] -#![feature(binary_heap_retain)] #![feature(binary_heap_as_slice)] #![feature(inplace_iteration)] #![feature(iter_advance_by)] diff --git a/library/core/src/cell.rs b/library/core/src/cell.rs index 63bce5d0ccd..d728dc03817 100644 --- a/library/core/src/cell.rs +++ b/library/core/src/cell.rs @@ -1816,7 +1816,7 @@ impl<T: ?Sized + fmt::Display> fmt::Display for RefMut<'_, T> { /// `UnsafeCell<T>` opts-out of the immutability guarantee for `&T`: a shared reference /// `&UnsafeCell<T>` may point to data that is being mutated. This is called "interior mutability". /// -/// All other types that allow internal mutability, such as `Cell<T>` and `RefCell<T>`, internally +/// All other types that allow internal mutability, such as [`Cell<T>`] and [`RefCell<T>`], internally /// use `UnsafeCell` to wrap their data. /// /// Note that only the immutability guarantee for shared references is affected by `UnsafeCell`. The diff --git a/library/core/src/cell/lazy.rs b/library/core/src/cell/lazy.rs index 64a6ce51b2e..44adcfa1a94 100644 --- a/library/core/src/cell/lazy.rs +++ b/library/core/src/cell/lazy.rs @@ -1,6 +1,13 @@ -use crate::cell::{Cell, OnceCell}; -use crate::fmt; use crate::ops::Deref; +use crate::{fmt, mem}; + +use super::UnsafeCell; + +enum State<T, F> { + Uninit(F), + Init(T), + Poisoned, +} /// A value which is initialized on the first access. /// @@ -31,8 +38,7 @@ use crate::ops::Deref; /// ``` #[unstable(feature = "lazy_cell", issue = "109736")] pub struct LazyCell<T, F = fn() -> T> { - cell: OnceCell<T>, - init: Cell<Option<F>>, + state: UnsafeCell<State<T, F>>, } impl<T, F: FnOnce() -> T> LazyCell<T, F> { @@ -53,8 +59,8 @@ impl<T, F: FnOnce() -> T> LazyCell<T, F> { /// ``` #[inline] #[unstable(feature = "lazy_cell", issue = "109736")] - pub const fn new(init: F) -> LazyCell<T, F> { - LazyCell { cell: OnceCell::new(), init: Cell::new(Some(init)) } + pub const fn new(f: F) -> LazyCell<T, F> { + LazyCell { state: UnsafeCell::new(State::Uninit(f)) } } /// Forces the evaluation of this lazy value and returns a reference to @@ -77,10 +83,65 @@ impl<T, F: FnOnce() -> T> LazyCell<T, F> { #[inline] #[unstable(feature = "lazy_cell", issue = "109736")] pub fn force(this: &LazyCell<T, F>) -> &T { - this.cell.get_or_init(|| match this.init.take() { - Some(f) => f(), - None => panic!("`Lazy` instance has previously been poisoned"), - }) + // SAFETY: + // This invalidates any mutable references to the data. The resulting + // reference lives either until the end of the borrow of `this` (in the + // initialized case) or is invalidated in `really_init` (in the + // uninitialized case; `really_init` will create and return a fresh reference). + let state = unsafe { &*this.state.get() }; + match state { + State::Init(data) => data, + // SAFETY: The state is uninitialized. + State::Uninit(_) => unsafe { LazyCell::really_init(this) }, + State::Poisoned => panic!("LazyCell has previously been poisoned"), + } + } + + /// # Safety + /// May only be called when the state is `Uninit`. + #[cold] + unsafe fn really_init(this: &LazyCell<T, F>) -> &T { + // SAFETY: + // This function is only called when the state is uninitialized, + // so no references to `state` can exist except for the reference + // in `force`, which is invalidated here and not accessed again. + let state = unsafe { &mut *this.state.get() }; + // Temporarily mark the state as poisoned. This prevents reentrant + // accesses and correctly poisons the cell if the closure panicked. + let State::Uninit(f) = mem::replace(state, State::Poisoned) else { unreachable!() }; + + let data = f(); + + // SAFETY: + // If the closure accessed the cell through something like a reentrant + // mutex, but caught the panic resulting from the state being poisoned, + // the mutable borrow for `state` will be invalidated, so we need to + // go through the `UnsafeCell` pointer here. The state can only be + // poisoned at this point, so using `write` to skip the destructor + // of `State` should help the optimizer. + unsafe { this.state.get().write(State::Init(data)) }; + + // SAFETY: + // The previous references were invalidated by the `write` call above, + // so do a new shared borrow of the state instead. + let state = unsafe { &*this.state.get() }; + let State::Init(data) = state else { unreachable!() }; + data + } +} + +impl<T, F> LazyCell<T, F> { + #[inline] + fn get(&self) -> Option<&T> { + // SAFETY: + // This is sound for the same reason as in `force`: once the state is + // initialized, it will not be mutably accessed again, so this reference + // will stay valid for the duration of the borrow to `self`. + let state = unsafe { &*self.state.get() }; + match state { + State::Init(data) => Some(data), + _ => None, + } } } @@ -105,6 +166,11 @@ impl<T: Default> Default for LazyCell<T> { #[unstable(feature = "lazy_cell", issue = "109736")] impl<T: fmt::Debug, F> fmt::Debug for LazyCell<T, F> { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.debug_struct("Lazy").field("cell", &self.cell).field("init", &"..").finish() + let mut d = f.debug_tuple("LazyCell"); + match self.get() { + Some(data) => d.field(data), + None => d.field(&format_args!("<uninit>")), + }; + d.finish() } } diff --git a/library/core/src/iter/traits/iterator.rs b/library/core/src/iter/traits/iterator.rs index 080330fa41e..36cf7defd6d 100644 --- a/library/core/src/iter/traits/iterator.rs +++ b/library/core/src/iter/traits/iterator.rs @@ -2120,8 +2120,8 @@ pub trait Iterator { /// /// # Current implementation /// - /// Current algorithms tries finding the first element for which the predicate evaluates - /// to false, and the last element for which it evaluates to true and repeatedly swaps them. + /// The current algorithm tries to find the first element for which the predicate evaluates + /// to false and the last element for which it evaluates to true, and repeatedly swaps them. /// /// Time complexity: *O*(*n*) /// diff --git a/library/core/src/num/nonzero.rs b/library/core/src/num/nonzero.rs index 06d22d84aed..ecfb735fad1 100644 --- a/library/core/src/num/nonzero.rs +++ b/library/core/src/num/nonzero.rs @@ -34,6 +34,13 @@ macro_rules! nonzero_integers { /// use std::mem::size_of; #[doc = concat!("assert_eq!(size_of::<Option<core::num::", stringify!($Ty), ">>(), size_of::<", stringify!($Int), ">());")] /// ``` + /// + /// # Layout + /// + #[doc = concat!("`", stringify!($Ty), "` is guaranteed to have the same layout and bit validity as `", stringify!($Int), "`")] + /// with the exception that `0` is not a valid instance. + #[doc = concat!("`Option<", stringify!($Ty), ">` is guaranteed to be compatible with `", stringify!($Int), "`,")] + /// including in FFI. #[$stability] #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)] #[repr(transparent)] diff --git a/library/core/src/primitive_docs.rs b/library/core/src/primitive_docs.rs index e12a3e378a6..bf8339335dd 100644 --- a/library/core/src/primitive_docs.rs +++ b/library/core/src/primitive_docs.rs @@ -1,7 +1,8 @@ // `library/{std,core}/src/primitive_docs.rs` should have the same contents. // These are different files so that relative links work properly without // having to have `CARGO_PKG_NAME` set, but conceptually they should always be the same. -#[doc(primitive = "bool")] +#[cfg_attr(bootstrap, doc(primitive = "bool"))] +#[cfg_attr(not(bootstrap), rustc_doc_primitive = "bool")] #[doc(alias = "true")] #[doc(alias = "false")] /// The boolean type. @@ -63,7 +64,8 @@ #[stable(feature = "rust1", since = "1.0.0")] mod prim_bool {} -#[doc(primitive = "never")] +#[cfg_attr(bootstrap, doc(primitive = "never"))] +#[cfg_attr(not(bootstrap), rustc_doc_primitive = "never")] #[doc(alias = "!")] // /// The `!` type, also called "never". @@ -274,7 +276,8 @@ mod prim_bool {} #[unstable(feature = "never_type", issue = "35121")] mod prim_never {} -#[doc(primitive = "char")] +#[cfg_attr(bootstrap, doc(primitive = "char"))] +#[cfg_attr(not(bootstrap), rustc_doc_primitive = "char")] #[allow(rustdoc::invalid_rust_codeblocks)] /// A character type. /// @@ -398,7 +401,8 @@ mod prim_never {} #[stable(feature = "rust1", since = "1.0.0")] mod prim_char {} -#[doc(primitive = "unit")] +#[cfg_attr(bootstrap, doc(primitive = "unit"))] +#[cfg_attr(not(bootstrap), rustc_doc_primitive = "unit")] #[doc(alias = "(")] #[doc(alias = ")")] #[doc(alias = "()")] @@ -460,7 +464,8 @@ impl Copy for () { // empty } -#[doc(primitive = "pointer")] +#[cfg_attr(bootstrap, doc(primitive = "pointer"))] +#[cfg_attr(not(bootstrap), rustc_doc_primitive = "pointer")] #[doc(alias = "ptr")] #[doc(alias = "*")] #[doc(alias = "*const")] @@ -577,7 +582,8 @@ impl Copy for () { #[stable(feature = "rust1", since = "1.0.0")] mod prim_pointer {} -#[doc(primitive = "array")] +#[cfg_attr(bootstrap, doc(primitive = "array"))] +#[cfg_attr(not(bootstrap), rustc_doc_primitive = "array")] #[doc(alias = "[]")] #[doc(alias = "[T;N]")] // unfortunately, rustdoc doesn't have fuzzy search for aliases #[doc(alias = "[T; N]")] @@ -778,7 +784,8 @@ mod prim_pointer {} #[stable(feature = "rust1", since = "1.0.0")] mod prim_array {} -#[doc(primitive = "slice")] +#[cfg_attr(bootstrap, doc(primitive = "slice"))] +#[cfg_attr(not(bootstrap), rustc_doc_primitive = "slice")] #[doc(alias = "[")] #[doc(alias = "]")] #[doc(alias = "[]")] @@ -870,7 +877,8 @@ mod prim_array {} #[stable(feature = "rust1", since = "1.0.0")] mod prim_slice {} -#[doc(primitive = "str")] +#[cfg_attr(bootstrap, doc(primitive = "str"))] +#[cfg_attr(not(bootstrap), rustc_doc_primitive = "str")] /// String slices. /// /// *[See also the `std::str` module](crate::str).* @@ -937,7 +945,8 @@ mod prim_slice {} #[stable(feature = "rust1", since = "1.0.0")] mod prim_str {} -#[doc(primitive = "tuple")] +#[cfg_attr(bootstrap, doc(primitive = "tuple"))] +#[cfg_attr(not(bootstrap), rustc_doc_primitive = "tuple")] #[doc(alias = "(")] #[doc(alias = ")")] #[doc(alias = "()")] @@ -1081,7 +1090,8 @@ impl<T: Copy> Copy for (T,) { // empty } -#[doc(primitive = "f32")] +#[cfg_attr(bootstrap, doc(primitive = "f32"))] +#[cfg_attr(not(bootstrap), rustc_doc_primitive = "f32")] /// A 32-bit floating point type (specifically, the "binary32" type defined in IEEE 754-2008). /// /// This type can represent a wide range of decimal numbers, like `3.5`, `27`, @@ -1147,7 +1157,8 @@ impl<T: Copy> Copy for (T,) { #[stable(feature = "rust1", since = "1.0.0")] mod prim_f32 {} -#[doc(primitive = "f64")] +#[cfg_attr(bootstrap, doc(primitive = "f64"))] +#[cfg_attr(not(bootstrap), rustc_doc_primitive = "f64")] /// A 64-bit floating point type (specifically, the "binary64" type defined in IEEE 754-2008). /// /// This type is very similar to [`f32`], but has increased @@ -1162,67 +1173,78 @@ mod prim_f32 {} #[stable(feature = "rust1", since = "1.0.0")] mod prim_f64 {} -#[doc(primitive = "i8")] +#[cfg_attr(bootstrap, doc(primitive = "i8"))] +#[cfg_attr(not(bootstrap), rustc_doc_primitive = "i8")] // /// The 8-bit signed integer type. #[stable(feature = "rust1", since = "1.0.0")] mod prim_i8 {} -#[doc(primitive = "i16")] +#[cfg_attr(bootstrap, doc(primitive = "i16"))] +#[cfg_attr(not(bootstrap), rustc_doc_primitive = "i16")] // /// The 16-bit signed integer type. #[stable(feature = "rust1", since = "1.0.0")] mod prim_i16 {} -#[doc(primitive = "i32")] +#[cfg_attr(bootstrap, doc(primitive = "i32"))] +#[cfg_attr(not(bootstrap), rustc_doc_primitive = "i32")] // /// The 32-bit signed integer type. #[stable(feature = "rust1", since = "1.0.0")] mod prim_i32 {} -#[doc(primitive = "i64")] +#[cfg_attr(bootstrap, doc(primitive = "i64"))] +#[cfg_attr(not(bootstrap), rustc_doc_primitive = "i64")] // /// The 64-bit signed integer type. #[stable(feature = "rust1", since = "1.0.0")] mod prim_i64 {} -#[doc(primitive = "i128")] +#[cfg_attr(bootstrap, doc(primitive = "i128"))] +#[cfg_attr(not(bootstrap), rustc_doc_primitive = "i128")] // /// The 128-bit signed integer type. #[stable(feature = "i128", since = "1.26.0")] mod prim_i128 {} -#[doc(primitive = "u8")] +#[cfg_attr(bootstrap, doc(primitive = "u8"))] +#[cfg_attr(not(bootstrap), rustc_doc_primitive = "u8")] // /// The 8-bit unsigned integer type. #[stable(feature = "rust1", since = "1.0.0")] mod prim_u8 {} -#[doc(primitive = "u16")] +#[cfg_attr(bootstrap, doc(primitive = "u16"))] +#[cfg_attr(not(bootstrap), rustc_doc_primitive = "u16")] // /// The 16-bit unsigned integer type. #[stable(feature = "rust1", since = "1.0.0")] mod prim_u16 {} -#[doc(primitive = "u32")] +#[cfg_attr(bootstrap, doc(primitive = "u32"))] +#[cfg_attr(not(bootstrap), rustc_doc_primitive = "u32")] // /// The 32-bit unsigned integer type. #[stable(feature = "rust1", since = "1.0.0")] mod prim_u32 {} -#[doc(primitive = "u64")] +#[cfg_attr(bootstrap, doc(primitive = "u64"))] +#[cfg_attr(not(bootstrap), rustc_doc_primitive = "u64")] // /// The 64-bit unsigned integer type. #[stable(feature = "rust1", since = "1.0.0")] mod prim_u64 {} -#[doc(primitive = "u128")] +#[cfg_attr(bootstrap, doc(primitive = "u128"))] +#[cfg_attr(not(bootstrap), rustc_doc_primitive = "u128")] // /// The 128-bit unsigned integer type. #[stable(feature = "i128", since = "1.26.0")] mod prim_u128 {} -#[doc(primitive = "isize")] +#[cfg_attr(bootstrap, doc(primitive = "isize"))] +#[cfg_attr(not(bootstrap), rustc_doc_primitive = "isize")] // /// The pointer-sized signed integer type. /// @@ -1232,7 +1254,8 @@ mod prim_u128 {} #[stable(feature = "rust1", since = "1.0.0")] mod prim_isize {} -#[doc(primitive = "usize")] +#[cfg_attr(bootstrap, doc(primitive = "usize"))] +#[cfg_attr(not(bootstrap), rustc_doc_primitive = "usize")] // /// The pointer-sized unsigned integer type. /// @@ -1242,7 +1265,8 @@ mod prim_isize {} #[stable(feature = "rust1", since = "1.0.0")] mod prim_usize {} -#[doc(primitive = "reference")] +#[cfg_attr(bootstrap, doc(primitive = "reference"))] +#[cfg_attr(not(bootstrap), rustc_doc_primitive = "reference")] #[doc(alias = "&")] #[doc(alias = "&mut")] // @@ -1373,7 +1397,8 @@ mod prim_usize {} #[stable(feature = "rust1", since = "1.0.0")] mod prim_ref {} -#[doc(primitive = "fn")] +#[cfg_attr(bootstrap, doc(primitive = "fn"))] +#[cfg_attr(not(bootstrap), rustc_doc_primitive = "fn")] // /// Function pointers, like `fn(usize) -> bool`. /// diff --git a/library/std/Cargo.toml b/library/std/Cargo.toml index 6345db24054..96c75f97f6e 100644 --- a/library/std/Cargo.toml +++ b/library/std/Cargo.toml @@ -16,7 +16,7 @@ panic_unwind = { path = "../panic_unwind", optional = true } panic_abort = { path = "../panic_abort" } core = { path = "../core" } libc = { version = "0.2.140", default-features = false, features = ['rustc-dep-of-std'] } -compiler_builtins = { version = "0.1.87" } +compiler_builtins = { version = "0.1.91" } profiler_builtins = { path = "../profiler_builtins", optional = true } unwind = { path = "../unwind" } hashbrown = { version = "0.12", default-features = false, features = ['rustc-dep-of-std'] } diff --git a/library/std/src/os/fd/owned.rs b/library/std/src/os/fd/owned.rs index 99a4e0b5106..a40d39c5e44 100644 --- a/library/std/src/os/fd/owned.rs +++ b/library/std/src/os/fd/owned.rs @@ -268,7 +268,7 @@ impl AsFd for OwnedFd { #[inline] fn as_fd(&self) -> BorrowedFd<'_> { // Safety: `OwnedFd` and `BorrowedFd` have the same validity - // invariants, and the `BorrowdFd` is bounded by the lifetime + // invariants, and the `BorrowedFd` is bounded by the lifetime // of `&self`. unsafe { BorrowedFd::borrow_raw(self.as_raw_fd()) } } diff --git a/library/std/src/primitive_docs.rs b/library/std/src/primitive_docs.rs index e12a3e378a6..bf8339335dd 100644 --- a/library/std/src/primitive_docs.rs +++ b/library/std/src/primitive_docs.rs @@ -1,7 +1,8 @@ // `library/{std,core}/src/primitive_docs.rs` should have the same contents. // These are different files so that relative links work properly without // having to have `CARGO_PKG_NAME` set, but conceptually they should always be the same. -#[doc(primitive = "bool")] +#[cfg_attr(bootstrap, doc(primitive = "bool"))] +#[cfg_attr(not(bootstrap), rustc_doc_primitive = "bool")] #[doc(alias = "true")] #[doc(alias = "false")] /// The boolean type. @@ -63,7 +64,8 @@ #[stable(feature = "rust1", since = "1.0.0")] mod prim_bool {} -#[doc(primitive = "never")] +#[cfg_attr(bootstrap, doc(primitive = "never"))] +#[cfg_attr(not(bootstrap), rustc_doc_primitive = "never")] #[doc(alias = "!")] // /// The `!` type, also called "never". @@ -274,7 +276,8 @@ mod prim_bool {} #[unstable(feature = "never_type", issue = "35121")] mod prim_never {} -#[doc(primitive = "char")] +#[cfg_attr(bootstrap, doc(primitive = "char"))] +#[cfg_attr(not(bootstrap), rustc_doc_primitive = "char")] #[allow(rustdoc::invalid_rust_codeblocks)] /// A character type. /// @@ -398,7 +401,8 @@ mod prim_never {} #[stable(feature = "rust1", since = "1.0.0")] mod prim_char {} -#[doc(primitive = "unit")] +#[cfg_attr(bootstrap, doc(primitive = "unit"))] +#[cfg_attr(not(bootstrap), rustc_doc_primitive = "unit")] #[doc(alias = "(")] #[doc(alias = ")")] #[doc(alias = "()")] @@ -460,7 +464,8 @@ impl Copy for () { // empty } -#[doc(primitive = "pointer")] +#[cfg_attr(bootstrap, doc(primitive = "pointer"))] +#[cfg_attr(not(bootstrap), rustc_doc_primitive = "pointer")] #[doc(alias = "ptr")] #[doc(alias = "*")] #[doc(alias = "*const")] @@ -577,7 +582,8 @@ impl Copy for () { #[stable(feature = "rust1", since = "1.0.0")] mod prim_pointer {} -#[doc(primitive = "array")] +#[cfg_attr(bootstrap, doc(primitive = "array"))] +#[cfg_attr(not(bootstrap), rustc_doc_primitive = "array")] #[doc(alias = "[]")] #[doc(alias = "[T;N]")] // unfortunately, rustdoc doesn't have fuzzy search for aliases #[doc(alias = "[T; N]")] @@ -778,7 +784,8 @@ mod prim_pointer {} #[stable(feature = "rust1", since = "1.0.0")] mod prim_array {} -#[doc(primitive = "slice")] +#[cfg_attr(bootstrap, doc(primitive = "slice"))] +#[cfg_attr(not(bootstrap), rustc_doc_primitive = "slice")] #[doc(alias = "[")] #[doc(alias = "]")] #[doc(alias = "[]")] @@ -870,7 +877,8 @@ mod prim_array {} #[stable(feature = "rust1", since = "1.0.0")] mod prim_slice {} -#[doc(primitive = "str")] +#[cfg_attr(bootstrap, doc(primitive = "str"))] +#[cfg_attr(not(bootstrap), rustc_doc_primitive = "str")] /// String slices. /// /// *[See also the `std::str` module](crate::str).* @@ -937,7 +945,8 @@ mod prim_slice {} #[stable(feature = "rust1", since = "1.0.0")] mod prim_str {} -#[doc(primitive = "tuple")] +#[cfg_attr(bootstrap, doc(primitive = "tuple"))] +#[cfg_attr(not(bootstrap), rustc_doc_primitive = "tuple")] #[doc(alias = "(")] #[doc(alias = ")")] #[doc(alias = "()")] @@ -1081,7 +1090,8 @@ impl<T: Copy> Copy for (T,) { // empty } -#[doc(primitive = "f32")] +#[cfg_attr(bootstrap, doc(primitive = "f32"))] +#[cfg_attr(not(bootstrap), rustc_doc_primitive = "f32")] /// A 32-bit floating point type (specifically, the "binary32" type defined in IEEE 754-2008). /// /// This type can represent a wide range of decimal numbers, like `3.5`, `27`, @@ -1147,7 +1157,8 @@ impl<T: Copy> Copy for (T,) { #[stable(feature = "rust1", since = "1.0.0")] mod prim_f32 {} -#[doc(primitive = "f64")] +#[cfg_attr(bootstrap, doc(primitive = "f64"))] +#[cfg_attr(not(bootstrap), rustc_doc_primitive = "f64")] /// A 64-bit floating point type (specifically, the "binary64" type defined in IEEE 754-2008). /// /// This type is very similar to [`f32`], but has increased @@ -1162,67 +1173,78 @@ mod prim_f32 {} #[stable(feature = "rust1", since = "1.0.0")] mod prim_f64 {} -#[doc(primitive = "i8")] +#[cfg_attr(bootstrap, doc(primitive = "i8"))] +#[cfg_attr(not(bootstrap), rustc_doc_primitive = "i8")] // /// The 8-bit signed integer type. #[stable(feature = "rust1", since = "1.0.0")] mod prim_i8 {} -#[doc(primitive = "i16")] +#[cfg_attr(bootstrap, doc(primitive = "i16"))] +#[cfg_attr(not(bootstrap), rustc_doc_primitive = "i16")] // /// The 16-bit signed integer type. #[stable(feature = "rust1", since = "1.0.0")] mod prim_i16 {} -#[doc(primitive = "i32")] +#[cfg_attr(bootstrap, doc(primitive = "i32"))] +#[cfg_attr(not(bootstrap), rustc_doc_primitive = "i32")] // /// The 32-bit signed integer type. #[stable(feature = "rust1", since = "1.0.0")] mod prim_i32 {} -#[doc(primitive = "i64")] +#[cfg_attr(bootstrap, doc(primitive = "i64"))] +#[cfg_attr(not(bootstrap), rustc_doc_primitive = "i64")] // /// The 64-bit signed integer type. #[stable(feature = "rust1", since = "1.0.0")] mod prim_i64 {} -#[doc(primitive = "i128")] +#[cfg_attr(bootstrap, doc(primitive = "i128"))] +#[cfg_attr(not(bootstrap), rustc_doc_primitive = "i128")] // /// The 128-bit signed integer type. #[stable(feature = "i128", since = "1.26.0")] mod prim_i128 {} -#[doc(primitive = "u8")] +#[cfg_attr(bootstrap, doc(primitive = "u8"))] +#[cfg_attr(not(bootstrap), rustc_doc_primitive = "u8")] // /// The 8-bit unsigned integer type. #[stable(feature = "rust1", since = "1.0.0")] mod prim_u8 {} -#[doc(primitive = "u16")] +#[cfg_attr(bootstrap, doc(primitive = "u16"))] +#[cfg_attr(not(bootstrap), rustc_doc_primitive = "u16")] // /// The 16-bit unsigned integer type. #[stable(feature = "rust1", since = "1.0.0")] mod prim_u16 {} -#[doc(primitive = "u32")] +#[cfg_attr(bootstrap, doc(primitive = "u32"))] +#[cfg_attr(not(bootstrap), rustc_doc_primitive = "u32")] // /// The 32-bit unsigned integer type. #[stable(feature = "rust1", since = "1.0.0")] mod prim_u32 {} -#[doc(primitive = "u64")] +#[cfg_attr(bootstrap, doc(primitive = "u64"))] +#[cfg_attr(not(bootstrap), rustc_doc_primitive = "u64")] // /// The 64-bit unsigned integer type. #[stable(feature = "rust1", since = "1.0.0")] mod prim_u64 {} -#[doc(primitive = "u128")] +#[cfg_attr(bootstrap, doc(primitive = "u128"))] +#[cfg_attr(not(bootstrap), rustc_doc_primitive = "u128")] // /// The 128-bit unsigned integer type. #[stable(feature = "i128", since = "1.26.0")] mod prim_u128 {} -#[doc(primitive = "isize")] +#[cfg_attr(bootstrap, doc(primitive = "isize"))] +#[cfg_attr(not(bootstrap), rustc_doc_primitive = "isize")] // /// The pointer-sized signed integer type. /// @@ -1232,7 +1254,8 @@ mod prim_u128 {} #[stable(feature = "rust1", since = "1.0.0")] mod prim_isize {} -#[doc(primitive = "usize")] +#[cfg_attr(bootstrap, doc(primitive = "usize"))] +#[cfg_attr(not(bootstrap), rustc_doc_primitive = "usize")] // /// The pointer-sized unsigned integer type. /// @@ -1242,7 +1265,8 @@ mod prim_isize {} #[stable(feature = "rust1", since = "1.0.0")] mod prim_usize {} -#[doc(primitive = "reference")] +#[cfg_attr(bootstrap, doc(primitive = "reference"))] +#[cfg_attr(not(bootstrap), rustc_doc_primitive = "reference")] #[doc(alias = "&")] #[doc(alias = "&mut")] // @@ -1373,7 +1397,8 @@ mod prim_usize {} #[stable(feature = "rust1", since = "1.0.0")] mod prim_ref {} -#[doc(primitive = "fn")] +#[cfg_attr(bootstrap, doc(primitive = "fn"))] +#[cfg_attr(not(bootstrap), rustc_doc_primitive = "fn")] // /// Function pointers, like `fn(usize) -> bool`. /// diff --git a/library/std/src/sys/hermit/net.rs b/library/std/src/sys/hermit/net.rs index 5fb6281aa1e..d6f64a29719 100644 --- a/library/std/src/sys/hermit/net.rs +++ b/library/std/src/sys/hermit/net.rs @@ -1,7 +1,7 @@ #![allow(dead_code)] use crate::cmp; -use crate::io::{self, IoSlice, IoSliceMut}; +use crate::io::{self, BorrowedBuf, BorrowedCursor, IoSlice, IoSliceMut}; use crate::mem; use crate::net::{Shutdown, SocketAddr}; use crate::os::hermit::io::{AsFd, AsRawFd, BorrowedFd, FromRawFd, RawFd}; @@ -146,18 +146,35 @@ impl Socket { Ok(Socket(unsafe { FileDesc::from_raw_fd(fd) })) } - fn recv_with_flags(&self, buf: &mut [u8], flags: i32) -> io::Result<usize> { - let ret = - cvt(unsafe { netc::recv(self.0.as_raw_fd(), buf.as_mut_ptr(), buf.len(), flags) })?; - Ok(ret as usize) + fn recv_with_flags(&self, mut buf: BorrowedCursor<'_>, flags: i32) -> io::Result<()> { + let ret = cvt(unsafe { + netc::recv( + self.0.as_raw_fd(), + buf.as_mut().as_mut_ptr() as *mut u8, + buf.capacity(), + flags, + ) + })?; + unsafe { + buf.advance(ret as usize); + } + Ok(()) } pub fn read(&self, buf: &mut [u8]) -> io::Result<usize> { - self.recv_with_flags(buf, 0) + let mut buf = BorrowedBuf::from(buf); + self.recv_with_flags(buf.unfilled(), 0)?; + Ok(buf.len()) } pub fn peek(&self, buf: &mut [u8]) -> io::Result<usize> { - self.recv_with_flags(buf, netc::MSG_PEEK) + let mut buf = BorrowedBuf::from(buf); + self.recv_with_flags(buf.unfilled(), netc::MSG_PEEK)?; + Ok(buf.len()) + } + + pub fn read_buf(&self, buf: BorrowedCursor<'_>) -> io::Result<()> { + self.recv_with_flags(buf, 0) } pub fn read_vectored(&self, bufs: &mut [IoSliceMut<'_>]) -> io::Result<usize> { diff --git a/src/bootstrap/Cargo.lock b/src/bootstrap/Cargo.lock index 27236e191fd..965dfa5f398 100644 --- a/src/bootstrap/Cargo.lock +++ b/src/bootstrap/Cargo.lock @@ -12,17 +12,6 @@ dependencies = [ ] [[package]] -name = "atty" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" -dependencies = [ - "hermit-abi", - "libc", - "winapi", -] - -[[package]] name = "autocfg" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -47,7 +36,6 @@ dependencies = [ name = "bootstrap" version = "0.0.0" dependencies = [ - "atty", "build_helper", "cc", "cmake", @@ -56,6 +44,7 @@ dependencies = [ "getopts", "hex", "ignore", + "is-terminal", "libc", "object", "once_cell", @@ -212,13 +201,13 @@ checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" [[package]] name = "errno" -version = "0.2.8" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f639046355ee4f37944e44f60642c6f3a7efa3cf6b78c78a0d989a8ce6c396a1" +checksum = "50d6a0976c999d473fe89ad888d5a284e55366d9dc9038b1ba2aa15128c4afa0" dependencies = [ "errno-dragonfly", "libc", - "winapi", + "windows-sys", ] [[package]] @@ -233,9 +222,9 @@ dependencies = [ [[package]] name = "fd-lock" -version = "3.0.8" +version = "3.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb21c69b9fea5e15dbc1049e4b77145dd0ba1c84019c488102de0dc4ea4b0a27" +checksum = "9799aefb4a2e4a01cc47610b1dd47c18ab13d991f27bbcaed9296f5a53d5cbad" dependencies = [ "cfg-if", "rustix", @@ -302,6 +291,12 @@ dependencies = [ ] [[package]] +name = "hermit-abi" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286" + +[[package]] name = "hex" version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -327,15 +322,28 @@ dependencies = [ [[package]] name = "io-lifetimes" -version = "1.0.1" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7d367024b3f3414d8e01f437f704f41a9f64ab36f9067fa73e526ad4c763c87" +checksum = "09270fd4fa1111bc614ed2246c7ef56239a3063d5be0d1ec3b589c505d400aeb" dependencies = [ + "hermit-abi 0.3.1", "libc", "windows-sys", ] [[package]] +name = "is-terminal" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "256017f749ab3117e93acb91063009e1f1bb56d03965b14c2c8df4eb02c524d8" +dependencies = [ + "hermit-abi 0.3.1", + "io-lifetimes", + "rustix", + "windows-sys", +] + +[[package]] name = "itoa" version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -349,15 +357,15 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.137" +version = "0.2.140" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc7fcc620a3bff7cdd7a365be3376c97191aeaccc2a603e600951e452615bf89" +checksum = "99227334921fae1a979cf0bfdfcc6b3e5ce376ef57e16fb6fb3ea2ed6095f80c" [[package]] name = "linux-raw-sys" -version = "0.1.3" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f9f08d8963a6c613f4b1a78f4f4a4dbfadf8e6545b2d72861731e4858b8b47f" +checksum = "d59d8c75012853d2e872fb56bc8a2e53718e2cafe1a4c823143141c6d90c322f" [[package]] name = "log" @@ -409,7 +417,7 @@ version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "19e64526ebdee182341572e50e9ad03965aa510cd94427a4549448f285e957a1" dependencies = [ - "hermit-abi", + "hermit-abi 0.1.19", "libc", ] @@ -540,9 +548,9 @@ checksum = "49b3de9ec5dc0a3417da371aab17d729997c15010e7fd24ff707773a33bddb64" [[package]] name = "rustix" -version = "0.36.3" +version = "0.37.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b1fbb4dfc4eb1d390c02df47760bb19a84bb80b301ecc947ab5406394d8223e" +checksum = "d097081ed288dfe45699b72f5b5d648e5f15d64d900c7080273baa20c16a6849" dependencies = [ "bitflags", "errno", @@ -753,17 +761,11 @@ dependencies = [ [[package]] name = "windows-sys" -version = "0.42.0" +version = "0.45.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" +checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", + "windows-targets", ] [[package]] diff --git a/src/bootstrap/Cargo.toml b/src/bootstrap/Cargo.toml index 5c659800bdb..2fbe7aa57aa 100644 --- a/src/bootstrap/Cargo.toml +++ b/src/bootstrap/Cargo.toml @@ -30,7 +30,7 @@ path = "bin/sccache-plus-cl.rs" test = false [dependencies] -atty = "0.2.14" +is-terminal = "0.4" build_helper = { path = "../tools/build_helper" } cmake = "0.1.38" filetime = "0.2" diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py index 013d1ab525b..d12781cc33a 100644 --- a/src/bootstrap/bootstrap.py +++ b/src/bootstrap/bootstrap.py @@ -741,6 +741,9 @@ class RustBuild(object): env["LIBRARY_PATH"] = os.path.join(self.bin_root(), "lib") + \ (os.pathsep + env["LIBRARY_PATH"]) \ if "LIBRARY_PATH" in env else "" + env["LIBPATH"] = os.path.join(self.bin_root(), "lib") + \ + (os.pathsep + env["LIBPATH"]) \ + if "LIBPATH" in env else "" # Export Stage0 snapshot compiler related env variables build_section = "target.{}".format(self.build) diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs index 67bd573a855..e3581943f2c 100644 --- a/src/bootstrap/compile.rs +++ b/src/bootstrap/compile.rs @@ -20,7 +20,7 @@ use serde_derive::Deserialize; use crate::builder::crate_description; use crate::builder::Cargo; -use crate::builder::{Builder, Kind, RunConfig, ShouldRun, Step}; +use crate::builder::{Builder, Kind, PathSet, RunConfig, ShouldRun, Step, TaskPath}; use crate::cache::{Interned, INTERNER}; use crate::config::{LlvmLibunwind, RustcLto, TargetSelection}; use crate::dist; @@ -995,6 +995,44 @@ pub struct CodegenBackend { pub backend: Interned<String>, } +fn needs_codegen_config(run: &RunConfig<'_>) -> bool { + let mut needs_codegen_cfg = false; + for path_set in &run.paths { + needs_codegen_cfg = match path_set { + PathSet::Set(set) => set.iter().any(|p| is_codegen_cfg_needed(p, run)), + PathSet::Suite(suite) => is_codegen_cfg_needed(&suite, run), + } + } + needs_codegen_cfg +} + +const CODEGEN_BACKEND_PREFIX: &str = "rustc_codegen_"; + +fn is_codegen_cfg_needed(path: &TaskPath, run: &RunConfig<'_>) -> bool { + if path.path.to_str().unwrap().contains(&CODEGEN_BACKEND_PREFIX) { + let mut needs_codegen_backend_config = true; + for &backend in &run.builder.config.rust_codegen_backends { + if path + .path + .to_str() + .unwrap() + .ends_with(&(CODEGEN_BACKEND_PREFIX.to_owned() + &backend)) + { + needs_codegen_backend_config = false; + } + } + if needs_codegen_backend_config { + run.builder.info( + "Warning: no codegen-backends config matched the requested path to build a codegen backend. \ + Help: add backend to codegen-backends in config.toml.", + ); + return true; + } + } + + return false; +} + impl Step for CodegenBackend { type Output = (); const ONLY_HOSTS: bool = true; @@ -1006,6 +1044,10 @@ impl Step for CodegenBackend { } fn make_run(run: RunConfig<'_>) { + if needs_codegen_config(&run) { + return; + } + for &backend in &run.builder.config.rust_codegen_backends { if backend == "llvm" { continue; // Already built as part of rustc @@ -1346,6 +1388,13 @@ impl Step for Assemble { // when not performing a full bootstrap). builder.ensure(Rustc::new(build_compiler, target_compiler.host)); + // FIXME: For now patch over problems noted in #90244 by early returning here, even though + // we've not properly assembled the target sysroot. A full fix is pending further investigation, + // for now full bootstrap usage is rare enough that this is OK. + if target_compiler.stage >= 3 && !builder.config.full_bootstrap { + return target_compiler; + } + for &backend in builder.config.rust_codegen_backends.iter() { if backend == "llvm" { continue; // Already built as part of rustc diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs index 0eba18c3a63..b8b6b7b2d4e 100644 --- a/src/bootstrap/config.rs +++ b/src/bootstrap/config.rs @@ -808,6 +808,8 @@ define_config! { impl Config { pub fn default_opts() -> Config { + use is_terminal::IsTerminal; + let mut config = Config::default(); config.llvm_optimize = true; config.ninja_in_file = true; @@ -828,8 +830,8 @@ impl Config { config.dist_include_mingw_linker = true; config.dist_compression_profile = "fast".into(); - config.stdout_is_tty = atty::is(atty::Stream::Stdout); - config.stderr_is_tty = atty::is(atty::Stream::Stderr); + config.stdout_is_tty = std::io::stdout().is_terminal(); + config.stderr_is_tty = std::io::stderr().is_terminal(); // set by build.rs config.build = TargetSelection::from_user(&env!("BUILD_TRIPLE")); diff --git a/src/bootstrap/dylib_util.rs b/src/bootstrap/dylib_util.rs index 6d75272c501..b14c0bed66c 100644 --- a/src/bootstrap/dylib_util.rs +++ b/src/bootstrap/dylib_util.rs @@ -12,6 +12,8 @@ pub fn dylib_path_var() -> &'static str { "DYLD_LIBRARY_PATH" } else if cfg!(target_os = "haiku") { "LIBRARY_PATH" + } else if cfg!(target_os = "aix") { + "LIBPATH" } else { "LD_LIBRARY_PATH" } diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs index 2ffad594fc7..e3f3ab5243e 100644 --- a/src/bootstrap/lib.rs +++ b/src/bootstrap/lib.rs @@ -21,7 +21,6 @@ use std::collections::{HashMap, HashSet}; use std::env; use std::fs::{self, File}; use std::io; -use std::io::ErrorKind; use std::path::{Path, PathBuf}; use std::process::{Command, Stdio}; use std::str; @@ -505,16 +504,18 @@ impl Build { let build_triple = build.out.join(&build.build.triple); t!(fs::create_dir_all(&build_triple)); let host = build.out.join("host"); - if let Err(e) = symlink_dir(&build.config, &build_triple, &host) { - if e.kind() != ErrorKind::AlreadyExists { - panic!( - "symlink_dir({} => {}) failed with {}", - host.display(), - build_triple.display(), - e - ); - } - } + if host.is_symlink() { + // Left over from a previous build; overwrite it. + // This matters if `build.build` has changed between invocations. + #[cfg(windows)] + t!(fs::remove_dir(&host)); + #[cfg(not(windows))] + t!(fs::remove_file(&host)); + } + t!( + symlink_dir(&build.config, &build_triple, &host), + format!("symlink_dir({} => {}) failed", host.display(), build_triple.display()) + ); build } diff --git a/src/bootstrap/metrics.rs b/src/bootstrap/metrics.rs index 5f254761aa1..82b123ec8a5 100644 --- a/src/bootstrap/metrics.rs +++ b/src/bootstrap/metrics.rs @@ -11,7 +11,7 @@ use serde_derive::{Deserialize, Serialize}; use std::cell::RefCell; use std::fs::File; use std::io::BufWriter; -use std::time::{Duration, Instant}; +use std::time::{Duration, Instant, SystemTime}; use sysinfo::{CpuExt, System, SystemExt}; pub(crate) struct BuildMetrics { @@ -27,6 +27,7 @@ impl BuildMetrics { system_info: System::new(), timer_start: None, invocation_timer_start: Instant::now(), + invocation_start: SystemTime::now(), }); BuildMetrics { state } @@ -124,6 +125,11 @@ impl BuildMetrics { } }; invocations.push(JsonInvocation { + start_time: state + .invocation_start + .duration_since(SystemTime::UNIX_EPOCH) + .unwrap() + .as_secs(), duration_including_children_sec: state.invocation_timer_start.elapsed().as_secs_f64(), children: steps.into_iter().map(|step| self.prepare_json_step(step)).collect(), }); @@ -166,6 +172,7 @@ struct MetricsState { system_info: System, timer_start: Option<Instant>, invocation_timer_start: Instant, + invocation_start: SystemTime, } struct StepMetrics { @@ -194,6 +201,10 @@ struct JsonRoot { #[derive(Serialize, Deserialize)] #[serde(rename_all = "snake_case")] struct JsonInvocation { + // Unix timestamp in seconds + // + // This is necessary to easily correlate this invocation with logs or other data. + start_time: u64, duration_including_children_sec: f64, children: Vec<JsonNode>, } diff --git a/src/ci/docker/host-x86_64/x86_64-gnu-tools/browser-ui-test.version b/src/ci/docker/host-x86_64/x86_64-gnu-tools/browser-ui-test.version index 6fd113fcfd8..66fb941ea37 100644 --- a/src/ci/docker/host-x86_64/x86_64-gnu-tools/browser-ui-test.version +++ b/src/ci/docker/host-x86_64/x86_64-gnu-tools/browser-ui-test.version @@ -1 +1 @@ -0.14.5 \ No newline at end of file +0.14.6 \ No newline at end of file diff --git a/src/ci/github-actions/ci.yml b/src/ci/github-actions/ci.yml index c594288dcf8..403953b5047 100644 --- a/src/ci/github-actions/ci.yml +++ b/src/ci/github-actions/ci.yml @@ -284,7 +284,7 @@ jobs: permissions: actions: write # for rust-lang/simpleinfra/github-actions/cancel-outdated-builds <<: *base-ci-job - name: PR + name: PR - ${{ matrix.name }} env: <<: [*shared-ci-variables, *public-variables] if: github.event_name == 'pull_request' @@ -312,7 +312,7 @@ jobs: permissions: actions: write # for rust-lang/simpleinfra/github-actions/cancel-outdated-builds <<: *base-ci-job - name: auto + name: auto - ${{ matrix.name }} env: <<: [*shared-ci-variables, *prod-variables] if: github.event_name == 'push' && github.ref == 'refs/heads/auto' && github.repository == 'rust-lang-ci/rust' @@ -741,7 +741,7 @@ jobs: permissions: actions: write # for rust-lang/simpleinfra/github-actions/cancel-outdated-builds <<: *base-ci-job - name: try + name: try - ${{ matrix.name }} env: <<: [*shared-ci-variables, *prod-variables] if: github.event_name == 'push' && (github.ref == 'refs/heads/try' || github.ref == 'refs/heads/try-perf') && github.repository == 'rust-lang-ci/rust' diff --git a/src/ci/run.sh b/src/ci/run.sh index 5f4e4a8e1b4..3056d9fc054 100755 --- a/src/ci/run.sh +++ b/src/ci/run.sh @@ -58,7 +58,12 @@ RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --disable-manage-submodules" RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --enable-locked-deps" RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --enable-cargo-native-static" RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --set rust.codegen-units-std=1" -RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --set dist.compression-profile=best" +# rust-lang/promote-release will recompress CI artifacts, and while we care +# about the per-commit artifact sizes, it's not as important that they're +# highly compressed as it is that the process is fast. Best compression +# generally implies single-threaded compression which results in wasting most +# of our CPU resources. +RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --set dist.compression-profile=balanced" # When building for mingw, limit the number of parallel linker jobs during # the LLVM build, as not to run out of memory. diff --git a/src/doc/book b/src/doc/book -Subproject 21a2ed14f4480dab62438dcc1130291bebc6537 +Subproject 0510ca84c2ce6bf93c4ccf9248756e9e4fd00b1 diff --git a/src/doc/rust-by-example b/src/doc/rust-by-example -Subproject cfbfd648ce33926c3490f24de9a5b56cce404b8 +Subproject ba84bf35d0f17d404003349309201654d25f61a diff --git a/src/doc/rustc-dev-guide b/src/doc/rustc-dev-guide -Subproject d08baa166b463537229eeb737c4ccadabd83cf7 +Subproject fca8af6c154c6cde2512f1331cf2704f214a818 diff --git a/src/doc/rustc/src/codegen-options/index.md b/src/doc/rustc/src/codegen-options/index.md index c7f120dafea..62347f169a5 100644 --- a/src/doc/rustc/src/codegen-options/index.md +++ b/src/doc/rustc/src/codegen-options/index.md @@ -71,9 +71,11 @@ If not specified, debug assertions are automatically enabled only if the This flag controls the generation of debug information. It takes one of the following values: -* `0`: no debug info at all (the default). -* `1`: line tables only. -* `2`: full debug info. +* `0` or `none`: no debug info at all (the default). +* `line-directives-only`: line info directives only. For the nvptx* targets this enables [profiling](https://reviews.llvm.org/D46061). For other use cases, `line-tables-only` is the better, more compatible choice. +* `line-tables-only`: line tables only. Generates the minimal amount of debug info for backtraces with filename/line number info, but not anything else, i.e. no variable or function parameter info. +* `1` or `limited`: debug info without type or variable-level information. +* `2` or `full`: full debug info. Note: The [`-g` flag][option-g-debug] is an alias for `-C debuginfo=2`. diff --git a/src/doc/rustc/src/platform-support/armv4t-none-eabi.md b/src/doc/rustc/src/platform-support/armv4t-none-eabi.md index cf831e1595e..a230eba6bf9 100644 --- a/src/doc/rustc/src/platform-support/armv4t-none-eabi.md +++ b/src/doc/rustc/src/platform-support/armv4t-none-eabi.md @@ -17,13 +17,6 @@ specific with this target, so any ARMv4T device should work fine. The target is cross-compiled, and uses static linking. -The linker that comes with rustc cannot link for this platform (the platform is -too old). You will need the `arm-none-eabi-ld` linker from a GNU Binutils -targeting ARM. This can be obtained for Windows/Mac/Linux from the [ARM -Developer Website][arm-dev], or possibly from your OS's package manager. - -[arm-dev]: https://developer.arm.com/Tools%20and%20Software/GNU%20Toolchain - This target doesn't provide a linker script, you'll need to bring your own according to the specific device you want to target. Pass `-Clink-arg=-Tyour_script.ld` as a rustc argument to make the linker use diff --git a/src/doc/rustdoc/src/unstable-features.md b/src/doc/rustdoc/src/unstable-features.md index b8b5014ab42..960c1de1782 100644 --- a/src/doc/rustdoc/src/unstable-features.md +++ b/src/doc/rustdoc/src/unstable-features.md @@ -177,9 +177,9 @@ Book][unstable-masked] and [its tracking issue][issue-masked]. This is for Rust compiler internal use only. Since primitive types are defined in the compiler, there's no place to attach documentation -attributes. The `#[doc(primitive)]` attribute is used by the standard library to provide a way -to generate documentation for primitive types, and requires `#![feature(rustdoc_internals)]` to -enable. +attributes. The `#[rustc_doc_primitive = "..."]` attribute is used by the standard library to +provide a way to generate documentation for primitive types, and requires `#![feature(rustc_attrs)]` +to enable. ### Document keywords diff --git a/src/librustdoc/clean/mod.rs b/src/librustdoc/clean/mod.rs index 2d247bd537b..1c57cd7a946 100644 --- a/src/librustdoc/clean/mod.rs +++ b/src/librustdoc/clean/mod.rs @@ -2002,7 +2002,8 @@ fn clean_generic_args<'tcx>( generic_args: &hir::GenericArgs<'tcx>, cx: &mut DocContext<'tcx>, ) -> GenericArgs { - if generic_args.parenthesized { + // FIXME(return_type_notation): Fix RTN parens rendering + if generic_args.parenthesized == hir::GenericArgsParentheses::ParenSugar { let output = clean_ty(generic_args.bindings[0].ty(), cx); let output = if output != Type::Tuple(Vec::new()) { Some(Box::new(output)) } else { None }; let inputs = diff --git a/src/librustdoc/clean/types.rs b/src/librustdoc/clean/types.rs index 909e0a07e4c..a37d4f31643 100644 --- a/src/librustdoc/clean/types.rs +++ b/src/librustdoc/clean/types.rs @@ -249,38 +249,24 @@ impl ExternalCrate { // // Note that this loop only searches the top-level items of the crate, // and this is intentional. If we were to search the entire crate for an - // item tagged with `#[doc(primitive)]` then we would also have to + // item tagged with `#[rustc_doc_primitive]` then we would also have to // search the entirety of external modules for items tagged - // `#[doc(primitive)]`, which is a pretty inefficient process (decoding + // `#[rustc_doc_primitive]`, which is a pretty inefficient process (decoding // all that metadata unconditionally). // // In order to keep the metadata load under control, the - // `#[doc(primitive)]` feature is explicitly designed to only allow the + // `#[rustc_doc_primitive]` feature is explicitly designed to only allow the // primitive tags to show up as the top level items in a crate. // // Also note that this does not attempt to deal with modules tagged // duplicately for the same primitive. This is handled later on when // rendering by delegating everything to a hash map. let as_primitive = |res: Res<!>| { - if let Res::Def(DefKind::Mod, def_id) = res { - let mut prim = None; - let meta_items = tcx - .get_attrs(def_id, sym::doc) - .flat_map(|attr| attr.meta_item_list().unwrap_or_default()); - for meta in meta_items { - if let Some(v) = meta.value_str() { - if meta.has_name(sym::primitive) { - prim = PrimitiveType::from_symbol(v); - if prim.is_some() { - break; - } - // FIXME: should warn on unknown primitives? - } - } - } - return prim.map(|p| (def_id, p)); - } - None + let Res::Def(DefKind::Mod, def_id) = res else { return None }; + tcx.get_attrs(def_id, sym::rustc_doc_primitive).find_map(|attr| { + // FIXME: should warn on unknown primitives? + Some((def_id, PrimitiveType::from_symbol(attr.value_str()?)?)) + }) }; if root.is_local() { @@ -466,10 +452,12 @@ impl Item { pub(crate) fn links(&self, cx: &Context<'_>) -> Vec<RenderedLink> { use crate::html::format::{href, link_tooltip}; - cx.cache() + let Some(links) = cx.cache() .intra_doc_links - .get(&self.item_id) - .map_or(&[][..], |v| v.as_slice()) + .get(&self.item_id) else { + return vec![] + }; + links .iter() .filter_map(|ItemLink { link: s, link_text, page_id: id, ref fragment }| { debug!(?id); @@ -497,10 +485,12 @@ impl Item { /// the link text, but does need to know which `[]`-bracketed names /// are actually links. pub(crate) fn link_names(&self, cache: &Cache) -> Vec<RenderedLink> { - cache + let Some(links) = cache .intra_doc_links - .get(&self.item_id) - .map_or(&[][..], |v| v.as_slice()) + .get(&self.item_id) else { + return vec![]; + }; + links .iter() .map(|ItemLink { link: s, link_text, .. }| RenderedLink { original_text: s.clone(), @@ -1020,7 +1010,7 @@ pub(crate) fn collapse_doc_fragments(doc_strings: &[DocFragment]) -> String { /// A link that has not yet been rendered. /// /// This link will be turned into a rendered link by [`Item::links`]. -#[derive(Clone, Debug, PartialEq, Eq)] +#[derive(Clone, Debug, PartialEq, Eq, Hash)] pub(crate) struct ItemLink { /// The original link written in the markdown pub(crate) link: Box<str>, @@ -1829,13 +1819,17 @@ impl PrimitiveType { } } - /// Returns the DefId of the module with `doc(primitive)` for this primitive type. + /// Returns the DefId of the module with `rustc_doc_primitive` for this primitive type. /// Panics if there is no such module. /// - /// This gives precedence to primitives defined in the current crate, and deprioritizes primitives defined in `core`, - /// but otherwise, if multiple crates define the same primitive, there is no guarantee of which will be picked. - /// In particular, if a crate depends on both `std` and another crate that also defines `doc(primitive)`, then - /// it's entirely random whether `std` or the other crate is picked. (no_std crates are usually fine unless multiple dependencies define a primitive.) + /// This gives precedence to primitives defined in the current crate, and deprioritizes + /// primitives defined in `core`, + /// but otherwise, if multiple crates define the same primitive, there is no guarantee of which + /// will be picked. + /// + /// In particular, if a crate depends on both `std` and another crate that also defines + /// `rustc_doc_primitive`, then it's entirely random whether `std` or the other crate is picked. + /// (no_std crates are usually fine unless multiple dependencies define a primitive.) pub(crate) fn primitive_locations(tcx: TyCtxt<'_>) -> &FxHashMap<PrimitiveType, DefId> { static PRIMITIVE_LOCATIONS: OnceCell<FxHashMap<PrimitiveType, DefId>> = OnceCell::new(); PRIMITIVE_LOCATIONS.get_or_init(|| { diff --git a/src/librustdoc/config.rs b/src/librustdoc/config.rs index 2c514a0c826..ea8c7e9a67c 100644 --- a/src/librustdoc/config.rs +++ b/src/librustdoc/config.rs @@ -31,18 +31,13 @@ use crate::passes::{self, Condition}; use crate::scrape_examples::{AllCallLocations, ScrapeExamplesOptions}; use crate::theme; -#[derive(Clone, Copy, PartialEq, Eq, Debug)] +#[derive(Clone, Copy, PartialEq, Eq, Debug, Default)] pub(crate) enum OutputFormat { Json, + #[default] Html, } -impl Default for OutputFormat { - fn default() -> OutputFormat { - OutputFormat::Html - } -} - impl OutputFormat { pub(crate) fn is_json(&self) -> bool { matches!(self, OutputFormat::Json) diff --git a/src/librustdoc/formats/cache.rs b/src/librustdoc/formats/cache.rs index 0295de8437e..c0329182032 100644 --- a/src/librustdoc/formats/cache.rs +++ b/src/librustdoc/formats/cache.rs @@ -1,6 +1,6 @@ use std::mem; -use rustc_data_structures::fx::{FxHashMap, FxHashSet}; +use rustc_data_structures::fx::{FxHashMap, FxHashSet, FxIndexSet}; use rustc_hir::def_id::{CrateNum, DefId, DefIdMap, DefIdSet}; use rustc_middle::ty::{self, TyCtxt}; use rustc_span::Symbol; @@ -118,7 +118,7 @@ pub(crate) struct Cache { /// All intra-doc links resolved so far. /// /// Links are indexed by the DefId of the item they document. - pub(crate) intra_doc_links: FxHashMap<ItemId, Vec<clean::ItemLink>>, + pub(crate) intra_doc_links: FxHashMap<ItemId, FxIndexSet<clean::ItemLink>>, /// Cfg that have been hidden via #![doc(cfg_hide(...))] pub(crate) hidden_cfg: FxHashSet<clean::cfg::Cfg>, } diff --git a/src/librustdoc/html/format.rs b/src/librustdoc/html/format.rs index 0895bb510d4..02b358e863b 100644 --- a/src/librustdoc/html/format.rs +++ b/src/librustdoc/html/format.rs @@ -1142,22 +1142,21 @@ fn fmt_type<'cx>( // the ugliness comes from inlining across crates where // everything comes in as a fully resolved QPath (hard to // look at). - match href(trait_.def_id(), cx) { - Ok((ref url, _, ref path)) if !f.alternate() => { - write!( - f, - "<a class=\"associatedtype\" href=\"{url}#{shortty}.{name}\" \ - title=\"type {path}::{name}\">{name}</a>{args}", - url = url, - shortty = ItemType::AssocType, - name = assoc.name, - path = join_with_double_colon(path), - args = assoc.args.print(cx), - )?; - } - _ => write!(f, "{}{:#}", assoc.name, assoc.args.print(cx))?, - } - Ok(()) + if !f.alternate() && let Ok((url, _, path)) = href(trait_.def_id(), cx) { + write!( + f, + "<a class=\"associatedtype\" href=\"{url}#{shortty}.{name}\" \ + title=\"type {path}::{name}\">{name}</a>", + shortty = ItemType::AssocType, + name = assoc.name, + path = join_with_double_colon(&path), + ) + } else { + write!(f, "{}", assoc.name) + }?; + + // Carry `f.alternate()` into this display w/o branching manually. + fmt::Display::fmt(&assoc.args.print(cx), f) } } } diff --git a/src/librustdoc/html/highlight.rs b/src/librustdoc/html/highlight.rs index c099d0e4f3f..b61dd571458 100644 --- a/src/librustdoc/html/highlight.rs +++ b/src/librustdoc/html/highlight.rs @@ -177,8 +177,8 @@ impl<'a, 'tcx, F: Write> TokenHandler<'a, 'tcx, F> { } else { // We only want to "open" the tag ourselves if we have more than one pending and if the // current parent tag is not the same as our pending content. - let close_tag = if self.pending_elems.len() > 1 && current_class.is_some() { - Some(enter_span(self.out, current_class.unwrap(), &self.href_context)) + let close_tag = if self.pending_elems.len() > 1 && let Some(current_class) = current_class { + Some(enter_span(self.out, current_class, &self.href_context)) } else { None }; diff --git a/src/librustdoc/html/render/sidebar.rs b/src/librustdoc/html/render/sidebar.rs index 94ad4753d7c..455b4e9aefe 100644 --- a/src/librustdoc/html/render/sidebar.rs +++ b/src/librustdoc/html/render/sidebar.rs @@ -113,11 +113,8 @@ pub(super) fn print_sidebar(cx: &Context<'_>, it: &clean::Item, buffer: &mut Buf } else { ("", "") }; - let version = if it.is_crate() { - cx.cache().crate_version.as_ref().map(String::as_str).unwrap_or_default() - } else { - "" - }; + let version = + if it.is_crate() { cx.cache().crate_version.as_deref().unwrap_or_default() } else { "" }; let path: String = if !it.is_mod() { cx.current.iter().map(|s| s.as_str()).intersperse("::").collect() } else { diff --git a/src/librustdoc/html/static/js/main.js b/src/librustdoc/html/static/js/main.js index 1487ebf9b0a..45c0360a49e 100644 --- a/src/librustdoc/html/static/js/main.js +++ b/src/librustdoc/html/static/js/main.js @@ -1016,9 +1016,7 @@ function preLoadCss(cssUrl) { <code>enum</code>, <code>trait</code>, <code>type</code>, <code>macro</code>, \ and <code>const</code>.", "Search functions by type signature (e.g., <code>vec -> usize</code> or \ - <code>-> vec</code>)", - "Search multiple things at once by splitting your query with comma (e.g., \ - <code>str,u8</code> or <code>String,struct:Vec,test</code>)", + <code>-> vec</code> or <code>String, enum:Cow -> bool</code>)", "You can look for items with an exact name by putting double quotes around \ your request: <code>\"string\"</code>", "Look for items inside another one by searching for a path: <code>vec::Vec</code>", diff --git a/src/librustdoc/json/conversions.rs b/src/librustdoc/json/conversions.rs index 59d67f27b30..c39caf73a93 100644 --- a/src/librustdoc/json/conversions.rs +++ b/src/librustdoc/json/conversions.rs @@ -249,9 +249,7 @@ pub(crate) fn id_from_item_inner( // instead, we directly get the primitive symbol and convert it to u32 to // generate the ID. if matches!(tcx.def_kind(def_id), DefKind::Mod) && - let Some(prim) = tcx.get_attrs(*def_id, sym::doc) - .flat_map(|attr| attr.meta_item_list().unwrap_or_default()) - .filter(|attr| attr.has_name(sym::primitive)) + let Some(prim) = tcx.get_attrs(*def_id, sym::rustc_doc_primitive) .find_map(|attr| attr.value_str()) { format!(":{}", prim.as_u32()) } else { diff --git a/src/librustdoc/json/mod.rs b/src/librustdoc/json/mod.rs index 08bceb59cfd..d6da6e09938 100644 --- a/src/librustdoc/json/mod.rs +++ b/src/librustdoc/json/mod.rs @@ -78,7 +78,7 @@ impl<'tcx> JsonRenderer<'tcx> { // HACK(hkmatsumoto): For impls of primitive types, we index them // regardless of whether they're local. This is because users can // document primitive items in an arbitrary crate by using - // `doc(primitive)`. + // `rustc_doc_primitive`. let mut is_primitive_impl = false; if let clean::types::ItemKind::ImplItem(ref impl_) = *item.kind && impl_.trait_.is_none() && diff --git a/src/librustdoc/passes/collect_intra_doc_links.rs b/src/librustdoc/passes/collect_intra_doc_links.rs index d98cf251e97..2cd9c8a8781 100644 --- a/src/librustdoc/passes/collect_intra_doc_links.rs +++ b/src/librustdoc/passes/collect_intra_doc_links.rs @@ -47,7 +47,18 @@ fn collect_intra_doc_links(krate: Crate, cx: &mut DocContext<'_>) -> Crate { krate } -#[derive(Copy, Clone, Debug, Hash)] +fn filter_assoc_items_by_name_and_namespace<'a>( + tcx: TyCtxt<'a>, + assoc_items_of: DefId, + ident: Ident, + ns: Namespace, +) -> impl Iterator<Item = &ty::AssocItem> + 'a { + tcx.associated_items(assoc_items_of).filter_by_name_unhygienic(ident.name).filter(move |item| { + item.kind.namespace() == ns && tcx.hygienic_eq(ident, item.ident(tcx), assoc_items_of) + }) +} + +#[derive(Copy, Clone, Debug, Hash, PartialEq)] enum Res { Def(DefKind, DefId), Primitive(PrimitiveType), @@ -59,7 +70,7 @@ impl Res { fn descr(self) -> &'static str { match self { Res::Def(kind, id) => ResolveRes::Def(kind, id).descr(), - Res::Primitive(_) => "builtin type", + Res::Primitive(_) => "primitive type", } } @@ -317,14 +328,21 @@ impl<'a, 'tcx> LinkCollector<'a, 'tcx> { prim_ty: PrimitiveType, ns: Namespace, item_name: Symbol, - ) -> Option<(Res, DefId)> { + ) -> Vec<(Res, DefId)> { let tcx = self.cx.tcx; - prim_ty.impls(tcx).find_map(|impl_| { - tcx.associated_items(impl_) - .find_by_name_and_namespace(tcx, Ident::with_dummy_span(item_name), ns, impl_) + prim_ty + .impls(tcx) + .flat_map(|impl_| { + filter_assoc_items_by_name_and_namespace( + tcx, + impl_, + Ident::with_dummy_span(item_name), + ns, + ) .map(|item| (Res::Primitive(prim_ty), item.def_id)) - }) + }) + .collect::<Vec<_>>() } fn resolve_self_ty(&self, path_str: &str, ns: Namespace, item_id: DefId) -> Option<Res> { @@ -394,14 +412,16 @@ impl<'a, 'tcx> LinkCollector<'a, 'tcx> { ns: Namespace, item_id: DefId, module_id: DefId, - ) -> Result<(Res, Option<DefId>), UnresolvedPath<'path>> { + ) -> Result<Vec<(Res, Option<DefId>)>, UnresolvedPath<'path>> { if let Some(res) = self.resolve_path(path_str, ns, item_id, module_id) { return Ok(match res { Res::Def( DefKind::AssocFn | DefKind::AssocConst | DefKind::AssocTy | DefKind::Variant, def_id, - ) => (Res::from_def_id(self.cx.tcx, self.cx.tcx.parent(def_id)), Some(def_id)), - _ => (res, None), + ) => { + vec![(Res::from_def_id(self.cx.tcx, self.cx.tcx.parent(def_id)), Some(def_id))] + } + _ => vec![(res, None)], }); } else if ns == MacroNS { return Err(UnresolvedPath { @@ -433,17 +453,24 @@ impl<'a, 'tcx> LinkCollector<'a, 'tcx> { })?; // FIXME(#83862): this arbitrarily gives precedence to primitives over modules to support - // links to primitives when `#[doc(primitive)]` is present. It should give an ambiguity - // error instead and special case *only* modules with `#[doc(primitive)]`, not all + // links to primitives when `#[rustc_doc_primitive]` is present. It should give an ambiguity + // error instead and special case *only* modules with `#[rustc_doc_primitive]`, not all // primitives. - resolve_primitive(&path_root, TypeNS) + match resolve_primitive(&path_root, TypeNS) .or_else(|| self.resolve_path(&path_root, TypeNS, item_id, module_id)) .and_then(|ty_res| { - self.resolve_associated_item(ty_res, item_name, ns, module_id).map(Ok) - }) - .unwrap_or_else(|| { + let candidates = self + .resolve_associated_item(ty_res, item_name, ns, module_id) + .into_iter() + .map(|(res, def_id)| (res, Some(def_id))) + .collect::<Vec<_>>(); + if !candidates.is_empty() { Some(candidates) } else { None } + }) { + Some(r) => Ok(r), + None => { if ns == Namespace::ValueNS { self.variant_field(path_str, item_id, module_id) + .map(|(res, def_id)| vec![(res, Some(def_id))]) } else { Err(UnresolvedPath { item_id, @@ -452,8 +479,8 @@ impl<'a, 'tcx> LinkCollector<'a, 'tcx> { unresolved: path_root.into(), }) } - }) - .map(|(res, def_id)| (res, Some(def_id))) + } + } } /// Convert a DefId to a Res, where possible. @@ -535,24 +562,31 @@ impl<'a, 'tcx> LinkCollector<'a, 'tcx> { item_name: Symbol, ns: Namespace, module_id: DefId, - ) -> Option<(Res, DefId)> { + ) -> Vec<(Res, DefId)> { let tcx = self.cx.tcx; match root_res { Res::Primitive(prim) => { - self.resolve_primitive_associated_item(prim, ns, item_name).or_else(|| { + let items = self.resolve_primitive_associated_item(prim, ns, item_name); + if !items.is_empty() { + items + // Inherent associated items take precedence over items that come from trait impls. + } else { self.primitive_type_to_ty(prim) - .and_then(|ty| { + .map(|ty| { resolve_associated_trait_item(ty, module_id, item_name, ns, self.cx) + .iter() + .map(|item| (root_res, item.def_id)) + .collect::<Vec<_>>() }) - .map(|item| (root_res, item.def_id)) - }) + .unwrap_or(Vec::new()) + } } Res::Def(DefKind::TyAlias, did) => { // Resolve the link on the type the alias points to. // FIXME: if the associated item is defined directly on the type alias, // it will show up on its documentation page, we should link there instead. - let res = self.def_id_to_res(did)?; + let Some(res) = self.def_id_to_res(did) else { return Vec::new() }; self.resolve_associated_item(res, item_name, ns, module_id) } Res::Def( @@ -566,7 +600,7 @@ impl<'a, 'tcx> LinkCollector<'a, 'tcx> { ty::Adt(adt_def, _) => { for variant in adt_def.variants() { if variant.name == item_name { - return Some((root_res, variant.def_id)); + return vec![(root_res, variant.def_id)]; } } } @@ -575,43 +609,46 @@ impl<'a, 'tcx> LinkCollector<'a, 'tcx> { } // Checks if item_name belongs to `impl SomeItem` - let assoc_item = tcx + let mut assoc_items: Vec<_> = tcx .inherent_impls(did) .iter() .flat_map(|&imp| { - tcx.associated_items(imp).find_by_name_and_namespace( + filter_assoc_items_by_name_and_namespace( tcx, + imp, Ident::with_dummy_span(item_name), ns, - imp, ) }) - .copied() - // There should only ever be one associated item that matches from any inherent impl - .next() + .map(|item| (root_res, item.def_id)) + .collect(); + + if assoc_items.is_empty() { // Check if item_name belongs to `impl SomeTrait for SomeItem` // FIXME(#74563): This gives precedence to `impl SomeItem`: // Although having both would be ambiguous, use impl version for compatibility's sake. // To handle that properly resolve() would have to support // something like [`ambi_fn`](<SomeStruct as SomeTrait>::ambi_fn) - .or_else(|| { - resolve_associated_trait_item( - tcx.type_of(did).subst_identity(), - module_id, - item_name, - ns, - self.cx, - ) - }); + assoc_items = resolve_associated_trait_item( + tcx.type_of(did).subst_identity(), + module_id, + item_name, + ns, + self.cx, + ) + .into_iter() + .map(|item| (root_res, item.def_id)) + .collect::<Vec<_>>(); + } - debug!("got associated item {:?}", assoc_item); + debug!("got associated item {:?}", assoc_items); - if let Some(item) = assoc_item { - return Some((root_res, item.def_id)); + if !assoc_items.is_empty() { + return assoc_items; } if ns != Namespace::ValueNS { - return None; + return Vec::new(); } debug!("looking for fields named {} for {:?}", item_name, did); // FIXME: this doesn't really belong in `associated_item` (maybe `variant_field` is better?) @@ -631,20 +668,27 @@ impl<'a, 'tcx> LinkCollector<'a, 'tcx> { // field syntax) and are handled by the compiler's resolver. let def = match tcx.type_of(did).subst_identity().kind() { ty::Adt(def, _) if !def.is_enum() => def, - _ => return None, + _ => return Vec::new(), }; - let field = - def.non_enum_variant().fields.iter().find(|item| item.name == item_name)?; - Some((root_res, field.did)) + def.non_enum_variant() + .fields + .iter() + .filter(|field| field.name == item_name) + .map(|field| (root_res, field.did)) + .collect::<Vec<_>>() } - Res::Def(DefKind::Trait, did) => tcx - .associated_items(did) - .find_by_name_and_namespace(tcx, Ident::with_dummy_span(item_name), ns, did) - .map(|item| { - let res = Res::Def(item.kind.as_def_kind(), item.def_id); - (res, item.def_id) - }), - _ => None, + Res::Def(DefKind::Trait, did) => filter_assoc_items_by_name_and_namespace( + tcx, + did, + Ident::with_dummy_span(item_name), + ns, + ) + .map(|item| { + let res = Res::Def(item.kind.as_def_kind(), item.def_id); + (res, item.def_id) + }) + .collect::<Vec<_>>(), + _ => Vec::new(), } } } @@ -664,7 +708,7 @@ fn resolve_associated_trait_item<'a>( item_name: Symbol, ns: Namespace, cx: &mut DocContext<'a>, -) -> Option<ty::AssocItem> { +) -> Vec<ty::AssocItem> { // FIXME: this should also consider blanket impls (`impl<T> X for T`). Unfortunately // `get_auto_trait_and_blanket_impls` is broken because the caching behavior is wrong. In the // meantime, just don't look for these blanket impls. @@ -672,19 +716,26 @@ fn resolve_associated_trait_item<'a>( // Next consider explicit impls: `impl MyTrait for MyType` // Give precedence to inherent impls. let traits = trait_impls_for(cx, ty, module); + let tcx = cx.tcx; debug!("considering traits {:?}", traits); - let mut candidates = traits.iter().filter_map(|&(impl_, trait_)| { - cx.tcx - .associated_items(trait_) - .find_by_name_and_namespace(cx.tcx, Ident::with_dummy_span(item_name), ns, trait_) - .map(|trait_assoc| { - trait_assoc_to_impl_assoc_item(cx.tcx, impl_, trait_assoc.def_id) + let candidates = traits + .iter() + .flat_map(|&(impl_, trait_)| { + filter_assoc_items_by_name_and_namespace( + cx.tcx, + trait_, + Ident::with_dummy_span(item_name), + ns, + ) + .map(move |trait_assoc| { + trait_assoc_to_impl_assoc_item(tcx, impl_, trait_assoc.def_id) .unwrap_or(*trait_assoc) }) - }); + }) + .collect::<Vec<_>>(); // FIXME(#74563): warn about ambiguity - debug!("the candidates were {:?}", candidates.clone().collect::<Vec<_>>()); - candidates.next() + debug!("the candidates were {:?}", candidates); + candidates } /// Find the associated item in the impl `impl_id` that corresponds to the @@ -758,15 +809,15 @@ fn trait_impls_for<'a>( /// Check for resolve collisions between a trait and its derive. /// /// These are common and we should just resolve to the trait in that case. -fn is_derive_trait_collision<T>(ns: &PerNS<Result<(Res, T), ResolutionFailure<'_>>>) -> bool { - matches!( - *ns, - PerNS { - type_ns: Ok((Res::Def(DefKind::Trait, _), _)), - macro_ns: Ok((Res::Def(DefKind::Macro(MacroKind::Derive), _), _)), - .. - } - ) +fn is_derive_trait_collision<T>(ns: &PerNS<Result<Vec<(Res, T)>, ResolutionFailure<'_>>>) -> bool { + if let (Ok(type_ns), Ok(macro_ns)) = (&ns.type_ns, &ns.macro_ns) { + type_ns.iter().any(|(res, _)| matches!(res, Res::Def(DefKind::Trait, _))) + && macro_ns + .iter() + .any(|(res, _)| matches!(res, Res::Def(DefKind::Macro(MacroKind::Derive), _))) + } else { + false + } } impl<'a, 'tcx> DocVisitor for LinkCollector<'a, 'tcx> { @@ -927,7 +978,7 @@ impl LinkCollector<'_, '_> { for md_link in preprocessed_markdown_links(&doc) { let link = self.resolve_link(item, item_id, module_id, &doc, &md_link); if let Some(link) = link { - self.cx.cache.intra_doc_links.entry(item.item_id).or_default().push(link); + self.cx.cache.intra_doc_links.entry(item.item_id).or_default().insert(link); } } } @@ -987,15 +1038,15 @@ impl LinkCollector<'_, '_> { res = prim; } else { // `[char]` when a `char` module is in scope - let candidates = vec![res, prim]; - ambiguity_error(self.cx, diag_info, path_str, candidates); + let candidates = &[(res, res.def_id(self.cx.tcx)), (prim, None)]; + ambiguity_error(self.cx, &diag_info, path_str, candidates); return None; } } } match res { - Res::Primitive(prim) => { + Res::Primitive(_) => { if let Some(UrlFragment::Item(id)) = fragment { // We're actually resolving an associated item of a primitive, so we need to // verify the disambiguator (if any) matches the type of the associated item. @@ -1015,15 +1066,6 @@ impl LinkCollector<'_, '_> { item, &diag_info, )?; - - // FIXME: it would be nice to check that the feature gate was enabled in the original crate, not just ignore it altogether. - // However I'm not sure how to check that across crates. - if prim == PrimitiveType::RawPointer - && item.item_id.is_local() - && !self.cx.tcx.features().intra_doc_pointers - { - self.report_rawptr_assoc_feature_gate(dox, ori_link, item); - } } else { match disambiguator { Some(Disambiguator::Primitive | Disambiguator::Namespace(_)) | None => {} @@ -1102,7 +1144,7 @@ impl LinkCollector<'_, '_> { } } - // item can be non-local e.g. when using #[doc(primitive = "pointer")] + // item can be non-local e.g. when using `#[rustc_doc_primitive = "pointer"]` if let Some((src_id, dst_id)) = id.as_local().and_then(|dst_id| { item.item_id.expect_def_id().as_local().map(|src_id| (src_id, dst_id)) }) { @@ -1144,10 +1186,9 @@ impl LinkCollector<'_, '_> { report_diagnostic(self.cx.tcx, BROKEN_INTRA_DOC_LINKS, &msg, diag_info, callback); } - fn report_rawptr_assoc_feature_gate(&self, dox: &str, ori_link: &MarkdownLink, item: &Item) { - let span = - super::source_span_for_markdown_range(self.cx.tcx, dox, &ori_link.range, &item.attrs) - .unwrap_or_else(|| item.attr_span(self.cx.tcx)); + fn report_rawptr_assoc_feature_gate(&self, dox: &str, ori_link: &Range<usize>, item: &Item) { + let span = super::source_span_for_markdown_range(self.cx.tcx, dox, ori_link, &item.attrs) + .unwrap_or_else(|| item.attr_span(self.cx.tcx)); rustc_session::parse::feature_err( &self.cx.tcx.sess.parse_sess, sym::intra_doc_pointers, @@ -1172,7 +1213,31 @@ impl LinkCollector<'_, '_> { } } - let res = self.resolve_with_disambiguator(&key, diag.clone()).and_then(|(res, def_id)| { + let mut candidates = self.resolve_with_disambiguator(&key, diag.clone()); + + // FIXME: it would be nice to check that the feature gate was enabled in the original crate, not just ignore it altogether. + // However I'm not sure how to check that across crates. + if let Some(candidate) = candidates.get(0) && + candidate.0 == Res::Primitive(PrimitiveType::RawPointer) && + key.path_str.contains("::") // We only want to check this if this is an associated item. + { + if key.item_id.is_local() && !self.cx.tcx.features().intra_doc_pointers { + self.report_rawptr_assoc_feature_gate(diag.dox, &diag.link_range, diag.item); + return None; + } else { + candidates = vec![candidates[0]]; + } + } + + // If there are multiple items with the same "kind" (for example, both "associated types") + // and after removing duplicated kinds, only one remains, the `ambiguity_error` function + // won't emit an error. So at this point, we can just take the first candidate as it was + // the first retrieved and use it to generate the link. + if candidates.len() > 1 && !ambiguity_error(self.cx, &diag, &key.path_str, &candidates) { + candidates = vec![candidates[0]]; + } + + if let &[(res, def_id)] = candidates.as_slice() { let fragment = match (&key.extra_fragment, def_id) { (Some(_), Some(def_id)) => { report_anchor_conflict(self.cx, diag, def_id); @@ -1182,13 +1247,15 @@ impl LinkCollector<'_, '_> { (None, Some(def_id)) => Some(UrlFragment::Item(def_id)), (None, None) => None, }; - Some((res, fragment)) - }); + let r = Some((res, fragment)); + self.visited_links.insert(key, r.clone()); + return r; + } - if res.is_some() || cache_errors { - self.visited_links.insert(key, res.clone()); + if cache_errors { + self.visited_links.insert(key, None); } - res + None } /// After parsing the disambiguator, resolve the main part of the link. @@ -1197,7 +1264,7 @@ impl LinkCollector<'_, '_> { &mut self, key: &ResolutionInfo, diag: DiagnosticInfo<'_>, - ) -> Option<(Res, Option<DefId>)> { + ) -> Vec<(Res, Option<DefId>)> { let disambiguator = key.dis; let path_str = &key.path_str; let item_id = key.item_id; @@ -1206,7 +1273,7 @@ impl LinkCollector<'_, '_> { match disambiguator.map(Disambiguator::ns) { Some(expected_ns) => { match self.resolve(path_str, expected_ns, item_id, module_id) { - Ok(res) => Some(res), + Ok(candidates) => candidates, Err(err) => { // We only looked in one namespace. Try to give a better error if possible. // FIXME: really it should be `resolution_failure` that does this, not `resolve_with_disambiguator`. @@ -1215,10 +1282,11 @@ impl LinkCollector<'_, '_> { for other_ns in [TypeNS, ValueNS, MacroNS] { if other_ns != expected_ns { if let Ok(res) = - self.resolve(path_str, other_ns, item_id, module_id) + self.resolve(path_str, other_ns, item_id, module_id) && + !res.is_empty() { err = ResolutionFailure::WrongNamespace { - res: full_res(self.cx.tcx, res), + res: full_res(self.cx.tcx, res[0]), expected_ns, }; break; @@ -1239,18 +1307,26 @@ impl LinkCollector<'_, '_> { let candidates = PerNS { macro_ns: candidate(MacroNS), type_ns: candidate(TypeNS), - value_ns: candidate(ValueNS).and_then(|(res, def_id)| { - match res { - // Constructors are picked up in the type namespace. - Res::Def(DefKind::Ctor(..), _) => { - Err(ResolutionFailure::WrongNamespace { res, expected_ns: TypeNS }) + value_ns: candidate(ValueNS).and_then(|v_res| { + for (res, _) in v_res.iter() { + match res { + // Constructors are picked up in the type namespace. + Res::Def(DefKind::Ctor(..), _) => { + return Err(ResolutionFailure::WrongNamespace { + res: *res, + expected_ns: TypeNS, + }); + } + _ => {} } - _ => Ok((res, def_id)), } + Ok(v_res) }), }; - let len = candidates.iter().filter(|res| res.is_ok()).count(); + let len = candidates + .iter() + .fold(0, |acc, res| if let Ok(res) = res { acc + res.len() } else { acc }); if len == 0 { return resolution_failure( @@ -1260,22 +1336,21 @@ impl LinkCollector<'_, '_> { disambiguator, candidates.into_iter().filter_map(|res| res.err()).collect(), ); - } - - if len == 1 { - Some(candidates.into_iter().find_map(|res| res.ok()).unwrap()) - } else if len == 2 && is_derive_trait_collision(&candidates) { - Some(candidates.type_ns.unwrap()) + } else if len == 1 { + candidates.into_iter().filter_map(|res| res.ok()).flatten().collect::<Vec<_>>() } else { - let ignore_macro = is_derive_trait_collision(&candidates); - // If we're reporting an ambiguity, don't mention the namespaces that failed - let mut candidates = - candidates.map(|candidate| candidate.ok().map(|(res, _)| res)); - if ignore_macro { - candidates.macro_ns = None; + let has_derive_trait_collision = is_derive_trait_collision(&candidates); + if len == 2 && has_derive_trait_collision { + candidates.type_ns.unwrap() + } else { + // If we're reporting an ambiguity, don't mention the namespaces that failed + let mut candidates = candidates.map(|candidate| candidate.ok()); + // If there a collision between a trait and a derive, we ignore the derive. + if has_derive_trait_collision { + candidates.macro_ns = None; + } + candidates.into_iter().filter_map(|res| res).flatten().collect::<Vec<_>>() } - ambiguity_error(self.cx, diag, path_str, candidates.present_items().collect()); - None } } } @@ -1563,7 +1638,7 @@ fn resolution_failure( path_str: &str, disambiguator: Option<Disambiguator>, kinds: SmallVec<[ResolutionFailure<'_>; 3]>, -) -> Option<(Res, Option<DefId>)> { +) -> Vec<(Res, Option<DefId>)> { let tcx = collector.cx.tcx; let mut recovered_res = None; report_diagnostic( @@ -1622,11 +1697,13 @@ fn resolution_failure( }; name = start; for ns in [TypeNS, ValueNS, MacroNS] { - if let Ok(res) = collector.resolve(start, ns, item_id, module_id) { - debug!("found partial_res={:?}", res); - *partial_res = Some(full_res(collector.cx.tcx, res)); - *unresolved = end.into(); - break 'outer; + if let Ok(v_res) = collector.resolve(start, ns, item_id, module_id) { + debug!("found partial_res={:?}", v_res); + if !v_res.is_empty() { + *partial_res = Some(full_res(collector.cx.tcx, v_res[0])); + *unresolved = end.into(); + break 'outer; + } } } *unresolved = end.into(); @@ -1774,7 +1851,10 @@ fn resolution_failure( }, ); - recovered_res + match recovered_res { + Some(r) => vec![r], + None => Vec::new(), + } } fn report_multiple_anchors(cx: &DocContext<'_>, diag_info: DiagnosticInfo<'_>) { @@ -1859,28 +1939,47 @@ fn report_malformed_generics( } /// Report an ambiguity error, where there were multiple possible resolutions. +/// +/// If all `candidates` have the same kind, it's not possible to disambiguate so in this case, +/// the function won't emit an error and will return `false`. Otherwise, it'll emit the error and +/// return `true`. fn ambiguity_error( cx: &DocContext<'_>, - diag_info: DiagnosticInfo<'_>, + diag_info: &DiagnosticInfo<'_>, path_str: &str, - candidates: Vec<Res>, -) { - let mut msg = format!("`{}` is ", path_str); + candidates: &[(Res, Option<DefId>)], +) -> bool { + let mut descrs = FxHashSet::default(); + let kinds = candidates + .iter() + .map( + |(res, def_id)| { + if let Some(def_id) = def_id { Res::from_def_id(cx.tcx, *def_id) } else { *res } + }, + ) + .filter(|res| descrs.insert(res.descr())) + .collect::<Vec<_>>(); + if descrs.len() == 1 { + // There is no way for users to disambiguate at this point, so better return the first + // candidate and not show a warning. + return false; + } - match candidates.as_slice() { - [first_def, second_def] => { + let mut msg = format!("`{}` is ", path_str); + match kinds.as_slice() { + [res1, res2] => { msg += &format!( "both {} {} and {} {}", - first_def.article(), - first_def.descr(), - second_def.article(), - second_def.descr(), + res1.article(), + res1.descr(), + res2.article(), + res2.descr() ); } _ => { - let mut candidates = candidates.iter().peekable(); - while let Some(res) = candidates.next() { - if candidates.peek().is_some() { + let mut kinds = kinds.iter().peekable(); + while let Some(res) = kinds.next() { + if kinds.peek().is_some() { msg += &format!("{} {}, ", res.article(), res.descr()); } else { msg += &format!("and {} {}", res.article(), res.descr()); @@ -1889,17 +1988,18 @@ fn ambiguity_error( } } - report_diagnostic(cx.tcx, BROKEN_INTRA_DOC_LINKS, &msg, &diag_info, |diag, sp| { + report_diagnostic(cx.tcx, BROKEN_INTRA_DOC_LINKS, &msg, diag_info, |diag, sp| { if let Some(sp) = sp { diag.span_label(sp, "ambiguous link"); } else { diag.note("ambiguous link"); } - for res in candidates { + for res in kinds { suggest_disambiguator(res, diag, path_str, diag_info.ori_link, sp); } }); + true } /// In case of an ambiguity or mismatched disambiguator, suggest the correct diff --git a/src/librustdoc/visit_ast.rs b/src/librustdoc/visit_ast.rs index 060062db002..c959bb3701a 100644 --- a/src/librustdoc/visit_ast.rs +++ b/src/librustdoc/visit_ast.rs @@ -421,12 +421,20 @@ impl<'a, 'tcx> RustdocVisitor<'a, 'tcx> { | hir::ItemKind::Struct(..) | hir::ItemKind::Union(..) | hir::ItemKind::TyAlias(..) - | hir::ItemKind::OpaqueTy(..) + | hir::ItemKind::OpaqueTy(hir::OpaqueTy { + origin: hir::OpaqueTyOrigin::TyAlias, .. + }) | hir::ItemKind::Static(..) | hir::ItemKind::Trait(..) | hir::ItemKind::TraitAlias(..) => { self.add_to_current_mod(item, renamed, import_id); } + hir::ItemKind::OpaqueTy(hir::OpaqueTy { + origin: hir::OpaqueTyOrigin::AsyncFn(_) | hir::OpaqueTyOrigin::FnReturn(_), + .. + }) => { + // return-position impl traits are never nameable, and should never be documented. + } hir::ItemKind::Const(..) => { // Underscore constants do not correspond to a nameable item and // so are never useful in documentation. diff --git a/src/tools/cargo b/src/tools/cargo -Subproject 145219a9f089f8b57c09f40525374fbade1e34a +Subproject 0e474cfd7b16b018cf46e95da3f6a5b2f1f6a9e diff --git a/src/tools/clippy/clippy_lints/src/redundant_static_lifetimes.rs b/src/tools/clippy/clippy_lints/src/redundant_static_lifetimes.rs index 44bf824aa0e..11b908e7e53 100644 --- a/src/tools/clippy/clippy_lints/src/redundant_static_lifetimes.rs +++ b/src/tools/clippy/clippy_lints/src/redundant_static_lifetimes.rs @@ -1,7 +1,7 @@ use clippy_utils::diagnostics::span_lint_and_then; use clippy_utils::msrvs::{self, Msrv}; use clippy_utils::source::snippet; -use rustc_ast::ast::{Item, ItemKind, Ty, TyKind}; +use rustc_ast::ast::{Item, ItemKind, Ty, TyKind, StaticItem, ConstItem}; use rustc_errors::Applicability; use rustc_lint::{EarlyContext, EarlyLintPass}; use rustc_session::{declare_tool_lint, impl_lint_pass}; @@ -100,13 +100,13 @@ impl EarlyLintPass for RedundantStaticLifetimes { } if !item.span.from_expansion() { - if let ItemKind::Const(_, ref var_type, _) = item.kind { + if let ItemKind::Const(box ConstItem { ty: ref var_type, .. }) = item.kind { Self::visit_type(var_type, cx, "constants have by default a `'static` lifetime"); // Don't check associated consts because `'static` cannot be elided on those (issue // #2438) } - if let ItemKind::Static(ref var_type, _, _) = item.kind { + if let ItemKind::Static(box StaticItem { ty: ref var_type,.. }) = item.kind { Self::visit_type(var_type, cx, "statics have by default a `'static` lifetime"); } } diff --git a/src/tools/clippy/clippy_lints/src/ref_option_ref.rs b/src/tools/clippy/clippy_lints/src/ref_option_ref.rs index 448a32b77c0..c984a8286eb 100644 --- a/src/tools/clippy/clippy_lints/src/ref_option_ref.rs +++ b/src/tools/clippy/clippy_lints/src/ref_option_ref.rs @@ -3,7 +3,7 @@ use clippy_utils::last_path_segment; use clippy_utils::source::snippet; use if_chain::if_chain; use rustc_errors::Applicability; -use rustc_hir::{GenericArg, Mutability, Ty, TyKind}; +use rustc_hir::{GenericArg, GenericArgsParentheses, Mutability, Ty, TyKind}; use rustc_lint::{LateContext, LateLintPass}; use rustc_session::{declare_lint_pass, declare_tool_lint}; use rustc_span::symbol::sym; @@ -47,7 +47,7 @@ impl<'tcx> LateLintPass<'tcx> for RefOptionRef { if cx.tcx.is_diagnostic_item(sym::Option, def_id); if let Some(params) = last_path_segment(qpath).args ; - if !params.parenthesized; + if params.parenthesized == GenericArgsParentheses::No; if let Some(inner_ty) = params.args.iter().find_map(|arg| match arg { GenericArg::Type(inner_ty) => Some(inner_ty), _ => None, diff --git a/src/tools/clippy/clippy_lints/src/types/borrowed_box.rs b/src/tools/clippy/clippy_lints/src/types/borrowed_box.rs index 65dfe7637ea..acdf5471069 100644 --- a/src/tools/clippy/clippy_lints/src/types/borrowed_box.rs +++ b/src/tools/clippy/clippy_lints/src/types/borrowed_box.rs @@ -20,7 +20,7 @@ pub(super) fn check(cx: &LateContext<'_>, hir_ty: &hir::Ty<'_>, lt: &Lifetime, m if let QPath::Resolved(None, path) = *qpath; if let [ref bx] = *path.segments; if let Some(params) = bx.args; - if !params.parenthesized; + if params.parenthesized == hir::GenericArgsParentheses::No; if let Some(inner) = params.args.iter().find_map(|arg| match arg { GenericArg::Type(ty) => Some(ty), _ => None, diff --git a/src/tools/clippy/clippy_lints/src/types/utils.rs b/src/tools/clippy/clippy_lints/src/types/utils.rs index 7f43b7841ff..a30748db88f 100644 --- a/src/tools/clippy/clippy_lints/src/types/utils.rs +++ b/src/tools/clippy/clippy_lints/src/types/utils.rs @@ -1,6 +1,6 @@ use clippy_utils::last_path_segment; use if_chain::if_chain; -use rustc_hir::{GenericArg, QPath, TyKind}; +use rustc_hir::{GenericArg, GenericArgsParentheses, QPath, TyKind}; use rustc_lint::LateContext; use rustc_span::source_map::Span; @@ -8,7 +8,7 @@ pub(super) fn match_borrows_parameter(_cx: &LateContext<'_>, qpath: &QPath<'_>) let last = last_path_segment(qpath); if_chain! { if let Some(params) = last.args; - if !params.parenthesized; + if params.parenthesized == GenericArgsParentheses::No; if let Some(ty) = params.args.iter().find_map(|arg| match arg { GenericArg::Type(ty) => Some(ty), _ => None, diff --git a/src/tools/clippy/clippy_lints/src/use_self.rs b/src/tools/clippy/clippy_lints/src/use_self.rs index 8ea5475fb25..7dfb0956077 100644 --- a/src/tools/clippy/clippy_lints/src/use_self.rs +++ b/src/tools/clippy/clippy_lints/src/use_self.rs @@ -10,7 +10,7 @@ use rustc_hir::{ def::{CtorOf, DefKind, Res}, def_id::LocalDefId, intravisit::{walk_inf, walk_ty, Visitor}, - Expr, ExprKind, FnRetTy, FnSig, GenericArg, GenericParam, GenericParamKind, HirId, Impl, ImplItemKind, Item, + Expr, ExprKind, FnRetTy, FnSig, GenericArg, GenericArgsParentheses, GenericParam, GenericParamKind, HirId, Impl, ImplItemKind, Item, ItemKind, Pat, PatKind, Path, QPath, Ty, TyKind, }; use rustc_hir_analysis::hir_ty_to_ty; @@ -100,7 +100,8 @@ impl<'tcx> LateLintPass<'tcx> for UseSelf { if let TyKind::Path(QPath::Resolved(_, item_path)) = self_ty.kind; let parameters = &item_path.segments.last().expect(SEGMENTS_MSG).args; if parameters.as_ref().map_or(true, |params| { - !params.parenthesized && !params.args.iter().any(|arg| matches!(arg, GenericArg::Lifetime(_))) + params.parenthesized == GenericArgsParentheses::No + && !params.args.iter().any(|arg| matches!(arg, GenericArg::Lifetime(_))) }); if !item.span.from_expansion(); if !is_from_proc_macro(cx, item); // expensive, should be last check diff --git a/src/tools/clippy/clippy_utils/src/ast_utils.rs b/src/tools/clippy/clippy_utils/src/ast_utils.rs index d2dedc20439..c5b58b0c060 100644 --- a/src/tools/clippy/clippy_utils/src/ast_utils.rs +++ b/src/tools/clippy/clippy_utils/src/ast_utils.rs @@ -286,8 +286,8 @@ pub fn eq_item_kind(l: &ItemKind, r: &ItemKind) -> bool { match (l, r) { (ExternCrate(l), ExternCrate(r)) => l == r, (Use(l), Use(r)) => eq_use_tree(l, r), - (Static(lt, lm, le), Static(rt, rm, re)) => lm == rm && eq_ty(lt, rt) && eq_expr_opt(le, re), - (Const(ld, lt, le), Const(rd, rt, re)) => eq_defaultness(*ld, *rd) && eq_ty(lt, rt) && eq_expr_opt(le, re), + (Static(box ast::StaticItem { ty: lt, mutability: lm, expr: le}), Static(box ast::StaticItem { ty: rt, mutability: rm, expr: re})) => lm == rm && eq_ty(lt, rt) && eq_expr_opt(le, re), + (Const(box ast::ConstItem { defaultness: ld, ty: lt, expr: le}), Const(box ast::ConstItem { defaultness: rd, ty: rt, expr: re} )) => eq_defaultness(*ld, *rd) && eq_ty(lt, rt) && eq_expr_opt(le, re), ( Fn(box ast::Fn { defaultness: ld, @@ -451,7 +451,7 @@ pub fn eq_foreign_item_kind(l: &ForeignItemKind, r: &ForeignItemKind) -> bool { pub fn eq_assoc_item_kind(l: &AssocItemKind, r: &AssocItemKind) -> bool { use AssocItemKind::*; match (l, r) { - (Const(ld, lt, le), Const(rd, rt, re)) => eq_defaultness(*ld, *rd) && eq_ty(lt, rt) && eq_expr_opt(le, re), + (Const(box ast::ConstItem { defaultness: ld, ty: lt, expr: le}), Const(box ast::ConstItem { defaultness: rd, ty: rt, expr: re})) => eq_defaultness(*ld, *rd) && eq_ty(lt, rt) && eq_expr_opt(le, re), ( Fn(box ast::Fn { defaultness: ld, diff --git a/src/tools/clippy/clippy_utils/src/hir_utils.rs b/src/tools/clippy/clippy_utils/src/hir_utils.rs index 3a6d23ca5c1..3ee7147828b 100644 --- a/src/tools/clippy/clippy_utils/src/hir_utils.rs +++ b/src/tools/clippy/clippy_utils/src/hir_utils.rs @@ -401,14 +401,9 @@ impl HirEqInterExpr<'_, '_, '_> { } fn eq_path_parameters(&mut self, left: &GenericArgs<'_>, right: &GenericArgs<'_>) -> bool { - if !(left.parenthesized || right.parenthesized) { + if left.parenthesized == right.parenthesized { over(left.args, right.args, |l, r| self.eq_generic_arg(l, r)) // FIXME(flip1995): may not work && over(left.bindings, right.bindings, |l, r| self.eq_type_binding(l, r)) - } else if left.parenthesized && right.parenthesized { - over(left.inputs(), right.inputs(), |l, r| self.eq_ty(l, r)) - && both(&Some(&left.bindings[0].ty()), &Some(&right.bindings[0].ty()), |l, r| { - self.eq_ty(l, r) - }) } else { false } diff --git a/src/tools/compiletest/src/util.rs b/src/tools/compiletest/src/util.rs index 5f6a27e5366..748240cc94b 100644 --- a/src/tools/compiletest/src/util.rs +++ b/src/tools/compiletest/src/util.rs @@ -156,6 +156,8 @@ pub fn dylib_env_var() -> &'static str { "DYLD_LIBRARY_PATH" } else if cfg!(target_os = "haiku") { "LIBRARY_PATH" + } else if cfg!(target_os = "aix") { + "LIBPATH" } else { "LD_LIBRARY_PATH" } diff --git a/src/tools/miri/Cargo.toml b/src/tools/miri/Cargo.toml index 717020f43c4..6705bf7b007 100644 --- a/src/tools/miri/Cargo.toml +++ b/src/tools/miri/Cargo.toml @@ -34,7 +34,7 @@ measureme = "10.0.0" libc = "0.2" [target.'cfg(target_os = "linux")'.dependencies] -libffi = "3.0.0" +libffi = "3.2.0" libloading = "0.7" [dev-dependencies] diff --git a/src/tools/rust-installer/src/compression.rs b/src/tools/rust-installer/src/compression.rs index 510c914163c..7c9c946e0b5 100644 --- a/src/tools/rust-installer/src/compression.rs +++ b/src/tools/rust-installer/src/compression.rs @@ -89,43 +89,11 @@ impl CompressionFormat { xz2::stream::MtStreamBuilder::new().threads(6).preset(6).encoder().unwrap() } CompressionProfile::Best => { - let mut filters = xz2::stream::Filters::new(); - // the preset is overridden by the other options so it doesn't matter - let mut lzma_ops = xz2::stream::LzmaOptions::new_preset(9).unwrap(); - // This sets the overall dictionary size, which is also how much memory (baseline) - // is needed for decompression. - lzma_ops.dict_size(64 * 1024 * 1024); - // Use the best match finder for compression ratio. - lzma_ops.match_finder(xz2::stream::MatchFinder::BinaryTree4); - lzma_ops.mode(xz2::stream::Mode::Normal); - // Set nice len to the maximum for best compression ratio - lzma_ops.nice_len(273); - // Set depth to a reasonable value, 0 means auto, 1000 is somwhat high but gives - // good results. - lzma_ops.depth(1000); - // 2 is the default and does well for most files - lzma_ops.position_bits(2); - // 0 is the default and does well for most files - lzma_ops.literal_position_bits(0); - // 3 is the default and does well for most files - lzma_ops.literal_context_bits(3); - - filters.lzma2(&lzma_ops); - - let mut builder = xz2::stream::MtStreamBuilder::new(); - builder.filters(filters); - - // On 32-bit platforms limit ourselves to 3 threads, otherwise we exceed memory - // usage this process can take. In the future we'll likely only do super-fast - // compression in CI and move this heavyweight processing to promote-release (which - // is always 64-bit and can run on big-memory machines) but for now this lets us - // move forward. - if std::mem::size_of::<usize>() == 4 { - builder.threads(3); - } else { - builder.threads(6); - } - builder.encoder().unwrap() + // Note that this isn't actually the best compression settings for the + // produced artifacts, the production artifacts on static.rust-lang.org are + // produced by rust-lang/promote-release which hosts recompression logic + // and is tuned for optimal compression. + xz2::stream::MtStreamBuilder::new().threads(6).preset(9).encoder().unwrap() } }; @@ -245,20 +213,14 @@ impl Write for CombinedEncoder { } fn flush(&mut self) -> std::io::Result<()> { - self.encoders - .par_iter_mut() - .map(|w| w.flush()) - .collect::<std::io::Result<Vec<()>>>()?; + self.encoders.par_iter_mut().map(|w| w.flush()).collect::<std::io::Result<Vec<()>>>()?; Ok(()) } } impl Encoder for CombinedEncoder { fn finish(self: Box<Self>) -> Result<(), Error> { - self.encoders - .into_par_iter() - .map(|e| e.finish()) - .collect::<Result<Vec<()>, Error>>()?; + self.encoders.into_par_iter().map(|e| e.finish()).collect::<Result<Vec<()>, Error>>()?; Ok(()) } } diff --git a/src/tools/rustfmt/src/items.rs b/src/tools/rustfmt/src/items.rs index 25e8a024857..43779cfaecd 100644 --- a/src/tools/rustfmt/src/items.rs +++ b/src/tools/rustfmt/src/items.rs @@ -1804,13 +1804,15 @@ pub(crate) struct StaticParts<'a> { impl<'a> StaticParts<'a> { pub(crate) fn from_item(item: &'a ast::Item) -> Self { - let (defaultness, prefix, ty, mutability, expr) = match item.kind { - ast::ItemKind::Static(ref ty, mutability, ref expr) => { - (None, "static", ty, mutability, expr) - } - ast::ItemKind::Const(defaultness, ref ty, ref expr) => { - (Some(defaultness), "const", ty, ast::Mutability::Not, expr) - } + let (defaultness, prefix, ty, mutability, expr) = match &item.kind { + ast::ItemKind::Static(s) => (None, "static", &s.ty, s.mutability, &s.expr), + ast::ItemKind::Const(c) => ( + Some(c.defaultness), + "const", + &c.ty, + ast::Mutability::Not, + &c.expr, + ), _ => unreachable!(), }; StaticParts { @@ -1826,10 +1828,8 @@ impl<'a> StaticParts<'a> { } pub(crate) fn from_trait_item(ti: &'a ast::AssocItem) -> Self { - let (defaultness, ty, expr_opt) = match ti.kind { - ast::AssocItemKind::Const(defaultness, ref ty, ref expr_opt) => { - (defaultness, ty, expr_opt) - } + let (defaultness, ty, expr_opt) = match &ti.kind { + ast::AssocItemKind::Const(c) => (c.defaultness, &c.ty, &c.expr), _ => unreachable!(), }; StaticParts { @@ -1845,8 +1845,8 @@ impl<'a> StaticParts<'a> { } pub(crate) fn from_impl_item(ii: &'a ast::AssocItem) -> Self { - let (defaultness, ty, expr) = match ii.kind { - ast::AssocItemKind::Const(defaultness, ref ty, ref expr) => (defaultness, ty, expr), + let (defaultness, ty, expr) = match &ii.kind { + ast::AssocItemKind::Const(c) => (c.defaultness, &c.ty, &c.expr), _ => unreachable!(), }; StaticParts { diff --git a/src/tools/tidy/src/ui_tests.rs b/src/tools/tidy/src/ui_tests.rs index 20b8a2c3b24..f582666ab28 100644 --- a/src/tools/tidy/src/ui_tests.rs +++ b/src/tools/tidy/src/ui_tests.rs @@ -9,7 +9,7 @@ use std::path::{Path, PathBuf}; const ENTRY_LIMIT: usize = 1000; // FIXME: The following limits should be reduced eventually. -const ROOT_ENTRY_LIMIT: usize = 940; +const ROOT_ENTRY_LIMIT: usize = 881; const ISSUES_ENTRY_LIMIT: usize = 1978; fn check_entries(tests_path: &Path, bad: &mut bool) { diff --git a/tests/codegen/debug-limited.rs b/tests/codegen/debug-limited.rs new file mode 100644 index 00000000000..48d676887fd --- /dev/null +++ b/tests/codegen/debug-limited.rs @@ -0,0 +1,27 @@ +// Verify that the limited debuginfo option emits llvm's FullDebugInfo, but no type info. +// +// compile-flags: -C debuginfo=limited + +#[repr(C)] +struct StructType { + a: i64, + b: i32, +} + +extern "C" { + fn creator() -> *mut StructType; + fn save(p: *const StructType); +} + +fn main() { + unsafe { + let value: &mut StructType = &mut *creator(); + value.a = 7; + save(value as *const StructType) + } +} + +// CHECK: !DICompileUnit +// CHECK: emissionKind: FullDebug +// CHECK: !DILocation +// CHECK-NOT: !DIBasicType diff --git a/tests/codegen/debug-line-directives-only.rs b/tests/codegen/debug-line-directives-only.rs new file mode 100644 index 00000000000..750bdd49de0 --- /dev/null +++ b/tests/codegen/debug-line-directives-only.rs @@ -0,0 +1,27 @@ +// Verify that the only debuginfo generated are the line directives. +// +// compile-flags: -C debuginfo=line-directives-only + +#[repr(C)] +struct StructType { + a: i64, + b: i32, +} + +extern "C" { + fn creator() -> *mut StructType; + fn save(p: *const StructType); +} + +fn main() { + unsafe { + let value: &mut StructType = &mut *creator(); + value.a = 7; + save(value as *const StructType) + } +} + +// CHECK: !DICompileUnit +// CHECK: emissionKind: DebugDirectivesOnly +// CHECK: !DILocation +// CHECK-NOT: !DIBasicType diff --git a/tests/codegen/debug-line-tables-only.rs b/tests/codegen/debug-line-tables-only.rs new file mode 100644 index 00000000000..3ed165a6f69 --- /dev/null +++ b/tests/codegen/debug-line-tables-only.rs @@ -0,0 +1,27 @@ +// Verify that the only debuginfo generated are the line tables. +// +// compile-flags: -C debuginfo=line-tables-only + +#[repr(C)] +struct StructType { + a: i64, + b: i32, +} + +extern "C" { + fn creator() -> *mut StructType; + fn save(p: *const StructType); +} + +fn main() { + unsafe { + let value: &mut StructType = &mut *creator(); + value.a = 7; + save(value as *const StructType) + } +} + +// CHECK: !DICompileUnit +// CHECK: emissionKind: LineTablesOnly +// CHECK: !DILocation +// CHECK-NOT: !DIBasicType diff --git a/tests/codegen/vec-in-place.rs b/tests/codegen/vec-in-place.rs index 9992604221b..d68067ceb19 100644 --- a/tests/codegen/vec-in-place.rs +++ b/tests/codegen/vec-in-place.rs @@ -1,11 +1,13 @@ // ignore-debug: the debug assertions get in the way // compile-flags: -O -Z merge-functions=disabled +// min-llvm-version: 16 #![crate_type = "lib"] // Ensure that trivial casts of vec elements are O(1) pub struct Wrapper<T>(T); +// previously repr(C) caused the optimization to fail #[repr(C)] pub struct Foo { a: u64, @@ -14,9 +16,8 @@ pub struct Foo { d: u64, } -// Going from an aggregate struct to another type currently requires Copy to -// enable the TrustedRandomAccess specialization. Without it optimizations do not yet -// reliably recognize the loops as noop for repr(C) or non-Copy structs. +// implementing Copy exercises the TrustedRandomAccess specialization inside the in-place +// specialization #[derive(Copy, Clone)] pub struct Bar { a: u64, @@ -25,6 +26,14 @@ pub struct Bar { d: u64, } +// this exercises the try-fold codepath +pub struct Baz { + a: u64, + b: u64, + c: u64, + d: u64, +} + // CHECK-LABEL: @vec_iterator_cast_primitive #[no_mangle] pub fn vec_iterator_cast_primitive(vec: Vec<i8>) -> Vec<u8> { @@ -52,18 +61,29 @@ pub fn vec_iterator_cast_unwrap(vec: Vec<Wrapper<u8>>) -> Vec<u8> { // CHECK-LABEL: @vec_iterator_cast_aggregate #[no_mangle] pub fn vec_iterator_cast_aggregate(vec: Vec<[u64; 4]>) -> Vec<Foo> { - // FIXME These checks should be the same as other functions. - // CHECK-NOT: @__rust_alloc - // CHECK-NOT: @__rust_alloc + // CHECK-NOT: loop + // CHECK-NOT: call vec.into_iter().map(|e| unsafe { std::mem::transmute(e) }).collect() } -// CHECK-LABEL: @vec_iterator_cast_deaggregate +// CHECK-LABEL: @vec_iterator_cast_deaggregate_tra #[no_mangle] -pub fn vec_iterator_cast_deaggregate(vec: Vec<Bar>) -> Vec<[u64; 4]> { - // FIXME These checks should be the same as other functions. - // CHECK-NOT: @__rust_alloc - // CHECK-NOT: @__rust_alloc +pub fn vec_iterator_cast_deaggregate_tra(vec: Vec<Bar>) -> Vec<[u64; 4]> { + // CHECK-NOT: loop + // CHECK-NOT: call + + // Safety: For the purpose of this test we assume that Bar layout matches [u64; 4]. + // This currently is not guaranteed for repr(Rust) types, but it happens to work here and + // the UCG may add additional guarantees for homogenous types in the future that would make this + // correct. + vec.into_iter().map(|e| unsafe { std::mem::transmute(e) }).collect() +} + +// CHECK-LABEL: @vec_iterator_cast_deaggregate_fold +#[no_mangle] +pub fn vec_iterator_cast_deaggregate_fold(vec: Vec<Baz>) -> Vec<[u64; 4]> { + // CHECK-NOT: loop + // CHECK-NOT: call // Safety: For the purpose of this test we assume that Bar layout matches [u64; 4]. // This currently is not guaranteed for repr(Rust) types, but it happens to work here and diff --git a/tests/run-make-fulldeps/hotplug_codegen_backend/Makefile b/tests/run-make-fulldeps/hotplug_codegen_backend/Makefile index 4cda243ffb5..6752091e699 100644 --- a/tests/run-make-fulldeps/hotplug_codegen_backend/Makefile +++ b/tests/run-make-fulldeps/hotplug_codegen_backend/Makefile @@ -1,4 +1,4 @@ -include ../tools.mk +include ../../run-make/tools.mk # ignore-stage1 diff --git a/tests/run-make-fulldeps/issue-19371/Makefile b/tests/run-make-fulldeps/issue-19371/Makefile index 994e50801c8..edec68f0862 100644 --- a/tests/run-make-fulldeps/issue-19371/Makefile +++ b/tests/run-make-fulldeps/issue-19371/Makefile @@ -1,4 +1,4 @@ -include ../tools.mk +include ../../run-make/tools.mk # This test ensures that rustc compile_input can be called twice in one task # without causing a panic. diff --git a/tests/run-make-fulldeps/issue-25581/Makefile b/tests/run-make-fulldeps/issue-25581/Makefile deleted file mode 100644 index 4f5d026f213..00000000000 --- a/tests/run-make-fulldeps/issue-25581/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -include ../tools.mk - -all: $(call NATIVE_STATICLIB,test) - $(RUSTC) test.rs - $(call RUN,test) || exit 1 diff --git a/tests/run-make-fulldeps/obtain-borrowck/Makefile b/tests/run-make-fulldeps/obtain-borrowck/Makefile index 212d0f67d00..233f5c9eaf4 100644 --- a/tests/run-make-fulldeps/obtain-borrowck/Makefile +++ b/tests/run-make-fulldeps/obtain-borrowck/Makefile @@ -1,4 +1,4 @@ -include ../tools.mk +include ../../run-make/tools.mk # This example shows how to implement a rustc driver that retrieves MIR bodies # together with the borrow checker information. diff --git a/tests/run-make-fulldeps/pretty-expanded/Makefile b/tests/run-make-fulldeps/pretty-expanded/Makefile index 5a0097a8351..48199179ece 100644 --- a/tests/run-make-fulldeps/pretty-expanded/Makefile +++ b/tests/run-make-fulldeps/pretty-expanded/Makefile @@ -1,4 +1,4 @@ -include ../tools.mk +include ../../run-make/tools.mk all: $(RUSTC) -o $(TMPDIR)/input.expanded.rs -Zunpretty=expanded input.rs diff --git a/tests/run-make-fulldeps/a-b-a-linker-guard/Makefile b/tests/run-make/a-b-a-linker-guard/Makefile index adc9e3d0916..43282eae09c 100644 --- a/tests/run-make-fulldeps/a-b-a-linker-guard/Makefile +++ b/tests/run-make/a-b-a-linker-guard/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk # Test that if we build `b` against a version of `a` that has one set diff --git a/tests/run-make-fulldeps/a-b-a-linker-guard/a.rs b/tests/run-make/a-b-a-linker-guard/a.rs index aa07b1e7160..aa07b1e7160 100644 --- a/tests/run-make-fulldeps/a-b-a-linker-guard/a.rs +++ b/tests/run-make/a-b-a-linker-guard/a.rs diff --git a/tests/run-make-fulldeps/a-b-a-linker-guard/b.rs b/tests/run-make/a-b-a-linker-guard/b.rs index f30df120a3b..f30df120a3b 100644 --- a/tests/run-make-fulldeps/a-b-a-linker-guard/b.rs +++ b/tests/run-make/a-b-a-linker-guard/b.rs diff --git a/tests/run-make-fulldeps/alloc-no-oom-handling/Makefile b/tests/run-make/alloc-no-oom-handling/Makefile index 87f74c69c79..87f74c69c79 100644 --- a/tests/run-make-fulldeps/alloc-no-oom-handling/Makefile +++ b/tests/run-make/alloc-no-oom-handling/Makefile diff --git a/tests/run-make-fulldeps/alloc-no-rc/Makefile b/tests/run-make/alloc-no-rc/Makefile index 9824b17e6c2..9824b17e6c2 100644 --- a/tests/run-make-fulldeps/alloc-no-rc/Makefile +++ b/tests/run-make/alloc-no-rc/Makefile diff --git a/tests/run-make-fulldeps/alloc-no-sync/Makefile b/tests/run-make/alloc-no-sync/Makefile index 04ec4c7d8bc..04ec4c7d8bc 100644 --- a/tests/run-make-fulldeps/alloc-no-sync/Makefile +++ b/tests/run-make/alloc-no-sync/Makefile diff --git a/tests/run-make-fulldeps/allow-non-lint-warnings-cmdline/Makefile b/tests/run-make/allow-non-lint-warnings-cmdline/Makefile index 60d9c7c3745..78b9a7b9898 100644 --- a/tests/run-make-fulldeps/allow-non-lint-warnings-cmdline/Makefile +++ b/tests/run-make/allow-non-lint-warnings-cmdline/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk # Test that -A warnings makes the 'empty trait list for derive' warning go away diff --git a/tests/run-make-fulldeps/allow-non-lint-warnings-cmdline/foo.rs b/tests/run-make/allow-non-lint-warnings-cmdline/foo.rs index 46e72da2de9..46e72da2de9 100644 --- a/tests/run-make-fulldeps/allow-non-lint-warnings-cmdline/foo.rs +++ b/tests/run-make/allow-non-lint-warnings-cmdline/foo.rs diff --git a/tests/run-make-fulldeps/allow-warnings-cmdline-stability/Makefile b/tests/run-make/allow-warnings-cmdline-stability/Makefile index 1ce8d0ec284..368a39af6bf 100644 --- a/tests/run-make-fulldeps/allow-warnings-cmdline-stability/Makefile +++ b/tests/run-make/allow-warnings-cmdline-stability/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk # Test that -A warnings makes the 'empty trait list for derive' warning go away diff --git a/tests/run-make-fulldeps/allow-warnings-cmdline-stability/bar.rs b/tests/run-make/allow-warnings-cmdline-stability/bar.rs index 3dcfb9dadd8..3dcfb9dadd8 100644 --- a/tests/run-make-fulldeps/allow-warnings-cmdline-stability/bar.rs +++ b/tests/run-make/allow-warnings-cmdline-stability/bar.rs diff --git a/tests/run-make-fulldeps/allow-warnings-cmdline-stability/foo.rs b/tests/run-make/allow-warnings-cmdline-stability/foo.rs index 869b5435416..869b5435416 100644 --- a/tests/run-make-fulldeps/allow-warnings-cmdline-stability/foo.rs +++ b/tests/run-make/allow-warnings-cmdline-stability/foo.rs diff --git a/tests/run-make-fulldeps/archive-duplicate-names/Makefile b/tests/run-make/archive-duplicate-names/Makefile index bbdcd2a34fe..5433a42d252 100644 --- a/tests/run-make-fulldeps/archive-duplicate-names/Makefile +++ b/tests/run-make/archive-duplicate-names/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk all: diff --git a/tests/run-make-fulldeps/archive-duplicate-names/bar.c b/tests/run-make/archive-duplicate-names/bar.c index e4259998678..e4259998678 100644 --- a/tests/run-make-fulldeps/archive-duplicate-names/bar.c +++ b/tests/run-make/archive-duplicate-names/bar.c diff --git a/tests/run-make-fulldeps/archive-duplicate-names/bar.rs b/tests/run-make/archive-duplicate-names/bar.rs index 994a98c2cd8..994a98c2cd8 100644 --- a/tests/run-make-fulldeps/archive-duplicate-names/bar.rs +++ b/tests/run-make/archive-duplicate-names/bar.rs diff --git a/tests/run-make-fulldeps/archive-duplicate-names/foo.c b/tests/run-make/archive-duplicate-names/foo.c index 85e6cd8c390..85e6cd8c390 100644 --- a/tests/run-make-fulldeps/archive-duplicate-names/foo.c +++ b/tests/run-make/archive-duplicate-names/foo.c diff --git a/tests/run-make-fulldeps/archive-duplicate-names/foo.rs b/tests/run-make/archive-duplicate-names/foo.rs index 0bf13c406ab..0bf13c406ab 100644 --- a/tests/run-make-fulldeps/archive-duplicate-names/foo.rs +++ b/tests/run-make/archive-duplicate-names/foo.rs diff --git a/tests/run-make-fulldeps/arguments-non-c-like-enum/Makefile b/tests/run-make/arguments-non-c-like-enum/Makefile index 513311c8289..0c8d8bf3acc 100644 --- a/tests/run-make-fulldeps/arguments-non-c-like-enum/Makefile +++ b/tests/run-make/arguments-non-c-like-enum/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk all: diff --git a/tests/run-make-fulldeps/arguments-non-c-like-enum/nonclike.rs b/tests/run-make/arguments-non-c-like-enum/nonclike.rs index 57c2c6127ed..57c2c6127ed 100644 --- a/tests/run-make-fulldeps/arguments-non-c-like-enum/nonclike.rs +++ b/tests/run-make/arguments-non-c-like-enum/nonclike.rs diff --git a/tests/run-make-fulldeps/arguments-non-c-like-enum/test.c b/tests/run-make/arguments-non-c-like-enum/test.c index 0a1621e49f2..0a1621e49f2 100644 --- a/tests/run-make-fulldeps/arguments-non-c-like-enum/test.c +++ b/tests/run-make/arguments-non-c-like-enum/test.c diff --git a/tests/run-make-fulldeps/atomic-lock-free/Makefile b/tests/run-make/atomic-lock-free/Makefile index 37e59624a25..37e59624a25 100644 --- a/tests/run-make-fulldeps/atomic-lock-free/Makefile +++ b/tests/run-make/atomic-lock-free/Makefile diff --git a/tests/run-make-fulldeps/atomic-lock-free/atomic_lock_free.rs b/tests/run-make/atomic-lock-free/atomic_lock_free.rs index 47d90b1856b..47d90b1856b 100644 --- a/tests/run-make-fulldeps/atomic-lock-free/atomic_lock_free.rs +++ b/tests/run-make/atomic-lock-free/atomic_lock_free.rs diff --git a/tests/run-make-fulldeps/bare-outfile/Makefile b/tests/run-make/bare-outfile/Makefile index 858466e942b..23b619ea0ba 100644 --- a/tests/run-make-fulldeps/bare-outfile/Makefile +++ b/tests/run-make/bare-outfile/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk all: diff --git a/tests/run-make-fulldeps/bare-outfile/foo.rs b/tests/run-make/bare-outfile/foo.rs index f79c691f085..f79c691f085 100644 --- a/tests/run-make-fulldeps/bare-outfile/foo.rs +++ b/tests/run-make/bare-outfile/foo.rs diff --git a/tests/run-make-fulldeps/c-dynamic-dylib/Makefile b/tests/run-make/c-dynamic-dylib/Makefile index ac68778922d..b5bfbc76539 100644 --- a/tests/run-make-fulldeps/c-dynamic-dylib/Makefile +++ b/tests/run-make/c-dynamic-dylib/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk # ignore-macos diff --git a/tests/run-make-fulldeps/c-dynamic-dylib/bar.rs b/tests/run-make/c-dynamic-dylib/bar.rs index b8c798ffdb4..b8c798ffdb4 100644 --- a/tests/run-make-fulldeps/c-dynamic-dylib/bar.rs +++ b/tests/run-make/c-dynamic-dylib/bar.rs diff --git a/tests/run-make-fulldeps/c-dynamic-dylib/cfoo.c b/tests/run-make/c-dynamic-dylib/cfoo.c index fea490cf9b4..fea490cf9b4 100644 --- a/tests/run-make-fulldeps/c-dynamic-dylib/cfoo.c +++ b/tests/run-make/c-dynamic-dylib/cfoo.c diff --git a/tests/run-make-fulldeps/c-dynamic-dylib/foo.rs b/tests/run-make/c-dynamic-dylib/foo.rs index 9f7a9e2213c..9f7a9e2213c 100644 --- a/tests/run-make-fulldeps/c-dynamic-dylib/foo.rs +++ b/tests/run-make/c-dynamic-dylib/foo.rs diff --git a/tests/run-make-fulldeps/c-dynamic-rlib/Makefile b/tests/run-make/c-dynamic-rlib/Makefile index c65d648b929..0475bd8acae 100644 --- a/tests/run-make-fulldeps/c-dynamic-rlib/Makefile +++ b/tests/run-make/c-dynamic-rlib/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk # ignore-macos diff --git a/tests/run-make-fulldeps/c-dynamic-rlib/bar.rs b/tests/run-make/c-dynamic-rlib/bar.rs index b8c798ffdb4..b8c798ffdb4 100644 --- a/tests/run-make-fulldeps/c-dynamic-rlib/bar.rs +++ b/tests/run-make/c-dynamic-rlib/bar.rs diff --git a/tests/run-make-fulldeps/c-dynamic-rlib/cfoo.c b/tests/run-make/c-dynamic-rlib/cfoo.c index fea490cf9b4..fea490cf9b4 100644 --- a/tests/run-make-fulldeps/c-dynamic-rlib/cfoo.c +++ b/tests/run-make/c-dynamic-rlib/cfoo.c diff --git a/tests/run-make-fulldeps/c-dynamic-rlib/foo.rs b/tests/run-make/c-dynamic-rlib/foo.rs index 3dd376f1ff5..3dd376f1ff5 100644 --- a/tests/run-make-fulldeps/c-dynamic-rlib/foo.rs +++ b/tests/run-make/c-dynamic-rlib/foo.rs diff --git a/tests/run-make-fulldeps/c-link-to-rust-dylib/Makefile b/tests/run-make/c-link-to-rust-dylib/Makefile index 2a371b54541..2763cb6ed1d 100644 --- a/tests/run-make-fulldeps/c-link-to-rust-dylib/Makefile +++ b/tests/run-make/c-link-to-rust-dylib/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk all: $(TMPDIR)/$(call BIN,bar) diff --git a/tests/run-make-fulldeps/c-link-to-rust-dylib/bar.c b/tests/run-make/c-link-to-rust-dylib/bar.c index bb4036b06e1..bb4036b06e1 100644 --- a/tests/run-make-fulldeps/c-link-to-rust-dylib/bar.c +++ b/tests/run-make/c-link-to-rust-dylib/bar.c diff --git a/tests/run-make-fulldeps/c-link-to-rust-dylib/foo.rs b/tests/run-make/c-link-to-rust-dylib/foo.rs index f197fa51334..f197fa51334 100644 --- a/tests/run-make-fulldeps/c-link-to-rust-dylib/foo.rs +++ b/tests/run-make/c-link-to-rust-dylib/foo.rs diff --git a/tests/run-make-fulldeps/c-link-to-rust-staticlib/Makefile b/tests/run-make/c-link-to-rust-staticlib/Makefile index d38bcef309a..e14775f5c18 100644 --- a/tests/run-make-fulldeps/c-link-to-rust-staticlib/Makefile +++ b/tests/run-make/c-link-to-rust-staticlib/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk # ignore-freebsd diff --git a/tests/run-make-fulldeps/c-link-to-rust-staticlib/bar.c b/tests/run-make/c-link-to-rust-staticlib/bar.c index bb4036b06e1..bb4036b06e1 100644 --- a/tests/run-make-fulldeps/c-link-to-rust-staticlib/bar.c +++ b/tests/run-make/c-link-to-rust-staticlib/bar.c diff --git a/tests/run-make-fulldeps/c-link-to-rust-staticlib/foo.rs b/tests/run-make/c-link-to-rust-staticlib/foo.rs index 2e59432cdb1..2e59432cdb1 100644 --- a/tests/run-make-fulldeps/c-link-to-rust-staticlib/foo.rs +++ b/tests/run-make/c-link-to-rust-staticlib/foo.rs diff --git a/tests/run-make-fulldeps/c-link-to-rust-va-list-fn/Makefile b/tests/run-make/c-link-to-rust-va-list-fn/Makefile index 9ce2a34e677..596c0fce3ce 100644 --- a/tests/run-make-fulldeps/c-link-to-rust-va-list-fn/Makefile +++ b/tests/run-make/c-link-to-rust-va-list-fn/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk all: diff --git a/tests/run-make-fulldeps/c-link-to-rust-va-list-fn/checkrust.rs b/tests/run-make/c-link-to-rust-va-list-fn/checkrust.rs index 5830ef033d3..5830ef033d3 100644 --- a/tests/run-make-fulldeps/c-link-to-rust-va-list-fn/checkrust.rs +++ b/tests/run-make/c-link-to-rust-va-list-fn/checkrust.rs diff --git a/tests/run-make-fulldeps/c-link-to-rust-va-list-fn/test.c b/tests/run-make/c-link-to-rust-va-list-fn/test.c index 5bdb51680a6..5bdb51680a6 100644 --- a/tests/run-make-fulldeps/c-link-to-rust-va-list-fn/test.c +++ b/tests/run-make/c-link-to-rust-va-list-fn/test.c diff --git a/tests/run-make-fulldeps/c-static-dylib/Makefile b/tests/run-make/c-static-dylib/Makefile index 5b78005e3ee..4e23edb6c57 100644 --- a/tests/run-make-fulldeps/c-static-dylib/Makefile +++ b/tests/run-make/c-static-dylib/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk all: $(call NATIVE_STATICLIB,cfoo) diff --git a/tests/run-make-fulldeps/c-static-dylib/bar.rs b/tests/run-make/c-static-dylib/bar.rs index b8c798ffdb4..b8c798ffdb4 100644 --- a/tests/run-make-fulldeps/c-static-dylib/bar.rs +++ b/tests/run-make/c-static-dylib/bar.rs diff --git a/tests/run-make-fulldeps/c-static-dylib/cfoo.c b/tests/run-make/c-static-dylib/cfoo.c index 9fe07f82f9e..9fe07f82f9e 100644 --- a/tests/run-make-fulldeps/c-static-dylib/cfoo.c +++ b/tests/run-make/c-static-dylib/cfoo.c diff --git a/tests/run-make-fulldeps/c-static-dylib/foo.rs b/tests/run-make/c-static-dylib/foo.rs index 1e8af4d4404..1e8af4d4404 100644 --- a/tests/run-make-fulldeps/c-static-dylib/foo.rs +++ b/tests/run-make/c-static-dylib/foo.rs diff --git a/tests/run-make-fulldeps/c-static-rlib/Makefile b/tests/run-make/c-static-rlib/Makefile index 11a3cf1940c..4e351127cb6 100644 --- a/tests/run-make-fulldeps/c-static-rlib/Makefile +++ b/tests/run-make/c-static-rlib/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk all: $(call NATIVE_STATICLIB,cfoo) diff --git a/tests/run-make-fulldeps/c-static-rlib/bar.rs b/tests/run-make/c-static-rlib/bar.rs index b8c798ffdb4..b8c798ffdb4 100644 --- a/tests/run-make-fulldeps/c-static-rlib/bar.rs +++ b/tests/run-make/c-static-rlib/bar.rs diff --git a/tests/run-make-fulldeps/c-static-rlib/cfoo.c b/tests/run-make/c-static-rlib/cfoo.c index 9fe07f82f9e..9fe07f82f9e 100644 --- a/tests/run-make-fulldeps/c-static-rlib/cfoo.c +++ b/tests/run-make/c-static-rlib/cfoo.c diff --git a/tests/run-make-fulldeps/c-static-rlib/foo.rs b/tests/run-make/c-static-rlib/foo.rs index 9c6d2080ef4..9c6d2080ef4 100644 --- a/tests/run-make-fulldeps/c-static-rlib/foo.rs +++ b/tests/run-make/c-static-rlib/foo.rs diff --git a/tests/run-make-fulldeps/c-unwind-abi-catch-lib-panic/Makefile b/tests/run-make/c-unwind-abi-catch-lib-panic/Makefile index 134f000d453..9c41a5a717e 100644 --- a/tests/run-make-fulldeps/c-unwind-abi-catch-lib-panic/Makefile +++ b/tests/run-make/c-unwind-abi-catch-lib-panic/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk all: archive diff --git a/tests/run-make-fulldeps/c-unwind-abi-catch-lib-panic/add.c b/tests/run-make/c-unwind-abi-catch-lib-panic/add.c index 444359451f6..444359451f6 100644 --- a/tests/run-make-fulldeps/c-unwind-abi-catch-lib-panic/add.c +++ b/tests/run-make/c-unwind-abi-catch-lib-panic/add.c diff --git a/tests/run-make-fulldeps/c-unwind-abi-catch-lib-panic/main.rs b/tests/run-make/c-unwind-abi-catch-lib-panic/main.rs index 78a71219c78..78a71219c78 100644 --- a/tests/run-make-fulldeps/c-unwind-abi-catch-lib-panic/main.rs +++ b/tests/run-make/c-unwind-abi-catch-lib-panic/main.rs diff --git a/tests/run-make-fulldeps/c-unwind-abi-catch-lib-panic/panic.rs b/tests/run-make/c-unwind-abi-catch-lib-panic/panic.rs index a99a04d5c6f..a99a04d5c6f 100644 --- a/tests/run-make-fulldeps/c-unwind-abi-catch-lib-panic/panic.rs +++ b/tests/run-make/c-unwind-abi-catch-lib-panic/panic.rs diff --git a/tests/run-make-fulldeps/c-unwind-abi-catch-panic/Makefile b/tests/run-make/c-unwind-abi-catch-panic/Makefile index e93ec99da2a..4398ac2ee24 100644 --- a/tests/run-make-fulldeps/c-unwind-abi-catch-panic/Makefile +++ b/tests/run-make/c-unwind-abi-catch-panic/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk all: $(call NATIVE_STATICLIB,add) diff --git a/tests/run-make-fulldeps/c-unwind-abi-catch-panic/add.c b/tests/run-make/c-unwind-abi-catch-panic/add.c index 444359451f6..444359451f6 100644 --- a/tests/run-make-fulldeps/c-unwind-abi-catch-panic/add.c +++ b/tests/run-make/c-unwind-abi-catch-panic/add.c diff --git a/tests/run-make-fulldeps/c-unwind-abi-catch-panic/main.rs b/tests/run-make/c-unwind-abi-catch-panic/main.rs index 15d38d72160..15d38d72160 100644 --- a/tests/run-make-fulldeps/c-unwind-abi-catch-panic/main.rs +++ b/tests/run-make/c-unwind-abi-catch-panic/main.rs diff --git a/tests/run-make-fulldeps/cat-and-grep-sanity-check/Makefile b/tests/run-make/cat-and-grep-sanity-check/Makefile index 82351e22009..82351e22009 100644 --- a/tests/run-make-fulldeps/cat-and-grep-sanity-check/Makefile +++ b/tests/run-make/cat-and-grep-sanity-check/Makefile diff --git a/tests/run-make-fulldeps/cdylib-dylib-linkage/Makefile b/tests/run-make/cdylib-dylib-linkage/Makefile index 5c9b2d1bb2f..51fbfef2d85 100644 --- a/tests/run-make-fulldeps/cdylib-dylib-linkage/Makefile +++ b/tests/run-make/cdylib-dylib-linkage/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk TARGET_SYSROOT := $(shell $(RUSTC) --print sysroot)/lib/rustlib/$(TARGET)/lib diff --git a/tests/run-make-fulldeps/cdylib-dylib-linkage/bar.rs b/tests/run-make/cdylib-dylib-linkage/bar.rs index b3a7539abae..b3a7539abae 100644 --- a/tests/run-make-fulldeps/cdylib-dylib-linkage/bar.rs +++ b/tests/run-make/cdylib-dylib-linkage/bar.rs diff --git a/tests/run-make-fulldeps/cdylib-dylib-linkage/foo.c b/tests/run-make/cdylib-dylib-linkage/foo.c index 154f9682ef8..154f9682ef8 100644 --- a/tests/run-make-fulldeps/cdylib-dylib-linkage/foo.c +++ b/tests/run-make/cdylib-dylib-linkage/foo.c diff --git a/tests/run-make-fulldeps/cdylib-dylib-linkage/foo.rs b/tests/run-make/cdylib-dylib-linkage/foo.rs index c4069495aaf..c4069495aaf 100644 --- a/tests/run-make-fulldeps/cdylib-dylib-linkage/foo.rs +++ b/tests/run-make/cdylib-dylib-linkage/foo.rs diff --git a/tests/run-make-fulldeps/cdylib-fewer-symbols/Makefile b/tests/run-make/cdylib-fewer-symbols/Makefile index 324791af8de..4e08f979c36 100644 --- a/tests/run-make-fulldeps/cdylib-fewer-symbols/Makefile +++ b/tests/run-make/cdylib-fewer-symbols/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile # Test that allocator-related symbols don't show up as exported from a cdylib as # they're internal to Rust and not part of the public ABI. diff --git a/tests/run-make-fulldeps/cdylib-fewer-symbols/foo.rs b/tests/run-make/cdylib-fewer-symbols/foo.rs index af37bc8e953..af37bc8e953 100644 --- a/tests/run-make-fulldeps/cdylib-fewer-symbols/foo.rs +++ b/tests/run-make/cdylib-fewer-symbols/foo.rs diff --git a/tests/run-make-fulldeps/cdylib/Makefile b/tests/run-make/cdylib/Makefile index 47ec762b3e9..3c8b5269554 100644 --- a/tests/run-make-fulldeps/cdylib/Makefile +++ b/tests/run-make/cdylib/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk all: $(call RUN_BINFILE,foo) diff --git a/tests/run-make-fulldeps/cdylib/bar.rs b/tests/run-make/cdylib/bar.rs index fe665abc7c1..fe665abc7c1 100644 --- a/tests/run-make-fulldeps/cdylib/bar.rs +++ b/tests/run-make/cdylib/bar.rs diff --git a/tests/run-make-fulldeps/cdylib/foo.c b/tests/run-make/cdylib/foo.c index 154f9682ef8..154f9682ef8 100644 --- a/tests/run-make-fulldeps/cdylib/foo.c +++ b/tests/run-make/cdylib/foo.c diff --git a/tests/run-make-fulldeps/cdylib/foo.rs b/tests/run-make/cdylib/foo.rs index c4069495aaf..c4069495aaf 100644 --- a/tests/run-make-fulldeps/cdylib/foo.rs +++ b/tests/run-make/cdylib/foo.rs diff --git a/tests/run-make-fulldeps/codegen-options-parsing/Makefile b/tests/run-make/codegen-options-parsing/Makefile index b063593c9d9..56bb900b7d8 100644 --- a/tests/run-make-fulldeps/codegen-options-parsing/Makefile +++ b/tests/run-make/codegen-options-parsing/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk all: diff --git a/tests/run-make-fulldeps/codegen-options-parsing/dummy.rs b/tests/run-make/codegen-options-parsing/dummy.rs index f328e4d9d04..f328e4d9d04 100644 --- a/tests/run-make-fulldeps/codegen-options-parsing/dummy.rs +++ b/tests/run-make/codegen-options-parsing/dummy.rs diff --git a/tests/run-make-fulldeps/compile-stdin/Makefile b/tests/run-make/compile-stdin/Makefile index be15548690f..2a495281c24 100644 --- a/tests/run-make-fulldeps/compile-stdin/Makefile +++ b/tests/run-make/compile-stdin/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk all: diff --git a/tests/run-make-fulldeps/compiler-lookup-paths-2/Makefile b/tests/run-make/compiler-lookup-paths-2/Makefile index d4ff7d8daab..d4ff7d8daab 100644 --- a/tests/run-make-fulldeps/compiler-lookup-paths-2/Makefile +++ b/tests/run-make/compiler-lookup-paths-2/Makefile diff --git a/tests/run-make-fulldeps/compiler-lookup-paths-2/a.rs b/tests/run-make/compiler-lookup-paths-2/a.rs index 83be6e807e0..83be6e807e0 100644 --- a/tests/run-make-fulldeps/compiler-lookup-paths-2/a.rs +++ b/tests/run-make/compiler-lookup-paths-2/a.rs diff --git a/tests/run-make-fulldeps/compiler-lookup-paths-2/b.rs b/tests/run-make/compiler-lookup-paths-2/b.rs index 1be6cbc919d..1be6cbc919d 100644 --- a/tests/run-make-fulldeps/compiler-lookup-paths-2/b.rs +++ b/tests/run-make/compiler-lookup-paths-2/b.rs diff --git a/tests/run-make-fulldeps/compiler-lookup-paths-2/c.rs b/tests/run-make/compiler-lookup-paths-2/c.rs index e37bc2e1dce..e37bc2e1dce 100644 --- a/tests/run-make-fulldeps/compiler-lookup-paths-2/c.rs +++ b/tests/run-make/compiler-lookup-paths-2/c.rs diff --git a/tests/run-make-fulldeps/compiler-lookup-paths/Makefile b/tests/run-make/compiler-lookup-paths/Makefile index c16bf7af6c4..310d6772c34 100644 --- a/tests/run-make-fulldeps/compiler-lookup-paths/Makefile +++ b/tests/run-make/compiler-lookup-paths/Makefile @@ -1,5 +1,8 @@ include ../tools.mk +# ignore-wasm32 (need a C compiler) +# ignore-wasm64 (need a C compiler) + all: $(TMPDIR)/libnative.a mkdir -p $(TMPDIR)/crate mkdir -p $(TMPDIR)/native diff --git a/tests/run-make-fulldeps/compiler-lookup-paths/a.rs b/tests/run-make/compiler-lookup-paths/a.rs index 83be6e807e0..83be6e807e0 100644 --- a/tests/run-make-fulldeps/compiler-lookup-paths/a.rs +++ b/tests/run-make/compiler-lookup-paths/a.rs diff --git a/tests/run-make-fulldeps/compiler-lookup-paths/b.rs b/tests/run-make/compiler-lookup-paths/b.rs index 1be6cbc919d..1be6cbc919d 100644 --- a/tests/run-make-fulldeps/compiler-lookup-paths/b.rs +++ b/tests/run-make/compiler-lookup-paths/b.rs diff --git a/tests/run-make-fulldeps/compiler-lookup-paths/c.rs b/tests/run-make/compiler-lookup-paths/c.rs index 4c7ce01b6a0..4c7ce01b6a0 100644 --- a/tests/run-make-fulldeps/compiler-lookup-paths/c.rs +++ b/tests/run-make/compiler-lookup-paths/c.rs diff --git a/tests/run-make-fulldeps/compiler-lookup-paths/d.rs b/tests/run-make/compiler-lookup-paths/d.rs index 6cd9916b6f6..6cd9916b6f6 100644 --- a/tests/run-make-fulldeps/compiler-lookup-paths/d.rs +++ b/tests/run-make/compiler-lookup-paths/d.rs diff --git a/tests/run-make-fulldeps/compiler-lookup-paths/e.rs b/tests/run-make/compiler-lookup-paths/e.rs index 18eb60aca97..18eb60aca97 100644 --- a/tests/run-make-fulldeps/compiler-lookup-paths/e.rs +++ b/tests/run-make/compiler-lookup-paths/e.rs diff --git a/tests/run-make-fulldeps/compiler-lookup-paths/e2.rs b/tests/run-make/compiler-lookup-paths/e2.rs index cbf08b98e7e..cbf08b98e7e 100644 --- a/tests/run-make-fulldeps/compiler-lookup-paths/e2.rs +++ b/tests/run-make/compiler-lookup-paths/e2.rs diff --git a/tests/run-make-fulldeps/compiler-lookup-paths/f.rs b/tests/run-make/compiler-lookup-paths/f.rs index 483deaaea49..483deaaea49 100644 --- a/tests/run-make-fulldeps/compiler-lookup-paths/f.rs +++ b/tests/run-make/compiler-lookup-paths/f.rs diff --git a/tests/run-make-fulldeps/compiler-lookup-paths/native.c b/tests/run-make/compiler-lookup-paths/native.c index d11c69f812a..d11c69f812a 100644 --- a/tests/run-make-fulldeps/compiler-lookup-paths/native.c +++ b/tests/run-make/compiler-lookup-paths/native.c diff --git a/tests/run-make-fulldeps/compiler-rt-works-on-mingw/Makefile b/tests/run-make/compiler-rt-works-on-mingw/Makefile index 74917570a01..74917570a01 100644 --- a/tests/run-make-fulldeps/compiler-rt-works-on-mingw/Makefile +++ b/tests/run-make/compiler-rt-works-on-mingw/Makefile diff --git a/tests/run-make-fulldeps/compiler-rt-works-on-mingw/foo.cpp b/tests/run-make/compiler-rt-works-on-mingw/foo.cpp index 4c2fb9cdb87..4c2fb9cdb87 100644 --- a/tests/run-make-fulldeps/compiler-rt-works-on-mingw/foo.cpp +++ b/tests/run-make/compiler-rt-works-on-mingw/foo.cpp diff --git a/tests/run-make-fulldeps/compiler-rt-works-on-mingw/foo.rs b/tests/run-make/compiler-rt-works-on-mingw/foo.rs index 7fdb8158871..7fdb8158871 100644 --- a/tests/run-make-fulldeps/compiler-rt-works-on-mingw/foo.rs +++ b/tests/run-make/compiler-rt-works-on-mingw/foo.rs diff --git a/tests/run-make/const_fn_mir/Makefile b/tests/run-make/const_fn_mir/Makefile index ad5695093a1..b2c268f0439 100644 --- a/tests/run-make/const_fn_mir/Makefile +++ b/tests/run-make/const_fn_mir/Makefile @@ -1,4 +1,4 @@ -include ../../run-make-fulldeps/tools.mk +include ../tools.mk all: $(RUSTC) main.rs --emit=mir -o "$(TMPDIR)"/dump.mir diff --git a/tests/run-make-fulldeps/core-no-fp-fmt-parse/Makefile b/tests/run-make/core-no-fp-fmt-parse/Makefile index 837664d92b9..837664d92b9 100644 --- a/tests/run-make-fulldeps/core-no-fp-fmt-parse/Makefile +++ b/tests/run-make/core-no-fp-fmt-parse/Makefile diff --git a/tests/run-make/coverage/coverage_tools.mk b/tests/run-make/coverage/coverage_tools.mk index 0b6bbc33167..028c020a461 100644 --- a/tests/run-make/coverage/coverage_tools.mk +++ b/tests/run-make/coverage/coverage_tools.mk @@ -3,4 +3,4 @@ # # include ../coverage/coverage_tools.mk -include ../../run-make-fulldeps/tools.mk +include ../tools.mk diff --git a/tests/run-make-fulldeps/crate-data-smoke/Makefile b/tests/run-make/crate-data-smoke/Makefile index a453f65ff3e..a453f65ff3e 100644 --- a/tests/run-make-fulldeps/crate-data-smoke/Makefile +++ b/tests/run-make/crate-data-smoke/Makefile diff --git a/tests/run-make-fulldeps/crate-data-smoke/crate.rs b/tests/run-make/crate-data-smoke/crate.rs index a48a6f51c42..a48a6f51c42 100644 --- a/tests/run-make-fulldeps/crate-data-smoke/crate.rs +++ b/tests/run-make/crate-data-smoke/crate.rs diff --git a/tests/run-make-fulldeps/crate-data-smoke/lib.rs b/tests/run-make/crate-data-smoke/lib.rs index 8002f11ec87..8002f11ec87 100644 --- a/tests/run-make-fulldeps/crate-data-smoke/lib.rs +++ b/tests/run-make/crate-data-smoke/lib.rs diff --git a/tests/run-make-fulldeps/crate-data-smoke/rlib.rs b/tests/run-make/crate-data-smoke/rlib.rs index 47fcce4a7f6..47fcce4a7f6 100644 --- a/tests/run-make-fulldeps/crate-data-smoke/rlib.rs +++ b/tests/run-make/crate-data-smoke/rlib.rs diff --git a/tests/run-make-fulldeps/crate-hash-rustc-version/Makefile b/tests/run-make/crate-hash-rustc-version/Makefile index 4f25a865ebd..f1d2a360410 100644 --- a/tests/run-make-fulldeps/crate-hash-rustc-version/Makefile +++ b/tests/run-make/crate-hash-rustc-version/Makefile @@ -1,4 +1,5 @@ -include ../../run-make-fulldeps/tools.mk +# ignore-cross-compile +include ../tools.mk # Ensure that crates compiled with different rustc versions cannot # be dynamically linked. diff --git a/tests/run-make-fulldeps/crate-hash-rustc-version/a.rs b/tests/run-make/crate-hash-rustc-version/a.rs index d65b5ce8e88..d65b5ce8e88 100644 --- a/tests/run-make-fulldeps/crate-hash-rustc-version/a.rs +++ b/tests/run-make/crate-hash-rustc-version/a.rs diff --git a/tests/run-make-fulldeps/crate-hash-rustc-version/b.rs b/tests/run-make/crate-hash-rustc-version/b.rs index 316ac26e73f..316ac26e73f 100644 --- a/tests/run-make-fulldeps/crate-hash-rustc-version/b.rs +++ b/tests/run-make/crate-hash-rustc-version/b.rs diff --git a/tests/run-make-fulldeps/crate-name-priority/Makefile b/tests/run-make/crate-name-priority/Makefile index 08a07c325e3..4adaa75a71c 100644 --- a/tests/run-make-fulldeps/crate-name-priority/Makefile +++ b/tests/run-make/crate-name-priority/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk all: diff --git a/tests/run-make-fulldeps/crate-name-priority/foo.rs b/tests/run-make/crate-name-priority/foo.rs index f328e4d9d04..f328e4d9d04 100644 --- a/tests/run-make-fulldeps/crate-name-priority/foo.rs +++ b/tests/run-make/crate-name-priority/foo.rs diff --git a/tests/run-make-fulldeps/crate-name-priority/foo1.rs b/tests/run-make/crate-name-priority/foo1.rs index 4ff3bd9516b..4ff3bd9516b 100644 --- a/tests/run-make-fulldeps/crate-name-priority/foo1.rs +++ b/tests/run-make/crate-name-priority/foo1.rs diff --git a/tests/run-make-fulldeps/cross-lang-lto-clang/Makefile b/tests/run-make/cross-lang-lto-clang/Makefile index acaebf439d6..acaebf439d6 100644 --- a/tests/run-make-fulldeps/cross-lang-lto-clang/Makefile +++ b/tests/run-make/cross-lang-lto-clang/Makefile diff --git a/tests/run-make-fulldeps/cross-lang-lto-clang/clib.c b/tests/run-make/cross-lang-lto-clang/clib.c index 90f33f24dc4..90f33f24dc4 100644 --- a/tests/run-make-fulldeps/cross-lang-lto-clang/clib.c +++ b/tests/run-make/cross-lang-lto-clang/clib.c diff --git a/tests/run-make-fulldeps/cross-lang-lto-clang/cmain.c b/tests/run-make/cross-lang-lto-clang/cmain.c index e62a40117ce..e62a40117ce 100644 --- a/tests/run-make-fulldeps/cross-lang-lto-clang/cmain.c +++ b/tests/run-make/cross-lang-lto-clang/cmain.c diff --git a/tests/run-make-fulldeps/cross-lang-lto-clang/main.rs b/tests/run-make/cross-lang-lto-clang/main.rs index 8129dcb85d9..8129dcb85d9 100644 --- a/tests/run-make-fulldeps/cross-lang-lto-clang/main.rs +++ b/tests/run-make/cross-lang-lto-clang/main.rs diff --git a/tests/run-make-fulldeps/cross-lang-lto-clang/rustlib.rs b/tests/run-make/cross-lang-lto-clang/rustlib.rs index 8a74d74a420..8a74d74a420 100644 --- a/tests/run-make-fulldeps/cross-lang-lto-clang/rustlib.rs +++ b/tests/run-make/cross-lang-lto-clang/rustlib.rs diff --git a/tests/run-make-fulldeps/cross-lang-lto-pgo-smoketest/Makefile b/tests/run-make/cross-lang-lto-pgo-smoketest/Makefile index 70085d9bde1..70085d9bde1 100644 --- a/tests/run-make-fulldeps/cross-lang-lto-pgo-smoketest/Makefile +++ b/tests/run-make/cross-lang-lto-pgo-smoketest/Makefile diff --git a/tests/run-make-fulldeps/cross-lang-lto-pgo-smoketest/clib.c b/tests/run-make/cross-lang-lto-pgo-smoketest/clib.c index 90f33f24dc4..90f33f24dc4 100644 --- a/tests/run-make-fulldeps/cross-lang-lto-pgo-smoketest/clib.c +++ b/tests/run-make/cross-lang-lto-pgo-smoketest/clib.c diff --git a/tests/run-make-fulldeps/cross-lang-lto-pgo-smoketest/cmain.c b/tests/run-make/cross-lang-lto-pgo-smoketest/cmain.c index e3f24828be3..e3f24828be3 100644 --- a/tests/run-make-fulldeps/cross-lang-lto-pgo-smoketest/cmain.c +++ b/tests/run-make/cross-lang-lto-pgo-smoketest/cmain.c diff --git a/tests/run-make-fulldeps/cross-lang-lto-pgo-smoketest/main.rs b/tests/run-make/cross-lang-lto-pgo-smoketest/main.rs index 8129dcb85d9..8129dcb85d9 100644 --- a/tests/run-make-fulldeps/cross-lang-lto-pgo-smoketest/main.rs +++ b/tests/run-make/cross-lang-lto-pgo-smoketest/main.rs diff --git a/tests/run-make-fulldeps/cross-lang-lto-pgo-smoketest/rustlib.rs b/tests/run-make/cross-lang-lto-pgo-smoketest/rustlib.rs index 8a74d74a420..8a74d74a420 100644 --- a/tests/run-make-fulldeps/cross-lang-lto-pgo-smoketest/rustlib.rs +++ b/tests/run-make/cross-lang-lto-pgo-smoketest/rustlib.rs diff --git a/tests/run-make-fulldeps/cross-lang-lto-upstream-rlibs/Makefile b/tests/run-make/cross-lang-lto-upstream-rlibs/Makefile index 6f1caa31a80..6f1caa31a80 100644 --- a/tests/run-make-fulldeps/cross-lang-lto-upstream-rlibs/Makefile +++ b/tests/run-make/cross-lang-lto-upstream-rlibs/Makefile diff --git a/tests/run-make-fulldeps/cross-lang-lto-upstream-rlibs/staticlib.rs b/tests/run-make/cross-lang-lto-upstream-rlibs/staticlib.rs index 34951dda3b6..34951dda3b6 100644 --- a/tests/run-make-fulldeps/cross-lang-lto-upstream-rlibs/staticlib.rs +++ b/tests/run-make/cross-lang-lto-upstream-rlibs/staticlib.rs diff --git a/tests/run-make-fulldeps/cross-lang-lto-upstream-rlibs/upstream.rs b/tests/run-make/cross-lang-lto-upstream-rlibs/upstream.rs index bd6820098ee..bd6820098ee 100644 --- a/tests/run-make-fulldeps/cross-lang-lto-upstream-rlibs/upstream.rs +++ b/tests/run-make/cross-lang-lto-upstream-rlibs/upstream.rs diff --git a/tests/run-make-fulldeps/cross-lang-lto/Makefile b/tests/run-make/cross-lang-lto/Makefile index 92058f952a9..92058f952a9 100644 --- a/tests/run-make-fulldeps/cross-lang-lto/Makefile +++ b/tests/run-make/cross-lang-lto/Makefile diff --git a/tests/run-make-fulldeps/cross-lang-lto/lib.rs b/tests/run-make/cross-lang-lto/lib.rs index 94cfef6ada5..94cfef6ada5 100644 --- a/tests/run-make-fulldeps/cross-lang-lto/lib.rs +++ b/tests/run-make/cross-lang-lto/lib.rs diff --git a/tests/run-make-fulldeps/cross-lang-lto/main.rs b/tests/run-make/cross-lang-lto/main.rs index f6320bcb04a..f6320bcb04a 100644 --- a/tests/run-make-fulldeps/cross-lang-lto/main.rs +++ b/tests/run-make/cross-lang-lto/main.rs diff --git a/tests/run-make-fulldeps/debug-assertions/Makefile b/tests/run-make/debug-assertions/Makefile index 73beb4b03ae..e83337c597f 100644 --- a/tests/run-make-fulldeps/debug-assertions/Makefile +++ b/tests/run-make/debug-assertions/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk all: diff --git a/tests/run-make-fulldeps/debug-assertions/debug.rs b/tests/run-make/debug-assertions/debug.rs index 76ca60a71c8..76ca60a71c8 100644 --- a/tests/run-make-fulldeps/debug-assertions/debug.rs +++ b/tests/run-make/debug-assertions/debug.rs diff --git a/tests/run-make/dep-graph/Makefile b/tests/run-make/dep-graph/Makefile index ae97b1672ae..d06333f4454 100644 --- a/tests/run-make/dep-graph/Makefile +++ b/tests/run-make/dep-graph/Makefile @@ -1,4 +1,4 @@ -include ../../run-make-fulldeps/tools.mk +include ../tools.mk # ignore-cross-compile diff --git a/tests/run-make-fulldeps/dep-info-doesnt-run-much/Makefile b/tests/run-make/dep-info-doesnt-run-much/Makefile index b4dc44ad2be..b4dc44ad2be 100644 --- a/tests/run-make-fulldeps/dep-info-doesnt-run-much/Makefile +++ b/tests/run-make/dep-info-doesnt-run-much/Makefile diff --git a/tests/run-make-fulldeps/dep-info-doesnt-run-much/foo.rs b/tests/run-make/dep-info-doesnt-run-much/foo.rs index 316e681293e..316e681293e 100644 --- a/tests/run-make-fulldeps/dep-info-doesnt-run-much/foo.rs +++ b/tests/run-make/dep-info-doesnt-run-much/foo.rs diff --git a/tests/run-make-fulldeps/dep-info-spaces/Makefile b/tests/run-make/dep-info-spaces/Makefile index 0cfe513e490..0cfe513e490 100644 --- a/tests/run-make-fulldeps/dep-info-spaces/Makefile +++ b/tests/run-make/dep-info-spaces/Makefile diff --git a/tests/run-make-fulldeps/dep-info-spaces/Makefile.foo b/tests/run-make/dep-info-spaces/Makefile.foo index 80a5d4333cd..80a5d4333cd 100644 --- a/tests/run-make-fulldeps/dep-info-spaces/Makefile.foo +++ b/tests/run-make/dep-info-spaces/Makefile.foo diff --git a/tests/run-make-fulldeps/dep-info-spaces/bar.rs b/tests/run-make/dep-info-spaces/bar.rs index c5c0bc606cd..c5c0bc606cd 100644 --- a/tests/run-make-fulldeps/dep-info-spaces/bar.rs +++ b/tests/run-make/dep-info-spaces/bar.rs diff --git a/tests/run-make-fulldeps/dep-info-spaces/foo foo.rs b/tests/run-make/dep-info-spaces/foo foo.rs index b76b4321d62..b76b4321d62 100644 --- a/tests/run-make-fulldeps/dep-info-spaces/foo foo.rs +++ b/tests/run-make/dep-info-spaces/foo foo.rs diff --git a/tests/run-make-fulldeps/dep-info-spaces/lib.rs b/tests/run-make/dep-info-spaces/lib.rs index 6264e7b67ec..6264e7b67ec 100644 --- a/tests/run-make-fulldeps/dep-info-spaces/lib.rs +++ b/tests/run-make/dep-info-spaces/lib.rs diff --git a/tests/run-make-fulldeps/dep-info/Makefile b/tests/run-make/dep-info/Makefile index c76f43a8eed..c76f43a8eed 100644 --- a/tests/run-make-fulldeps/dep-info/Makefile +++ b/tests/run-make/dep-info/Makefile diff --git a/tests/run-make-fulldeps/dep-info/Makefile.foo b/tests/run-make/dep-info/Makefile.foo index e5df31f88c1..e5df31f88c1 100644 --- a/tests/run-make-fulldeps/dep-info/Makefile.foo +++ b/tests/run-make/dep-info/Makefile.foo diff --git a/tests/run-make-fulldeps/dep-info/bar.rs b/tests/run-make/dep-info/bar.rs index c5c0bc606cd..c5c0bc606cd 100644 --- a/tests/run-make-fulldeps/dep-info/bar.rs +++ b/tests/run-make/dep-info/bar.rs diff --git a/tests/run-make-fulldeps/dep-info/foo.rs b/tests/run-make/dep-info/foo.rs index b76b4321d62..b76b4321d62 100644 --- a/tests/run-make-fulldeps/dep-info/foo.rs +++ b/tests/run-make/dep-info/foo.rs diff --git a/tests/run-make-fulldeps/dep-info/lib.rs b/tests/run-make/dep-info/lib.rs index eb8631259d4..eb8631259d4 100644 --- a/tests/run-make-fulldeps/dep-info/lib.rs +++ b/tests/run-make/dep-info/lib.rs diff --git a/tests/run-make-fulldeps/dep-info/lib2.rs b/tests/run-make/dep-info/lib2.rs index f4fda9c93c5..f4fda9c93c5 100644 --- a/tests/run-make-fulldeps/dep-info/lib2.rs +++ b/tests/run-make/dep-info/lib2.rs diff --git a/tests/run-make-fulldeps/doctests-keep-binaries/Makefile b/tests/run-make/doctests-keep-binaries/Makefile index 273c8980b02..6254e93d333 100644 --- a/tests/run-make-fulldeps/doctests-keep-binaries/Makefile +++ b/tests/run-make/doctests-keep-binaries/Makefile @@ -1,4 +1,5 @@ -include ../../run-make-fulldeps/tools.mk +# ignore-cross-compile +include ../tools.mk # Check that valid binaries are persisted by running them, regardless of whether the --run or --no-run option is used. diff --git a/tests/run-make-fulldeps/doctests-keep-binaries/t.rs b/tests/run-make/doctests-keep-binaries/t.rs index c38cf0a0b25..c38cf0a0b25 100644 --- a/tests/run-make-fulldeps/doctests-keep-binaries/t.rs +++ b/tests/run-make/doctests-keep-binaries/t.rs diff --git a/tests/run-make/dump-mono-stats/Makefile b/tests/run-make/dump-mono-stats/Makefile index fe1112fb0a4..196f84be6ec 100644 --- a/tests/run-make/dump-mono-stats/Makefile +++ b/tests/run-make/dump-mono-stats/Makefile @@ -1,4 +1,4 @@ -include ../../run-make-fulldeps/tools.mk +include ../tools.mk all: $(RUSTC) --crate-type lib foo.rs -Z dump-mono-stats=$(TMPDIR) -Zdump-mono-stats-format=json diff --git a/tests/run-make-fulldeps/duplicate-output-flavors/Makefile b/tests/run-make/duplicate-output-flavors/Makefile index e33279966c9..e33279966c9 100644 --- a/tests/run-make-fulldeps/duplicate-output-flavors/Makefile +++ b/tests/run-make/duplicate-output-flavors/Makefile diff --git a/tests/run-make-fulldeps/duplicate-output-flavors/foo.rs b/tests/run-make/duplicate-output-flavors/foo.rs index c1bfaa6cab5..c1bfaa6cab5 100644 --- a/tests/run-make-fulldeps/duplicate-output-flavors/foo.rs +++ b/tests/run-make/duplicate-output-flavors/foo.rs diff --git a/tests/run-make-fulldeps/dylib-chain/Makefile b/tests/run-make/dylib-chain/Makefile index 1139822f4ea..f1fea99c5ee 100644 --- a/tests/run-make-fulldeps/dylib-chain/Makefile +++ b/tests/run-make/dylib-chain/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk all: diff --git a/tests/run-make-fulldeps/dylib-chain/m1.rs b/tests/run-make/dylib-chain/m1.rs index 08c3f37522c..08c3f37522c 100644 --- a/tests/run-make-fulldeps/dylib-chain/m1.rs +++ b/tests/run-make/dylib-chain/m1.rs diff --git a/tests/run-make-fulldeps/dylib-chain/m2.rs b/tests/run-make/dylib-chain/m2.rs index 62176ddc9f3..62176ddc9f3 100644 --- a/tests/run-make-fulldeps/dylib-chain/m2.rs +++ b/tests/run-make/dylib-chain/m2.rs diff --git a/tests/run-make-fulldeps/dylib-chain/m3.rs b/tests/run-make/dylib-chain/m3.rs index d213aeda9ac..d213aeda9ac 100644 --- a/tests/run-make-fulldeps/dylib-chain/m3.rs +++ b/tests/run-make/dylib-chain/m3.rs diff --git a/tests/run-make-fulldeps/dylib-chain/m4.rs b/tests/run-make/dylib-chain/m4.rs index fa8ec6079de..fa8ec6079de 100644 --- a/tests/run-make-fulldeps/dylib-chain/m4.rs +++ b/tests/run-make/dylib-chain/m4.rs diff --git a/tests/run-make/emit-named-files/Makefile b/tests/run-make/emit-named-files/Makefile index e081fa4793b..2b97b841fc0 100644 --- a/tests/run-make/emit-named-files/Makefile +++ b/tests/run-make/emit-named-files/Makefile @@ -1,4 +1,4 @@ -include ../../run-make-fulldeps/tools.mk +include ../tools.mk OUT=$(TMPDIR)/emit diff --git a/tests/run-make/emit-path-unhashed/Makefile b/tests/run-make/emit-path-unhashed/Makefile index c144d4aa92f..74047fe5f86 100644 --- a/tests/run-make/emit-path-unhashed/Makefile +++ b/tests/run-make/emit-path-unhashed/Makefile @@ -1,4 +1,4 @@ -include ../../run-make-fulldeps/tools.mk +include ../tools.mk OUT=$(TMPDIR)/emit diff --git a/tests/run-make/emit-shared-files/Makefile b/tests/run-make/emit-shared-files/Makefile index cad0c9e5b81..27c72b00368 100644 --- a/tests/run-make/emit-shared-files/Makefile +++ b/tests/run-make/emit-shared-files/Makefile @@ -1,4 +1,4 @@ -include ../../run-make-fulldeps/tools.mk +include ../tools.mk INVOCATION_ONLY = $(TMPDIR)/invocation-only TOOLCHAIN_ONLY = $(TMPDIR)/toolchain-only diff --git a/tests/run-make-fulldeps/emit-stack-sizes/Makefile b/tests/run-make/emit-stack-sizes/Makefile index f636ebd28f2..f636ebd28f2 100644 --- a/tests/run-make-fulldeps/emit-stack-sizes/Makefile +++ b/tests/run-make/emit-stack-sizes/Makefile diff --git a/tests/run-make-fulldeps/emit-stack-sizes/foo.rs b/tests/run-make/emit-stack-sizes/foo.rs index ee51ae32886..ee51ae32886 100644 --- a/tests/run-make-fulldeps/emit-stack-sizes/foo.rs +++ b/tests/run-make/emit-stack-sizes/foo.rs diff --git a/tests/run-make-fulldeps/emit/Makefile b/tests/run-make/emit/Makefile index 78e68bd6111..b3ca0b79fb0 100644 --- a/tests/run-make-fulldeps/emit/Makefile +++ b/tests/run-make/emit/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk all: diff --git a/tests/run-make-fulldeps/emit/test-24876.rs b/tests/run-make/emit/test-24876.rs index 734e2ee4bd4..734e2ee4bd4 100644 --- a/tests/run-make-fulldeps/emit/test-24876.rs +++ b/tests/run-make/emit/test-24876.rs diff --git a/tests/run-make-fulldeps/emit/test-26235.rs b/tests/run-make/emit/test-26235.rs index 07d975f3317..07d975f3317 100644 --- a/tests/run-make-fulldeps/emit/test-26235.rs +++ b/tests/run-make/emit/test-26235.rs diff --git a/tests/run-make/env-dep-info/Makefile b/tests/run-make/env-dep-info/Makefile index 1675a61b167..bc0ffc2df1e 100644 --- a/tests/run-make/env-dep-info/Makefile +++ b/tests/run-make/env-dep-info/Makefile @@ -1,4 +1,4 @@ -include ../../run-make-fulldeps/tools.mk +include ../tools.mk # FIXME(eddyb) provide `HOST_RUSTC` and `TARGET_RUSTC` # instead of hardcoding them everywhere they're needed. diff --git a/tests/run-make-fulldeps/error-found-staticlib-instead-crate/Makefile b/tests/run-make/error-found-staticlib-instead-crate/Makefile index 0eae41d720c..0eae41d720c 100644 --- a/tests/run-make-fulldeps/error-found-staticlib-instead-crate/Makefile +++ b/tests/run-make/error-found-staticlib-instead-crate/Makefile diff --git a/tests/run-make-fulldeps/error-found-staticlib-instead-crate/bar.rs b/tests/run-make/error-found-staticlib-instead-crate/bar.rs index fe35f1f8e2e..fe35f1f8e2e 100644 --- a/tests/run-make-fulldeps/error-found-staticlib-instead-crate/bar.rs +++ b/tests/run-make/error-found-staticlib-instead-crate/bar.rs diff --git a/tests/run-make-fulldeps/error-found-staticlib-instead-crate/foo.rs b/tests/run-make/error-found-staticlib-instead-crate/foo.rs index b76b4321d62..b76b4321d62 100644 --- a/tests/run-make-fulldeps/error-found-staticlib-instead-crate/foo.rs +++ b/tests/run-make/error-found-staticlib-instead-crate/foo.rs diff --git a/tests/run-make-fulldeps/error-writing-dependencies/Makefile b/tests/run-make/error-writing-dependencies/Makefile index a5d30a647f8..a5d30a647f8 100644 --- a/tests/run-make-fulldeps/error-writing-dependencies/Makefile +++ b/tests/run-make/error-writing-dependencies/Makefile diff --git a/tests/run-make-fulldeps/error-writing-dependencies/foo.rs b/tests/run-make/error-writing-dependencies/foo.rs index f328e4d9d04..f328e4d9d04 100644 --- a/tests/run-make-fulldeps/error-writing-dependencies/foo.rs +++ b/tests/run-make/error-writing-dependencies/foo.rs diff --git a/tests/run-make-fulldeps/exit-code/Makefile b/tests/run-make/exit-code/Makefile index 3ffaafe9065..6458b71688f 100644 --- a/tests/run-make-fulldeps/exit-code/Makefile +++ b/tests/run-make/exit-code/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk all: diff --git a/tests/run-make-fulldeps/exit-code/compile-error.rs b/tests/run-make/exit-code/compile-error.rs index a96c197606c..a96c197606c 100644 --- a/tests/run-make-fulldeps/exit-code/compile-error.rs +++ b/tests/run-make/exit-code/compile-error.rs diff --git a/tests/run-make-fulldeps/exit-code/lint-failure.rs b/tests/run-make/exit-code/lint-failure.rs index df876ec237f..df876ec237f 100644 --- a/tests/run-make-fulldeps/exit-code/lint-failure.rs +++ b/tests/run-make/exit-code/lint-failure.rs diff --git a/tests/run-make-fulldeps/exit-code/success.rs b/tests/run-make/exit-code/success.rs index 55b8e42b6e2..55b8e42b6e2 100644 --- a/tests/run-make-fulldeps/exit-code/success.rs +++ b/tests/run-make/exit-code/success.rs diff --git a/tests/run-make/export-executable-symbols/Makefile b/tests/run-make/export-executable-symbols/Makefile index daa77c99dcd..c4d29aa2bf4 100644 --- a/tests/run-make/export-executable-symbols/Makefile +++ b/tests/run-make/export-executable-symbols/Makefile @@ -1,4 +1,4 @@ -include ../../run-make-fulldeps/tools.mk +include ../tools.mk # ignore-wasm32 # ignore-wasm64 diff --git a/tests/run-make-fulldeps/extern-diff-internal-name/Makefile b/tests/run-make/extern-diff-internal-name/Makefile index 54596c2f029..250f82dfac0 100644 --- a/tests/run-make-fulldeps/extern-diff-internal-name/Makefile +++ b/tests/run-make/extern-diff-internal-name/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk all: diff --git a/tests/run-make-fulldeps/extern-diff-internal-name/lib.rs b/tests/run-make/extern-diff-internal-name/lib.rs index ad96f70866e..ad96f70866e 100644 --- a/tests/run-make-fulldeps/extern-diff-internal-name/lib.rs +++ b/tests/run-make/extern-diff-internal-name/lib.rs diff --git a/tests/run-make-fulldeps/extern-diff-internal-name/test.rs b/tests/run-make/extern-diff-internal-name/test.rs index 4c53dc28a80..4c53dc28a80 100644 --- a/tests/run-make-fulldeps/extern-diff-internal-name/test.rs +++ b/tests/run-make/extern-diff-internal-name/test.rs diff --git a/tests/run-make-fulldeps/extern-flag-disambiguates/Makefile b/tests/run-make/extern-flag-disambiguates/Makefile index a8f142a6402..e54a537ecd0 100644 --- a/tests/run-make-fulldeps/extern-flag-disambiguates/Makefile +++ b/tests/run-make/extern-flag-disambiguates/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk # Attempt to build this dependency tree: diff --git a/tests/run-make-fulldeps/extern-flag-disambiguates/a.rs b/tests/run-make/extern-flag-disambiguates/a.rs index 2b1a3190150..2b1a3190150 100644 --- a/tests/run-make-fulldeps/extern-flag-disambiguates/a.rs +++ b/tests/run-make/extern-flag-disambiguates/a.rs diff --git a/tests/run-make-fulldeps/extern-flag-disambiguates/b.rs b/tests/run-make/extern-flag-disambiguates/b.rs index 1d7a7339ce2..1d7a7339ce2 100644 --- a/tests/run-make-fulldeps/extern-flag-disambiguates/b.rs +++ b/tests/run-make/extern-flag-disambiguates/b.rs diff --git a/tests/run-make-fulldeps/extern-flag-disambiguates/c.rs b/tests/run-make/extern-flag-disambiguates/c.rs index 3f9d143ed2d..3f9d143ed2d 100644 --- a/tests/run-make-fulldeps/extern-flag-disambiguates/c.rs +++ b/tests/run-make/extern-flag-disambiguates/c.rs diff --git a/tests/run-make-fulldeps/extern-flag-disambiguates/d.rs b/tests/run-make/extern-flag-disambiguates/d.rs index 249c6a107ff..249c6a107ff 100644 --- a/tests/run-make-fulldeps/extern-flag-disambiguates/d.rs +++ b/tests/run-make/extern-flag-disambiguates/d.rs diff --git a/tests/run-make-fulldeps/extern-flag-fun/Makefile b/tests/run-make/extern-flag-fun/Makefile index a0b7c15edb9..687cdfd7675 100644 --- a/tests/run-make-fulldeps/extern-flag-fun/Makefile +++ b/tests/run-make/extern-flag-fun/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk all: diff --git a/tests/run-make-fulldeps/extern-flag-fun/bar-alt.rs b/tests/run-make/extern-flag-fun/bar-alt.rs index cdc6c27d800..cdc6c27d800 100644 --- a/tests/run-make-fulldeps/extern-flag-fun/bar-alt.rs +++ b/tests/run-make/extern-flag-fun/bar-alt.rs diff --git a/tests/run-make-fulldeps/extern-flag-fun/bar.rs b/tests/run-make/extern-flag-fun/bar.rs index d11c69f812a..d11c69f812a 100644 --- a/tests/run-make-fulldeps/extern-flag-fun/bar.rs +++ b/tests/run-make/extern-flag-fun/bar.rs diff --git a/tests/run-make-fulldeps/extern-flag-fun/foo.rs b/tests/run-make/extern-flag-fun/foo.rs index 0edda7d7b88..0edda7d7b88 100644 --- a/tests/run-make-fulldeps/extern-flag-fun/foo.rs +++ b/tests/run-make/extern-flag-fun/foo.rs diff --git a/tests/run-make-fulldeps/extern-flag-fun/gated_unstable.rs b/tests/run-make/extern-flag-fun/gated_unstable.rs index 03600c830ff..03600c830ff 100644 --- a/tests/run-make-fulldeps/extern-flag-fun/gated_unstable.rs +++ b/tests/run-make/extern-flag-fun/gated_unstable.rs diff --git a/tests/run-make-fulldeps/extern-flag-fun/rustc.rs b/tests/run-make/extern-flag-fun/rustc.rs index b76b4321d62..b76b4321d62 100644 --- a/tests/run-make-fulldeps/extern-flag-fun/rustc.rs +++ b/tests/run-make/extern-flag-fun/rustc.rs diff --git a/tests/run-make-fulldeps/extern-flag-pathless/Makefile b/tests/run-make/extern-flag-pathless/Makefile index 0f23815b650..701bfcd28c8 100644 --- a/tests/run-make-fulldeps/extern-flag-pathless/Makefile +++ b/tests/run-make/extern-flag-pathless/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk # Test mixing pathless --extern with paths. diff --git a/tests/run-make-fulldeps/extern-flag-pathless/bar-dynamic.rs b/tests/run-make/extern-flag-pathless/bar-dynamic.rs index e2d68d517ff..e2d68d517ff 100644 --- a/tests/run-make-fulldeps/extern-flag-pathless/bar-dynamic.rs +++ b/tests/run-make/extern-flag-pathless/bar-dynamic.rs diff --git a/tests/run-make-fulldeps/extern-flag-pathless/bar-static.rs b/tests/run-make/extern-flag-pathless/bar-static.rs index 240d8bde4d1..240d8bde4d1 100644 --- a/tests/run-make-fulldeps/extern-flag-pathless/bar-static.rs +++ b/tests/run-make/extern-flag-pathless/bar-static.rs diff --git a/tests/run-make-fulldeps/extern-flag-pathless/foo.rs b/tests/run-make/extern-flag-pathless/foo.rs index 1ea64da7dad..1ea64da7dad 100644 --- a/tests/run-make-fulldeps/extern-flag-pathless/foo.rs +++ b/tests/run-make/extern-flag-pathless/foo.rs diff --git a/tests/run-make-fulldeps/extern-flag-rename-transitive/Makefile b/tests/run-make/extern-flag-rename-transitive/Makefile index d16a8e20868..d16a8e20868 100644 --- a/tests/run-make-fulldeps/extern-flag-rename-transitive/Makefile +++ b/tests/run-make/extern-flag-rename-transitive/Makefile diff --git a/tests/run-make-fulldeps/extern-flag-rename-transitive/bar.rs b/tests/run-make/extern-flag-rename-transitive/bar.rs index 94446a07d6c..94446a07d6c 100644 --- a/tests/run-make-fulldeps/extern-flag-rename-transitive/bar.rs +++ b/tests/run-make/extern-flag-rename-transitive/bar.rs diff --git a/tests/run-make-fulldeps/extern-flag-rename-transitive/baz.rs b/tests/run-make/extern-flag-rename-transitive/baz.rs index c3908db3429..c3908db3429 100644 --- a/tests/run-make-fulldeps/extern-flag-rename-transitive/baz.rs +++ b/tests/run-make/extern-flag-rename-transitive/baz.rs diff --git a/tests/run-make-fulldeps/extern-flag-rename-transitive/foo.rs b/tests/run-make/extern-flag-rename-transitive/foo.rs index c1bfaa6cab5..c1bfaa6cab5 100644 --- a/tests/run-make-fulldeps/extern-flag-rename-transitive/foo.rs +++ b/tests/run-make/extern-flag-rename-transitive/foo.rs diff --git a/tests/run-make-fulldeps/extern-fn-generic/Makefile b/tests/run-make/extern-fn-generic/Makefile index 71746fb10cb..7dceea6cb88 100644 --- a/tests/run-make-fulldeps/extern-fn-generic/Makefile +++ b/tests/run-make/extern-fn-generic/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk all: $(call NATIVE_STATICLIB,test) diff --git a/tests/run-make-fulldeps/extern-fn-generic/test.c b/tests/run-make/extern-fn-generic/test.c index a8504ff2afb..a8504ff2afb 100644 --- a/tests/run-make-fulldeps/extern-fn-generic/test.c +++ b/tests/run-make/extern-fn-generic/test.c diff --git a/tests/run-make-fulldeps/extern-fn-generic/test.rs b/tests/run-make/extern-fn-generic/test.rs index c9baa489881..c9baa489881 100644 --- a/tests/run-make-fulldeps/extern-fn-generic/test.rs +++ b/tests/run-make/extern-fn-generic/test.rs diff --git a/tests/run-make-fulldeps/extern-fn-generic/testcrate.rs b/tests/run-make/extern-fn-generic/testcrate.rs index 39f76e59ca0..39f76e59ca0 100644 --- a/tests/run-make-fulldeps/extern-fn-generic/testcrate.rs +++ b/tests/run-make/extern-fn-generic/testcrate.rs diff --git a/tests/run-make-fulldeps/extern-fn-mangle/Makefile b/tests/run-make/extern-fn-mangle/Makefile index 4f5d026f213..3cbbf383996 100644 --- a/tests/run-make-fulldeps/extern-fn-mangle/Makefile +++ b/tests/run-make/extern-fn-mangle/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk all: $(call NATIVE_STATICLIB,test) diff --git a/tests/run-make-fulldeps/extern-fn-mangle/test.c b/tests/run-make/extern-fn-mangle/test.c index e94d75083b8..e94d75083b8 100644 --- a/tests/run-make-fulldeps/extern-fn-mangle/test.c +++ b/tests/run-make/extern-fn-mangle/test.c diff --git a/tests/run-make-fulldeps/extern-fn-mangle/test.rs b/tests/run-make/extern-fn-mangle/test.rs index 40b08f1ed70..40b08f1ed70 100644 --- a/tests/run-make-fulldeps/extern-fn-mangle/test.rs +++ b/tests/run-make/extern-fn-mangle/test.rs diff --git a/tests/run-make-fulldeps/extern-fn-reachable/Makefile b/tests/run-make/extern-fn-reachable/Makefile index 05bdb8d65b7..3297251bfd1 100644 --- a/tests/run-make-fulldeps/extern-fn-reachable/Makefile +++ b/tests/run-make/extern-fn-reachable/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk # ignore-windows-msvc diff --git a/tests/run-make-fulldeps/extern-fn-reachable/dylib.rs b/tests/run-make/extern-fn-reachable/dylib.rs index cd017934870..cd017934870 100644 --- a/tests/run-make-fulldeps/extern-fn-reachable/dylib.rs +++ b/tests/run-make/extern-fn-reachable/dylib.rs diff --git a/tests/run-make-fulldeps/extern-fn-struct-passing-abi/Makefile b/tests/run-make/extern-fn-struct-passing-abi/Makefile index 4f5d026f213..3cbbf383996 100644 --- a/tests/run-make-fulldeps/extern-fn-struct-passing-abi/Makefile +++ b/tests/run-make/extern-fn-struct-passing-abi/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk all: $(call NATIVE_STATICLIB,test) diff --git a/tests/run-make-fulldeps/extern-fn-struct-passing-abi/test.c b/tests/run-make/extern-fn-struct-passing-abi/test.c index 136b07129e1..136b07129e1 100644 --- a/tests/run-make-fulldeps/extern-fn-struct-passing-abi/test.c +++ b/tests/run-make/extern-fn-struct-passing-abi/test.c diff --git a/tests/run-make-fulldeps/extern-fn-struct-passing-abi/test.rs b/tests/run-make/extern-fn-struct-passing-abi/test.rs index afe0f52ef0b..afe0f52ef0b 100644 --- a/tests/run-make-fulldeps/extern-fn-struct-passing-abi/test.rs +++ b/tests/run-make/extern-fn-struct-passing-abi/test.rs diff --git a/tests/run-make-fulldeps/extern-fn-with-extern-types/Makefile b/tests/run-make/extern-fn-with-extern-types/Makefile index 1fa708950d4..07ec503aaae 100644 --- a/tests/run-make-fulldeps/extern-fn-with-extern-types/Makefile +++ b/tests/run-make/extern-fn-with-extern-types/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk all: $(call NATIVE_STATICLIB,ctest) diff --git a/tests/run-make-fulldeps/extern-fn-with-extern-types/ctest.c b/tests/run-make/extern-fn-with-extern-types/ctest.c index 3b6fb4cfce9..3b6fb4cfce9 100644 --- a/tests/run-make-fulldeps/extern-fn-with-extern-types/ctest.c +++ b/tests/run-make/extern-fn-with-extern-types/ctest.c diff --git a/tests/run-make-fulldeps/extern-fn-with-extern-types/test.rs b/tests/run-make/extern-fn-with-extern-types/test.rs index 90a6ebaf1aa..90a6ebaf1aa 100644 --- a/tests/run-make-fulldeps/extern-fn-with-extern-types/test.rs +++ b/tests/run-make/extern-fn-with-extern-types/test.rs diff --git a/tests/run-make-fulldeps/extern-fn-with-packed-struct/Makefile b/tests/run-make/extern-fn-with-packed-struct/Makefile index 4f5d026f213..3cbbf383996 100644 --- a/tests/run-make-fulldeps/extern-fn-with-packed-struct/Makefile +++ b/tests/run-make/extern-fn-with-packed-struct/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk all: $(call NATIVE_STATICLIB,test) diff --git a/tests/run-make-fulldeps/extern-fn-with-packed-struct/test.c b/tests/run-make/extern-fn-with-packed-struct/test.c index c89f8272b1e..c89f8272b1e 100644 --- a/tests/run-make-fulldeps/extern-fn-with-packed-struct/test.c +++ b/tests/run-make/extern-fn-with-packed-struct/test.c diff --git a/tests/run-make-fulldeps/extern-fn-with-packed-struct/test.rs b/tests/run-make/extern-fn-with-packed-struct/test.rs index 2f261efb510..2f261efb510 100644 --- a/tests/run-make-fulldeps/extern-fn-with-packed-struct/test.rs +++ b/tests/run-make/extern-fn-with-packed-struct/test.rs diff --git a/tests/run-make-fulldeps/extern-fn-with-union/Makefile b/tests/run-make/extern-fn-with-union/Makefile index 40bae923e30..e6c8c993679 100644 --- a/tests/run-make-fulldeps/extern-fn-with-union/Makefile +++ b/tests/run-make/extern-fn-with-union/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk all: $(call NATIVE_STATICLIB,ctest) diff --git a/tests/run-make-fulldeps/extern-fn-with-union/ctest.c b/tests/run-make/extern-fn-with-union/ctest.c index 86cb6453723..86cb6453723 100644 --- a/tests/run-make-fulldeps/extern-fn-with-union/ctest.c +++ b/tests/run-make/extern-fn-with-union/ctest.c diff --git a/tests/run-make-fulldeps/extern-fn-with-union/test.rs b/tests/run-make/extern-fn-with-union/test.rs index 438fbddf31f..438fbddf31f 100644 --- a/tests/run-make-fulldeps/extern-fn-with-union/test.rs +++ b/tests/run-make/extern-fn-with-union/test.rs diff --git a/tests/run-make-fulldeps/extern-fn-with-union/testcrate.rs b/tests/run-make/extern-fn-with-union/testcrate.rs index 28d91ff37c3..28d91ff37c3 100644 --- a/tests/run-make-fulldeps/extern-fn-with-union/testcrate.rs +++ b/tests/run-make/extern-fn-with-union/testcrate.rs diff --git a/tests/run-make-fulldeps/extern-multiple-copies/Makefile b/tests/run-make/extern-multiple-copies/Makefile index 00668a6bc88..b0b84278eda 100644 --- a/tests/run-make-fulldeps/extern-multiple-copies/Makefile +++ b/tests/run-make/extern-multiple-copies/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk all: diff --git a/tests/run-make-fulldeps/extern-multiple-copies/bar.rs b/tests/run-make/extern-multiple-copies/bar.rs index c6b3595f677..c6b3595f677 100644 --- a/tests/run-make-fulldeps/extern-multiple-copies/bar.rs +++ b/tests/run-make/extern-multiple-copies/bar.rs diff --git a/tests/run-make-fulldeps/extern-multiple-copies/foo1.rs b/tests/run-make/extern-multiple-copies/foo1.rs index c1bfaa6cab5..c1bfaa6cab5 100644 --- a/tests/run-make-fulldeps/extern-multiple-copies/foo1.rs +++ b/tests/run-make/extern-multiple-copies/foo1.rs diff --git a/tests/run-make-fulldeps/extern-multiple-copies/foo2.rs b/tests/run-make/extern-multiple-copies/foo2.rs index c1bfaa6cab5..c1bfaa6cab5 100644 --- a/tests/run-make-fulldeps/extern-multiple-copies/foo2.rs +++ b/tests/run-make/extern-multiple-copies/foo2.rs diff --git a/tests/run-make-fulldeps/extern-multiple-copies2/Makefile b/tests/run-make/extern-multiple-copies2/Makefile index 84de2ebf34d..708b1c1b540 100644 --- a/tests/run-make-fulldeps/extern-multiple-copies2/Makefile +++ b/tests/run-make/extern-multiple-copies2/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk all: diff --git a/tests/run-make-fulldeps/extern-multiple-copies2/bar.rs b/tests/run-make/extern-multiple-copies2/bar.rs index b3088152d6a..b3088152d6a 100644 --- a/tests/run-make-fulldeps/extern-multiple-copies2/bar.rs +++ b/tests/run-make/extern-multiple-copies2/bar.rs diff --git a/tests/run-make-fulldeps/extern-multiple-copies2/foo1.rs b/tests/run-make/extern-multiple-copies2/foo1.rs index 4c778e52ff4..4c778e52ff4 100644 --- a/tests/run-make-fulldeps/extern-multiple-copies2/foo1.rs +++ b/tests/run-make/extern-multiple-copies2/foo1.rs diff --git a/tests/run-make-fulldeps/extern-multiple-copies2/foo2.rs b/tests/run-make/extern-multiple-copies2/foo2.rs index 2be103507df..2be103507df 100644 --- a/tests/run-make-fulldeps/extern-multiple-copies2/foo2.rs +++ b/tests/run-make/extern-multiple-copies2/foo2.rs diff --git a/tests/run-make-fulldeps/extern-overrides-distribution/Makefile b/tests/run-make/extern-overrides-distribution/Makefile index c57b062cd5d..bfd0dd6991b 100644 --- a/tests/run-make-fulldeps/extern-overrides-distribution/Makefile +++ b/tests/run-make/extern-overrides-distribution/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk all: diff --git a/tests/run-make-fulldeps/extern-overrides-distribution/libc.rs b/tests/run-make/extern-overrides-distribution/libc.rs index ee51ae32886..ee51ae32886 100644 --- a/tests/run-make-fulldeps/extern-overrides-distribution/libc.rs +++ b/tests/run-make/extern-overrides-distribution/libc.rs diff --git a/tests/run-make-fulldeps/extern-overrides-distribution/main.rs b/tests/run-make/extern-overrides-distribution/main.rs index 1290a8c5670..1290a8c5670 100644 --- a/tests/run-make-fulldeps/extern-overrides-distribution/main.rs +++ b/tests/run-make/extern-overrides-distribution/main.rs diff --git a/tests/run-make-fulldeps/extra-filename-with-temp-outputs/Makefile b/tests/run-make/extra-filename-with-temp-outputs/Makefile index 470448cf50c..64745bef5b8 100644 --- a/tests/run-make-fulldeps/extra-filename-with-temp-outputs/Makefile +++ b/tests/run-make/extra-filename-with-temp-outputs/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk all: diff --git a/tests/run-make-fulldeps/extra-filename-with-temp-outputs/foo.rs b/tests/run-make/extra-filename-with-temp-outputs/foo.rs index f328e4d9d04..f328e4d9d04 100644 --- a/tests/run-make-fulldeps/extra-filename-with-temp-outputs/foo.rs +++ b/tests/run-make/extra-filename-with-temp-outputs/foo.rs diff --git a/tests/run-make/fmt-write-bloat/Makefile b/tests/run-make/fmt-write-bloat/Makefile index 53615775486..70e04b9af51 100644 --- a/tests/run-make/fmt-write-bloat/Makefile +++ b/tests/run-make/fmt-write-bloat/Makefile @@ -1,4 +1,4 @@ -include ../../run-make-fulldeps/tools.mk +include ../tools.mk # ignore-windows diff --git a/tests/run-make-fulldeps/foreign-double-unwind/Makefile b/tests/run-make/foreign-double-unwind/Makefile index ea2fe9ff881..f20fe3ce66e 100644 --- a/tests/run-make-fulldeps/foreign-double-unwind/Makefile +++ b/tests/run-make/foreign-double-unwind/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk all: foo diff --git a/tests/run-make-fulldeps/foreign-double-unwind/foo.cpp b/tests/run-make/foreign-double-unwind/foo.cpp index 69a8f11c2db..69a8f11c2db 100644 --- a/tests/run-make-fulldeps/foreign-double-unwind/foo.cpp +++ b/tests/run-make/foreign-double-unwind/foo.cpp diff --git a/tests/run-make-fulldeps/foreign-double-unwind/foo.rs b/tests/run-make/foreign-double-unwind/foo.rs index cae8aa9402d..cae8aa9402d 100644 --- a/tests/run-make-fulldeps/foreign-double-unwind/foo.rs +++ b/tests/run-make/foreign-double-unwind/foo.rs diff --git a/tests/run-make-fulldeps/foreign-exceptions/Makefile b/tests/run-make/foreign-exceptions/Makefile index 38fe2773df2..a8e20ffb1f4 100644 --- a/tests/run-make-fulldeps/foreign-exceptions/Makefile +++ b/tests/run-make/foreign-exceptions/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk all: foo diff --git a/tests/run-make-fulldeps/foreign-exceptions/foo.cpp b/tests/run-make/foreign-exceptions/foo.cpp index 8182021a2cc..8182021a2cc 100644 --- a/tests/run-make-fulldeps/foreign-exceptions/foo.cpp +++ b/tests/run-make/foreign-exceptions/foo.cpp diff --git a/tests/run-make-fulldeps/foreign-exceptions/foo.rs b/tests/run-make/foreign-exceptions/foo.rs index dd3b7c76f28..dd3b7c76f28 100644 --- a/tests/run-make-fulldeps/foreign-exceptions/foo.rs +++ b/tests/run-make/foreign-exceptions/foo.rs diff --git a/tests/run-make-fulldeps/foreign-rust-exceptions/Makefile b/tests/run-make/foreign-rust-exceptions/Makefile index 50fca7f24e6..0d007bf1c49 100644 --- a/tests/run-make-fulldeps/foreign-rust-exceptions/Makefile +++ b/tests/run-make/foreign-rust-exceptions/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile # ignore-i686-pc-windows-gnu # This test doesn't work on 32-bit MinGW as cdylib has its own copy of unwinder diff --git a/tests/run-make-fulldeps/foreign-rust-exceptions/bar.rs b/tests/run-make/foreign-rust-exceptions/bar.rs index 5f9efe32360..5f9efe32360 100644 --- a/tests/run-make-fulldeps/foreign-rust-exceptions/bar.rs +++ b/tests/run-make/foreign-rust-exceptions/bar.rs diff --git a/tests/run-make-fulldeps/foreign-rust-exceptions/foo.rs b/tests/run-make/foreign-rust-exceptions/foo.rs index 266987c5b6d..266987c5b6d 100644 --- a/tests/run-make-fulldeps/foreign-rust-exceptions/foo.rs +++ b/tests/run-make/foreign-rust-exceptions/foo.rs diff --git a/tests/run-make-fulldeps/fpic/Makefile b/tests/run-make/fpic/Makefile index 5986de3666f..c38dd8d6e8c 100644 --- a/tests/run-make-fulldeps/fpic/Makefile +++ b/tests/run-make/fpic/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk # ignore-windows diff --git a/tests/run-make-fulldeps/fpic/hello.rs b/tests/run-make/fpic/hello.rs index 45590d86ba6..45590d86ba6 100644 --- a/tests/run-make-fulldeps/fpic/hello.rs +++ b/tests/run-make/fpic/hello.rs diff --git a/tests/run-make-fulldeps/glibc-staticlib-args/Makefile b/tests/run-make/glibc-staticlib-args/Makefile index 39e64bacf58..cad6c049e45 100644 --- a/tests/run-make-fulldeps/glibc-staticlib-args/Makefile +++ b/tests/run-make/glibc-staticlib-args/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile # only-gnu # only-linux diff --git a/tests/run-make-fulldeps/glibc-staticlib-args/library.rs b/tests/run-make/glibc-staticlib-args/library.rs index 5ab627a2ac1..5ab627a2ac1 100644 --- a/tests/run-make-fulldeps/glibc-staticlib-args/library.rs +++ b/tests/run-make/glibc-staticlib-args/library.rs diff --git a/tests/run-make-fulldeps/glibc-staticlib-args/program.c b/tests/run-make/glibc-staticlib-args/program.c index 30f6974b750..30f6974b750 100644 --- a/tests/run-make-fulldeps/glibc-staticlib-args/program.c +++ b/tests/run-make/glibc-staticlib-args/program.c diff --git a/tests/run-make-fulldeps/hir-tree/Makefile b/tests/run-make/hir-tree/Makefile index b0450ea4bc5..b0450ea4bc5 100644 --- a/tests/run-make-fulldeps/hir-tree/Makefile +++ b/tests/run-make/hir-tree/Makefile diff --git a/tests/run-make-fulldeps/hir-tree/input.rs b/tests/run-make/hir-tree/input.rs index 9d1a4e9e47d..9d1a4e9e47d 100644 --- a/tests/run-make-fulldeps/hir-tree/input.rs +++ b/tests/run-make/hir-tree/input.rs diff --git a/tests/run-make-fulldeps/include_bytes_deps/Makefile b/tests/run-make/include_bytes_deps/Makefile index 696dfd207bb..696dfd207bb 100644 --- a/tests/run-make-fulldeps/include_bytes_deps/Makefile +++ b/tests/run-make/include_bytes_deps/Makefile diff --git a/tests/run-make-fulldeps/include_bytes_deps/input.bin b/tests/run-make/include_bytes_deps/input.bin index cd0875583aa..cd0875583aa 100644 --- a/tests/run-make-fulldeps/include_bytes_deps/input.bin +++ b/tests/run-make/include_bytes_deps/input.bin diff --git a/tests/run-make-fulldeps/include_bytes_deps/input.md b/tests/run-make/include_bytes_deps/input.md index 2a19b7405f7..2a19b7405f7 100644 --- a/tests/run-make-fulldeps/include_bytes_deps/input.md +++ b/tests/run-make/include_bytes_deps/input.md diff --git a/tests/run-make-fulldeps/include_bytes_deps/input.txt b/tests/run-make/include_bytes_deps/input.txt index cd0875583aa..cd0875583aa 100644 --- a/tests/run-make-fulldeps/include_bytes_deps/input.txt +++ b/tests/run-make/include_bytes_deps/input.txt diff --git a/tests/run-make-fulldeps/include_bytes_deps/main.rs b/tests/run-make/include_bytes_deps/main.rs index 2fd55699d44..2fd55699d44 100644 --- a/tests/run-make-fulldeps/include_bytes_deps/main.rs +++ b/tests/run-make/include_bytes_deps/main.rs diff --git a/tests/run-make-fulldeps/incr-add-rust-src-component/Makefile b/tests/run-make/incr-add-rust-src-component/Makefile index 5c1d953cc05..fd09c2299f9 100644 --- a/tests/run-make-fulldeps/incr-add-rust-src-component/Makefile +++ b/tests/run-make/incr-add-rust-src-component/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk # rust-lang/rust#70924: Test that if we add rust-src component in between two diff --git a/tests/run-make-fulldeps/incr-add-rust-src-component/main.rs b/tests/run-make/incr-add-rust-src-component/main.rs index f6320bcb04a..f6320bcb04a 100644 --- a/tests/run-make-fulldeps/incr-add-rust-src-component/main.rs +++ b/tests/run-make/incr-add-rust-src-component/main.rs diff --git a/tests/run-make/incr-foreign-head-span/Makefile b/tests/run-make/incr-foreign-head-span/Makefile index 712965eaa88..9d6102cdd72 100644 --- a/tests/run-make/incr-foreign-head-span/Makefile +++ b/tests/run-make/incr-foreign-head-span/Makefile @@ -1,4 +1,4 @@ -include ../../run-make-fulldeps/tools.mk +include ../tools.mk # ignore-none no-std is not supported # ignore-nvptx64-nvidia-cuda FIXME: can't find crate for 'std' diff --git a/tests/run-make/incr-prev-body-beyond-eof/Makefile b/tests/run-make/incr-prev-body-beyond-eof/Makefile index 24eea3acaea..aa47552f52c 100644 --- a/tests/run-make/incr-prev-body-beyond-eof/Makefile +++ b/tests/run-make/incr-prev-body-beyond-eof/Makefile @@ -1,7 +1,7 @@ # ignore-none no-std is not supported # ignore-nvptx64-nvidia-cuda FIXME: can't find crate for `std` -include ../../run-make-fulldeps/tools.mk +include ../tools.mk # Tests that we don't ICE during incremental compilation after modifying a # function span such that its previous end line exceeds the number of lines diff --git a/tests/run-make/incremental-session-fail/Makefile b/tests/run-make/incremental-session-fail/Makefile index 6ce1370927b..f43eece2eb7 100644 --- a/tests/run-make/incremental-session-fail/Makefile +++ b/tests/run-make/incremental-session-fail/Makefile @@ -1,4 +1,4 @@ -include ../../run-make-fulldeps/tools.mk +include ../tools.mk SESSION_DIR := $(TMPDIR)/session OUTPUT_FILE := $(TMPDIR)/build-output diff --git a/tests/run-make-fulldeps/inline-always-many-cgu/Makefile b/tests/run-make/inline-always-many-cgu/Makefile index 9945821db28..9945821db28 100644 --- a/tests/run-make-fulldeps/inline-always-many-cgu/Makefile +++ b/tests/run-make/inline-always-many-cgu/Makefile diff --git a/tests/run-make-fulldeps/inline-always-many-cgu/foo.rs b/tests/run-make/inline-always-many-cgu/foo.rs index 65fe69c16fe..65fe69c16fe 100644 --- a/tests/run-make-fulldeps/inline-always-many-cgu/foo.rs +++ b/tests/run-make/inline-always-many-cgu/foo.rs diff --git a/tests/run-make-fulldeps/interdependent-c-libraries/Makefile b/tests/run-make/interdependent-c-libraries/Makefile index dc5b55a9925..53a696d82bf 100644 --- a/tests/run-make-fulldeps/interdependent-c-libraries/Makefile +++ b/tests/run-make/interdependent-c-libraries/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk # The rust crate foo will link to the native library foo, while the rust crate diff --git a/tests/run-make-fulldeps/interdependent-c-libraries/bar.c b/tests/run-make/interdependent-c-libraries/bar.c index 812c9753528..812c9753528 100644 --- a/tests/run-make-fulldeps/interdependent-c-libraries/bar.c +++ b/tests/run-make/interdependent-c-libraries/bar.c diff --git a/tests/run-make-fulldeps/interdependent-c-libraries/bar.rs b/tests/run-make/interdependent-c-libraries/bar.rs index 3c2c3f21814..3c2c3f21814 100644 --- a/tests/run-make-fulldeps/interdependent-c-libraries/bar.rs +++ b/tests/run-make/interdependent-c-libraries/bar.rs diff --git a/tests/run-make-fulldeps/interdependent-c-libraries/foo.c b/tests/run-make/interdependent-c-libraries/foo.c index 85e6cd8c390..85e6cd8c390 100644 --- a/tests/run-make-fulldeps/interdependent-c-libraries/foo.c +++ b/tests/run-make/interdependent-c-libraries/foo.c diff --git a/tests/run-make-fulldeps/interdependent-c-libraries/foo.rs b/tests/run-make/interdependent-c-libraries/foo.rs index a69809726c6..a69809726c6 100644 --- a/tests/run-make-fulldeps/interdependent-c-libraries/foo.rs +++ b/tests/run-make/interdependent-c-libraries/foo.rs diff --git a/tests/run-make-fulldeps/interdependent-c-libraries/main.rs b/tests/run-make/interdependent-c-libraries/main.rs index 2aba427df47..2aba427df47 100644 --- a/tests/run-make-fulldeps/interdependent-c-libraries/main.rs +++ b/tests/run-make/interdependent-c-libraries/main.rs diff --git a/tests/run-make-fulldeps/intrinsic-unreachable/Makefile b/tests/run-make/intrinsic-unreachable/Makefile index ff9cc57098c..ff9cc57098c 100644 --- a/tests/run-make-fulldeps/intrinsic-unreachable/Makefile +++ b/tests/run-make/intrinsic-unreachable/Makefile diff --git a/tests/run-make-fulldeps/intrinsic-unreachable/exit-ret.rs b/tests/run-make/intrinsic-unreachable/exit-ret.rs index e7b9694d9f2..e7b9694d9f2 100644 --- a/tests/run-make-fulldeps/intrinsic-unreachable/exit-ret.rs +++ b/tests/run-make/intrinsic-unreachable/exit-ret.rs diff --git a/tests/run-make-fulldeps/intrinsic-unreachable/exit-unreachable.rs b/tests/run-make/intrinsic-unreachable/exit-unreachable.rs index ec85db733df..ec85db733df 100644 --- a/tests/run-make-fulldeps/intrinsic-unreachable/exit-unreachable.rs +++ b/tests/run-make/intrinsic-unreachable/exit-unreachable.rs diff --git a/tests/run-make-fulldeps/invalid-library/Makefile b/tests/run-make/invalid-library/Makefile index 910d9af7b05..910d9af7b05 100644 --- a/tests/run-make-fulldeps/invalid-library/Makefile +++ b/tests/run-make/invalid-library/Makefile diff --git a/tests/run-make-fulldeps/invalid-library/foo.rs b/tests/run-make/invalid-library/foo.rs index bb7b36c496e..bb7b36c496e 100644 --- a/tests/run-make-fulldeps/invalid-library/foo.rs +++ b/tests/run-make/invalid-library/foo.rs diff --git a/tests/run-make/invalid-so/Makefile b/tests/run-make/invalid-so/Makefile index 5b82ecd207d..e36c7040bc6 100644 --- a/tests/run-make/invalid-so/Makefile +++ b/tests/run-make/invalid-so/Makefile @@ -1,4 +1,4 @@ -include ../../run-make-fulldeps/tools.mk +include ../tools.mk DYLIB_NAME := $(shell echo | $(RUSTC) --crate-name foo --crate-type dylib --print file-names -) diff --git a/tests/run-make-fulldeps/invalid-staticlib/Makefile b/tests/run-make/invalid-staticlib/Makefile index 3f0f74ce3cb..3f0f74ce3cb 100644 --- a/tests/run-make-fulldeps/invalid-staticlib/Makefile +++ b/tests/run-make/invalid-staticlib/Makefile diff --git a/tests/run-make/issue-10971-temps-dir/Makefile b/tests/run-make/issue-10971-temps-dir/Makefile index e589bbffe60..6e1649a58d2 100644 --- a/tests/run-make/issue-10971-temps-dir/Makefile +++ b/tests/run-make/issue-10971-temps-dir/Makefile @@ -1,4 +1,4 @@ -include ../../run-make-fulldeps/tools.mk +include ../tools.mk # Regression test for issue #10971 # Running two invocations in parallel would overwrite each other's temp files. diff --git a/tests/run-make-fulldeps/issue-11908/Makefile b/tests/run-make/issue-11908/Makefile index 47005537e41..38586662fc7 100644 --- a/tests/run-make-fulldeps/issue-11908/Makefile +++ b/tests/run-make/issue-11908/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile # This test ensures that if you have the same rlib or dylib at two locations # in the same path that you don't hit an assertion in the compiler. # diff --git a/tests/run-make-fulldeps/issue-11908/bar.rs b/tests/run-make/issue-11908/bar.rs index bb7b36c496e..bb7b36c496e 100644 --- a/tests/run-make-fulldeps/issue-11908/bar.rs +++ b/tests/run-make/issue-11908/bar.rs diff --git a/tests/run-make-fulldeps/issue-11908/foo.rs b/tests/run-make/issue-11908/foo.rs index 82b2dfe9fdb..82b2dfe9fdb 100644 --- a/tests/run-make-fulldeps/issue-11908/foo.rs +++ b/tests/run-make/issue-11908/foo.rs diff --git a/tests/run-make-fulldeps/issue-14500/Makefile b/tests/run-make/issue-14500/Makefile index 52550e57018..eeab48de3b9 100644 --- a/tests/run-make-fulldeps/issue-14500/Makefile +++ b/tests/run-make/issue-14500/Makefile @@ -1,5 +1,7 @@ include ../tools.mk +# ignore-cross-compile + # Test to make sure that reachable extern fns are always available in final # productcs, including when LTO is used. In this test, the `foo` crate has a # reahable symbol, and is a dependency of the `bar` crate. When the `bar` crate diff --git a/tests/run-make-fulldeps/issue-14500/bar.rs b/tests/run-make/issue-14500/bar.rs index 49af74e1b74..49af74e1b74 100644 --- a/tests/run-make-fulldeps/issue-14500/bar.rs +++ b/tests/run-make/issue-14500/bar.rs diff --git a/tests/run-make-fulldeps/issue-14500/foo.c b/tests/run-make/issue-14500/foo.c index 2353d400df3..2353d400df3 100644 --- a/tests/run-make-fulldeps/issue-14500/foo.c +++ b/tests/run-make/issue-14500/foo.c diff --git a/tests/run-make-fulldeps/issue-14500/foo.rs b/tests/run-make/issue-14500/foo.rs index 7c19c1f2c67..7c19c1f2c67 100644 --- a/tests/run-make-fulldeps/issue-14500/foo.rs +++ b/tests/run-make/issue-14500/foo.rs diff --git a/tests/run-make-fulldeps/issue-14698/Makefile b/tests/run-make/issue-14698/Makefile index a1cfb5abab5..a1cfb5abab5 100644 --- a/tests/run-make-fulldeps/issue-14698/Makefile +++ b/tests/run-make/issue-14698/Makefile diff --git a/tests/run-make-fulldeps/issue-14698/foo.rs b/tests/run-make/issue-14698/foo.rs index f328e4d9d04..f328e4d9d04 100644 --- a/tests/run-make-fulldeps/issue-14698/foo.rs +++ b/tests/run-make/issue-14698/foo.rs diff --git a/tests/run-make-fulldeps/issue-15460/Makefile b/tests/run-make/issue-15460/Makefile index 1648d0c0c9b..a36a085fa6f 100644 --- a/tests/run-make-fulldeps/issue-15460/Makefile +++ b/tests/run-make/issue-15460/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk all: $(call NATIVE_STATICLIB,foo) diff --git a/tests/run-make-fulldeps/issue-15460/bar.rs b/tests/run-make/issue-15460/bar.rs index e66aeb6bd39..e66aeb6bd39 100644 --- a/tests/run-make-fulldeps/issue-15460/bar.rs +++ b/tests/run-make/issue-15460/bar.rs diff --git a/tests/run-make-fulldeps/issue-15460/foo.c b/tests/run-make/issue-15460/foo.c index fdf595b574e..fdf595b574e 100644 --- a/tests/run-make-fulldeps/issue-15460/foo.c +++ b/tests/run-make/issue-15460/foo.c diff --git a/tests/run-make-fulldeps/issue-15460/foo.rs b/tests/run-make/issue-15460/foo.rs index b4eaa0b31c5..b4eaa0b31c5 100644 --- a/tests/run-make-fulldeps/issue-15460/foo.rs +++ b/tests/run-make/issue-15460/foo.rs diff --git a/tests/run-make-fulldeps/issue-18943/Makefile b/tests/run-make/issue-18943/Makefile index fc40d756d6f..fc40d756d6f 100644 --- a/tests/run-make-fulldeps/issue-18943/Makefile +++ b/tests/run-make/issue-18943/Makefile diff --git a/tests/run-make-fulldeps/issue-18943/foo.rs b/tests/run-make/issue-18943/foo.rs index d18400dd3a5..d18400dd3a5 100644 --- a/tests/run-make-fulldeps/issue-18943/foo.rs +++ b/tests/run-make/issue-18943/foo.rs diff --git a/tests/run-make-fulldeps/issue-20626/Makefile b/tests/run-make/issue-20626/Makefile index f76f31e794a..63eee910a9c 100644 --- a/tests/run-make-fulldeps/issue-20626/Makefile +++ b/tests/run-make/issue-20626/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk # Test output to be four diff --git a/tests/run-make-fulldeps/issue-20626/foo.rs b/tests/run-make/issue-20626/foo.rs index a474e234e72..a474e234e72 100644 --- a/tests/run-make-fulldeps/issue-20626/foo.rs +++ b/tests/run-make/issue-20626/foo.rs diff --git a/tests/run-make-fulldeps/issue-22131/Makefile b/tests/run-make/issue-22131/Makefile index 770f4b04ec3..4f33a4659cc 100644 --- a/tests/run-make-fulldeps/issue-22131/Makefile +++ b/tests/run-make/issue-22131/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk all: foo.rs diff --git a/tests/run-make-fulldeps/issue-22131/foo.rs b/tests/run-make/issue-22131/foo.rs index 33255d76879..33255d76879 100644 --- a/tests/run-make-fulldeps/issue-22131/foo.rs +++ b/tests/run-make/issue-22131/foo.rs diff --git a/tests/run-make-fulldeps/issue-24445/Makefile b/tests/run-make/issue-24445/Makefile index 2a12226a6c0..a13910aa73e 100644 --- a/tests/run-make-fulldeps/issue-24445/Makefile +++ b/tests/run-make/issue-24445/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk # only-linux diff --git a/tests/run-make-fulldeps/issue-24445/foo.c b/tests/run-make/issue-24445/foo.c index bb4036b06e1..bb4036b06e1 100644 --- a/tests/run-make-fulldeps/issue-24445/foo.c +++ b/tests/run-make/issue-24445/foo.c diff --git a/tests/run-make-fulldeps/issue-24445/foo.rs b/tests/run-make/issue-24445/foo.rs index b67f3847cd4..b67f3847cd4 100644 --- a/tests/run-make-fulldeps/issue-24445/foo.rs +++ b/tests/run-make/issue-24445/foo.rs diff --git a/tests/run-make/issue-25581/Makefile b/tests/run-make/issue-25581/Makefile new file mode 100644 index 00000000000..3cbbf383996 --- /dev/null +++ b/tests/run-make/issue-25581/Makefile @@ -0,0 +1,6 @@ +# ignore-cross-compile +include ../tools.mk + +all: $(call NATIVE_STATICLIB,test) + $(RUSTC) test.rs + $(call RUN,test) || exit 1 diff --git a/tests/run-make-fulldeps/issue-25581/test.c b/tests/run-make/issue-25581/test.c index 52fbf78510a..52fbf78510a 100644 --- a/tests/run-make-fulldeps/issue-25581/test.c +++ b/tests/run-make/issue-25581/test.c diff --git a/tests/run-make-fulldeps/issue-25581/test.rs b/tests/run-make/issue-25581/test.rs index ba6749c9722..ba6749c9722 100644 --- a/tests/run-make-fulldeps/issue-25581/test.rs +++ b/tests/run-make/issue-25581/test.rs diff --git a/tests/run-make-fulldeps/issue-26006/Makefile b/tests/run-make/issue-26006/Makefile index 0ff07302002..b679c121530 100644 --- a/tests/run-make-fulldeps/issue-26006/Makefile +++ b/tests/run-make/issue-26006/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk # ignore-windows diff --git a/tests/run-make-fulldeps/issue-26006/in/libc/lib.rs b/tests/run-make/issue-26006/in/libc/lib.rs index 23f2bf51800..23f2bf51800 100644 --- a/tests/run-make-fulldeps/issue-26006/in/libc/lib.rs +++ b/tests/run-make/issue-26006/in/libc/lib.rs diff --git a/tests/run-make-fulldeps/issue-26006/in/time/lib.rs b/tests/run-make/issue-26006/in/time/lib.rs index 87f2f824a36..87f2f824a36 100644 --- a/tests/run-make-fulldeps/issue-26006/in/time/lib.rs +++ b/tests/run-make/issue-26006/in/time/lib.rs diff --git a/tests/run-make-fulldeps/issue-26092/Makefile b/tests/run-make/issue-26092/Makefile index 96822e7690b..96822e7690b 100644 --- a/tests/run-make-fulldeps/issue-26092/Makefile +++ b/tests/run-make/issue-26092/Makefile diff --git a/tests/run-make-fulldeps/issue-26092/blank.rs b/tests/run-make/issue-26092/blank.rs index f328e4d9d04..f328e4d9d04 100644 --- a/tests/run-make-fulldeps/issue-26092/blank.rs +++ b/tests/run-make/issue-26092/blank.rs diff --git a/tests/run-make-fulldeps/issue-28595/Makefile b/tests/run-make/issue-28595/Makefile index 30a1d9c560a..258f9788aaf 100644 --- a/tests/run-make-fulldeps/issue-28595/Makefile +++ b/tests/run-make/issue-28595/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk all: $(call NATIVE_STATICLIB,a) $(call NATIVE_STATICLIB,b) diff --git a/tests/run-make-fulldeps/issue-28595/a.c b/tests/run-make/issue-28595/a.c index 7bfd83cca21..7bfd83cca21 100644 --- a/tests/run-make-fulldeps/issue-28595/a.c +++ b/tests/run-make/issue-28595/a.c diff --git a/tests/run-make-fulldeps/issue-28595/a.rs b/tests/run-make/issue-28595/a.rs index 07863cf64d6..07863cf64d6 100644 --- a/tests/run-make-fulldeps/issue-28595/a.rs +++ b/tests/run-make/issue-28595/a.rs diff --git a/tests/run-make-fulldeps/issue-28595/b.c b/tests/run-make/issue-28595/b.c index 6aecb5f9e04..6aecb5f9e04 100644 --- a/tests/run-make-fulldeps/issue-28595/b.c +++ b/tests/run-make/issue-28595/b.c diff --git a/tests/run-make-fulldeps/issue-28595/b.rs b/tests/run-make/issue-28595/b.rs index 1f389859fad..1f389859fad 100644 --- a/tests/run-make-fulldeps/issue-28595/b.rs +++ b/tests/run-make/issue-28595/b.rs diff --git a/tests/run-make-fulldeps/issue-28766/Makefile b/tests/run-make/issue-28766/Makefile index 96d0bdc2b2a..96d0bdc2b2a 100644 --- a/tests/run-make-fulldeps/issue-28766/Makefile +++ b/tests/run-make/issue-28766/Makefile diff --git a/tests/run-make-fulldeps/issue-28766/foo.rs b/tests/run-make/issue-28766/foo.rs index 1dcabe42dc1..1dcabe42dc1 100644 --- a/tests/run-make-fulldeps/issue-28766/foo.rs +++ b/tests/run-make/issue-28766/foo.rs diff --git a/tests/run-make-fulldeps/issue-28766/main.rs b/tests/run-make/issue-28766/main.rs index de12b1fd9dc..de12b1fd9dc 100644 --- a/tests/run-make-fulldeps/issue-28766/main.rs +++ b/tests/run-make/issue-28766/main.rs diff --git a/tests/run-make-fulldeps/issue-30063/Makefile b/tests/run-make/issue-30063/Makefile index e4ede598f7b..8a69ca79f51 100644 --- a/tests/run-make-fulldeps/issue-30063/Makefile +++ b/tests/run-make/issue-30063/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk all: diff --git a/tests/run-make-fulldeps/issue-30063/foo.rs b/tests/run-make/issue-30063/foo.rs index 45590d86ba6..45590d86ba6 100644 --- a/tests/run-make-fulldeps/issue-30063/foo.rs +++ b/tests/run-make/issue-30063/foo.rs diff --git a/tests/run-make-fulldeps/issue-33329/Makefile b/tests/run-make/issue-33329/Makefile index 9c149440d8e..9c149440d8e 100644 --- a/tests/run-make-fulldeps/issue-33329/Makefile +++ b/tests/run-make/issue-33329/Makefile diff --git a/tests/run-make-fulldeps/issue-33329/main.rs b/tests/run-make/issue-33329/main.rs index f328e4d9d04..f328e4d9d04 100644 --- a/tests/run-make-fulldeps/issue-33329/main.rs +++ b/tests/run-make/issue-33329/main.rs diff --git a/tests/run-make-fulldeps/issue-35164/Makefile b/tests/run-make/issue-35164/Makefile index 38aa6f1265f..38aa6f1265f 100644 --- a/tests/run-make-fulldeps/issue-35164/Makefile +++ b/tests/run-make/issue-35164/Makefile diff --git a/tests/run-make-fulldeps/issue-35164/main.rs b/tests/run-make/issue-35164/main.rs index 1333d63224c..1333d63224c 100644 --- a/tests/run-make-fulldeps/issue-35164/main.rs +++ b/tests/run-make/issue-35164/main.rs diff --git a/tests/run-make-fulldeps/issue-35164/submodule/mod.rs b/tests/run-make/issue-35164/submodule/mod.rs index a9045b242fb..a9045b242fb 100644 --- a/tests/run-make-fulldeps/issue-35164/submodule/mod.rs +++ b/tests/run-make/issue-35164/submodule/mod.rs diff --git a/tests/run-make/issue-36710/Makefile b/tests/run-make/issue-36710/Makefile index c6b71f5fbd4..7b91107a234 100644 --- a/tests/run-make/issue-36710/Makefile +++ b/tests/run-make/issue-36710/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile # ignore-none no-std is not supported # ignore-wasm32 FIXME: don't attempt to compile C++ to WASM # ignore-wasm64 FIXME: don't attempt to compile C++ to WASM @@ -6,7 +7,7 @@ # (see dist-i586-gnu-i586-i686-musl Dockerfile) # ignore-sgx -include ../../run-make-fulldeps/tools.mk +include ../tools.mk all: foo $(call RUN,foo) diff --git a/tests/run-make-fulldeps/issue-37839/Makefile b/tests/run-make/issue-37839/Makefile index de50bd71379..6bad27b7bdc 100644 --- a/tests/run-make-fulldeps/issue-37839/Makefile +++ b/tests/run-make/issue-37839/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk all: diff --git a/tests/run-make-fulldeps/issue-37839/a.rs b/tests/run-make/issue-37839/a.rs index b5dffac3ff6..b5dffac3ff6 100644 --- a/tests/run-make-fulldeps/issue-37839/a.rs +++ b/tests/run-make/issue-37839/a.rs diff --git a/tests/run-make-fulldeps/issue-37839/b.rs b/tests/run-make/issue-37839/b.rs index 355d2b16527..355d2b16527 100644 --- a/tests/run-make-fulldeps/issue-37839/b.rs +++ b/tests/run-make/issue-37839/b.rs diff --git a/tests/run-make-fulldeps/issue-37839/c.rs b/tests/run-make/issue-37839/c.rs index 4c7ce01b6a0..4c7ce01b6a0 100644 --- a/tests/run-make-fulldeps/issue-37839/c.rs +++ b/tests/run-make/issue-37839/c.rs diff --git a/tests/run-make-fulldeps/issue-37893/Makefile b/tests/run-make/issue-37893/Makefile index 33a60830e5d..44e4a321a30 100644 --- a/tests/run-make-fulldeps/issue-37893/Makefile +++ b/tests/run-make/issue-37893/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk all: diff --git a/tests/run-make-fulldeps/issue-37893/a.rs b/tests/run-make/issue-37893/a.rs index b5dffac3ff6..b5dffac3ff6 100644 --- a/tests/run-make-fulldeps/issue-37893/a.rs +++ b/tests/run-make/issue-37893/a.rs diff --git a/tests/run-make-fulldeps/issue-37893/b.rs b/tests/run-make/issue-37893/b.rs index 355d2b16527..355d2b16527 100644 --- a/tests/run-make-fulldeps/issue-37893/b.rs +++ b/tests/run-make/issue-37893/b.rs diff --git a/tests/run-make-fulldeps/issue-37893/c.rs b/tests/run-make/issue-37893/c.rs index b9c2155728c..b9c2155728c 100644 --- a/tests/run-make-fulldeps/issue-37893/c.rs +++ b/tests/run-make/issue-37893/c.rs diff --git a/tests/run-make-fulldeps/issue-38237/Makefile b/tests/run-make/issue-38237/Makefile index 75121d04012..80dddc5bd13 100644 --- a/tests/run-make-fulldeps/issue-38237/Makefile +++ b/tests/run-make/issue-38237/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk all: diff --git a/tests/run-make-fulldeps/issue-38237/bar.rs b/tests/run-make/issue-38237/bar.rs index 2b839f3a3b3..2b839f3a3b3 100644 --- a/tests/run-make-fulldeps/issue-38237/bar.rs +++ b/tests/run-make/issue-38237/bar.rs diff --git a/tests/run-make-fulldeps/issue-38237/baz.rs b/tests/run-make/issue-38237/baz.rs index cd2425f9b69..cd2425f9b69 100644 --- a/tests/run-make-fulldeps/issue-38237/baz.rs +++ b/tests/run-make/issue-38237/baz.rs diff --git a/tests/run-make-fulldeps/issue-38237/foo.rs b/tests/run-make/issue-38237/foo.rs index a106e4fde5c..a106e4fde5c 100644 --- a/tests/run-make-fulldeps/issue-38237/foo.rs +++ b/tests/run-make/issue-38237/foo.rs diff --git a/tests/run-make-fulldeps/issue-40535/Makefile b/tests/run-make/issue-40535/Makefile index 155c8825214..155c8825214 100644 --- a/tests/run-make-fulldeps/issue-40535/Makefile +++ b/tests/run-make/issue-40535/Makefile diff --git a/tests/run-make-fulldeps/issue-40535/bar.rs b/tests/run-make/issue-40535/bar.rs index b02b28f59d9..b02b28f59d9 100644 --- a/tests/run-make-fulldeps/issue-40535/bar.rs +++ b/tests/run-make/issue-40535/bar.rs diff --git a/tests/run-make-fulldeps/issue-40535/baz.rs b/tests/run-make/issue-40535/baz.rs index 83be6e807e0..83be6e807e0 100644 --- a/tests/run-make-fulldeps/issue-40535/baz.rs +++ b/tests/run-make/issue-40535/baz.rs diff --git a/tests/run-make-fulldeps/issue-40535/foo.rs b/tests/run-make/issue-40535/foo.rs index 27020266425..27020266425 100644 --- a/tests/run-make-fulldeps/issue-40535/foo.rs +++ b/tests/run-make/issue-40535/foo.rs diff --git a/tests/run-make-fulldeps/issue-46239/Makefile b/tests/run-make/issue-46239/Makefile index a93ef321298..0006ced2515 100644 --- a/tests/run-make-fulldeps/issue-46239/Makefile +++ b/tests/run-make/issue-46239/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk all: diff --git a/tests/run-make-fulldeps/issue-46239/main.rs b/tests/run-make/issue-46239/main.rs index b7df5cf4d81..b7df5cf4d81 100644 --- a/tests/run-make-fulldeps/issue-46239/main.rs +++ b/tests/run-make/issue-46239/main.rs diff --git a/tests/run-make/issue-47384/Makefile b/tests/run-make/issue-47384/Makefile index 0aadf6c88c9..afc77cb275a 100644 --- a/tests/run-make/issue-47384/Makefile +++ b/tests/run-make/issue-47384/Makefile @@ -1,4 +1,4 @@ -include ../../run-make-fulldeps/tools.mk +include ../tools.mk # only-linux # ignore-cross-compile diff --git a/tests/run-make-fulldeps/issue-47551/Makefile b/tests/run-make/issue-47551/Makefile index 5a6ac725701..5a6ac725701 100644 --- a/tests/run-make-fulldeps/issue-47551/Makefile +++ b/tests/run-make/issue-47551/Makefile diff --git a/tests/run-make-fulldeps/issue-47551/eh_frame-terminator.rs b/tests/run-make/issue-47551/eh_frame-terminator.rs index a2c7a31b7c3..a2c7a31b7c3 100644 --- a/tests/run-make-fulldeps/issue-47551/eh_frame-terminator.rs +++ b/tests/run-make/issue-47551/eh_frame-terminator.rs diff --git a/tests/run-make-fulldeps/issue-51671/Makefile b/tests/run-make/issue-51671/Makefile index c9364536992..c9364536992 100644 --- a/tests/run-make-fulldeps/issue-51671/Makefile +++ b/tests/run-make/issue-51671/Makefile diff --git a/tests/run-make-fulldeps/issue-51671/app.rs b/tests/run-make/issue-51671/app.rs index e9dc1e9744f..e9dc1e9744f 100644 --- a/tests/run-make-fulldeps/issue-51671/app.rs +++ b/tests/run-make/issue-51671/app.rs diff --git a/tests/run-make-fulldeps/issue-53964/Makefile b/tests/run-make/issue-53964/Makefile index 6bd83021374..6bd83021374 100644 --- a/tests/run-make-fulldeps/issue-53964/Makefile +++ b/tests/run-make/issue-53964/Makefile diff --git a/tests/run-make-fulldeps/issue-53964/app.rs b/tests/run-make/issue-53964/app.rs index 8127b9578bf..8127b9578bf 100644 --- a/tests/run-make-fulldeps/issue-53964/app.rs +++ b/tests/run-make/issue-53964/app.rs diff --git a/tests/run-make-fulldeps/issue-53964/panic.rs b/tests/run-make/issue-53964/panic.rs index a8781205071..a8781205071 100644 --- a/tests/run-make-fulldeps/issue-53964/panic.rs +++ b/tests/run-make/issue-53964/panic.rs diff --git a/tests/run-make-fulldeps/issue-64153/Makefile b/tests/run-make/issue-64153/Makefile index f42ea620fb9..f42ea620fb9 100644 --- a/tests/run-make-fulldeps/issue-64153/Makefile +++ b/tests/run-make/issue-64153/Makefile diff --git a/tests/run-make-fulldeps/issue-64153/downstream.rs b/tests/run-make/issue-64153/downstream.rs index e03704665d4..e03704665d4 100644 --- a/tests/run-make-fulldeps/issue-64153/downstream.rs +++ b/tests/run-make/issue-64153/downstream.rs diff --git a/tests/run-make-fulldeps/issue-64153/upstream.rs b/tests/run-make/issue-64153/upstream.rs index 861a00298ea..861a00298ea 100644 --- a/tests/run-make-fulldeps/issue-64153/upstream.rs +++ b/tests/run-make/issue-64153/upstream.rs diff --git a/tests/run-make-fulldeps/issue-68794-textrel-on-minimal-lib/Makefile b/tests/run-make/issue-68794-textrel-on-minimal-lib/Makefile index 13983f4ffe0..6140b39c0e2 100644 --- a/tests/run-make-fulldeps/issue-68794-textrel-on-minimal-lib/Makefile +++ b/tests/run-make/issue-68794-textrel-on-minimal-lib/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile # Regression test for issue #68794 # # Verify that no text relocations are accidentally introduced by linking a diff --git a/tests/run-make-fulldeps/issue-68794-textrel-on-minimal-lib/bar.c b/tests/run-make/issue-68794-textrel-on-minimal-lib/bar.c index bb4036b06e1..bb4036b06e1 100644 --- a/tests/run-make-fulldeps/issue-68794-textrel-on-minimal-lib/bar.c +++ b/tests/run-make/issue-68794-textrel-on-minimal-lib/bar.c diff --git a/tests/run-make-fulldeps/issue-68794-textrel-on-minimal-lib/foo.rs b/tests/run-make/issue-68794-textrel-on-minimal-lib/foo.rs index a3e865b638e..a3e865b638e 100644 --- a/tests/run-make-fulldeps/issue-68794-textrel-on-minimal-lib/foo.rs +++ b/tests/run-make/issue-68794-textrel-on-minimal-lib/foo.rs diff --git a/tests/run-make-fulldeps/issue-69368/Makefile b/tests/run-make/issue-69368/Makefile index 41770475db0..b1229d1b07f 100644 --- a/tests/run-make-fulldeps/issue-69368/Makefile +++ b/tests/run-make/issue-69368/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk # Test that previously triggered a linker failure with root cause diff --git a/tests/run-make-fulldeps/issue-69368/a.rs b/tests/run-make/issue-69368/a.rs index a54f429550e..a54f429550e 100644 --- a/tests/run-make-fulldeps/issue-69368/a.rs +++ b/tests/run-make/issue-69368/a.rs diff --git a/tests/run-make-fulldeps/issue-69368/b.rs b/tests/run-make/issue-69368/b.rs index 4d6af026656..4d6af026656 100644 --- a/tests/run-make-fulldeps/issue-69368/b.rs +++ b/tests/run-make/issue-69368/b.rs diff --git a/tests/run-make-fulldeps/issue-69368/c.rs b/tests/run-make/issue-69368/c.rs index 729c4249a05..729c4249a05 100644 --- a/tests/run-make-fulldeps/issue-69368/c.rs +++ b/tests/run-make/issue-69368/c.rs diff --git a/tests/run-make/issue-71519/Makefile b/tests/run-make/issue-71519/Makefile index 57497f52053..0ee83328bb6 100644 --- a/tests/run-make/issue-71519/Makefile +++ b/tests/run-make/issue-71519/Makefile @@ -1,4 +1,4 @@ -include ../../run-make-fulldeps/tools.mk +include ../tools.mk # ignore-msvc # needs-rust-lld diff --git a/tests/run-make-fulldeps/issue-7349/Makefile b/tests/run-make/issue-7349/Makefile index dc073b77fe1..dc073b77fe1 100644 --- a/tests/run-make-fulldeps/issue-7349/Makefile +++ b/tests/run-make/issue-7349/Makefile diff --git a/tests/run-make-fulldeps/issue-7349/foo.rs b/tests/run-make/issue-7349/foo.rs index 246a1259580..246a1259580 100644 --- a/tests/run-make-fulldeps/issue-7349/foo.rs +++ b/tests/run-make/issue-7349/foo.rs diff --git a/tests/run-make-fulldeps/issue-83045/Makefile b/tests/run-make/issue-83045/Makefile index fc180ccfe28..7053da00f6b 100644 --- a/tests/run-make-fulldeps/issue-83045/Makefile +++ b/tests/run-make/issue-83045/Makefile @@ -1,4 +1,4 @@ -include ../../run-make-fulldeps/tools.mk +include ../tools.mk # This test case creates a situation where the crate loader would run # into an ICE when confronted with an invalid setup where it cannot diff --git a/tests/run-make-fulldeps/issue-83045/a.rs b/tests/run-make/issue-83045/a.rs index 66d9f758e9d..66d9f758e9d 100644 --- a/tests/run-make-fulldeps/issue-83045/a.rs +++ b/tests/run-make/issue-83045/a.rs diff --git a/tests/run-make-fulldeps/issue-83045/b.rs b/tests/run-make/issue-83045/b.rs index f4876cfa457..f4876cfa457 100644 --- a/tests/run-make-fulldeps/issue-83045/b.rs +++ b/tests/run-make/issue-83045/b.rs diff --git a/tests/run-make-fulldeps/issue-83045/c.rs b/tests/run-make/issue-83045/c.rs index e0c4525499e..e0c4525499e 100644 --- a/tests/run-make-fulldeps/issue-83045/c.rs +++ b/tests/run-make/issue-83045/c.rs diff --git a/tests/run-make/issue-83112-incr-test-moved-file/Makefile b/tests/run-make/issue-83112-incr-test-moved-file/Makefile index 2f796e5b2fc..a00088cd9d6 100644 --- a/tests/run-make/issue-83112-incr-test-moved-file/Makefile +++ b/tests/run-make/issue-83112-incr-test-moved-file/Makefile @@ -1,4 +1,4 @@ -include ../../run-make-fulldeps/tools.mk +include ../tools.mk # ignore-none no-std is not supported # ignore-nvptx64-nvidia-cuda FIXME: can't find crate for 'std' diff --git a/tests/run-make-fulldeps/issue-84395-lto-embed-bitcode/Makefile b/tests/run-make/issue-84395-lto-embed-bitcode/Makefile index 879ce174339..95c8d08a18b 100644 --- a/tests/run-make-fulldeps/issue-84395-lto-embed-bitcode/Makefile +++ b/tests/run-make/issue-84395-lto-embed-bitcode/Makefile @@ -3,7 +3,7 @@ # This test makes sure the embed bitcode in elf created with # lto-embed-bitcode=optimized is valid llvm BC module. -include ../../run-make-fulldeps/tools.mk +include ../tools.mk all: $(RUSTC) test.rs --target $(TARGET) -Clink-arg=-fuse-ld=lld -Clinker-plugin-lto -Clinker=$(CLANG) -Clink-arg=-Wl,--plugin-opt=-lto-embed-bitcode=optimized -Zemit-thin-lto=no diff --git a/tests/run-make-fulldeps/issue-84395-lto-embed-bitcode/test.rs b/tests/run-make/issue-84395-lto-embed-bitcode/test.rs index 47ad8c63411..47ad8c63411 100644 --- a/tests/run-make-fulldeps/issue-84395-lto-embed-bitcode/test.rs +++ b/tests/run-make/issue-84395-lto-embed-bitcode/test.rs diff --git a/tests/run-make/issue-85019-moved-src-dir/Makefile b/tests/run-make/issue-85019-moved-src-dir/Makefile index 3606d4fdf57..dec289058f9 100644 --- a/tests/run-make/issue-85019-moved-src-dir/Makefile +++ b/tests/run-make/issue-85019-moved-src-dir/Makefile @@ -1,4 +1,4 @@ -include ../../run-make-fulldeps/tools.mk +include ../tools.mk INCR=$(TMPDIR)/incr FIRST_SRC=$(TMPDIR)/first_src diff --git a/tests/run-make/issue-85401-static-mir/Makefile b/tests/run-make/issue-85401-static-mir/Makefile index 99590166bca..47a36b6e453 100644 --- a/tests/run-make/issue-85401-static-mir/Makefile +++ b/tests/run-make/issue-85401-static-mir/Makefile @@ -1,4 +1,4 @@ -include ../../run-make-fulldeps/tools.mk +include ../tools.mk # Regression test for issue #85401 # Verify that we do not ICE when trying to access MIR for statics, diff --git a/tests/run-make/issue-85441/Makefile b/tests/run-make/issue-85441/Makefile index f04b07d51fa..987d7f7d4a7 100644 --- a/tests/run-make/issue-85441/Makefile +++ b/tests/run-make/issue-85441/Makefile @@ -1,6 +1,6 @@ # only-windows-msvc -include ../../run-make-fulldeps/tools.mk +include ../tools.mk # Tests that WS2_32.dll is not unnecessarily linked, see issue #85441 diff --git a/tests/run-make/issue-88756-default-output/Makefile b/tests/run-make/issue-88756-default-output/Makefile index 275c35c2629..d1c3d0fe082 100644 --- a/tests/run-make/issue-88756-default-output/Makefile +++ b/tests/run-make/issue-88756-default-output/Makefile @@ -1,4 +1,4 @@ -include ../../run-make-fulldeps/tools.mk +include ../tools.mk all: $(BARE_RUSTDOC) 2>&1 | sed -E 's@/nightly/|/beta/|/stable/|/1\.[0-9]+\.[0-9]+/@/$$CHANNEL/@g' | diff - output-default.stdout diff --git a/tests/run-make/issue-96498/Makefile b/tests/run-make/issue-96498/Makefile index ce2b1b1ff7c..efdd328c671 100644 --- a/tests/run-make/issue-96498/Makefile +++ b/tests/run-make/issue-96498/Makefile @@ -1,7 +1,7 @@ # only-windows # needs-rust-lld -include ../../run-make-fulldeps/tools.mk +include ../tools.mk # Ensure that LLD can link all: diff --git a/tests/run-make-fulldeps/issue-97463-abi-param-passing/Makefile b/tests/run-make/issue-97463-abi-param-passing/Makefile index db1b53e152e..7ce7aaeec57 100644 --- a/tests/run-make-fulldeps/issue-97463-abi-param-passing/Makefile +++ b/tests/run-make/issue-97463-abi-param-passing/Makefile @@ -1,4 +1,5 @@ --include ../tools.mk +# ignore-cross-compile +include ../tools.mk # ignore-msvc diff --git a/tests/run-make-fulldeps/issue-97463-abi-param-passing/bad.c b/tests/run-make/issue-97463-abi-param-passing/bad.c index 013314ab20d..013314ab20d 100644 --- a/tests/run-make-fulldeps/issue-97463-abi-param-passing/bad.c +++ b/tests/run-make/issue-97463-abi-param-passing/bad.c diff --git a/tests/run-make-fulldeps/issue-97463-abi-param-passing/param_passing.rs b/tests/run-make/issue-97463-abi-param-passing/param_passing.rs index c11f3cc72bd..c11f3cc72bd 100644 --- a/tests/run-make-fulldeps/issue-97463-abi-param-passing/param_passing.rs +++ b/tests/run-make/issue-97463-abi-param-passing/param_passing.rs diff --git a/tests/run-make-fulldeps/issue64319/Makefile b/tests/run-make/issue64319/Makefile index ee0d177abc9..56346cbcc15 100644 --- a/tests/run-make-fulldeps/issue64319/Makefile +++ b/tests/run-make/issue64319/Makefile @@ -1,4 +1,5 @@ -include ../../run-make-fulldeps/tools.mk +# ignore-cross-compile +include ../tools.mk # Different optimization levels imply different values for `-Zshare-generics`, # so try out a whole bunch of combinations to make sure everything is compatible diff --git a/tests/run-make-fulldeps/issue64319/bar.rs b/tests/run-make/issue64319/bar.rs index 3895c0b6cdb..3895c0b6cdb 100644 --- a/tests/run-make-fulldeps/issue64319/bar.rs +++ b/tests/run-make/issue64319/bar.rs diff --git a/tests/run-make-fulldeps/issue64319/foo.rs b/tests/run-make/issue64319/foo.rs index c54a238e9ad..c54a238e9ad 100644 --- a/tests/run-make-fulldeps/issue64319/foo.rs +++ b/tests/run-make/issue64319/foo.rs diff --git a/tests/run-make/jobserver-error/Makefile b/tests/run-make/jobserver-error/Makefile index 3b9104fc354..39946ae5edb 100644 --- a/tests/run-make/jobserver-error/Makefile +++ b/tests/run-make/jobserver-error/Makefile @@ -1,4 +1,4 @@ -include ../../run-make-fulldeps/tools.mk +include ../tools.mk # only-linux diff --git a/tests/run-make-fulldeps/libs-through-symlinks/Makefile b/tests/run-make/libs-through-symlinks/Makefile index 45deaecb840..592eae663a4 100644 --- a/tests/run-make-fulldeps/libs-through-symlinks/Makefile +++ b/tests/run-make/libs-through-symlinks/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk # ignore-windows diff --git a/tests/run-make-fulldeps/libs-through-symlinks/bar.rs b/tests/run-make/libs-through-symlinks/bar.rs index bb7b36c496e..bb7b36c496e 100644 --- a/tests/run-make-fulldeps/libs-through-symlinks/bar.rs +++ b/tests/run-make/libs-through-symlinks/bar.rs diff --git a/tests/run-make-fulldeps/libs-through-symlinks/foo.rs b/tests/run-make/libs-through-symlinks/foo.rs index 8e3df2c6d4e..8e3df2c6d4e 100644 --- a/tests/run-make-fulldeps/libs-through-symlinks/foo.rs +++ b/tests/run-make/libs-through-symlinks/foo.rs diff --git a/tests/run-make-fulldeps/libtest-json/Makefile b/tests/run-make/libtest-json/Makefile index 37b6cb9e2d4..417637cf072 100644 --- a/tests/run-make-fulldeps/libtest-json/Makefile +++ b/tests/run-make/libtest-json/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk # Test expected libtest's JSON output diff --git a/tests/run-make-fulldeps/libtest-json/f.rs b/tests/run-make/libtest-json/f.rs index edfe25086ae..edfe25086ae 100644 --- a/tests/run-make-fulldeps/libtest-json/f.rs +++ b/tests/run-make/libtest-json/f.rs diff --git a/tests/run-make-fulldeps/libtest-json/output-default.json b/tests/run-make/libtest-json/output-default.json index ad22b66eda6..ad22b66eda6 100644 --- a/tests/run-make-fulldeps/libtest-json/output-default.json +++ b/tests/run-make/libtest-json/output-default.json diff --git a/tests/run-make-fulldeps/libtest-json/output-stdout-success.json b/tests/run-make/libtest-json/output-stdout-success.json index ec98172eb1c..ec98172eb1c 100644 --- a/tests/run-make-fulldeps/libtest-json/output-stdout-success.json +++ b/tests/run-make/libtest-json/output-stdout-success.json diff --git a/tests/run-make-fulldeps/libtest-json/validate_json.py b/tests/run-make/libtest-json/validate_json.py index 657f732f2bf..657f732f2bf 100755 --- a/tests/run-make-fulldeps/libtest-json/validate_json.py +++ b/tests/run-make/libtest-json/validate_json.py diff --git a/tests/run-make/libtest-thread-limit/Makefile b/tests/run-make/libtest-thread-limit/Makefile index d43a89e60ca..9496fa30159 100644 --- a/tests/run-make/libtest-thread-limit/Makefile +++ b/tests/run-make/libtest-thread-limit/Makefile @@ -1,4 +1,4 @@ -include ../../run-make-fulldeps/tools.mk +include ../tools.mk # only-linux diff --git a/tests/run-make-fulldeps/link-arg/Makefile b/tests/run-make/link-arg/Makefile index 103527c3e14..103527c3e14 100644 --- a/tests/run-make-fulldeps/link-arg/Makefile +++ b/tests/run-make/link-arg/Makefile diff --git a/tests/run-make-fulldeps/link-arg/empty.rs b/tests/run-make/link-arg/empty.rs index 45590d86ba6..45590d86ba6 100644 --- a/tests/run-make-fulldeps/link-arg/empty.rs +++ b/tests/run-make/link-arg/empty.rs diff --git a/tests/run-make-fulldeps/link-args-order/Makefile b/tests/run-make/link-args-order/Makefile index c562cc1b396..c562cc1b396 100644 --- a/tests/run-make-fulldeps/link-args-order/Makefile +++ b/tests/run-make/link-args-order/Makefile diff --git a/tests/run-make-fulldeps/link-args-order/empty.rs b/tests/run-make/link-args-order/empty.rs index f328e4d9d04..f328e4d9d04 100644 --- a/tests/run-make-fulldeps/link-args-order/empty.rs +++ b/tests/run-make/link-args-order/empty.rs diff --git a/tests/run-make-fulldeps/link-cfg/Makefile b/tests/run-make/link-cfg/Makefile index 0b25ccded06..a4099701144 100644 --- a/tests/run-make-fulldeps/link-cfg/Makefile +++ b/tests/run-make/link-cfg/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk all: $(call DYLIB,return1) $(call DYLIB,return2) $(call NATIVE_STATICLIB,return3) diff --git a/tests/run-make-fulldeps/link-cfg/dep-with-staticlib.rs b/tests/run-make/link-cfg/dep-with-staticlib.rs index 5ad66475d00..5ad66475d00 100644 --- a/tests/run-make-fulldeps/link-cfg/dep-with-staticlib.rs +++ b/tests/run-make/link-cfg/dep-with-staticlib.rs diff --git a/tests/run-make-fulldeps/link-cfg/dep.rs b/tests/run-make/link-cfg/dep.rs index 40de77f05b3..40de77f05b3 100644 --- a/tests/run-make-fulldeps/link-cfg/dep.rs +++ b/tests/run-make/link-cfg/dep.rs diff --git a/tests/run-make-fulldeps/link-cfg/no-deps.rs b/tests/run-make/link-cfg/no-deps.rs index ba5a8711a26..ba5a8711a26 100644 --- a/tests/run-make-fulldeps/link-cfg/no-deps.rs +++ b/tests/run-make/link-cfg/no-deps.rs diff --git a/tests/run-make-fulldeps/link-cfg/return1.c b/tests/run-make/link-cfg/return1.c index 41c2809ade3..41c2809ade3 100644 --- a/tests/run-make-fulldeps/link-cfg/return1.c +++ b/tests/run-make/link-cfg/return1.c diff --git a/tests/run-make-fulldeps/link-cfg/return2.c b/tests/run-make/link-cfg/return2.c index 622aeaa294c..622aeaa294c 100644 --- a/tests/run-make-fulldeps/link-cfg/return2.c +++ b/tests/run-make/link-cfg/return2.c diff --git a/tests/run-make-fulldeps/link-cfg/return3.c b/tests/run-make/link-cfg/return3.c index f29dc60d5e8..f29dc60d5e8 100644 --- a/tests/run-make-fulldeps/link-cfg/return3.c +++ b/tests/run-make/link-cfg/return3.c diff --git a/tests/run-make-fulldeps/link-cfg/with-deps.rs b/tests/run-make/link-cfg/with-deps.rs index 48b7828152e..48b7828152e 100644 --- a/tests/run-make-fulldeps/link-cfg/with-deps.rs +++ b/tests/run-make/link-cfg/with-deps.rs diff --git a/tests/run-make-fulldeps/link-cfg/with-staticlib-deps.rs b/tests/run-make/link-cfg/with-staticlib-deps.rs index 23e5926a73c..23e5926a73c 100644 --- a/tests/run-make-fulldeps/link-cfg/with-staticlib-deps.rs +++ b/tests/run-make/link-cfg/with-staticlib-deps.rs diff --git a/tests/run-make-fulldeps/link-dedup/Makefile b/tests/run-make/link-dedup/Makefile index eff18ab48ab..eff18ab48ab 100644 --- a/tests/run-make-fulldeps/link-dedup/Makefile +++ b/tests/run-make/link-dedup/Makefile diff --git a/tests/run-make-fulldeps/link-dedup/depa.rs b/tests/run-make/link-dedup/depa.rs index 19178c5bd49..19178c5bd49 100644 --- a/tests/run-make-fulldeps/link-dedup/depa.rs +++ b/tests/run-make/link-dedup/depa.rs diff --git a/tests/run-make-fulldeps/link-dedup/depb.rs b/tests/run-make/link-dedup/depb.rs index b1be21fe005..b1be21fe005 100644 --- a/tests/run-make-fulldeps/link-dedup/depb.rs +++ b/tests/run-make/link-dedup/depb.rs diff --git a/tests/run-make-fulldeps/link-dedup/depc.rs b/tests/run-make/link-dedup/depc.rs index 8dcb3dee5a2..8dcb3dee5a2 100644 --- a/tests/run-make-fulldeps/link-dedup/depc.rs +++ b/tests/run-make/link-dedup/depc.rs diff --git a/tests/run-make-fulldeps/link-dedup/empty.rs b/tests/run-make/link-dedup/empty.rs index e00ae18f4af..e00ae18f4af 100644 --- a/tests/run-make-fulldeps/link-dedup/empty.rs +++ b/tests/run-make/link-dedup/empty.rs diff --git a/tests/run-make-fulldeps/link-path-order/Makefile b/tests/run-make/link-path-order/Makefile index ed7c299e61a..a3831a63ac7 100644 --- a/tests/run-make-fulldeps/link-path-order/Makefile +++ b/tests/run-make/link-path-order/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk # Verifies that the -L arguments given to the linker is in the same order diff --git a/tests/run-make-fulldeps/link-path-order/correct.c b/tests/run-make/link-path-order/correct.c index 3064af952f8..3064af952f8 100644 --- a/tests/run-make-fulldeps/link-path-order/correct.c +++ b/tests/run-make/link-path-order/correct.c diff --git a/tests/run-make-fulldeps/link-path-order/main.rs b/tests/run-make/link-path-order/main.rs index 8024e343d19..8024e343d19 100644 --- a/tests/run-make-fulldeps/link-path-order/main.rs +++ b/tests/run-make/link-path-order/main.rs diff --git a/tests/run-make-fulldeps/link-path-order/wrong.c b/tests/run-make/link-path-order/wrong.c index 64275b3ad6b..64275b3ad6b 100644 --- a/tests/run-make-fulldeps/link-path-order/wrong.c +++ b/tests/run-make/link-path-order/wrong.c diff --git a/tests/run-make-fulldeps/linkage-attr-on-static/Makefile b/tests/run-make/linkage-attr-on-static/Makefile index 7cc54e40a3a..ef50a7ef9f1 100644 --- a/tests/run-make-fulldeps/linkage-attr-on-static/Makefile +++ b/tests/run-make/linkage-attr-on-static/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk all: $(call NATIVE_STATICLIB,foo) diff --git a/tests/run-make-fulldeps/linkage-attr-on-static/bar.rs b/tests/run-make/linkage-attr-on-static/bar.rs index 68607cbb657..68607cbb657 100644 --- a/tests/run-make-fulldeps/linkage-attr-on-static/bar.rs +++ b/tests/run-make/linkage-attr-on-static/bar.rs diff --git a/tests/run-make-fulldeps/linkage-attr-on-static/foo.c b/tests/run-make/linkage-attr-on-static/foo.c index 78a6934f57f..78a6934f57f 100644 --- a/tests/run-make-fulldeps/linkage-attr-on-static/foo.c +++ b/tests/run-make/linkage-attr-on-static/foo.c diff --git a/tests/run-make/llvm-outputs/Makefile b/tests/run-make/llvm-outputs/Makefile index a3f25eba0b2..cccf1dd66fb 100644 --- a/tests/run-make/llvm-outputs/Makefile +++ b/tests/run-make/llvm-outputs/Makefile @@ -1,4 +1,4 @@ -include ../../run-make-fulldeps/tools.mk +include ../tools.mk all: echo 'fn main() {}' | $(BARE_RUSTC) - --out-dir=$(TMPDIR)/random_directory_that_does_not_exist_ir/ --emit=llvm-ir diff --git a/tests/run-make-fulldeps/long-linker-command-lines-cmd-exe/Makefile b/tests/run-make/long-linker-command-lines-cmd-exe/Makefile index a38f4fe5dc5..e43aab7f8e0 100644 --- a/tests/run-make-fulldeps/long-linker-command-lines-cmd-exe/Makefile +++ b/tests/run-make/long-linker-command-lines-cmd-exe/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk all: diff --git a/tests/run-make-fulldeps/long-linker-command-lines-cmd-exe/foo.bat b/tests/run-make/long-linker-command-lines-cmd-exe/foo.bat index a9350f12bbb..a9350f12bbb 100644 --- a/tests/run-make-fulldeps/long-linker-command-lines-cmd-exe/foo.bat +++ b/tests/run-make/long-linker-command-lines-cmd-exe/foo.bat diff --git a/tests/run-make-fulldeps/long-linker-command-lines-cmd-exe/foo.rs b/tests/run-make/long-linker-command-lines-cmd-exe/foo.rs index 74d7b9b07f6..74d7b9b07f6 100644 --- a/tests/run-make-fulldeps/long-linker-command-lines-cmd-exe/foo.rs +++ b/tests/run-make/long-linker-command-lines-cmd-exe/foo.rs diff --git a/tests/run-make-fulldeps/long-linker-command-lines/Makefile b/tests/run-make/long-linker-command-lines/Makefile index 00199ca970d..f864ea74f4a 100644 --- a/tests/run-make-fulldeps/long-linker-command-lines/Makefile +++ b/tests/run-make/long-linker-command-lines/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk all: diff --git a/tests/run-make-fulldeps/long-linker-command-lines/foo.rs b/tests/run-make/long-linker-command-lines/foo.rs index db238c0cf1a..db238c0cf1a 100644 --- a/tests/run-make-fulldeps/long-linker-command-lines/foo.rs +++ b/tests/run-make/long-linker-command-lines/foo.rs diff --git a/tests/run-make-fulldeps/longjmp-across-rust/Makefile b/tests/run-make/longjmp-across-rust/Makefile index 848638d82dd..5fd2d4f855f 100644 --- a/tests/run-make-fulldeps/longjmp-across-rust/Makefile +++ b/tests/run-make/longjmp-across-rust/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk all: $(call NATIVE_STATICLIB,foo) diff --git a/tests/run-make-fulldeps/longjmp-across-rust/foo.c b/tests/run-make/longjmp-across-rust/foo.c index bd71cc4d777..bd71cc4d777 100644 --- a/tests/run-make-fulldeps/longjmp-across-rust/foo.c +++ b/tests/run-make/longjmp-across-rust/foo.c diff --git a/tests/run-make-fulldeps/longjmp-across-rust/main.rs b/tests/run-make/longjmp-across-rust/main.rs index cc1d5b126dd..cc1d5b126dd 100644 --- a/tests/run-make-fulldeps/longjmp-across-rust/main.rs +++ b/tests/run-make/longjmp-across-rust/main.rs diff --git a/tests/run-make-fulldeps/ls-metadata/Makefile b/tests/run-make/ls-metadata/Makefile index e0f916a248e..123dd64e15c 100644 --- a/tests/run-make-fulldeps/ls-metadata/Makefile +++ b/tests/run-make/ls-metadata/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk all: diff --git a/tests/run-make-fulldeps/ls-metadata/foo.rs b/tests/run-make/ls-metadata/foo.rs index f328e4d9d04..f328e4d9d04 100644 --- a/tests/run-make-fulldeps/ls-metadata/foo.rs +++ b/tests/run-make/ls-metadata/foo.rs diff --git a/tests/run-make-fulldeps/lto-dylib-dep/Makefile b/tests/run-make/lto-dylib-dep/Makefile index 41487b23c74..a9344597d08 100644 --- a/tests/run-make-fulldeps/lto-dylib-dep/Makefile +++ b/tests/run-make/lto-dylib-dep/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk # Test that we don't run into an assertion when using a Rust dylib dependency diff --git a/tests/run-make-fulldeps/lto-dylib-dep/a_dylib.rs b/tests/run-make/lto-dylib-dep/a_dylib.rs index e63457e6eb9..e63457e6eb9 100644 --- a/tests/run-make-fulldeps/lto-dylib-dep/a_dylib.rs +++ b/tests/run-make/lto-dylib-dep/a_dylib.rs diff --git a/tests/run-make-fulldeps/lto-dylib-dep/main.rs b/tests/run-make/lto-dylib-dep/main.rs index 4fb3c4730b2..4fb3c4730b2 100644 --- a/tests/run-make-fulldeps/lto-dylib-dep/main.rs +++ b/tests/run-make/lto-dylib-dep/main.rs diff --git a/tests/run-make-fulldeps/lto-empty/Makefile b/tests/run-make/lto-empty/Makefile index b4345ba1883..1b795c4b738 100644 --- a/tests/run-make-fulldeps/lto-empty/Makefile +++ b/tests/run-make/lto-empty/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk all: cdylib-fat cdylib-thin diff --git a/tests/run-make-fulldeps/lto-empty/lib.rs b/tests/run-make/lto-empty/lib.rs index e3663c79078..e3663c79078 100644 --- a/tests/run-make-fulldeps/lto-empty/lib.rs +++ b/tests/run-make/lto-empty/lib.rs diff --git a/tests/run-make-fulldeps/lto-no-link-whole-rlib/Makefile b/tests/run-make/lto-no-link-whole-rlib/Makefile index e576ee37cf7..3e82322e72d 100644 --- a/tests/run-make-fulldeps/lto-no-link-whole-rlib/Makefile +++ b/tests/run-make/lto-no-link-whole-rlib/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk all: $(call NATIVE_STATICLIB,foo) $(call NATIVE_STATICLIB,bar) diff --git a/tests/run-make-fulldeps/lto-no-link-whole-rlib/bar.c b/tests/run-make/lto-no-link-whole-rlib/bar.c index b2501193029..b2501193029 100644 --- a/tests/run-make-fulldeps/lto-no-link-whole-rlib/bar.c +++ b/tests/run-make/lto-no-link-whole-rlib/bar.c diff --git a/tests/run-make-fulldeps/lto-no-link-whole-rlib/foo.c b/tests/run-make/lto-no-link-whole-rlib/foo.c index 75010458ece..75010458ece 100644 --- a/tests/run-make-fulldeps/lto-no-link-whole-rlib/foo.c +++ b/tests/run-make/lto-no-link-whole-rlib/foo.c diff --git a/tests/run-make-fulldeps/lto-no-link-whole-rlib/lib1.rs b/tests/run-make/lto-no-link-whole-rlib/lib1.rs index f70bb338223..f70bb338223 100644 --- a/tests/run-make-fulldeps/lto-no-link-whole-rlib/lib1.rs +++ b/tests/run-make/lto-no-link-whole-rlib/lib1.rs diff --git a/tests/run-make-fulldeps/lto-no-link-whole-rlib/lib2.rs b/tests/run-make/lto-no-link-whole-rlib/lib2.rs index 2dec2a2718e..2dec2a2718e 100644 --- a/tests/run-make-fulldeps/lto-no-link-whole-rlib/lib2.rs +++ b/tests/run-make/lto-no-link-whole-rlib/lib2.rs diff --git a/tests/run-make-fulldeps/lto-no-link-whole-rlib/main.rs b/tests/run-make/lto-no-link-whole-rlib/main.rs index 0c658808e6e..0c658808e6e 100644 --- a/tests/run-make-fulldeps/lto-no-link-whole-rlib/main.rs +++ b/tests/run-make/lto-no-link-whole-rlib/main.rs diff --git a/tests/run-make-fulldeps/lto-readonly-lib/Makefile b/tests/run-make/lto-readonly-lib/Makefile index a20ecea88ea..11d944e3e3d 100644 --- a/tests/run-make-fulldeps/lto-readonly-lib/Makefile +++ b/tests/run-make/lto-readonly-lib/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk all: diff --git a/tests/run-make-fulldeps/lto-readonly-lib/lib.rs b/tests/run-make/lto-readonly-lib/lib.rs index c1bfaa6cab5..c1bfaa6cab5 100644 --- a/tests/run-make-fulldeps/lto-readonly-lib/lib.rs +++ b/tests/run-make/lto-readonly-lib/lib.rs diff --git a/tests/run-make-fulldeps/lto-readonly-lib/main.rs b/tests/run-make/lto-readonly-lib/main.rs index 69da798b3eb..69da798b3eb 100644 --- a/tests/run-make-fulldeps/lto-readonly-lib/main.rs +++ b/tests/run-make/lto-readonly-lib/main.rs diff --git a/tests/run-make-fulldeps/lto-smoke-c/Makefile b/tests/run-make/lto-smoke-c/Makefile index 7c6ee3be849..f1ba3d95da2 100644 --- a/tests/run-make-fulldeps/lto-smoke-c/Makefile +++ b/tests/run-make/lto-smoke-c/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk # Apparently older versions of GCC segfault if -g is passed... diff --git a/tests/run-make-fulldeps/lto-smoke-c/bar.c b/tests/run-make/lto-smoke-c/bar.c index bb4036b06e1..bb4036b06e1 100644 --- a/tests/run-make-fulldeps/lto-smoke-c/bar.c +++ b/tests/run-make/lto-smoke-c/bar.c diff --git a/tests/run-make-fulldeps/lto-smoke-c/foo.rs b/tests/run-make/lto-smoke-c/foo.rs index 2e59432cdb1..2e59432cdb1 100644 --- a/tests/run-make-fulldeps/lto-smoke-c/foo.rs +++ b/tests/run-make/lto-smoke-c/foo.rs diff --git a/tests/run-make-fulldeps/lto-smoke/Makefile b/tests/run-make/lto-smoke/Makefile index 8bce708b44b..13a09fce734 100644 --- a/tests/run-make-fulldeps/lto-smoke/Makefile +++ b/tests/run-make/lto-smoke/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk all: noparam bool_true bool_false thin fat diff --git a/tests/run-make-fulldeps/lto-smoke/lib.rs b/tests/run-make/lto-smoke/lib.rs index c1bfaa6cab5..c1bfaa6cab5 100644 --- a/tests/run-make-fulldeps/lto-smoke/lib.rs +++ b/tests/run-make/lto-smoke/lib.rs diff --git a/tests/run-make-fulldeps/lto-smoke/main.rs b/tests/run-make/lto-smoke/main.rs index 69da798b3eb..69da798b3eb 100644 --- a/tests/run-make-fulldeps/lto-smoke/main.rs +++ b/tests/run-make/lto-smoke/main.rs diff --git a/tests/run-make/macos-deployment-target/Makefile b/tests/run-make/macos-deployment-target/Makefile index 70fca043653..d0cf836bcdf 100644 --- a/tests/run-make/macos-deployment-target/Makefile +++ b/tests/run-make/macos-deployment-target/Makefile @@ -4,7 +4,7 @@ # This is important since its a compatibility hazard. The linker will # generate load commands differently based on what minimum OS it can assume. -include ../../run-make-fulldeps/tools.mk +include ../tools.mk ifeq ($(strip $(shell uname -m)),arm64) GREP_PATTERN = "minos 11.0" diff --git a/tests/run-make/macos-fat-archive/Makefile b/tests/run-make/macos-fat-archive/Makefile index cc99375db69..b6582c809e8 100644 --- a/tests/run-make/macos-fat-archive/Makefile +++ b/tests/run-make/macos-fat-archive/Makefile @@ -1,6 +1,6 @@ # only-macos --include ../../run-make-fulldeps/tools.mk +include ../tools.mk "$(TMPDIR)"/libnative-library.a: native-library.c $(CC) -arch arm64 -arch x86_64 native-library.c -c -o "$(TMPDIR)"/native-library.o diff --git a/tests/run-make-fulldeps/manual-crate-name/Makefile b/tests/run-make/manual-crate-name/Makefile index c00e20c7c57..c00e20c7c57 100644 --- a/tests/run-make-fulldeps/manual-crate-name/Makefile +++ b/tests/run-make/manual-crate-name/Makefile diff --git a/tests/run-make-fulldeps/manual-crate-name/bar.rs b/tests/run-make/manual-crate-name/bar.rs index c1bfaa6cab5..c1bfaa6cab5 100644 --- a/tests/run-make-fulldeps/manual-crate-name/bar.rs +++ b/tests/run-make/manual-crate-name/bar.rs diff --git a/tests/run-make-fulldeps/manual-link/Makefile b/tests/run-make/manual-link/Makefile index 401f6eb440a..8dbf0460fff 100644 --- a/tests/run-make-fulldeps/manual-link/Makefile +++ b/tests/run-make/manual-link/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk all: $(TMPDIR)/libbar.a diff --git a/tests/run-make-fulldeps/manual-link/bar.c b/tests/run-make/manual-link/bar.c index e4259998678..e4259998678 100644 --- a/tests/run-make-fulldeps/manual-link/bar.c +++ b/tests/run-make/manual-link/bar.c diff --git a/tests/run-make-fulldeps/manual-link/foo.c b/tests/run-make/manual-link/foo.c index e4259998678..e4259998678 100644 --- a/tests/run-make-fulldeps/manual-link/foo.c +++ b/tests/run-make/manual-link/foo.c diff --git a/tests/run-make-fulldeps/manual-link/foo.rs b/tests/run-make/manual-link/foo.rs index c1f28236ffd..c1f28236ffd 100644 --- a/tests/run-make-fulldeps/manual-link/foo.rs +++ b/tests/run-make/manual-link/foo.rs diff --git a/tests/run-make-fulldeps/manual-link/main.rs b/tests/run-make/manual-link/main.rs index fe35f1f8e2e..fe35f1f8e2e 100644 --- a/tests/run-make-fulldeps/manual-link/main.rs +++ b/tests/run-make/manual-link/main.rs diff --git a/tests/run-make-fulldeps/many-crates-but-no-match/Makefile b/tests/run-make/many-crates-but-no-match/Makefile index ca0ab8e9e5f..ca0ab8e9e5f 100644 --- a/tests/run-make-fulldeps/many-crates-but-no-match/Makefile +++ b/tests/run-make/many-crates-but-no-match/Makefile diff --git a/tests/run-make-fulldeps/many-crates-but-no-match/crateA1.rs b/tests/run-make/many-crates-but-no-match/crateA1.rs index 3fed5a38e2c..3fed5a38e2c 100644 --- a/tests/run-make-fulldeps/many-crates-but-no-match/crateA1.rs +++ b/tests/run-make/many-crates-but-no-match/crateA1.rs diff --git a/tests/run-make-fulldeps/many-crates-but-no-match/crateA2.rs b/tests/run-make/many-crates-but-no-match/crateA2.rs index 8db07a015ff..8db07a015ff 100644 --- a/tests/run-make-fulldeps/many-crates-but-no-match/crateA2.rs +++ b/tests/run-make/many-crates-but-no-match/crateA2.rs diff --git a/tests/run-make-fulldeps/many-crates-but-no-match/crateA3.rs b/tests/run-make/many-crates-but-no-match/crateA3.rs index a1e8e40a38c..a1e8e40a38c 100644 --- a/tests/run-make-fulldeps/many-crates-but-no-match/crateA3.rs +++ b/tests/run-make/many-crates-but-no-match/crateA3.rs diff --git a/tests/run-make-fulldeps/many-crates-but-no-match/crateB.rs b/tests/run-make/many-crates-but-no-match/crateB.rs index 4ccd65d653e..4ccd65d653e 100644 --- a/tests/run-make-fulldeps/many-crates-but-no-match/crateB.rs +++ b/tests/run-make/many-crates-but-no-match/crateB.rs diff --git a/tests/run-make-fulldeps/many-crates-but-no-match/crateC.rs b/tests/run-make/many-crates-but-no-match/crateC.rs index a8b817ec681..a8b817ec681 100644 --- a/tests/run-make-fulldeps/many-crates-but-no-match/crateC.rs +++ b/tests/run-make/many-crates-but-no-match/crateC.rs diff --git a/tests/run-make-fulldeps/metadata-flag-frobs-symbols/Makefile b/tests/run-make/metadata-flag-frobs-symbols/Makefile index dc6b10f4e9d..53d7d065769 100644 --- a/tests/run-make-fulldeps/metadata-flag-frobs-symbols/Makefile +++ b/tests/run-make/metadata-flag-frobs-symbols/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk all: diff --git a/tests/run-make-fulldeps/metadata-flag-frobs-symbols/bar.rs b/tests/run-make/metadata-flag-frobs-symbols/bar.rs index 1e6957a3694..1e6957a3694 100644 --- a/tests/run-make-fulldeps/metadata-flag-frobs-symbols/bar.rs +++ b/tests/run-make/metadata-flag-frobs-symbols/bar.rs diff --git a/tests/run-make-fulldeps/metadata-flag-frobs-symbols/foo.rs b/tests/run-make/metadata-flag-frobs-symbols/foo.rs index 696aed2fa1d..696aed2fa1d 100644 --- a/tests/run-make-fulldeps/metadata-flag-frobs-symbols/foo.rs +++ b/tests/run-make/metadata-flag-frobs-symbols/foo.rs diff --git a/tests/run-make-fulldeps/min-global-align/Makefile b/tests/run-make/min-global-align/Makefile index 82f38749e00..82f38749e00 100644 --- a/tests/run-make-fulldeps/min-global-align/Makefile +++ b/tests/run-make/min-global-align/Makefile diff --git a/tests/run-make-fulldeps/min-global-align/min_global_align.rs b/tests/run-make/min-global-align/min_global_align.rs index 135792e9372..135792e9372 100644 --- a/tests/run-make-fulldeps/min-global-align/min_global_align.rs +++ b/tests/run-make/min-global-align/min_global_align.rs diff --git a/tests/run-make-fulldeps/mingw-export-call-convention/Makefile b/tests/run-make/mingw-export-call-convention/Makefile index 4a60059cc54..4a60059cc54 100644 --- a/tests/run-make-fulldeps/mingw-export-call-convention/Makefile +++ b/tests/run-make/mingw-export-call-convention/Makefile diff --git a/tests/run-make-fulldeps/mingw-export-call-convention/foo.rs b/tests/run-make/mingw-export-call-convention/foo.rs index 1fec00311ef..1fec00311ef 100644 --- a/tests/run-make-fulldeps/mingw-export-call-convention/foo.rs +++ b/tests/run-make/mingw-export-call-convention/foo.rs diff --git a/tests/run-make-fulldeps/mismatching-target-triples/Makefile b/tests/run-make/mismatching-target-triples/Makefile index 409388e0414..409388e0414 100644 --- a/tests/run-make-fulldeps/mismatching-target-triples/Makefile +++ b/tests/run-make/mismatching-target-triples/Makefile diff --git a/tests/run-make-fulldeps/mismatching-target-triples/bar.rs b/tests/run-make/mismatching-target-triples/bar.rs index b2c2fc1c410..b2c2fc1c410 100644 --- a/tests/run-make-fulldeps/mismatching-target-triples/bar.rs +++ b/tests/run-make/mismatching-target-triples/bar.rs diff --git a/tests/run-make-fulldeps/mismatching-target-triples/foo.rs b/tests/run-make/mismatching-target-triples/foo.rs index 6fa05491448..6fa05491448 100644 --- a/tests/run-make-fulldeps/mismatching-target-triples/foo.rs +++ b/tests/run-make/mismatching-target-triples/foo.rs diff --git a/tests/run-make-fulldeps/missing-crate-dependency/Makefile b/tests/run-make/missing-crate-dependency/Makefile index 7c271ab8a90..7c271ab8a90 100644 --- a/tests/run-make-fulldeps/missing-crate-dependency/Makefile +++ b/tests/run-make/missing-crate-dependency/Makefile diff --git a/tests/run-make-fulldeps/missing-crate-dependency/crateA.rs b/tests/run-make/missing-crate-dependency/crateA.rs index 31433cb60b8..31433cb60b8 100644 --- a/tests/run-make-fulldeps/missing-crate-dependency/crateA.rs +++ b/tests/run-make/missing-crate-dependency/crateA.rs diff --git a/tests/run-make-fulldeps/missing-crate-dependency/crateB.rs b/tests/run-make/missing-crate-dependency/crateB.rs index 4ccd65d653e..4ccd65d653e 100644 --- a/tests/run-make-fulldeps/missing-crate-dependency/crateB.rs +++ b/tests/run-make/missing-crate-dependency/crateB.rs diff --git a/tests/run-make-fulldeps/missing-crate-dependency/crateC.rs b/tests/run-make/missing-crate-dependency/crateC.rs index a8b817ec681..a8b817ec681 100644 --- a/tests/run-make-fulldeps/missing-crate-dependency/crateC.rs +++ b/tests/run-make/missing-crate-dependency/crateC.rs diff --git a/tests/run-make-fulldeps/mixing-deps/Makefile b/tests/run-make/mixing-deps/Makefile index 956e704ee16..c2a5a2a0abb 100644 --- a/tests/run-make-fulldeps/mixing-deps/Makefile +++ b/tests/run-make/mixing-deps/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk all: diff --git a/tests/run-make-fulldeps/mixing-deps/both.rs b/tests/run-make/mixing-deps/both.rs index 6a58187633f..6a58187633f 100644 --- a/tests/run-make-fulldeps/mixing-deps/both.rs +++ b/tests/run-make/mixing-deps/both.rs diff --git a/tests/run-make-fulldeps/mixing-deps/dylib.rs b/tests/run-make/mixing-deps/dylib.rs index 88976d5b663..88976d5b663 100644 --- a/tests/run-make-fulldeps/mixing-deps/dylib.rs +++ b/tests/run-make/mixing-deps/dylib.rs diff --git a/tests/run-make-fulldeps/mixing-deps/prog.rs b/tests/run-make/mixing-deps/prog.rs index 188981dc1a3..188981dc1a3 100644 --- a/tests/run-make-fulldeps/mixing-deps/prog.rs +++ b/tests/run-make/mixing-deps/prog.rs diff --git a/tests/run-make-fulldeps/mixing-formats/Makefile b/tests/run-make/mixing-formats/Makefile index b27e54257f9..d01978a1599 100644 --- a/tests/run-make-fulldeps/mixing-formats/Makefile +++ b/tests/run-make/mixing-formats/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk # Testing various mixings of rlibs and dylibs. Makes sure that it's possible to diff --git a/tests/run-make-fulldeps/mixing-formats/bar1.rs b/tests/run-make/mixing-formats/bar1.rs index 49af74e1b74..49af74e1b74 100644 --- a/tests/run-make-fulldeps/mixing-formats/bar1.rs +++ b/tests/run-make/mixing-formats/bar1.rs diff --git a/tests/run-make-fulldeps/mixing-formats/bar2.rs b/tests/run-make/mixing-formats/bar2.rs index 49af74e1b74..49af74e1b74 100644 --- a/tests/run-make-fulldeps/mixing-formats/bar2.rs +++ b/tests/run-make/mixing-formats/bar2.rs diff --git a/tests/run-make-fulldeps/mixing-formats/baz.rs b/tests/run-make/mixing-formats/baz.rs index 99a73159ea4..99a73159ea4 100644 --- a/tests/run-make-fulldeps/mixing-formats/baz.rs +++ b/tests/run-make/mixing-formats/baz.rs diff --git a/tests/run-make-fulldeps/mixing-formats/baz2.rs b/tests/run-make/mixing-formats/baz2.rs index d0fab1e4cdf..d0fab1e4cdf 100644 --- a/tests/run-make-fulldeps/mixing-formats/baz2.rs +++ b/tests/run-make/mixing-formats/baz2.rs diff --git a/tests/run-make-fulldeps/mixing-formats/foo.rs b/tests/run-make/mixing-formats/foo.rs index d11c69f812a..d11c69f812a 100644 --- a/tests/run-make-fulldeps/mixing-formats/foo.rs +++ b/tests/run-make/mixing-formats/foo.rs diff --git a/tests/run-make-fulldeps/mixing-libs/Makefile b/tests/run-make/mixing-libs/Makefile index 39cc0708ca1..e8262b28401 100644 --- a/tests/run-make-fulldeps/mixing-libs/Makefile +++ b/tests/run-make/mixing-libs/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk all: diff --git a/tests/run-make-fulldeps/mixing-libs/dylib.rs b/tests/run-make/mixing-libs/dylib.rs index 6856887501c..6856887501c 100644 --- a/tests/run-make-fulldeps/mixing-libs/dylib.rs +++ b/tests/run-make/mixing-libs/dylib.rs diff --git a/tests/run-make-fulldeps/mixing-libs/prog.rs b/tests/run-make/mixing-libs/prog.rs index 14ce5c951a7..14ce5c951a7 100644 --- a/tests/run-make-fulldeps/mixing-libs/prog.rs +++ b/tests/run-make/mixing-libs/prog.rs diff --git a/tests/run-make-fulldeps/mixing-libs/rlib.rs b/tests/run-make/mixing-libs/rlib.rs index 96dcd16bb93..96dcd16bb93 100644 --- a/tests/run-make-fulldeps/mixing-libs/rlib.rs +++ b/tests/run-make/mixing-libs/rlib.rs diff --git a/tests/run-make-fulldeps/msvc-opt-minsize/Makefile b/tests/run-make/msvc-opt-minsize/Makefile index a5f019f244e..32e6e28018f 100644 --- a/tests/run-make-fulldeps/msvc-opt-minsize/Makefile +++ b/tests/run-make/msvc-opt-minsize/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk all: diff --git a/tests/run-make-fulldeps/msvc-opt-minsize/foo.rs b/tests/run-make/msvc-opt-minsize/foo.rs index 3f5496c08ee..3f5496c08ee 100644 --- a/tests/run-make-fulldeps/msvc-opt-minsize/foo.rs +++ b/tests/run-make/msvc-opt-minsize/foo.rs diff --git a/tests/run-make-fulldeps/multiple-emits/Makefile b/tests/run-make/multiple-emits/Makefile index d1f29764485..d1f29764485 100644 --- a/tests/run-make-fulldeps/multiple-emits/Makefile +++ b/tests/run-make/multiple-emits/Makefile diff --git a/tests/run-make-fulldeps/multiple-emits/foo.rs b/tests/run-make/multiple-emits/foo.rs index f328e4d9d04..f328e4d9d04 100644 --- a/tests/run-make-fulldeps/multiple-emits/foo.rs +++ b/tests/run-make/multiple-emits/foo.rs diff --git a/tests/run-make/native-link-modifier-bundle/Makefile b/tests/run-make/native-link-modifier-bundle/Makefile index e8a1121bfcd..527720922fe 100644 --- a/tests/run-make/native-link-modifier-bundle/Makefile +++ b/tests/run-make/native-link-modifier-bundle/Makefile @@ -1,7 +1,7 @@ # ignore-cross-compile # ignore-windows-msvc -include ../../run-make-fulldeps/tools.mk +include ../tools.mk # We're using the llvm-nm instead of the system nm to ensure it is compatible # with the LLVM bitcode generated by rustc. diff --git a/tests/run-make/native-link-modifier-verbatim-linker/Makefile b/tests/run-make/native-link-modifier-verbatim-linker/Makefile index 666e4084ce2..256dc2d0664 100644 --- a/tests/run-make/native-link-modifier-verbatim-linker/Makefile +++ b/tests/run-make/native-link-modifier-verbatim-linker/Makefile @@ -1,7 +1,7 @@ # ignore-cross-compile # ignore-macos -include ../../run-make-fulldeps/tools.mk +include ../tools.mk all: # Verbatim allows specify precise name. diff --git a/tests/run-make/native-link-modifier-verbatim-rustc/Makefile b/tests/run-make/native-link-modifier-verbatim-rustc/Makefile index 6f01f37804a..dfd6ec50fc0 100644 --- a/tests/run-make/native-link-modifier-verbatim-rustc/Makefile +++ b/tests/run-make/native-link-modifier-verbatim-rustc/Makefile @@ -1,4 +1,4 @@ -include ../../run-make-fulldeps/tools.mk +include ../tools.mk all: # Verbatim allows specify precise name. diff --git a/tests/run-make/native-link-modifier-whole-archive/Makefile b/tests/run-make/native-link-modifier-whole-archive/Makefile index f26bd864ced..5eb7a416f91 100644 --- a/tests/run-make/native-link-modifier-whole-archive/Makefile +++ b/tests/run-make/native-link-modifier-whole-archive/Makefile @@ -8,7 +8,7 @@ # that code would never make it into the final executable and we'd thus be missing some # of the output. -include ../../run-make-fulldeps/tools.mk +include ../tools.mk all: $(TMPDIR)/$(call BIN,directly_linked) \ $(TMPDIR)/$(call BIN,directly_linked_test_plus_whole_archive) \ diff --git a/tests/run-make-fulldeps/no-builtins-lto/Makefile b/tests/run-make/no-builtins-lto/Makefile index c8f05d9918b..c8f05d9918b 100644 --- a/tests/run-make-fulldeps/no-builtins-lto/Makefile +++ b/tests/run-make/no-builtins-lto/Makefile diff --git a/tests/run-make-fulldeps/no-builtins-lto/main.rs b/tests/run-make/no-builtins-lto/main.rs index 890c999c8cc..890c999c8cc 100644 --- a/tests/run-make-fulldeps/no-builtins-lto/main.rs +++ b/tests/run-make/no-builtins-lto/main.rs diff --git a/tests/run-make-fulldeps/no-builtins-lto/no_builtins.rs b/tests/run-make/no-builtins-lto/no_builtins.rs index 5d001031a57..5d001031a57 100644 --- a/tests/run-make-fulldeps/no-builtins-lto/no_builtins.rs +++ b/tests/run-make/no-builtins-lto/no_builtins.rs diff --git a/tests/run-make-fulldeps/no-duplicate-libs/Makefile b/tests/run-make/no-duplicate-libs/Makefile index b05aff7826e..4be8c026294 100644 --- a/tests/run-make-fulldeps/no-duplicate-libs/Makefile +++ b/tests/run-make/no-duplicate-libs/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk ifdef IS_MSVC diff --git a/tests/run-make-fulldeps/no-duplicate-libs/bar.c b/tests/run-make/no-duplicate-libs/bar.c index e369526572d..e369526572d 100644 --- a/tests/run-make-fulldeps/no-duplicate-libs/bar.c +++ b/tests/run-make/no-duplicate-libs/bar.c diff --git a/tests/run-make-fulldeps/no-duplicate-libs/foo.c b/tests/run-make/no-duplicate-libs/foo.c index 85e6cd8c390..85e6cd8c390 100644 --- a/tests/run-make-fulldeps/no-duplicate-libs/foo.c +++ b/tests/run-make/no-duplicate-libs/foo.c diff --git a/tests/run-make-fulldeps/no-duplicate-libs/main.rs b/tests/run-make/no-duplicate-libs/main.rs index b25ef35ada6..b25ef35ada6 100644 --- a/tests/run-make-fulldeps/no-duplicate-libs/main.rs +++ b/tests/run-make/no-duplicate-libs/main.rs diff --git a/tests/run-make/no-input-file/Makefile b/tests/run-make/no-input-file/Makefile index 2f02159229d..a754573a524 100644 --- a/tests/run-make/no-input-file/Makefile +++ b/tests/run-make/no-input-file/Makefile @@ -1,4 +1,4 @@ -include ../../run-make-fulldeps/tools.mk +include ../tools.mk all: $(RUSTC) --print crate-name 2>&1 | diff - no-input-file.stderr diff --git a/tests/run-make-fulldeps/no-intermediate-extras/Makefile b/tests/run-make/no-intermediate-extras/Makefile index 4116aac1b8f..83b5cedcf2a 100644 --- a/tests/run-make-fulldeps/no-intermediate-extras/Makefile +++ b/tests/run-make/no-intermediate-extras/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile # Regression test for issue #10973 include ../tools.mk diff --git a/tests/run-make-fulldeps/no-intermediate-extras/foo.rs b/tests/run-make/no-intermediate-extras/foo.rs index d11c69f812a..d11c69f812a 100644 --- a/tests/run-make-fulldeps/no-intermediate-extras/foo.rs +++ b/tests/run-make/no-intermediate-extras/foo.rs diff --git a/tests/run-make-fulldeps/obey-crate-type-flag/Makefile b/tests/run-make/obey-crate-type-flag/Makefile index effcfc94cc5..ecbb2e620ed 100644 --- a/tests/run-make-fulldeps/obey-crate-type-flag/Makefile +++ b/tests/run-make/obey-crate-type-flag/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk # check that rustc builds all crate_type attributes diff --git a/tests/run-make-fulldeps/obey-crate-type-flag/test.rs b/tests/run-make/obey-crate-type-flag/test.rs index 8a768f9de90..8a768f9de90 100644 --- a/tests/run-make-fulldeps/obey-crate-type-flag/test.rs +++ b/tests/run-make/obey-crate-type-flag/test.rs diff --git a/tests/run-make-fulldeps/output-filename-conflicts-with-directory/Makefile b/tests/run-make/output-filename-conflicts-with-directory/Makefile index 45221356cd9..45221356cd9 100644 --- a/tests/run-make-fulldeps/output-filename-conflicts-with-directory/Makefile +++ b/tests/run-make/output-filename-conflicts-with-directory/Makefile diff --git a/tests/run-make-fulldeps/output-filename-conflicts-with-directory/foo.rs b/tests/run-make/output-filename-conflicts-with-directory/foo.rs index f328e4d9d04..f328e4d9d04 100644 --- a/tests/run-make-fulldeps/output-filename-conflicts-with-directory/foo.rs +++ b/tests/run-make/output-filename-conflicts-with-directory/foo.rs diff --git a/tests/run-make-fulldeps/output-filename-overwrites-input/Makefile b/tests/run-make/output-filename-overwrites-input/Makefile index 33069c06f5a..605b86b253e 100644 --- a/tests/run-make-fulldeps/output-filename-overwrites-input/Makefile +++ b/tests/run-make/output-filename-overwrites-input/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk all: diff --git a/tests/run-make-fulldeps/output-filename-overwrites-input/bar.rs b/tests/run-make/output-filename-overwrites-input/bar.rs index 83be6e807e0..83be6e807e0 100644 --- a/tests/run-make-fulldeps/output-filename-overwrites-input/bar.rs +++ b/tests/run-make/output-filename-overwrites-input/bar.rs diff --git a/tests/run-make-fulldeps/output-filename-overwrites-input/foo.rs b/tests/run-make/output-filename-overwrites-input/foo.rs index f328e4d9d04..f328e4d9d04 100644 --- a/tests/run-make-fulldeps/output-filename-overwrites-input/foo.rs +++ b/tests/run-make/output-filename-overwrites-input/foo.rs diff --git a/tests/run-make-fulldeps/output-type-permutations/Makefile b/tests/run-make/output-type-permutations/Makefile index 791606c643b..035033b9fdd 100644 --- a/tests/run-make-fulldeps/output-type-permutations/Makefile +++ b/tests/run-make/output-type-permutations/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk all: diff --git a/tests/run-make-fulldeps/output-type-permutations/foo.rs b/tests/run-make/output-type-permutations/foo.rs index f0a2cc6ad75..f0a2cc6ad75 100644 --- a/tests/run-make-fulldeps/output-type-permutations/foo.rs +++ b/tests/run-make/output-type-permutations/foo.rs diff --git a/tests/run-make-fulldeps/output-with-hyphens/Makefile b/tests/run-make/output-with-hyphens/Makefile index 365fb6e591a..846c9a66a89 100644 --- a/tests/run-make-fulldeps/output-with-hyphens/Makefile +++ b/tests/run-make/output-with-hyphens/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk all: diff --git a/tests/run-make-fulldeps/output-with-hyphens/foo-bar.rs b/tests/run-make/output-with-hyphens/foo-bar.rs index f328e4d9d04..f328e4d9d04 100644 --- a/tests/run-make-fulldeps/output-with-hyphens/foo-bar.rs +++ b/tests/run-make/output-with-hyphens/foo-bar.rs diff --git a/tests/run-make-fulldeps/override-aliased-flags/Makefile b/tests/run-make/override-aliased-flags/Makefile index 186b8c7c85e..db1ff1ff981 100644 --- a/tests/run-make-fulldeps/override-aliased-flags/Makefile +++ b/tests/run-make/override-aliased-flags/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk # FIXME: it would be good to check that it's actually the rightmost flags diff --git a/tests/run-make-fulldeps/override-aliased-flags/main.rs b/tests/run-make/override-aliased-flags/main.rs index f328e4d9d04..f328e4d9d04 100644 --- a/tests/run-make-fulldeps/override-aliased-flags/main.rs +++ b/tests/run-make/override-aliased-flags/main.rs diff --git a/tests/run-make/overwrite-input/Makefile b/tests/run-make/overwrite-input/Makefile index 03b03eb147d..c62b5aab190 100644 --- a/tests/run-make/overwrite-input/Makefile +++ b/tests/run-make/overwrite-input/Makefile @@ -1,4 +1,4 @@ -include ../../run-make-fulldeps/tools.mk +include ../tools.mk all: $(RUSTC) main.rs -o main.rs 2> $(TMPDIR)/file.stderr || echo "failed successfully" diff --git a/tests/run-make-fulldeps/panic-impl-transitive/Makefile b/tests/run-make/panic-impl-transitive/Makefile index c3192efcb5a..9a271a22e10 100644 --- a/tests/run-make-fulldeps/panic-impl-transitive/Makefile +++ b/tests/run-make/panic-impl-transitive/Makefile @@ -1,4 +1,4 @@ -include ../../run-make-fulldeps/tools.mk +include ../tools.mk # NOTE we use --emit=llvm-ir to avoid running the linker (linking will fail because there's no main # in this crate) diff --git a/tests/run-make-fulldeps/panic-impl-transitive/panic-impl-consumer.rs b/tests/run-make/panic-impl-transitive/panic-impl-consumer.rs index 82a98b12d04..82a98b12d04 100644 --- a/tests/run-make-fulldeps/panic-impl-transitive/panic-impl-consumer.rs +++ b/tests/run-make/panic-impl-transitive/panic-impl-consumer.rs diff --git a/tests/run-make-fulldeps/panic-impl-transitive/panic-impl-provider.rs b/tests/run-make/panic-impl-transitive/panic-impl-provider.rs index f1b9873c83a..f1b9873c83a 100644 --- a/tests/run-make-fulldeps/panic-impl-transitive/panic-impl-provider.rs +++ b/tests/run-make/panic-impl-transitive/panic-impl-provider.rs diff --git a/tests/run-make/pass-linker-flags-from-dep/Makefile b/tests/run-make/pass-linker-flags-from-dep/Makefile index b9426326aea..b57389bb7d4 100644 --- a/tests/run-make/pass-linker-flags-from-dep/Makefile +++ b/tests/run-make/pass-linker-flags-from-dep/Makefile @@ -1,4 +1,4 @@ -include ../../run-make-fulldeps/tools.mk +include ../tools.mk all: # Build deps diff --git a/tests/run-make/pass-linker-flags/Makefile b/tests/run-make/pass-linker-flags/Makefile index a3efb8df6ac..6ddbcbb1b08 100644 --- a/tests/run-make/pass-linker-flags/Makefile +++ b/tests/run-make/pass-linker-flags/Makefile @@ -1,4 +1,4 @@ -include ../../run-make-fulldeps/tools.mk +include ../tools.mk all: $(RUSTC) rs.rs -Z unstable-options -l static=l1 -l link-arg=a1 -l static=l2 -l link-arg=a2 -l dylib=d1 -l link-arg=a3 --print link-args | $(CGREP) -e 'l1.*a1.*l2.*a2.*d1.*a3' diff --git a/tests/run-make-fulldeps/pass-non-c-like-enum-to-c/Makefile b/tests/run-make/pass-non-c-like-enum-to-c/Makefile index 42d3c977f75..bd441d321bf 100644 --- a/tests/run-make-fulldeps/pass-non-c-like-enum-to-c/Makefile +++ b/tests/run-make/pass-non-c-like-enum-to-c/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk all: $(call NATIVE_STATICLIB,test) diff --git a/tests/run-make-fulldeps/pass-non-c-like-enum-to-c/nonclike.rs b/tests/run-make/pass-non-c-like-enum-to-c/nonclike.rs index 517286a868d..517286a868d 100644 --- a/tests/run-make-fulldeps/pass-non-c-like-enum-to-c/nonclike.rs +++ b/tests/run-make/pass-non-c-like-enum-to-c/nonclike.rs diff --git a/tests/run-make-fulldeps/pass-non-c-like-enum-to-c/test.c b/tests/run-make/pass-non-c-like-enum-to-c/test.c index 99511b2530f..99511b2530f 100644 --- a/tests/run-make-fulldeps/pass-non-c-like-enum-to-c/test.c +++ b/tests/run-make/pass-non-c-like-enum-to-c/test.c diff --git a/tests/run-make-fulldeps/pgo-branch-weights/Makefile b/tests/run-make/pgo-branch-weights/Makefile index c60206a1f34..c60206a1f34 100644 --- a/tests/run-make-fulldeps/pgo-branch-weights/Makefile +++ b/tests/run-make/pgo-branch-weights/Makefile diff --git a/tests/run-make-fulldeps/pgo-branch-weights/filecheck-patterns.txt b/tests/run-make/pgo-branch-weights/filecheck-patterns.txt index 70d5a645c14..70d5a645c14 100644 --- a/tests/run-make-fulldeps/pgo-branch-weights/filecheck-patterns.txt +++ b/tests/run-make/pgo-branch-weights/filecheck-patterns.txt diff --git a/tests/run-make-fulldeps/pgo-branch-weights/interesting.rs b/tests/run-make/pgo-branch-weights/interesting.rs index a26d6fd69d1..a26d6fd69d1 100644 --- a/tests/run-make-fulldeps/pgo-branch-weights/interesting.rs +++ b/tests/run-make/pgo-branch-weights/interesting.rs diff --git a/tests/run-make-fulldeps/pgo-branch-weights/main.rs b/tests/run-make/pgo-branch-weights/main.rs index 619cf9c698c..619cf9c698c 100644 --- a/tests/run-make-fulldeps/pgo-branch-weights/main.rs +++ b/tests/run-make/pgo-branch-weights/main.rs diff --git a/tests/run-make-fulldeps/pgo-branch-weights/opaque.rs b/tests/run-make/pgo-branch-weights/opaque.rs index 72f93c9feab..72f93c9feab 100644 --- a/tests/run-make-fulldeps/pgo-branch-weights/opaque.rs +++ b/tests/run-make/pgo-branch-weights/opaque.rs diff --git a/tests/run-make-fulldeps/pgo-gen-lto/Makefile b/tests/run-make/pgo-gen-lto/Makefile index 3f2f6a838b5..3f2f6a838b5 100644 --- a/tests/run-make-fulldeps/pgo-gen-lto/Makefile +++ b/tests/run-make/pgo-gen-lto/Makefile diff --git a/tests/run-make-fulldeps/pgo-gen-lto/test.rs b/tests/run-make/pgo-gen-lto/test.rs index f328e4d9d04..f328e4d9d04 100644 --- a/tests/run-make-fulldeps/pgo-gen-lto/test.rs +++ b/tests/run-make/pgo-gen-lto/test.rs diff --git a/tests/run-make-fulldeps/pgo-gen-no-imp-symbols/Makefile b/tests/run-make/pgo-gen-no-imp-symbols/Makefile index 7f72b11b611..7f72b11b611 100644 --- a/tests/run-make-fulldeps/pgo-gen-no-imp-symbols/Makefile +++ b/tests/run-make/pgo-gen-no-imp-symbols/Makefile diff --git a/tests/run-make-fulldeps/pgo-gen-no-imp-symbols/test.rs b/tests/run-make/pgo-gen-no-imp-symbols/test.rs index f328e4d9d04..f328e4d9d04 100644 --- a/tests/run-make-fulldeps/pgo-gen-no-imp-symbols/test.rs +++ b/tests/run-make/pgo-gen-no-imp-symbols/test.rs diff --git a/tests/run-make-fulldeps/pgo-gen/Makefile b/tests/run-make/pgo-gen/Makefile index 4623a74957b..4623a74957b 100644 --- a/tests/run-make-fulldeps/pgo-gen/Makefile +++ b/tests/run-make/pgo-gen/Makefile diff --git a/tests/run-make-fulldeps/pgo-gen/test.rs b/tests/run-make/pgo-gen/test.rs index f328e4d9d04..f328e4d9d04 100644 --- a/tests/run-make-fulldeps/pgo-gen/test.rs +++ b/tests/run-make/pgo-gen/test.rs diff --git a/tests/run-make-fulldeps/pgo-indirect-call-promotion/Makefile b/tests/run-make/pgo-indirect-call-promotion/Makefile index 45302215cc6..45302215cc6 100644 --- a/tests/run-make-fulldeps/pgo-indirect-call-promotion/Makefile +++ b/tests/run-make/pgo-indirect-call-promotion/Makefile diff --git a/tests/run-make-fulldeps/pgo-indirect-call-promotion/filecheck-patterns.txt b/tests/run-make/pgo-indirect-call-promotion/filecheck-patterns.txt index e19c78350e9..e19c78350e9 100644 --- a/tests/run-make-fulldeps/pgo-indirect-call-promotion/filecheck-patterns.txt +++ b/tests/run-make/pgo-indirect-call-promotion/filecheck-patterns.txt diff --git a/tests/run-make-fulldeps/pgo-indirect-call-promotion/interesting.rs b/tests/run-make/pgo-indirect-call-promotion/interesting.rs index 4fd096d626d..4fd096d626d 100644 --- a/tests/run-make-fulldeps/pgo-indirect-call-promotion/interesting.rs +++ b/tests/run-make/pgo-indirect-call-promotion/interesting.rs diff --git a/tests/run-make-fulldeps/pgo-indirect-call-promotion/main.rs b/tests/run-make/pgo-indirect-call-promotion/main.rs index 27181f30710..27181f30710 100644 --- a/tests/run-make-fulldeps/pgo-indirect-call-promotion/main.rs +++ b/tests/run-make/pgo-indirect-call-promotion/main.rs diff --git a/tests/run-make-fulldeps/pgo-indirect-call-promotion/opaque.rs b/tests/run-make/pgo-indirect-call-promotion/opaque.rs index 9628d711c50..9628d711c50 100644 --- a/tests/run-make-fulldeps/pgo-indirect-call-promotion/opaque.rs +++ b/tests/run-make/pgo-indirect-call-promotion/opaque.rs diff --git a/tests/run-make-fulldeps/pgo-use/Makefile b/tests/run-make/pgo-use/Makefile index 3bac9b77aa3..3bac9b77aa3 100644 --- a/tests/run-make-fulldeps/pgo-use/Makefile +++ b/tests/run-make/pgo-use/Makefile diff --git a/tests/run-make-fulldeps/pgo-use/filecheck-patterns.txt b/tests/run-make/pgo-use/filecheck-patterns.txt index 6da34f88f2a..6da34f88f2a 100644 --- a/tests/run-make-fulldeps/pgo-use/filecheck-patterns.txt +++ b/tests/run-make/pgo-use/filecheck-patterns.txt diff --git a/tests/run-make-fulldeps/pgo-use/main.rs b/tests/run-make/pgo-use/main.rs index eb9192c87e6..eb9192c87e6 100644 --- a/tests/run-make-fulldeps/pgo-use/main.rs +++ b/tests/run-make/pgo-use/main.rs diff --git a/tests/run-make-fulldeps/pointer-auth-link-with-c/Makefile b/tests/run-make/pointer-auth-link-with-c/Makefile index 7acea03802c..7acea03802c 100644 --- a/tests/run-make-fulldeps/pointer-auth-link-with-c/Makefile +++ b/tests/run-make/pointer-auth-link-with-c/Makefile diff --git a/tests/run-make-fulldeps/pointer-auth-link-with-c/test.c b/tests/run-make/pointer-auth-link-with-c/test.c index 9fe07f82f9e..9fe07f82f9e 100644 --- a/tests/run-make-fulldeps/pointer-auth-link-with-c/test.c +++ b/tests/run-make/pointer-auth-link-with-c/test.c diff --git a/tests/run-make-fulldeps/pointer-auth-link-with-c/test.rs b/tests/run-make/pointer-auth-link-with-c/test.rs index 615ad0aeb3d..615ad0aeb3d 100644 --- a/tests/run-make-fulldeps/pointer-auth-link-with-c/test.rs +++ b/tests/run-make/pointer-auth-link-with-c/test.rs diff --git a/tests/run-make-fulldeps/prefer-dylib/Makefile b/tests/run-make/prefer-dylib/Makefile index 3817ca195eb..cc26e70ae67 100644 --- a/tests/run-make-fulldeps/prefer-dylib/Makefile +++ b/tests/run-make/prefer-dylib/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk all: diff --git a/tests/run-make-fulldeps/prefer-dylib/bar.rs b/tests/run-make/prefer-dylib/bar.rs index c5c0bc606cd..c5c0bc606cd 100644 --- a/tests/run-make-fulldeps/prefer-dylib/bar.rs +++ b/tests/run-make/prefer-dylib/bar.rs diff --git a/tests/run-make-fulldeps/prefer-dylib/foo.rs b/tests/run-make/prefer-dylib/foo.rs index 8d68535e3b6..8d68535e3b6 100644 --- a/tests/run-make-fulldeps/prefer-dylib/foo.rs +++ b/tests/run-make/prefer-dylib/foo.rs diff --git a/tests/run-make-fulldeps/prefer-rlib/Makefile b/tests/run-make/prefer-rlib/Makefile index adc345d760d..2e86b9c1dd7 100644 --- a/tests/run-make-fulldeps/prefer-rlib/Makefile +++ b/tests/run-make/prefer-rlib/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk all: diff --git a/tests/run-make-fulldeps/prefer-rlib/bar.rs b/tests/run-make/prefer-rlib/bar.rs index c5c0bc606cd..c5c0bc606cd 100644 --- a/tests/run-make-fulldeps/prefer-rlib/bar.rs +++ b/tests/run-make/prefer-rlib/bar.rs diff --git a/tests/run-make-fulldeps/prefer-rlib/foo.rs b/tests/run-make/prefer-rlib/foo.rs index 8d68535e3b6..8d68535e3b6 100644 --- a/tests/run-make-fulldeps/prefer-rlib/foo.rs +++ b/tests/run-make/prefer-rlib/foo.rs diff --git a/tests/run-make-fulldeps/pretty-print-to-file/Makefile b/tests/run-make/pretty-print-to-file/Makefile index ca11b8c47f0..ca11b8c47f0 100644 --- a/tests/run-make-fulldeps/pretty-print-to-file/Makefile +++ b/tests/run-make/pretty-print-to-file/Makefile diff --git a/tests/run-make-fulldeps/pretty-print-to-file/input.pp b/tests/run-make/pretty-print-to-file/input.pp index e3f03242a6e..e3f03242a6e 100644 --- a/tests/run-make-fulldeps/pretty-print-to-file/input.pp +++ b/tests/run-make/pretty-print-to-file/input.pp diff --git a/tests/run-make-fulldeps/pretty-print-to-file/input.rs b/tests/run-make/pretty-print-to-file/input.rs index aa828155b20..aa828155b20 100644 --- a/tests/run-make-fulldeps/pretty-print-to-file/input.rs +++ b/tests/run-make/pretty-print-to-file/input.rs diff --git a/tests/run-make-fulldeps/print-calling-conventions/Makefile b/tests/run-make/print-calling-conventions/Makefile index d3fd06392b0..27b87e61086 100644 --- a/tests/run-make-fulldeps/print-calling-conventions/Makefile +++ b/tests/run-make/print-calling-conventions/Makefile @@ -1,4 +1,4 @@ --include ../tools.mk +include ../tools.mk all: $(RUSTC) --print calling-conventions diff --git a/tests/run-make-fulldeps/print-cfg/Makefile b/tests/run-make/print-cfg/Makefile index 126f5768c90..126f5768c90 100644 --- a/tests/run-make-fulldeps/print-cfg/Makefile +++ b/tests/run-make/print-cfg/Makefile diff --git a/tests/run-make-fulldeps/print-target-list/Makefile b/tests/run-make/print-target-list/Makefile index f23c40d4281..f23c40d4281 100644 --- a/tests/run-make-fulldeps/print-target-list/Makefile +++ b/tests/run-make/print-target-list/Makefile diff --git a/tests/run-make-fulldeps/profile/Makefile b/tests/run-make/profile/Makefile index fffc051adbf..fffc051adbf 100644 --- a/tests/run-make-fulldeps/profile/Makefile +++ b/tests/run-make/profile/Makefile diff --git a/tests/run-make-fulldeps/profile/test.rs b/tests/run-make/profile/test.rs index f328e4d9d04..f328e4d9d04 100644 --- a/tests/run-make-fulldeps/profile/test.rs +++ b/tests/run-make/profile/test.rs diff --git a/tests/run-make-fulldeps/prune-link-args/Makefile b/tests/run-make/prune-link-args/Makefile index a359dc5aef1..c21ba6ace38 100644 --- a/tests/run-make-fulldeps/prune-link-args/Makefile +++ b/tests/run-make/prune-link-args/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk # ignore-windows diff --git a/tests/run-make-fulldeps/prune-link-args/empty.rs b/tests/run-make/prune-link-args/empty.rs index 45590d86ba6..45590d86ba6 100644 --- a/tests/run-make-fulldeps/prune-link-args/empty.rs +++ b/tests/run-make/prune-link-args/empty.rs diff --git a/tests/run-make/raw-dylib-alt-calling-convention/Makefile b/tests/run-make/raw-dylib-alt-calling-convention/Makefile index 03f8778d25d..1744c431f9c 100644 --- a/tests/run-make/raw-dylib-alt-calling-convention/Makefile +++ b/tests/run-make/raw-dylib-alt-calling-convention/Makefile @@ -3,7 +3,7 @@ # only-x86 # only-windows -include ../../run-make-fulldeps/tools.mk +include ../tools.mk all: $(RUSTC) --crate-type lib --crate-name raw_dylib_alt_calling_convention_test lib.rs diff --git a/tests/run-make/raw-dylib-c/Makefile b/tests/run-make/raw-dylib-c/Makefile index f47ab24f4fb..06e7935c026 100644 --- a/tests/run-make/raw-dylib-c/Makefile +++ b/tests/run-make/raw-dylib-c/Makefile @@ -2,7 +2,7 @@ # only-windows -include ../../run-make-fulldeps/tools.mk +include ../tools.mk all: $(RUSTC) --crate-type lib --crate-name raw_dylib_test lib.rs diff --git a/tests/run-make/raw-dylib-cross-compilation/Makefile b/tests/run-make/raw-dylib-cross-compilation/Makefile index 2a714f3a11f..a8f97edd689 100644 --- a/tests/run-make/raw-dylib-cross-compilation/Makefile +++ b/tests/run-make/raw-dylib-cross-compilation/Makefile @@ -7,7 +7,7 @@ # i686 dlltool.exe can't product x64 binaries. # ignore-i686-pc-windows-gnu -include ../../run-make-fulldeps/tools.mk +include ../tools.mk all: # Build as x86 and make sure that we have x86 objects only. diff --git a/tests/run-make/raw-dylib-import-name-type/Makefile b/tests/run-make/raw-dylib-import-name-type/Makefile index fcc60e88e1a..67152329807 100644 --- a/tests/run-make/raw-dylib-import-name-type/Makefile +++ b/tests/run-make/raw-dylib-import-name-type/Makefile @@ -3,7 +3,7 @@ # only-x86 # only-windows --include ../../run-make-fulldeps/tools.mk +include ../tools.mk all: $(RUSTC) --crate-type bin driver.rs -L "$(TMPDIR)" diff --git a/tests/run-make/raw-dylib-inline-cross-dylib/Makefile b/tests/run-make/raw-dylib-inline-cross-dylib/Makefile index 722a49b02cb..6d1d04bfd37 100644 --- a/tests/run-make/raw-dylib-inline-cross-dylib/Makefile +++ b/tests/run-make/raw-dylib-inline-cross-dylib/Makefile @@ -2,7 +2,7 @@ # only-windows -include ../../run-make-fulldeps/tools.mk +include ../tools.mk # We'd be using the llvm-objdump instead of the system objdump to ensure compatibility # with the LLVM bitcode generated by rustc but on Windows piping/IO redirection under MSYS2 is wonky with llvm-objdump. diff --git a/tests/run-make/raw-dylib-link-ordinal/Makefile b/tests/run-make/raw-dylib-link-ordinal/Makefile index b55a94dbc46..374a0b59de3 100644 --- a/tests/run-make/raw-dylib-link-ordinal/Makefile +++ b/tests/run-make/raw-dylib-link-ordinal/Makefile @@ -2,7 +2,7 @@ # only-windows -include ../../run-make-fulldeps/tools.mk +include ../tools.mk all: $(RUSTC) --crate-type lib --crate-name raw_dylib_test lib.rs diff --git a/tests/run-make/raw-dylib-stdcall-ordinal/Makefile b/tests/run-make/raw-dylib-stdcall-ordinal/Makefile index b9deb7729c2..178c15ab3de 100644 --- a/tests/run-make/raw-dylib-stdcall-ordinal/Makefile +++ b/tests/run-make/raw-dylib-stdcall-ordinal/Makefile @@ -3,7 +3,7 @@ # only-x86 # only-windows -include ../../run-make-fulldeps/tools.mk +include ../tools.mk all: $(RUSTC) --crate-type lib --crate-name raw_dylib_test lib.rs diff --git a/tests/run-make-fulldeps/redundant-libs/Makefile b/tests/run-make/redundant-libs/Makefile index b2dff05d163..0a48b2b2801 100644 --- a/tests/run-make-fulldeps/redundant-libs/Makefile +++ b/tests/run-make/redundant-libs/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk # ignore-windows-msvc diff --git a/tests/run-make-fulldeps/redundant-libs/bar.c b/tests/run-make/redundant-libs/bar.c index e4259998678..e4259998678 100644 --- a/tests/run-make-fulldeps/redundant-libs/bar.c +++ b/tests/run-make/redundant-libs/bar.c diff --git a/tests/run-make-fulldeps/redundant-libs/baz.c b/tests/run-make/redundant-libs/baz.c index a4e2c2b717f..a4e2c2b717f 100644 --- a/tests/run-make-fulldeps/redundant-libs/baz.c +++ b/tests/run-make/redundant-libs/baz.c diff --git a/tests/run-make-fulldeps/redundant-libs/foo.c b/tests/run-make/redundant-libs/foo.c index 339ee86c99e..339ee86c99e 100644 --- a/tests/run-make-fulldeps/redundant-libs/foo.c +++ b/tests/run-make/redundant-libs/foo.c diff --git a/tests/run-make-fulldeps/redundant-libs/main.rs b/tests/run-make/redundant-libs/main.rs index 90d185ff51d..90d185ff51d 100644 --- a/tests/run-make-fulldeps/redundant-libs/main.rs +++ b/tests/run-make/redundant-libs/main.rs diff --git a/tests/run-make-fulldeps/relocation-model/Makefile b/tests/run-make/relocation-model/Makefile index a31dbfd9167..8cc5205ed51 100644 --- a/tests/run-make-fulldeps/relocation-model/Makefile +++ b/tests/run-make/relocation-model/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk all: others diff --git a/tests/run-make-fulldeps/relocation-model/foo.rs b/tests/run-make/relocation-model/foo.rs index da0f5d925d1..da0f5d925d1 100644 --- a/tests/run-make-fulldeps/relocation-model/foo.rs +++ b/tests/run-make/relocation-model/foo.rs diff --git a/tests/run-make-fulldeps/relro-levels/Makefile b/tests/run-make/relro-levels/Makefile index 6176fc1a589..e0402f59f12 100644 --- a/tests/run-make-fulldeps/relro-levels/Makefile +++ b/tests/run-make/relro-levels/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk # only-linux diff --git a/tests/run-make-fulldeps/relro-levels/hello.rs b/tests/run-make/relro-levels/hello.rs index e7a11a969c0..e7a11a969c0 100644 --- a/tests/run-make-fulldeps/relro-levels/hello.rs +++ b/tests/run-make/relro-levels/hello.rs diff --git a/tests/run-make/remap-path-prefix-dwarf/Makefile b/tests/run-make/remap-path-prefix-dwarf/Makefile index fbaea7b68fe..c9ede1b6027 100644 --- a/tests/run-make/remap-path-prefix-dwarf/Makefile +++ b/tests/run-make/remap-path-prefix-dwarf/Makefile @@ -6,7 +6,7 @@ SRC_DIR := $(abspath .) SRC_DIR_PARENT := $(abspath ..) -include ../../run-make-fulldeps/tools.mk +include ../tools.mk all: \ abs_input_outside_working_dir \ diff --git a/tests/run-make-fulldeps/remap-path-prefix/Makefile b/tests/run-make/remap-path-prefix/Makefile index 2a7378fdf9e..2a7378fdf9e 100644 --- a/tests/run-make-fulldeps/remap-path-prefix/Makefile +++ b/tests/run-make/remap-path-prefix/Makefile diff --git a/tests/run-make-fulldeps/remap-path-prefix/auxiliary/lib.rs b/tests/run-make/remap-path-prefix/auxiliary/lib.rs index 019c786a902..019c786a902 100644 --- a/tests/run-make-fulldeps/remap-path-prefix/auxiliary/lib.rs +++ b/tests/run-make/remap-path-prefix/auxiliary/lib.rs diff --git a/tests/run-make/repr128-dwarf/Makefile b/tests/run-make/repr128-dwarf/Makefile index 2b03c22c0d0..3f933042724 100644 --- a/tests/run-make/repr128-dwarf/Makefile +++ b/tests/run-make/repr128-dwarf/Makefile @@ -2,7 +2,7 @@ # This test should be replaced with one in tests/debuginfo once GDB or LLDB support 128-bit # enums. -include ../../run-make-fulldeps/tools.mk +include ../tools.mk all: $(RUSTC) -Cdebuginfo=2 lib.rs -o $(TMPDIR)/repr128.rlib diff --git a/tests/run-make-fulldeps/reproducible-build-2/Makefile b/tests/run-make/reproducible-build-2/Makefile index 1df5e102ce3..68fcac8b47f 100644 --- a/tests/run-make-fulldeps/reproducible-build-2/Makefile +++ b/tests/run-make/reproducible-build-2/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk # ignore-musl diff --git a/tests/run-make-fulldeps/reproducible-build-2/linker.rs b/tests/run-make/reproducible-build-2/linker.rs index 998d1f32859..998d1f32859 100644 --- a/tests/run-make-fulldeps/reproducible-build-2/linker.rs +++ b/tests/run-make/reproducible-build-2/linker.rs diff --git a/tests/run-make-fulldeps/reproducible-build-2/reproducible-build-aux.rs b/tests/run-make/reproducible-build-2/reproducible-build-aux.rs index 8105b3d2bda..8105b3d2bda 100644 --- a/tests/run-make-fulldeps/reproducible-build-2/reproducible-build-aux.rs +++ b/tests/run-make/reproducible-build-2/reproducible-build-aux.rs diff --git a/tests/run-make-fulldeps/reproducible-build-2/reproducible-build.rs b/tests/run-make/reproducible-build-2/reproducible-build.rs index a6c04774c86..a6c04774c86 100644 --- a/tests/run-make-fulldeps/reproducible-build-2/reproducible-build.rs +++ b/tests/run-make/reproducible-build-2/reproducible-build.rs diff --git a/tests/run-make-fulldeps/reproducible-build/Makefile b/tests/run-make/reproducible-build/Makefile index 642a480815b..f5d17a234c0 100644 --- a/tests/run-make-fulldeps/reproducible-build/Makefile +++ b/tests/run-make/reproducible-build/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk # ignore-musl diff --git a/tests/run-make-fulldeps/reproducible-build/linker.rs b/tests/run-make/reproducible-build/linker.rs index 3dda6f190e4..3dda6f190e4 100644 --- a/tests/run-make-fulldeps/reproducible-build/linker.rs +++ b/tests/run-make/reproducible-build/linker.rs diff --git a/tests/run-make-fulldeps/reproducible-build/reproducible-build-aux.rs b/tests/run-make/reproducible-build/reproducible-build-aux.rs index 8105b3d2bda..8105b3d2bda 100644 --- a/tests/run-make-fulldeps/reproducible-build/reproducible-build-aux.rs +++ b/tests/run-make/reproducible-build/reproducible-build-aux.rs diff --git a/tests/run-make-fulldeps/reproducible-build/reproducible-build.rs b/tests/run-make/reproducible-build/reproducible-build.rs index a6c04774c86..a6c04774c86 100644 --- a/tests/run-make-fulldeps/reproducible-build/reproducible-build.rs +++ b/tests/run-make/reproducible-build/reproducible-build.rs diff --git a/tests/run-make-fulldeps/resolve-rename/Makefile b/tests/run-make/resolve-rename/Makefile index 00f83a5d6b2..00f83a5d6b2 100644 --- a/tests/run-make-fulldeps/resolve-rename/Makefile +++ b/tests/run-make/resolve-rename/Makefile diff --git a/tests/run-make-fulldeps/resolve-rename/bar.rs b/tests/run-make/resolve-rename/bar.rs index 4a09ce355e6..4a09ce355e6 100644 --- a/tests/run-make-fulldeps/resolve-rename/bar.rs +++ b/tests/run-make/resolve-rename/bar.rs diff --git a/tests/run-make-fulldeps/resolve-rename/baz.rs b/tests/run-make/resolve-rename/baz.rs index 9176073ef97..9176073ef97 100644 --- a/tests/run-make-fulldeps/resolve-rename/baz.rs +++ b/tests/run-make/resolve-rename/baz.rs diff --git a/tests/run-make-fulldeps/resolve-rename/foo.rs b/tests/run-make/resolve-rename/foo.rs index bd6820098ee..bd6820098ee 100644 --- a/tests/run-make-fulldeps/resolve-rename/foo.rs +++ b/tests/run-make/resolve-rename/foo.rs diff --git a/tests/run-make-fulldeps/return-non-c-like-enum-from-c/Makefile b/tests/run-make/return-non-c-like-enum-from-c/Makefile index 42d3c977f75..bd441d321bf 100644 --- a/tests/run-make-fulldeps/return-non-c-like-enum-from-c/Makefile +++ b/tests/run-make/return-non-c-like-enum-from-c/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk all: $(call NATIVE_STATICLIB,test) diff --git a/tests/run-make-fulldeps/return-non-c-like-enum-from-c/nonclike.rs b/tests/run-make/return-non-c-like-enum-from-c/nonclike.rs index ea22a2a56e0..ea22a2a56e0 100644 --- a/tests/run-make-fulldeps/return-non-c-like-enum-from-c/nonclike.rs +++ b/tests/run-make/return-non-c-like-enum-from-c/nonclike.rs diff --git a/tests/run-make-fulldeps/return-non-c-like-enum-from-c/test.c b/tests/run-make/return-non-c-like-enum-from-c/test.c index 3ad135bab4a..3ad135bab4a 100644 --- a/tests/run-make-fulldeps/return-non-c-like-enum-from-c/test.c +++ b/tests/run-make/return-non-c-like-enum-from-c/test.c diff --git a/tests/run-make-fulldeps/return-non-c-like-enum/Makefile b/tests/run-make/return-non-c-like-enum/Makefile index 513311c8289..0c8d8bf3acc 100644 --- a/tests/run-make-fulldeps/return-non-c-like-enum/Makefile +++ b/tests/run-make/return-non-c-like-enum/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk all: diff --git a/tests/run-make-fulldeps/return-non-c-like-enum/nonclike.rs b/tests/run-make/return-non-c-like-enum/nonclike.rs index de529cf641a..de529cf641a 100644 --- a/tests/run-make-fulldeps/return-non-c-like-enum/nonclike.rs +++ b/tests/run-make/return-non-c-like-enum/nonclike.rs diff --git a/tests/run-make-fulldeps/return-non-c-like-enum/test.c b/tests/run-make/return-non-c-like-enum/test.c index afadd3c10c5..afadd3c10c5 100644 --- a/tests/run-make-fulldeps/return-non-c-like-enum/test.c +++ b/tests/run-make/return-non-c-like-enum/test.c diff --git a/tests/run-make-fulldeps/rlib-chain/Makefile b/tests/run-make/rlib-chain/Makefile index 236943a2a3b..7a1f887fa52 100644 --- a/tests/run-make-fulldeps/rlib-chain/Makefile +++ b/tests/run-make/rlib-chain/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk all: diff --git a/tests/run-make-fulldeps/rlib-chain/m1.rs b/tests/run-make/rlib-chain/m1.rs index 665b206ccf1..665b206ccf1 100644 --- a/tests/run-make-fulldeps/rlib-chain/m1.rs +++ b/tests/run-make/rlib-chain/m1.rs diff --git a/tests/run-make-fulldeps/rlib-chain/m2.rs b/tests/run-make/rlib-chain/m2.rs index eba12fe1218..eba12fe1218 100644 --- a/tests/run-make-fulldeps/rlib-chain/m2.rs +++ b/tests/run-make/rlib-chain/m2.rs diff --git a/tests/run-make-fulldeps/rlib-chain/m3.rs b/tests/run-make/rlib-chain/m3.rs index ade191db49c..ade191db49c 100644 --- a/tests/run-make-fulldeps/rlib-chain/m3.rs +++ b/tests/run-make/rlib-chain/m3.rs diff --git a/tests/run-make-fulldeps/rlib-chain/m4.rs b/tests/run-make/rlib-chain/m4.rs index fa8ec6079de..fa8ec6079de 100644 --- a/tests/run-make-fulldeps/rlib-chain/m4.rs +++ b/tests/run-make/rlib-chain/m4.rs diff --git a/tests/run-make/rlib-format-packed-bundled-libs-2/Makefile b/tests/run-make/rlib-format-packed-bundled-libs-2/Makefile index 37b8d809a27..d2a740b06b3 100644 --- a/tests/run-make/rlib-format-packed-bundled-libs-2/Makefile +++ b/tests/run-make/rlib-format-packed-bundled-libs-2/Makefile @@ -1,4 +1,4 @@ --include ../../run-make-fulldeps/tools.mk +include ../tools.mk # ignore-cross-compile diff --git a/tests/run-make/rlib-format-packed-bundled-libs-3/Makefile b/tests/run-make/rlib-format-packed-bundled-libs-3/Makefile index 62dc1b5f606..1f2812cb087 100644 --- a/tests/run-make/rlib-format-packed-bundled-libs-3/Makefile +++ b/tests/run-make/rlib-format-packed-bundled-libs-3/Makefile @@ -1,4 +1,4 @@ --include ../../run-make-fulldeps/tools.mk +include ../tools.mk # ignore-cross-compile # only-linux diff --git a/tests/run-make/rlib-format-packed-bundled-libs/Makefile b/tests/run-make/rlib-format-packed-bundled-libs/Makefile index 7fb6ce8d1e4..f454da67893 100644 --- a/tests/run-make/rlib-format-packed-bundled-libs/Makefile +++ b/tests/run-make/rlib-format-packed-bundled-libs/Makefile @@ -1,4 +1,4 @@ --include ../../run-make-fulldeps/tools.mk +include ../tools.mk # ignore-cross-compile diff --git a/tests/run-make/rustc-macro-dep-files/Makefile b/tests/run-make/rustc-macro-dep-files/Makefile index 6ae659db2e9..76d713c4bb3 100644 --- a/tests/run-make/rustc-macro-dep-files/Makefile +++ b/tests/run-make/rustc-macro-dep-files/Makefile @@ -1,4 +1,4 @@ -include ../../run-make-fulldeps/tools.mk +include ../tools.mk # FIXME(eddyb) provide `HOST_RUSTC` and `TARGET_RUSTC` # instead of hardcoding them everywhere they're needed. diff --git a/tests/run-make-fulldeps/rustdoc-determinism/Makefile b/tests/run-make/rustdoc-determinism/Makefile index a3ef1690671..a3ef1690671 100644 --- a/tests/run-make-fulldeps/rustdoc-determinism/Makefile +++ b/tests/run-make/rustdoc-determinism/Makefile diff --git a/tests/run-make-fulldeps/rustdoc-determinism/bar.rs b/tests/run-make/rustdoc-determinism/bar.rs index ca05a6a9076..ca05a6a9076 100644 --- a/tests/run-make-fulldeps/rustdoc-determinism/bar.rs +++ b/tests/run-make/rustdoc-determinism/bar.rs diff --git a/tests/run-make-fulldeps/rustdoc-determinism/foo.rs b/tests/run-make/rustdoc-determinism/foo.rs index 4a835673a59..4a835673a59 100644 --- a/tests/run-make-fulldeps/rustdoc-determinism/foo.rs +++ b/tests/run-make/rustdoc-determinism/foo.rs diff --git a/tests/run-make-fulldeps/rustdoc-error-lines/Makefile b/tests/run-make/rustdoc-error-lines/Makefile index 2dc30f56b83..2dc30f56b83 100644 --- a/tests/run-make-fulldeps/rustdoc-error-lines/Makefile +++ b/tests/run-make/rustdoc-error-lines/Makefile diff --git a/tests/run-make-fulldeps/rustdoc-error-lines/input.rs b/tests/run-make/rustdoc-error-lines/input.rs index b4db182e85f..b4db182e85f 100644 --- a/tests/run-make-fulldeps/rustdoc-error-lines/input.rs +++ b/tests/run-make/rustdoc-error-lines/input.rs diff --git a/tests/run-make-fulldeps/rustdoc-io-error/Makefile b/tests/run-make/rustdoc-io-error/Makefile index 27f5ecf94ab..27f5ecf94ab 100644 --- a/tests/run-make-fulldeps/rustdoc-io-error/Makefile +++ b/tests/run-make/rustdoc-io-error/Makefile diff --git a/tests/run-make-fulldeps/rustdoc-io-error/foo.rs b/tests/run-make/rustdoc-io-error/foo.rs index 4a835673a59..4a835673a59 100644 --- a/tests/run-make-fulldeps/rustdoc-io-error/foo.rs +++ b/tests/run-make/rustdoc-io-error/foo.rs diff --git a/tests/run-make-fulldeps/rustdoc-map-file/Makefile b/tests/run-make/rustdoc-map-file/Makefile index 5cbf7747af6..5cbf7747af6 100644 --- a/tests/run-make-fulldeps/rustdoc-map-file/Makefile +++ b/tests/run-make/rustdoc-map-file/Makefile diff --git a/tests/run-make-fulldeps/rustdoc-map-file/expected.json b/tests/run-make/rustdoc-map-file/expected.json index 6b1ccbeac30..6b1ccbeac30 100644 --- a/tests/run-make-fulldeps/rustdoc-map-file/expected.json +++ b/tests/run-make/rustdoc-map-file/expected.json diff --git a/tests/run-make-fulldeps/rustdoc-map-file/foo.rs b/tests/run-make/rustdoc-map-file/foo.rs index e12b9d2292c..e12b9d2292c 100644 --- a/tests/run-make-fulldeps/rustdoc-map-file/foo.rs +++ b/tests/run-make/rustdoc-map-file/foo.rs diff --git a/tests/run-make-fulldeps/rustdoc-map-file/validate_json.py b/tests/run-make/rustdoc-map-file/validate_json.py index 5c14c90b70d..5c14c90b70d 100755 --- a/tests/run-make-fulldeps/rustdoc-map-file/validate_json.py +++ b/tests/run-make/rustdoc-map-file/validate_json.py diff --git a/tests/run-make-fulldeps/rustdoc-output-path/Makefile b/tests/run-make/rustdoc-output-path/Makefile index 8f5cda9e56e..8f5cda9e56e 100644 --- a/tests/run-make-fulldeps/rustdoc-output-path/Makefile +++ b/tests/run-make/rustdoc-output-path/Makefile diff --git a/tests/run-make-fulldeps/rustdoc-output-path/foo.rs b/tests/run-make/rustdoc-output-path/foo.rs index 4a835673a59..4a835673a59 100644 --- a/tests/run-make-fulldeps/rustdoc-output-path/foo.rs +++ b/tests/run-make/rustdoc-output-path/foo.rs diff --git a/tests/run-make-fulldeps/rustdoc-scrape-examples-macros/Makefile b/tests/run-make/rustdoc-scrape-examples-macros/Makefile index c857aa4b993..edc19d8cb5d 100644 --- a/tests/run-make-fulldeps/rustdoc-scrape-examples-macros/Makefile +++ b/tests/run-make/rustdoc-scrape-examples-macros/Makefile @@ -1,4 +1,5 @@ -include ../../run-make-fulldeps/tools.mk +# ignore-cross-compile +include ../../run-make/tools.mk OUTPUT_DIR := "$(TMPDIR)/rustdoc" DYLIB_NAME := $(shell echo | $(RUSTC) --crate-name foobar_macro --crate-type dylib --print file-names -) diff --git a/tests/run-make-fulldeps/rustdoc-scrape-examples-macros/examples/ex.rs b/tests/run-make/rustdoc-scrape-examples-macros/examples/ex.rs index 4d8c8b30e31..4d8c8b30e31 100644 --- a/tests/run-make-fulldeps/rustdoc-scrape-examples-macros/examples/ex.rs +++ b/tests/run-make/rustdoc-scrape-examples-macros/examples/ex.rs diff --git a/tests/run-make-fulldeps/rustdoc-scrape-examples-macros/src/lib.rs b/tests/run-make/rustdoc-scrape-examples-macros/src/lib.rs index d8658a0f255..d8658a0f255 100644 --- a/tests/run-make-fulldeps/rustdoc-scrape-examples-macros/src/lib.rs +++ b/tests/run-make/rustdoc-scrape-examples-macros/src/lib.rs diff --git a/tests/run-make-fulldeps/rustdoc-scrape-examples-macros/src/proc.rs b/tests/run-make/rustdoc-scrape-examples-macros/src/proc.rs index 46e518fdf6a..46e518fdf6a 100644 --- a/tests/run-make-fulldeps/rustdoc-scrape-examples-macros/src/proc.rs +++ b/tests/run-make/rustdoc-scrape-examples-macros/src/proc.rs diff --git a/tests/run-make/rustdoc-scrape-examples-multiple/scrape.mk b/tests/run-make/rustdoc-scrape-examples-multiple/scrape.mk index 7a28d2145d5..57220bc6635 100644 --- a/tests/run-make/rustdoc-scrape-examples-multiple/scrape.mk +++ b/tests/run-make/rustdoc-scrape-examples-multiple/scrape.mk @@ -1,4 +1,4 @@ -include ../../run-make-fulldeps/tools.mk +include ../tools.mk OUTPUT_DIR := "$(TMPDIR)/rustdoc" diff --git a/tests/run-make-fulldeps/rustdoc-target-spec-json-path/Makefile b/tests/run-make/rustdoc-target-spec-json-path/Makefile index 6d0bc4186f2..6d0bc4186f2 100644 --- a/tests/run-make-fulldeps/rustdoc-target-spec-json-path/Makefile +++ b/tests/run-make/rustdoc-target-spec-json-path/Makefile diff --git a/tests/run-make-fulldeps/rustdoc-target-spec-json-path/dummy_core.rs b/tests/run-make/rustdoc-target-spec-json-path/dummy_core.rs index da27b7f3463..da27b7f3463 100644 --- a/tests/run-make-fulldeps/rustdoc-target-spec-json-path/dummy_core.rs +++ b/tests/run-make/rustdoc-target-spec-json-path/dummy_core.rs diff --git a/tests/run-make-fulldeps/rustdoc-target-spec-json-path/my_crate.rs b/tests/run-make/rustdoc-target-spec-json-path/my_crate.rs index 12aa0822084..12aa0822084 100644 --- a/tests/run-make-fulldeps/rustdoc-target-spec-json-path/my_crate.rs +++ b/tests/run-make/rustdoc-target-spec-json-path/my_crate.rs diff --git a/tests/run-make-fulldeps/rustdoc-target-spec-json-path/target.json b/tests/run-make/rustdoc-target-spec-json-path/target.json index 34357182c20..34357182c20 100644 --- a/tests/run-make-fulldeps/rustdoc-target-spec-json-path/target.json +++ b/tests/run-make/rustdoc-target-spec-json-path/target.json diff --git a/tests/run-make-fulldeps/rustdoc-themes/Makefile b/tests/run-make/rustdoc-themes/Makefile index a6d9a43addf..a6d9a43addf 100644 --- a/tests/run-make-fulldeps/rustdoc-themes/Makefile +++ b/tests/run-make/rustdoc-themes/Makefile diff --git a/tests/run-make-fulldeps/rustdoc-themes/foo.rs b/tests/run-make/rustdoc-themes/foo.rs index 995544aeff9..995544aeff9 100644 --- a/tests/run-make-fulldeps/rustdoc-themes/foo.rs +++ b/tests/run-make/rustdoc-themes/foo.rs diff --git a/tests/run-make/rustdoc-verify-output-files/Makefile b/tests/run-make/rustdoc-verify-output-files/Makefile index 0666122e8ab..57ac7078d14 100644 --- a/tests/run-make/rustdoc-verify-output-files/Makefile +++ b/tests/run-make/rustdoc-verify-output-files/Makefile @@ -1,4 +1,4 @@ -include ../../run-make-fulldeps/tools.mk +include ../tools.mk OUTPUT_DIR := "$(TMPDIR)/rustdoc" TMP_OUTPUT_DIR := "$(TMPDIR)/tmp-rustdoc" diff --git a/tests/run-make/rustdoc-with-out-dir-option/Makefile b/tests/run-make/rustdoc-with-out-dir-option/Makefile index b3c3f5230c1..f5d5060ed13 100644 --- a/tests/run-make/rustdoc-with-out-dir-option/Makefile +++ b/tests/run-make/rustdoc-with-out-dir-option/Makefile @@ -1,4 +1,4 @@ -include ../../run-make-fulldeps/tools.mk +include ../tools.mk OUTPUT_DIR := "$(TMPDIR)/rustdoc" diff --git a/tests/run-make/rustdoc-with-output-option/Makefile b/tests/run-make/rustdoc-with-output-option/Makefile index 02093a35cfc..d0a8205a8ee 100644 --- a/tests/run-make/rustdoc-with-output-option/Makefile +++ b/tests/run-make/rustdoc-with-output-option/Makefile @@ -1,4 +1,4 @@ -include ../../run-make-fulldeps/tools.mk +include ../tools.mk OUTPUT_DIR := "$(TMPDIR)/rustdoc" diff --git a/tests/run-make/rustdoc-with-short-out-dir-option/Makefile b/tests/run-make/rustdoc-with-short-out-dir-option/Makefile index dc5056a86dd..1b9327bce22 100644 --- a/tests/run-make/rustdoc-with-short-out-dir-option/Makefile +++ b/tests/run-make/rustdoc-with-short-out-dir-option/Makefile @@ -1,4 +1,4 @@ -include ../../run-make-fulldeps/tools.mk +include ../tools.mk OUTPUT_DIR := "$(TMPDIR)/rustdoc" diff --git a/tests/run-make-fulldeps/sanitizer-cdylib-link/Makefile b/tests/run-make/sanitizer-cdylib-link/Makefile index 691585268bf..691585268bf 100644 --- a/tests/run-make-fulldeps/sanitizer-cdylib-link/Makefile +++ b/tests/run-make/sanitizer-cdylib-link/Makefile diff --git a/tests/run-make-fulldeps/sanitizer-cdylib-link/library.rs b/tests/run-make/sanitizer-cdylib-link/library.rs index f2a52cb5ca1..f2a52cb5ca1 100644 --- a/tests/run-make-fulldeps/sanitizer-cdylib-link/library.rs +++ b/tests/run-make/sanitizer-cdylib-link/library.rs diff --git a/tests/run-make-fulldeps/sanitizer-cdylib-link/program.rs b/tests/run-make/sanitizer-cdylib-link/program.rs index ef053aa2e7a..ef053aa2e7a 100644 --- a/tests/run-make-fulldeps/sanitizer-cdylib-link/program.rs +++ b/tests/run-make/sanitizer-cdylib-link/program.rs diff --git a/tests/run-make-fulldeps/sanitizer-dylib-link/Makefile b/tests/run-make/sanitizer-dylib-link/Makefile index b0a91e5b197..b0a91e5b197 100644 --- a/tests/run-make-fulldeps/sanitizer-dylib-link/Makefile +++ b/tests/run-make/sanitizer-dylib-link/Makefile diff --git a/tests/run-make-fulldeps/sanitizer-dylib-link/library.rs b/tests/run-make/sanitizer-dylib-link/library.rs index f2a52cb5ca1..f2a52cb5ca1 100644 --- a/tests/run-make-fulldeps/sanitizer-dylib-link/library.rs +++ b/tests/run-make/sanitizer-dylib-link/library.rs diff --git a/tests/run-make-fulldeps/sanitizer-dylib-link/program.rs b/tests/run-make/sanitizer-dylib-link/program.rs index ef053aa2e7a..ef053aa2e7a 100644 --- a/tests/run-make-fulldeps/sanitizer-dylib-link/program.rs +++ b/tests/run-make/sanitizer-dylib-link/program.rs diff --git a/tests/run-make-fulldeps/sanitizer-staticlib-link/Makefile b/tests/run-make/sanitizer-staticlib-link/Makefile index 7b1a286ed12..7b1a286ed12 100644 --- a/tests/run-make-fulldeps/sanitizer-staticlib-link/Makefile +++ b/tests/run-make/sanitizer-staticlib-link/Makefile diff --git a/tests/run-make-fulldeps/sanitizer-staticlib-link/library.rs b/tests/run-make/sanitizer-staticlib-link/library.rs index f2a52cb5ca1..f2a52cb5ca1 100644 --- a/tests/run-make-fulldeps/sanitizer-staticlib-link/library.rs +++ b/tests/run-make/sanitizer-staticlib-link/library.rs diff --git a/tests/run-make-fulldeps/sanitizer-staticlib-link/program.c b/tests/run-make/sanitizer-staticlib-link/program.c index 735e2b147fd..735e2b147fd 100644 --- a/tests/run-make-fulldeps/sanitizer-staticlib-link/program.c +++ b/tests/run-make/sanitizer-staticlib-link/program.c diff --git a/tests/run-make-fulldeps/sanitizer-staticlib-link/program.rs b/tests/run-make/sanitizer-staticlib-link/program.rs index ec59bdb11c8..ec59bdb11c8 100644 --- a/tests/run-make-fulldeps/sanitizer-staticlib-link/program.rs +++ b/tests/run-make/sanitizer-staticlib-link/program.rs diff --git a/tests/run-make-fulldeps/separate-link-fail/Makefile b/tests/run-make/separate-link-fail/Makefile index bfd18fbf972..bfd18fbf972 100644 --- a/tests/run-make-fulldeps/separate-link-fail/Makefile +++ b/tests/run-make/separate-link-fail/Makefile diff --git a/tests/run-make-fulldeps/separate-link/Makefile b/tests/run-make/separate-link/Makefile index 3ccdb6275d1..d01158d9f5f 100644 --- a/tests/run-make-fulldeps/separate-link/Makefile +++ b/tests/run-make/separate-link/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk all: diff --git a/tests/run-make-fulldeps/sepcomp-cci-copies/Makefile b/tests/run-make/sepcomp-cci-copies/Makefile index df289d0b0b1..df289d0b0b1 100644 --- a/tests/run-make-fulldeps/sepcomp-cci-copies/Makefile +++ b/tests/run-make/sepcomp-cci-copies/Makefile diff --git a/tests/run-make-fulldeps/sepcomp-cci-copies/cci_lib.rs b/tests/run-make/sepcomp-cci-copies/cci_lib.rs index 869d4a6cd3e..869d4a6cd3e 100644 --- a/tests/run-make-fulldeps/sepcomp-cci-copies/cci_lib.rs +++ b/tests/run-make/sepcomp-cci-copies/cci_lib.rs diff --git a/tests/run-make-fulldeps/sepcomp-cci-copies/foo.rs b/tests/run-make/sepcomp-cci-copies/foo.rs index ba251fcb0ac..ba251fcb0ac 100644 --- a/tests/run-make-fulldeps/sepcomp-cci-copies/foo.rs +++ b/tests/run-make/sepcomp-cci-copies/foo.rs diff --git a/tests/run-make-fulldeps/sepcomp-inlining/Makefile b/tests/run-make/sepcomp-inlining/Makefile index 327aeb75e5e..327aeb75e5e 100644 --- a/tests/run-make-fulldeps/sepcomp-inlining/Makefile +++ b/tests/run-make/sepcomp-inlining/Makefile diff --git a/tests/run-make-fulldeps/sepcomp-inlining/foo.rs b/tests/run-make/sepcomp-inlining/foo.rs index 2fe5f9cb726..2fe5f9cb726 100644 --- a/tests/run-make-fulldeps/sepcomp-inlining/foo.rs +++ b/tests/run-make/sepcomp-inlining/foo.rs diff --git a/tests/run-make-fulldeps/sepcomp-separate/Makefile b/tests/run-make/sepcomp-separate/Makefile index 62cf54a88fb..62cf54a88fb 100644 --- a/tests/run-make-fulldeps/sepcomp-separate/Makefile +++ b/tests/run-make/sepcomp-separate/Makefile diff --git a/tests/run-make-fulldeps/sepcomp-separate/foo.rs b/tests/run-make/sepcomp-separate/foo.rs index 169bafa9b3a..169bafa9b3a 100644 --- a/tests/run-make-fulldeps/sepcomp-separate/foo.rs +++ b/tests/run-make/sepcomp-separate/foo.rs diff --git a/tests/run-make-fulldeps/share-generics-dylib/Makefile b/tests/run-make/share-generics-dylib/Makefile index 065fb574c3c..9d97eca80d3 100644 --- a/tests/run-make-fulldeps/share-generics-dylib/Makefile +++ b/tests/run-make/share-generics-dylib/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile # This test makes sure all generic instances get re-exported from Rust dylibs for use by # `-Zshare-generics`. There are two rlibs (`instance_provider_a` and `instance_provider_b`) # which both provide an instance of `Cell<i32>::set`. There is `instance_user_dylib` which is @@ -9,7 +10,7 @@ # # This is regression test for https://github.com/rust-lang/rust/issues/67276. -include ../../run-make-fulldeps/tools.mk +include ../tools.mk COMMON_ARGS=-Cprefer-dynamic -Zshare-generics=yes -Ccodegen-units=1 -Csymbol-mangling-version=v0 diff --git a/tests/run-make-fulldeps/share-generics-dylib/instance_provider_a.rs b/tests/run-make/share-generics-dylib/instance_provider_a.rs index b4e125ac052..b4e125ac052 100644 --- a/tests/run-make-fulldeps/share-generics-dylib/instance_provider_a.rs +++ b/tests/run-make/share-generics-dylib/instance_provider_a.rs diff --git a/tests/run-make-fulldeps/share-generics-dylib/instance_provider_b.rs b/tests/run-make/share-generics-dylib/instance_provider_b.rs index f613db873e6..f613db873e6 100644 --- a/tests/run-make-fulldeps/share-generics-dylib/instance_provider_b.rs +++ b/tests/run-make/share-generics-dylib/instance_provider_b.rs diff --git a/tests/run-make-fulldeps/share-generics-dylib/instance_user_a_rlib.rs b/tests/run-make/share-generics-dylib/instance_user_a_rlib.rs index c8e6ab95cf9..c8e6ab95cf9 100644 --- a/tests/run-make-fulldeps/share-generics-dylib/instance_user_a_rlib.rs +++ b/tests/run-make/share-generics-dylib/instance_user_a_rlib.rs diff --git a/tests/run-make-fulldeps/share-generics-dylib/instance_user_b_rlib.rs b/tests/run-make/share-generics-dylib/instance_user_b_rlib.rs index 7c34af6d0dc..7c34af6d0dc 100644 --- a/tests/run-make-fulldeps/share-generics-dylib/instance_user_b_rlib.rs +++ b/tests/run-make/share-generics-dylib/instance_user_b_rlib.rs diff --git a/tests/run-make-fulldeps/share-generics-dylib/instance_user_dylib.rs b/tests/run-make/share-generics-dylib/instance_user_dylib.rs index 7c8368eec65..7c8368eec65 100644 --- a/tests/run-make-fulldeps/share-generics-dylib/instance_user_dylib.rs +++ b/tests/run-make/share-generics-dylib/instance_user_dylib.rs diff --git a/tests/run-make-fulldeps/share-generics-dylib/linked_leaf.rs b/tests/run-make/share-generics-dylib/linked_leaf.rs index e510dad691c..e510dad691c 100644 --- a/tests/run-make-fulldeps/share-generics-dylib/linked_leaf.rs +++ b/tests/run-make/share-generics-dylib/linked_leaf.rs diff --git a/tests/run-make-fulldeps/simd-ffi/Makefile b/tests/run-make/simd-ffi/Makefile index 29735347041..29735347041 100644 --- a/tests/run-make-fulldeps/simd-ffi/Makefile +++ b/tests/run-make/simd-ffi/Makefile diff --git a/tests/run-make-fulldeps/simd-ffi/simd.rs b/tests/run-make/simd-ffi/simd.rs index d11cfd77c5b..d11cfd77c5b 100644 --- a/tests/run-make-fulldeps/simd-ffi/simd.rs +++ b/tests/run-make/simd-ffi/simd.rs diff --git a/tests/run-make-fulldeps/simple-dylib/Makefile b/tests/run-make/simple-dylib/Makefile index 5dda5d66d1c..f3e1c1da88c 100644 --- a/tests/run-make-fulldeps/simple-dylib/Makefile +++ b/tests/run-make/simple-dylib/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk all: $(RUSTC) bar.rs --crate-type=dylib -C prefer-dynamic diff --git a/tests/run-make-fulldeps/simple-dylib/bar.rs b/tests/run-make/simple-dylib/bar.rs index c5c0bc606cd..c5c0bc606cd 100644 --- a/tests/run-make-fulldeps/simple-dylib/bar.rs +++ b/tests/run-make/simple-dylib/bar.rs diff --git a/tests/run-make-fulldeps/simple-dylib/foo.rs b/tests/run-make/simple-dylib/foo.rs index 8d68535e3b6..8d68535e3b6 100644 --- a/tests/run-make-fulldeps/simple-dylib/foo.rs +++ b/tests/run-make/simple-dylib/foo.rs diff --git a/tests/run-make-fulldeps/simple-rlib/Makefile b/tests/run-make/simple-rlib/Makefile index d912b8a7bab..28df61a1547 100644 --- a/tests/run-make-fulldeps/simple-rlib/Makefile +++ b/tests/run-make/simple-rlib/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk all: $(RUSTC) bar.rs --crate-type=rlib diff --git a/tests/run-make-fulldeps/simple-rlib/bar.rs b/tests/run-make/simple-rlib/bar.rs index c5c0bc606cd..c5c0bc606cd 100644 --- a/tests/run-make-fulldeps/simple-rlib/bar.rs +++ b/tests/run-make/simple-rlib/bar.rs diff --git a/tests/run-make-fulldeps/simple-rlib/foo.rs b/tests/run-make/simple-rlib/foo.rs index 8d68535e3b6..8d68535e3b6 100644 --- a/tests/run-make-fulldeps/simple-rlib/foo.rs +++ b/tests/run-make/simple-rlib/foo.rs diff --git a/tests/run-make-fulldeps/split-debuginfo/Makefile b/tests/run-make/split-debuginfo/Makefile index 44cda0d3d11..71e014c1f71 100644 --- a/tests/run-make-fulldeps/split-debuginfo/Makefile +++ b/tests/run-make/split-debuginfo/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk all: off packed unpacked diff --git a/tests/run-make-fulldeps/split-debuginfo/bar.rs b/tests/run-make/split-debuginfo/bar.rs index 07dd0715252..07dd0715252 100644 --- a/tests/run-make-fulldeps/split-debuginfo/bar.rs +++ b/tests/run-make/split-debuginfo/bar.rs diff --git a/tests/run-make-fulldeps/split-debuginfo/baz.rs b/tests/run-make/split-debuginfo/baz.rs index 8b1a393741c..8b1a393741c 100644 --- a/tests/run-make-fulldeps/split-debuginfo/baz.rs +++ b/tests/run-make/split-debuginfo/baz.rs diff --git a/tests/run-make-fulldeps/split-debuginfo/foo.rs b/tests/run-make/split-debuginfo/foo.rs index b058e540862..b058e540862 100644 --- a/tests/run-make-fulldeps/split-debuginfo/foo.rs +++ b/tests/run-make/split-debuginfo/foo.rs diff --git a/tests/run-make-fulldeps/split-debuginfo/main.rs b/tests/run-make/split-debuginfo/main.rs index 21fa16e40a4..21fa16e40a4 100644 --- a/tests/run-make-fulldeps/split-debuginfo/main.rs +++ b/tests/run-make/split-debuginfo/main.rs diff --git a/tests/run-make-fulldeps/stable-symbol-names/Makefile b/tests/run-make/stable-symbol-names/Makefile index bbfb8e38881..bbfb8e38881 100644 --- a/tests/run-make-fulldeps/stable-symbol-names/Makefile +++ b/tests/run-make/stable-symbol-names/Makefile diff --git a/tests/run-make-fulldeps/stable-symbol-names/stable-symbol-names1.rs b/tests/run-make/stable-symbol-names/stable-symbol-names1.rs index b85a428278c..b85a428278c 100644 --- a/tests/run-make-fulldeps/stable-symbol-names/stable-symbol-names1.rs +++ b/tests/run-make/stable-symbol-names/stable-symbol-names1.rs diff --git a/tests/run-make-fulldeps/stable-symbol-names/stable-symbol-names2.rs b/tests/run-make/stable-symbol-names/stable-symbol-names2.rs index 33df9d6c689..33df9d6c689 100644 --- a/tests/run-make-fulldeps/stable-symbol-names/stable-symbol-names2.rs +++ b/tests/run-make/stable-symbol-names/stable-symbol-names2.rs diff --git a/tests/run-make-fulldeps/static-dylib-by-default/Makefile b/tests/run-make/static-dylib-by-default/Makefile index eedd0b32092..cdaab42d06c 100644 --- a/tests/run-make-fulldeps/static-dylib-by-default/Makefile +++ b/tests/run-make/static-dylib-by-default/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk TO_LINK := $(call DYLIB,bar) diff --git a/tests/run-make-fulldeps/static-dylib-by-default/bar.rs b/tests/run-make/static-dylib-by-default/bar.rs index 14421165e2d..14421165e2d 100644 --- a/tests/run-make-fulldeps/static-dylib-by-default/bar.rs +++ b/tests/run-make/static-dylib-by-default/bar.rs diff --git a/tests/run-make-fulldeps/static-dylib-by-default/foo.rs b/tests/run-make/static-dylib-by-default/foo.rs index 7ebec872055..7ebec872055 100644 --- a/tests/run-make-fulldeps/static-dylib-by-default/foo.rs +++ b/tests/run-make/static-dylib-by-default/foo.rs diff --git a/tests/run-make-fulldeps/static-dylib-by-default/main.c b/tests/run-make/static-dylib-by-default/main.c index 5f7f2c27cd3..5f7f2c27cd3 100644 --- a/tests/run-make-fulldeps/static-dylib-by-default/main.c +++ b/tests/run-make/static-dylib-by-default/main.c diff --git a/tests/run-make-fulldeps/static-extern-type/Makefile b/tests/run-make/static-extern-type/Makefile index e9aa95e63a0..77897154322 100644 --- a/tests/run-make-fulldeps/static-extern-type/Makefile +++ b/tests/run-make/static-extern-type/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk all: $(call NATIVE_STATICLIB,define-foo) diff --git a/tests/run-make-fulldeps/static-extern-type/define-foo.c b/tests/run-make/static-extern-type/define-foo.c index 39be5acfa11..39be5acfa11 100644 --- a/tests/run-make-fulldeps/static-extern-type/define-foo.c +++ b/tests/run-make/static-extern-type/define-foo.c diff --git a/tests/run-make-fulldeps/static-extern-type/use-foo.rs b/tests/run-make/static-extern-type/use-foo.rs index 932b5b5944b..932b5b5944b 100644 --- a/tests/run-make-fulldeps/static-extern-type/use-foo.rs +++ b/tests/run-make/static-extern-type/use-foo.rs diff --git a/tests/run-make/static-pie/Makefile b/tests/run-make/static-pie/Makefile index f4e6adf1b18..19c041d9428 100644 --- a/tests/run-make/static-pie/Makefile +++ b/tests/run-make/static-pie/Makefile @@ -1,4 +1,4 @@ -include ../../run-make-fulldeps/tools.mk +include ../tools.mk # only-x86_64 # only-linux diff --git a/tests/run-make-fulldeps/static-unwinding/Makefile b/tests/run-make/static-unwinding/Makefile index 9c755d4ab18..dec94fb16f4 100644 --- a/tests/run-make-fulldeps/static-unwinding/Makefile +++ b/tests/run-make/static-unwinding/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk all: diff --git a/tests/run-make-fulldeps/static-unwinding/lib.rs b/tests/run-make/static-unwinding/lib.rs index 3fb1117a110..3fb1117a110 100644 --- a/tests/run-make-fulldeps/static-unwinding/lib.rs +++ b/tests/run-make/static-unwinding/lib.rs diff --git a/tests/run-make-fulldeps/static-unwinding/main.rs b/tests/run-make/static-unwinding/main.rs index 0c66ea1aa07..0c66ea1aa07 100644 --- a/tests/run-make-fulldeps/static-unwinding/main.rs +++ b/tests/run-make/static-unwinding/main.rs diff --git a/tests/run-make-fulldeps/staticlib-blank-lib/Makefile b/tests/run-make/staticlib-blank-lib/Makefile index fcbf87758fb..fcbf87758fb 100644 --- a/tests/run-make-fulldeps/staticlib-blank-lib/Makefile +++ b/tests/run-make/staticlib-blank-lib/Makefile diff --git a/tests/run-make-fulldeps/staticlib-blank-lib/foo.rs b/tests/run-make/staticlib-blank-lib/foo.rs index bf48d069da9..bf48d069da9 100644 --- a/tests/run-make-fulldeps/staticlib-blank-lib/foo.rs +++ b/tests/run-make/staticlib-blank-lib/foo.rs diff --git a/tests/run-make-fulldeps/std-core-cycle/Makefile b/tests/run-make/std-core-cycle/Makefile index 4f252863767..5ed6be905df 100644 --- a/tests/run-make-fulldeps/std-core-cycle/Makefile +++ b/tests/run-make/std-core-cycle/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk ifeq ($(UNAME),Darwin) diff --git a/tests/run-make-fulldeps/std-core-cycle/bar.rs b/tests/run-make/std-core-cycle/bar.rs index 9f5e7c29bdd..9f5e7c29bdd 100644 --- a/tests/run-make-fulldeps/std-core-cycle/bar.rs +++ b/tests/run-make/std-core-cycle/bar.rs diff --git a/tests/run-make-fulldeps/std-core-cycle/foo.rs b/tests/run-make/std-core-cycle/foo.rs index 6aa6e1ac3c5..6aa6e1ac3c5 100644 --- a/tests/run-make-fulldeps/std-core-cycle/foo.rs +++ b/tests/run-make/std-core-cycle/foo.rs diff --git a/tests/run-make-fulldeps/stdin-non-utf8/Makefile b/tests/run-make/stdin-non-utf8/Makefile index 709d4cf1408..709d4cf1408 100644 --- a/tests/run-make-fulldeps/stdin-non-utf8/Makefile +++ b/tests/run-make/stdin-non-utf8/Makefile diff --git a/tests/run-make-fulldeps/stdin-non-utf8/non-utf8 b/tests/run-make/stdin-non-utf8/non-utf8 index bc87051a852..bc87051a852 100644 --- a/tests/run-make-fulldeps/stdin-non-utf8/non-utf8 +++ b/tests/run-make/stdin-non-utf8/non-utf8 diff --git a/tests/run-make-fulldeps/suspicious-library/Makefile b/tests/run-make/suspicious-library/Makefile index 2af9e85c228..3b5ab3c53a5 100644 --- a/tests/run-make-fulldeps/suspicious-library/Makefile +++ b/tests/run-make/suspicious-library/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk all: diff --git a/tests/run-make-fulldeps/suspicious-library/bar.rs b/tests/run-make/suspicious-library/bar.rs index 550c94cd0c6..550c94cd0c6 100644 --- a/tests/run-make-fulldeps/suspicious-library/bar.rs +++ b/tests/run-make/suspicious-library/bar.rs diff --git a/tests/run-make-fulldeps/suspicious-library/foo.rs b/tests/run-make/suspicious-library/foo.rs index a382d8f2c7f..a382d8f2c7f 100644 --- a/tests/run-make-fulldeps/suspicious-library/foo.rs +++ b/tests/run-make/suspicious-library/foo.rs diff --git a/tests/run-make-fulldeps/symbol-visibility/Makefile b/tests/run-make/symbol-visibility/Makefile index 17052ef4e63..9159af214ca 100644 --- a/tests/run-make-fulldeps/symbol-visibility/Makefile +++ b/tests/run-make/symbol-visibility/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk # ignore-windows-msvc diff --git a/tests/run-make-fulldeps/symbol-visibility/a_cdylib.rs b/tests/run-make/symbol-visibility/a_cdylib.rs index d4fbff85bfe..d4fbff85bfe 100644 --- a/tests/run-make-fulldeps/symbol-visibility/a_cdylib.rs +++ b/tests/run-make/symbol-visibility/a_cdylib.rs diff --git a/tests/run-make-fulldeps/symbol-visibility/a_proc_macro.rs b/tests/run-make/symbol-visibility/a_proc_macro.rs index 9fd1a8a6717..9fd1a8a6717 100644 --- a/tests/run-make-fulldeps/symbol-visibility/a_proc_macro.rs +++ b/tests/run-make/symbol-visibility/a_proc_macro.rs diff --git a/tests/run-make-fulldeps/symbol-visibility/a_rust_dylib.rs b/tests/run-make/symbol-visibility/a_rust_dylib.rs index a47df0ab7ee..a47df0ab7ee 100644 --- a/tests/run-make-fulldeps/symbol-visibility/a_rust_dylib.rs +++ b/tests/run-make/symbol-visibility/a_rust_dylib.rs diff --git a/tests/run-make-fulldeps/symbol-visibility/an_executable.rs b/tests/run-make/symbol-visibility/an_executable.rs index 3f5e125ad19..3f5e125ad19 100644 --- a/tests/run-make-fulldeps/symbol-visibility/an_executable.rs +++ b/tests/run-make/symbol-visibility/an_executable.rs diff --git a/tests/run-make-fulldeps/symbol-visibility/an_rlib.rs b/tests/run-make/symbol-visibility/an_rlib.rs index 3696422b11e..3696422b11e 100644 --- a/tests/run-make-fulldeps/symbol-visibility/an_rlib.rs +++ b/tests/run-make/symbol-visibility/an_rlib.rs diff --git a/tests/run-make-fulldeps/symbols-include-type-name/Makefile b/tests/run-make/symbols-include-type-name/Makefile index ac26a852e36..ac26a852e36 100644 --- a/tests/run-make-fulldeps/symbols-include-type-name/Makefile +++ b/tests/run-make/symbols-include-type-name/Makefile diff --git a/tests/run-make-fulldeps/symbols-include-type-name/lib.rs b/tests/run-make/symbols-include-type-name/lib.rs index 37d44591767..37d44591767 100644 --- a/tests/run-make-fulldeps/symbols-include-type-name/lib.rs +++ b/tests/run-make/symbols-include-type-name/lib.rs diff --git a/tests/run-make-fulldeps/symlinked-extern/Makefile b/tests/run-make/symlinked-extern/Makefile index 058f43e857a..28c764b84e8 100644 --- a/tests/run-make-fulldeps/symlinked-extern/Makefile +++ b/tests/run-make/symlinked-extern/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk # ignore-windows diff --git a/tests/run-make-fulldeps/symlinked-extern/bar.rs b/tests/run-make/symlinked-extern/bar.rs index cd9c959d5e6..cd9c959d5e6 100644 --- a/tests/run-make-fulldeps/symlinked-extern/bar.rs +++ b/tests/run-make/symlinked-extern/bar.rs diff --git a/tests/run-make-fulldeps/symlinked-extern/baz.rs b/tests/run-make/symlinked-extern/baz.rs index cd433a3ac7a..cd433a3ac7a 100644 --- a/tests/run-make-fulldeps/symlinked-extern/baz.rs +++ b/tests/run-make/symlinked-extern/baz.rs diff --git a/tests/run-make-fulldeps/symlinked-extern/foo.rs b/tests/run-make/symlinked-extern/foo.rs index c00700b8cf8..c00700b8cf8 100644 --- a/tests/run-make-fulldeps/symlinked-extern/foo.rs +++ b/tests/run-make/symlinked-extern/foo.rs diff --git a/tests/run-make-fulldeps/symlinked-libraries/Makefile b/tests/run-make/symlinked-libraries/Makefile index 576bf7e54be..fb0b6127e6f 100644 --- a/tests/run-make-fulldeps/symlinked-libraries/Makefile +++ b/tests/run-make/symlinked-libraries/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk # ignore-windows diff --git a/tests/run-make-fulldeps/symlinked-libraries/bar.rs b/tests/run-make/symlinked-libraries/bar.rs index fde0d746634..fde0d746634 100644 --- a/tests/run-make-fulldeps/symlinked-libraries/bar.rs +++ b/tests/run-make/symlinked-libraries/bar.rs diff --git a/tests/run-make-fulldeps/symlinked-libraries/foo.rs b/tests/run-make/symlinked-libraries/foo.rs index cde9e291b45..cde9e291b45 100644 --- a/tests/run-make-fulldeps/symlinked-libraries/foo.rs +++ b/tests/run-make/symlinked-libraries/foo.rs diff --git a/tests/run-make-fulldeps/symlinked-rlib/Makefile b/tests/run-make/symlinked-rlib/Makefile index 49d3f220a35..a8565f683c3 100644 --- a/tests/run-make-fulldeps/symlinked-rlib/Makefile +++ b/tests/run-make/symlinked-rlib/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk # ignore-windows diff --git a/tests/run-make-fulldeps/symlinked-rlib/bar.rs b/tests/run-make/symlinked-rlib/bar.rs index fde0d746634..fde0d746634 100644 --- a/tests/run-make-fulldeps/symlinked-rlib/bar.rs +++ b/tests/run-make/symlinked-rlib/bar.rs diff --git a/tests/run-make-fulldeps/symlinked-rlib/foo.rs b/tests/run-make/symlinked-rlib/foo.rs index c5c0bc606cd..c5c0bc606cd 100644 --- a/tests/run-make-fulldeps/symlinked-rlib/foo.rs +++ b/tests/run-make/symlinked-rlib/foo.rs diff --git a/tests/run-make-fulldeps/sysroot-crates-are-unstable/Makefile b/tests/run-make/sysroot-crates-are-unstable/Makefile index 1e267fb9576..1e267fb9576 100644 --- a/tests/run-make-fulldeps/sysroot-crates-are-unstable/Makefile +++ b/tests/run-make/sysroot-crates-are-unstable/Makefile diff --git a/tests/run-make-fulldeps/sysroot-crates-are-unstable/test.py b/tests/run-make/sysroot-crates-are-unstable/test.py index cb77eb34fef..cab4faa4e64 100644 --- a/tests/run-make-fulldeps/sysroot-crates-are-unstable/test.py +++ b/tests/run-make/sysroot-crates-are-unstable/test.py @@ -43,6 +43,7 @@ def check_lib(lib): return True print('verifying if {} is an unstable crate'.format(lib['name'])) stdout, stderr = exec_command([os.environ['RUSTC'], '-', '--crate-type', 'rlib', + '--target', os.environ['TARGET'], '--extern', '{}={}'.format(lib['name'], lib['path'])], to_input=('extern crate {};'.format(lib['name'])).encode('utf-8')) if not 'use of unstable library feature' in '{}{}'.format(stdout, stderr): diff --git a/tests/run-make-fulldeps/target-cpu-native/Makefile b/tests/run-make/target-cpu-native/Makefile index eb3ca1e13aa..eb3ca1e13aa 100644 --- a/tests/run-make-fulldeps/target-cpu-native/Makefile +++ b/tests/run-make/target-cpu-native/Makefile diff --git a/tests/run-make-fulldeps/target-cpu-native/foo.rs b/tests/run-make/target-cpu-native/foo.rs index f79c691f085..f79c691f085 100644 --- a/tests/run-make-fulldeps/target-cpu-native/foo.rs +++ b/tests/run-make/target-cpu-native/foo.rs diff --git a/tests/run-make-fulldeps/target-specs/Makefile b/tests/run-make/target-specs/Makefile index a33f5368e3c..a33f5368e3c 100644 --- a/tests/run-make-fulldeps/target-specs/Makefile +++ b/tests/run-make/target-specs/Makefile diff --git a/tests/run-make-fulldeps/target-specs/definitely-not-builtin-target.json b/tests/run-make/target-specs/definitely-not-builtin-target.json index b36fa993d97..b36fa993d97 100644 --- a/tests/run-make-fulldeps/target-specs/definitely-not-builtin-target.json +++ b/tests/run-make/target-specs/definitely-not-builtin-target.json diff --git a/tests/run-make-fulldeps/target-specs/foo.rs b/tests/run-make/target-specs/foo.rs index 22939e87912..22939e87912 100644 --- a/tests/run-make-fulldeps/target-specs/foo.rs +++ b/tests/run-make/target-specs/foo.rs diff --git a/tests/run-make-fulldeps/target-specs/mismatching-data-layout.json b/tests/run-make/target-specs/mismatching-data-layout.json index d12caaad14a..d12caaad14a 100644 --- a/tests/run-make-fulldeps/target-specs/mismatching-data-layout.json +++ b/tests/run-make/target-specs/mismatching-data-layout.json diff --git a/tests/run-make-fulldeps/target-specs/my-awesome-platform.json b/tests/run-make/target-specs/my-awesome-platform.json index 00de3de05f0..00de3de05f0 100644 --- a/tests/run-make-fulldeps/target-specs/my-awesome-platform.json +++ b/tests/run-make/target-specs/my-awesome-platform.json diff --git a/tests/run-make-fulldeps/target-specs/my-incomplete-platform.json b/tests/run-make/target-specs/my-incomplete-platform.json index ceaa25cdf2f..ceaa25cdf2f 100644 --- a/tests/run-make-fulldeps/target-specs/my-incomplete-platform.json +++ b/tests/run-make/target-specs/my-incomplete-platform.json diff --git a/tests/run-make-fulldeps/target-specs/my-invalid-platform.json b/tests/run-make/target-specs/my-invalid-platform.json index 3feac45b7d6..3feac45b7d6 100644 --- a/tests/run-make-fulldeps/target-specs/my-invalid-platform.json +++ b/tests/run-make/target-specs/my-invalid-platform.json diff --git a/tests/run-make-fulldeps/target-specs/my-x86_64-unknown-linux-gnu-platform.json b/tests/run-make/target-specs/my-x86_64-unknown-linux-gnu-platform.json index 6d5e964ed4f..6d5e964ed4f 100644 --- a/tests/run-make-fulldeps/target-specs/my-x86_64-unknown-linux-gnu-platform.json +++ b/tests/run-make/target-specs/my-x86_64-unknown-linux-gnu-platform.json diff --git a/tests/run-make-fulldeps/target-without-atomic-cas/Makefile b/tests/run-make/target-without-atomic-cas/Makefile index 451f03d66cd..451f03d66cd 100644 --- a/tests/run-make-fulldeps/target-without-atomic-cas/Makefile +++ b/tests/run-make/target-without-atomic-cas/Makefile diff --git a/tests/run-make/test-benches/Makefile b/tests/run-make/test-benches/Makefile index 8fc122515d0..0253a52637f 100644 --- a/tests/run-make/test-benches/Makefile +++ b/tests/run-make/test-benches/Makefile @@ -1,4 +1,4 @@ -include ../../run-make-fulldeps/tools.mk +include ../tools.mk # ignore-cross-compile diff --git a/tests/run-make-fulldeps/test-harness/Makefile b/tests/run-make/test-harness/Makefile index 1fe059b07d2..ee8c9294f91 100644 --- a/tests/run-make-fulldeps/test-harness/Makefile +++ b/tests/run-make/test-harness/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk all: diff --git a/tests/run-make-fulldeps/test-harness/test-ignore-cfg.rs b/tests/run-make/test-harness/test-ignore-cfg.rs index 31ef131f2ad..31ef131f2ad 100644 --- a/tests/run-make-fulldeps/test-harness/test-ignore-cfg.rs +++ b/tests/run-make/test-harness/test-ignore-cfg.rs diff --git a/tests/run-make/thumb-none-cortex-m/Makefile b/tests/run-make/thumb-none-cortex-m/Makefile index 3065141c08a..e941fc4a78e 100644 --- a/tests/run-make/thumb-none-cortex-m/Makefile +++ b/tests/run-make/thumb-none-cortex-m/Makefile @@ -1,4 +1,4 @@ -include ../../run-make-fulldeps/tools.mk +include ../tools.mk # How to run this # $ ./x.py clean diff --git a/tests/run-make/thumb-none-qemu/Makefile b/tests/run-make/thumb-none-qemu/Makefile index a1c2ba12cd0..eea6ca34992 100644 --- a/tests/run-make/thumb-none-qemu/Makefile +++ b/tests/run-make/thumb-none-qemu/Makefile @@ -1,4 +1,4 @@ -include ../../run-make-fulldeps/tools.mk +include ../tools.mk # only-thumb diff --git a/tests/run-make-fulldeps/tools.mk b/tests/run-make/tools.mk index ea06b620c4c..ea06b620c4c 100644 --- a/tests/run-make-fulldeps/tools.mk +++ b/tests/run-make/tools.mk diff --git a/tests/run-make/track-path-dep-info/Makefile b/tests/run-make/track-path-dep-info/Makefile index ee853943f8b..0d6c9b1d2f0 100644 --- a/tests/run-make/track-path-dep-info/Makefile +++ b/tests/run-make/track-path-dep-info/Makefile @@ -1,4 +1,4 @@ -include ../../run-make-fulldeps/tools.mk +include ../tools.mk # FIXME(eddyb) provide `HOST_RUSTC` and `TARGET_RUSTC` # instead of hardcoding them everywhere they're needed. diff --git a/tests/run-make/track-pgo-dep-info/Makefile b/tests/run-make/track-pgo-dep-info/Makefile index 60b59c04aa9..6c7f67d0f0a 100644 --- a/tests/run-make/track-pgo-dep-info/Makefile +++ b/tests/run-make/track-pgo-dep-info/Makefile @@ -1,7 +1,7 @@ # needs-profiler-support # ignore-windows-gnu --include ../../run-make-fulldeps/tools.mk +include ../tools.mk # FIXME(eddyb) provide `HOST_RUSTC` and `TARGET_RUSTC` # instead of hardcoding them everywhere they're needed. diff --git a/tests/run-make/translation/Makefile b/tests/run-make/translation/Makefile index 397fc542909..0acf64e5da7 100644 --- a/tests/run-make/translation/Makefile +++ b/tests/run-make/translation/Makefile @@ -1,4 +1,4 @@ -include ../../run-make-fulldeps/tools.mk +include ../tools.mk # This test uses `ln -s` rather than copying to save testing time, but its # usage doesn't work on Windows. diff --git a/tests/run-make-fulldeps/type-mismatch-same-crate-name/Makefile b/tests/run-make/type-mismatch-same-crate-name/Makefile index a2a2a41c7a5..a2a2a41c7a5 100644 --- a/tests/run-make-fulldeps/type-mismatch-same-crate-name/Makefile +++ b/tests/run-make/type-mismatch-same-crate-name/Makefile diff --git a/tests/run-make-fulldeps/type-mismatch-same-crate-name/crateA.rs b/tests/run-make/type-mismatch-same-crate-name/crateA.rs index 4871c8c2e9c..4871c8c2e9c 100644 --- a/tests/run-make-fulldeps/type-mismatch-same-crate-name/crateA.rs +++ b/tests/run-make/type-mismatch-same-crate-name/crateA.rs diff --git a/tests/run-make-fulldeps/type-mismatch-same-crate-name/crateB.rs b/tests/run-make/type-mismatch-same-crate-name/crateB.rs index 24fcc7cadc1..24fcc7cadc1 100644 --- a/tests/run-make-fulldeps/type-mismatch-same-crate-name/crateB.rs +++ b/tests/run-make/type-mismatch-same-crate-name/crateB.rs diff --git a/tests/run-make-fulldeps/type-mismatch-same-crate-name/crateC.rs b/tests/run-make/type-mismatch-same-crate-name/crateC.rs index 71b38a9f8ca..71b38a9f8ca 100644 --- a/tests/run-make-fulldeps/type-mismatch-same-crate-name/crateC.rs +++ b/tests/run-make/type-mismatch-same-crate-name/crateC.rs diff --git a/tests/run-make/unstable-flag-required/Makefile b/tests/run-make/unstable-flag-required/Makefile index d3a734fae77..17dd15b079c 100644 --- a/tests/run-make/unstable-flag-required/Makefile +++ b/tests/run-make/unstable-flag-required/Makefile @@ -1,4 +1,4 @@ -include ../../run-make-fulldeps/tools.mk +include ../tools.mk all: $(RUSTDOC) --output-format=json x.html 2>&1 | diff - output-format-json.stderr diff --git a/tests/run-make-fulldeps/use-extern-for-plugins/Makefile b/tests/run-make/use-extern-for-plugins/Makefile index 6ae53afad20..6ae53afad20 100644 --- a/tests/run-make-fulldeps/use-extern-for-plugins/Makefile +++ b/tests/run-make/use-extern-for-plugins/Makefile diff --git a/tests/run-make-fulldeps/use-extern-for-plugins/bar.rs b/tests/run-make/use-extern-for-plugins/bar.rs index 704d2120362..704d2120362 100644 --- a/tests/run-make-fulldeps/use-extern-for-plugins/bar.rs +++ b/tests/run-make/use-extern-for-plugins/bar.rs diff --git a/tests/run-make-fulldeps/use-extern-for-plugins/baz.rs b/tests/run-make/use-extern-for-plugins/baz.rs index 49a96a0c80b..49a96a0c80b 100644 --- a/tests/run-make-fulldeps/use-extern-for-plugins/baz.rs +++ b/tests/run-make/use-extern-for-plugins/baz.rs diff --git a/tests/run-make-fulldeps/use-extern-for-plugins/foo.rs b/tests/run-make/use-extern-for-plugins/foo.rs index dffdc079887..dffdc079887 100644 --- a/tests/run-make-fulldeps/use-extern-for-plugins/foo.rs +++ b/tests/run-make/use-extern-for-plugins/foo.rs diff --git a/tests/run-make-fulldeps/use-suggestions-rust-2018/Makefile b/tests/run-make/use-suggestions-rust-2018/Makefile index 37cd6283c0a..37cd6283c0a 100644 --- a/tests/run-make-fulldeps/use-suggestions-rust-2018/Makefile +++ b/tests/run-make/use-suggestions-rust-2018/Makefile diff --git a/tests/run-make-fulldeps/use-suggestions-rust-2018/ep-nested-lib.rs b/tests/run-make/use-suggestions-rust-2018/ep-nested-lib.rs index 62a0a9d8f1b..62a0a9d8f1b 100644 --- a/tests/run-make-fulldeps/use-suggestions-rust-2018/ep-nested-lib.rs +++ b/tests/run-make/use-suggestions-rust-2018/ep-nested-lib.rs diff --git a/tests/run-make-fulldeps/use-suggestions-rust-2018/use-suggestions.rs b/tests/run-make/use-suggestions-rust-2018/use-suggestions.rs index d262d6f9877..d262d6f9877 100644 --- a/tests/run-make-fulldeps/use-suggestions-rust-2018/use-suggestions.rs +++ b/tests/run-make/use-suggestions-rust-2018/use-suggestions.rs diff --git a/tests/run-make-fulldeps/used-cdylib-macos/Makefile b/tests/run-make/used-cdylib-macos/Makefile index 38a4c31c7b3..38a4c31c7b3 100644 --- a/tests/run-make-fulldeps/used-cdylib-macos/Makefile +++ b/tests/run-make/used-cdylib-macos/Makefile diff --git a/tests/run-make-fulldeps/used-cdylib-macos/dylib_used.rs b/tests/run-make/used-cdylib-macos/dylib_used.rs index 85f0ff92fe7..85f0ff92fe7 100644 --- a/tests/run-make-fulldeps/used-cdylib-macos/dylib_used.rs +++ b/tests/run-make/used-cdylib-macos/dylib_used.rs diff --git a/tests/run-make-fulldeps/used/Makefile b/tests/run-make/used/Makefile index e80eb9e4020..e80eb9e4020 100644 --- a/tests/run-make-fulldeps/used/Makefile +++ b/tests/run-make/used/Makefile diff --git a/tests/run-make-fulldeps/used/used.rs b/tests/run-make/used/used.rs index dca0a5e1167..dca0a5e1167 100644 --- a/tests/run-make-fulldeps/used/used.rs +++ b/tests/run-make/used/used.rs diff --git a/tests/run-make/valid-print-requests/Makefile b/tests/run-make/valid-print-requests/Makefile index c325e536e7c..99430e98d1c 100644 --- a/tests/run-make/valid-print-requests/Makefile +++ b/tests/run-make/valid-print-requests/Makefile @@ -1,4 +1,4 @@ -include ../../run-make-fulldeps/tools.mk +include ../tools.mk all: $(RUSTC) --print uwu 2>&1 | diff - valid-print-requests.stderr diff --git a/tests/run-make-fulldeps/version/Makefile b/tests/run-make/version/Makefile index 3a130545d69..3a130545d69 100644 --- a/tests/run-make-fulldeps/version/Makefile +++ b/tests/run-make/version/Makefile diff --git a/tests/run-make-fulldeps/volatile-intrinsics/Makefile b/tests/run-make/volatile-intrinsics/Makefile index 2a78c7b9cfe..5672a045873 100644 --- a/tests/run-make-fulldeps/volatile-intrinsics/Makefile +++ b/tests/run-make/volatile-intrinsics/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk all: diff --git a/tests/run-make-fulldeps/volatile-intrinsics/main.rs b/tests/run-make/volatile-intrinsics/main.rs index 4295d95f3f3..4295d95f3f3 100644 --- a/tests/run-make-fulldeps/volatile-intrinsics/main.rs +++ b/tests/run-make/volatile-intrinsics/main.rs diff --git a/tests/run-make/wasm-abi/Makefile b/tests/run-make/wasm-abi/Makefile index e713ca1876d..ed95464efef 100644 --- a/tests/run-make/wasm-abi/Makefile +++ b/tests/run-make/wasm-abi/Makefile @@ -1,4 +1,4 @@ -include ../../run-make-fulldeps/tools.mk +include ../tools.mk # only-wasm32-bare diff --git a/tests/run-make/wasm-custom-section/Makefile b/tests/run-make/wasm-custom-section/Makefile index 92b0802e30a..2f7d38c2736 100644 --- a/tests/run-make/wasm-custom-section/Makefile +++ b/tests/run-make/wasm-custom-section/Makefile @@ -1,4 +1,4 @@ -include ../../run-make-fulldeps/tools.mk +include ../tools.mk # only-wasm32-bare diff --git a/tests/run-make/wasm-custom-sections-opt/Makefile b/tests/run-make/wasm-custom-sections-opt/Makefile index e5b45d96310..a0d4378131b 100644 --- a/tests/run-make/wasm-custom-sections-opt/Makefile +++ b/tests/run-make/wasm-custom-sections-opt/Makefile @@ -1,4 +1,4 @@ -include ../../run-make-fulldeps/tools.mk +include ../tools.mk # only-wasm32-bare diff --git a/tests/run-make/wasm-export-all-symbols/Makefile b/tests/run-make/wasm-export-all-symbols/Makefile index 834f4d258db..86713bc80b8 100644 --- a/tests/run-make/wasm-export-all-symbols/Makefile +++ b/tests/run-make/wasm-export-all-symbols/Makefile @@ -1,4 +1,4 @@ -include ../../run-make-fulldeps/tools.mk +include ../tools.mk # only-wasm32-bare diff --git a/tests/run-make/wasm-import-module/Makefile b/tests/run-make/wasm-import-module/Makefile index 18cef16aac3..a0b4d920b3d 100644 --- a/tests/run-make/wasm-import-module/Makefile +++ b/tests/run-make/wasm-import-module/Makefile @@ -1,4 +1,4 @@ -include ../../run-make-fulldeps/tools.mk +include ../tools.mk # only-wasm32-bare diff --git a/tests/run-make/wasm-panic-small/Makefile b/tests/run-make/wasm-panic-small/Makefile index 2af9f71357e..16f54521855 100644 --- a/tests/run-make/wasm-panic-small/Makefile +++ b/tests/run-make/wasm-panic-small/Makefile @@ -1,4 +1,4 @@ -include ../../run-make-fulldeps/tools.mk +include ../tools.mk # only-wasm32-bare diff --git a/tests/run-make/wasm-spurious-import/Makefile b/tests/run-make/wasm-spurious-import/Makefile index 6f50e6e554e..ff9dfeac6d0 100644 --- a/tests/run-make/wasm-spurious-import/Makefile +++ b/tests/run-make/wasm-spurious-import/Makefile @@ -1,4 +1,4 @@ -include ../../run-make-fulldeps/tools.mk +include ../tools.mk # only-wasm32-bare diff --git a/tests/run-make/wasm-stringify-ints-small/Makefile b/tests/run-make/wasm-stringify-ints-small/Makefile index 2fa2c954d4a..f959dbd426b 100644 --- a/tests/run-make/wasm-stringify-ints-small/Makefile +++ b/tests/run-make/wasm-stringify-ints-small/Makefile @@ -1,4 +1,4 @@ -include ../../run-make-fulldeps/tools.mk +include ../tools.mk ifeq ($(TARGET),wasm32-unknown-unknown) all: diff --git a/tests/run-make/wasm-symbols-different-module/Makefile b/tests/run-make/wasm-symbols-different-module/Makefile index 9e657222dea..0f86914c7b1 100644 --- a/tests/run-make/wasm-symbols-different-module/Makefile +++ b/tests/run-make/wasm-symbols-different-module/Makefile @@ -1,4 +1,4 @@ -include ../../run-make-fulldeps/tools.mk +include ../tools.mk # only-wasm32-bare diff --git a/tests/run-make/wasm-symbols-not-exported/Makefile b/tests/run-make/wasm-symbols-not-exported/Makefile index 60b0dee001f..024ad779748 100644 --- a/tests/run-make/wasm-symbols-not-exported/Makefile +++ b/tests/run-make/wasm-symbols-not-exported/Makefile @@ -1,4 +1,4 @@ -include ../../run-make-fulldeps/tools.mk +include ../tools.mk # only-wasm32-bare diff --git a/tests/run-make/wasm-symbols-not-imported/Makefile b/tests/run-make/wasm-symbols-not-imported/Makefile index dc7618c19a7..38440a8b025 100644 --- a/tests/run-make/wasm-symbols-not-imported/Makefile +++ b/tests/run-make/wasm-symbols-not-imported/Makefile @@ -1,4 +1,4 @@ -include ../../run-make-fulldeps/tools.mk +include ../tools.mk # only-wasm32-bare diff --git a/tests/run-make-fulldeps/weird-output-filenames/Makefile b/tests/run-make/weird-output-filenames/Makefile index d3a34e3b46e..d3a34e3b46e 100644 --- a/tests/run-make-fulldeps/weird-output-filenames/Makefile +++ b/tests/run-make/weird-output-filenames/Makefile diff --git a/tests/run-make-fulldeps/weird-output-filenames/foo.rs b/tests/run-make/weird-output-filenames/foo.rs index f328e4d9d04..f328e4d9d04 100644 --- a/tests/run-make-fulldeps/weird-output-filenames/foo.rs +++ b/tests/run-make/weird-output-filenames/foo.rs diff --git a/tests/run-make-fulldeps/windows-binary-no-external-deps/Makefile b/tests/run-make/windows-binary-no-external-deps/Makefile index 8960020fed5..8960020fed5 100644 --- a/tests/run-make-fulldeps/windows-binary-no-external-deps/Makefile +++ b/tests/run-make/windows-binary-no-external-deps/Makefile diff --git a/tests/run-make-fulldeps/windows-binary-no-external-deps/hello.rs b/tests/run-make/windows-binary-no-external-deps/hello.rs index 47ad8c63411..47ad8c63411 100644 --- a/tests/run-make-fulldeps/windows-binary-no-external-deps/hello.rs +++ b/tests/run-make/windows-binary-no-external-deps/hello.rs diff --git a/tests/run-make-fulldeps/windows-spawn/Makefile b/tests/run-make/windows-spawn/Makefile index b6cdb169bab..b6cdb169bab 100644 --- a/tests/run-make-fulldeps/windows-spawn/Makefile +++ b/tests/run-make/windows-spawn/Makefile diff --git a/tests/run-make-fulldeps/windows-spawn/hello.rs b/tests/run-make/windows-spawn/hello.rs index 47ad8c63411..47ad8c63411 100644 --- a/tests/run-make-fulldeps/windows-spawn/hello.rs +++ b/tests/run-make/windows-spawn/hello.rs diff --git a/tests/run-make-fulldeps/windows-spawn/spawn.rs b/tests/run-make/windows-spawn/spawn.rs index c34da3d5fde..c34da3d5fde 100644 --- a/tests/run-make-fulldeps/windows-spawn/spawn.rs +++ b/tests/run-make/windows-spawn/spawn.rs diff --git a/tests/run-make-fulldeps/windows-subsystem/Makefile b/tests/run-make/windows-subsystem/Makefile index 78c4e2ac1e8..e3cf9181de4 100644 --- a/tests/run-make-fulldeps/windows-subsystem/Makefile +++ b/tests/run-make/windows-subsystem/Makefile @@ -1,3 +1,4 @@ +# ignore-cross-compile include ../tools.mk all: diff --git a/tests/run-make-fulldeps/windows-subsystem/console.rs b/tests/run-make/windows-subsystem/console.rs index 61a92eb6a9d..61a92eb6a9d 100644 --- a/tests/run-make-fulldeps/windows-subsystem/console.rs +++ b/tests/run-make/windows-subsystem/console.rs diff --git a/tests/run-make-fulldeps/windows-subsystem/windows.rs b/tests/run-make/windows-subsystem/windows.rs index 1138248f07d..1138248f07d 100644 --- a/tests/run-make-fulldeps/windows-subsystem/windows.rs +++ b/tests/run-make/windows-subsystem/windows.rs diff --git a/tests/run-make/x86_64-fortanix-unknown-sgx-lvi/Makefile b/tests/run-make/x86_64-fortanix-unknown-sgx-lvi/Makefile index 84dcd239351..3c88ec34f43 100644 --- a/tests/run-make/x86_64-fortanix-unknown-sgx-lvi/Makefile +++ b/tests/run-make/x86_64-fortanix-unknown-sgx-lvi/Makefile @@ -1,4 +1,4 @@ -include ../../run-make-fulldeps/tools.mk +include ../tools.mk #only-x86_64-fortanix-unknown-sgx diff --git a/tests/rustdoc-gui/go-to-collapsed-elem.goml b/tests/rustdoc-gui/go-to-collapsed-elem.goml new file mode 100644 index 00000000000..279048e37c1 --- /dev/null +++ b/tests/rustdoc-gui/go-to-collapsed-elem.goml @@ -0,0 +1,21 @@ +// This test ensures that when clicking on a link which leads to an item inside a collapsed element, +// the collapsed element will be expanded. +goto: "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html" +// We check that the implementors block is expanded. +assert-property: ("#implementations-list .implementors-toggle", {"open": "true"}) +// We now collapse the implementors block. +property: ("#implementations-list .implementors-toggle", {"open": "false"}) +// And now we click on the link to the method to ensure it'll expand the implementors block. +click: "//*[@class='sidebar']//a[@href='#method.must_use']" +assert-property: ("#implementations-list .implementors-toggle", {"open": "true"}) + +// Now we do the same through search result. +// First we reload the page without the anchor in the URL. +goto: "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html" +// Then we collapse the section again... +property: ("#implementations-list .implementors-toggle", {"open": "false"}) +// Then we run the search. +write: (".search-input", "foo::must_use") +wait-for: "//*[@id='search']//a[@href='../test_docs/struct.Foo.html#method.must_use']" +click: "//*[@id='search']//a[@href='../test_docs/struct.Foo.html#method.must_use']" +assert-property: ("#implementations-list .implementors-toggle", {"open": "true"}) diff --git a/tests/rustdoc-json/impls/local_for_local_primitive.rs b/tests/rustdoc-json/impls/local_for_local_primitive.rs index 38e7e2658df..8383dcc0482 100644 --- a/tests/rustdoc-json/impls/local_for_local_primitive.rs +++ b/tests/rustdoc-json/impls/local_for_local_primitive.rs @@ -1,5 +1,5 @@ #![feature(no_core)] -#![feature(rustdoc_internals)] +#![feature(rustc_attrs)] #![no_core] // @set Local = "$.index[*][?(@.name=='Local')].id" @@ -16,6 +16,6 @@ impl Local for bool {} // FIXME(#101695): Test bool's `impls` include "Local for bool" // @has "$.index[*][?(@.name=='bool')]" -#[doc(primitive = "bool")] +#[rustc_doc_primitive = "bool"] /// Boolean docs mod prim_bool {} diff --git a/tests/rustdoc-json/primitives/local_primitive.rs b/tests/rustdoc-json/primitives/local_primitive.rs index f27e6a2adec..0cf479faf29 100644 --- a/tests/rustdoc-json/primitives/local_primitive.rs +++ b/tests/rustdoc-json/primitives/local_primitive.rs @@ -8,7 +8,7 @@ //! Link to [i32][prim@i32] [i64][prim@i64] -#[doc(primitive = "i32")] +#[rustc_doc_primitive = "i32"] mod prim_i32 {} // @set local_i32 = "$.index[*][?(@.name=='i32')].id" diff --git a/tests/rustdoc-json/primitives/primitive_impls.rs b/tests/rustdoc-json/primitives/primitive_impls.rs index 1fc9374065f..85d179ee45f 100644 --- a/tests/rustdoc-json/primitives/primitive_impls.rs +++ b/tests/rustdoc-json/primitives/primitive_impls.rs @@ -25,7 +25,7 @@ pub trait Trait {} impl Trait for i32 {} /// i32 -#[doc(primitive = "i32")] +#[rustc_doc_primitive = "i32"] mod prim_i32 {} // @set i32 = "$.index[*][?(@.docs=='i32')].id" diff --git a/tests/rustdoc-json/primitives/primitive_overloading.rs b/tests/rustdoc-json/primitives/primitive_overloading.rs index 56b35cd14c0..81e0acdc6e9 100644 --- a/tests/rustdoc-json/primitives/primitive_overloading.rs +++ b/tests/rustdoc-json/primitives/primitive_overloading.rs @@ -2,7 +2,7 @@ // Regression test for <https://github.com/rust-lang/rust/issues/98006>. -#![feature(rustdoc_internals)] +#![feature(rustc_attrs)] #![feature(no_core)] #![no_core] @@ -10,7 +10,7 @@ // @has "$.index[*][?(@.name=='usize')]" // @has "$.index[*][?(@.name=='prim')]" -#[doc(primitive = "usize")] +#[rustc_doc_primitive = "usize"] /// This is the built-in type `usize`. mod prim { } diff --git a/tests/rustdoc-json/primitives/use_primitive.rs b/tests/rustdoc-json/primitives/use_primitive.rs index e2292737462..5180a804f07 100644 --- a/tests/rustdoc-json/primitives/use_primitive.rs +++ b/tests/rustdoc-json/primitives/use_primitive.rs @@ -1,8 +1,8 @@ // edition:2018 -#![feature(rustdoc_internals)] +#![feature(rustc_attrs)] -#[doc(primitive = "usize")] +#[rustc_doc_primitive = "usize"] mod usize {} // @set local_crate_id = "$.index[*][?(@.name=='use_primitive')].crate_id" diff --git a/tests/rustdoc-ui/c-help.stdout b/tests/rustdoc-ui/c-help.stdout index 75b2e2a2a43..0bd2d73efee 100644 --- a/tests/rustdoc-ui/c-help.stdout +++ b/tests/rustdoc-ui/c-help.stdout @@ -3,7 +3,7 @@ -C codegen-units=val -- divide crate into N units to optimize in parallel -C control-flow-guard=val -- use Windows Control Flow Guard (default: no) -C debug-assertions=val -- explicitly enable the `cfg(debug_assertions)` directive - -C debuginfo=val -- debug info emission level (0 = no debug info, 1 = line tables only, 2 = full debug info with variable and type information; default: 0) + -C debuginfo=val -- debug info emission level (0-2, none, line-directives-only, line-tables-only, limited, or full; default: 0) -C default-linker-libraries=val -- allow the linker to link its default libraries (default: no) -C embed-bitcode=val -- emit bitcode in rlibs (default: yes) -C extra-filename=val -- extra data to put in each output filename diff --git a/tests/rustdoc-ui/coverage/exotic.rs b/tests/rustdoc-ui/coverage/exotic.rs index 72b70d6980b..f45405fbf5d 100644 --- a/tests/rustdoc-ui/coverage/exotic.rs +++ b/tests/rustdoc-ui/coverage/exotic.rs @@ -2,12 +2,13 @@ // check-pass #![feature(rustdoc_internals)] +#![feature(rustc_attrs)] //! the features only used in std also have entries in the table, so make sure those get pulled out //! properly as well /// woo, check it out, we can write our own primitive docs lol -#[doc(primitive="unit")] +#[rustc_doc_primitive = "unit"] mod prim_unit {} /// keywords? sure, pile them on diff --git a/tests/rustdoc-ui/intra-doc/ambiguity.rs b/tests/rustdoc-ui/intra-doc/ambiguity.rs index 1f3dc722eff..0290b858204 100644 --- a/tests/rustdoc-ui/intra-doc/ambiguity.rs +++ b/tests/rustdoc-ui/intra-doc/ambiguity.rs @@ -35,6 +35,6 @@ pub mod foo { /// Ambiguous non-implied shortcut link [`foo::bar`]. //~ERROR `foo::bar` pub struct Docs {} -/// [true] //~ ERROR `true` is both a module and a builtin type +/// [true] //~ ERROR `true` is both a module and a primitive type /// [primitive@true] pub mod r#true {} diff --git a/tests/rustdoc-ui/intra-doc/ambiguity.stderr b/tests/rustdoc-ui/intra-doc/ambiguity.stderr index 7974796e47b..47853e0b589 100644 --- a/tests/rustdoc-ui/intra-doc/ambiguity.stderr +++ b/tests/rustdoc-ui/intra-doc/ambiguity.stderr @@ -1,4 +1,4 @@ -error: `true` is both a module and a builtin type +error: `true` is both a module and a primitive type --> $DIR/ambiguity.rs:38:6 | LL | /// [true] @@ -13,89 +13,89 @@ help: to link to the module, prefix with `mod@` | LL | /// [mod@true] | ++++ -help: to link to the builtin type, prefix with `prim@` +help: to link to the primitive type, prefix with `prim@` | LL | /// [prim@true] | +++++ -error: `ambiguous` is both a struct and a function +error: `ambiguous` is both a function and a struct --> $DIR/ambiguity.rs:27:7 | LL | /// [`ambiguous`] is ambiguous. | ^^^^^^^^^ ambiguous link | -help: to link to the struct, prefix with `struct@` - | -LL | /// [`struct@ambiguous`] is ambiguous. - | +++++++ help: to link to the function, add parentheses | LL | /// [`ambiguous()`] is ambiguous. | ++ +help: to link to the struct, prefix with `struct@` + | +LL | /// [`struct@ambiguous`] is ambiguous. + | +++++++ -error: `ambiguous` is both a struct and a function +error: `ambiguous` is both a function and a struct --> $DIR/ambiguity.rs:29:6 | LL | /// [ambiguous] is ambiguous. | ^^^^^^^^^ ambiguous link | -help: to link to the struct, prefix with `struct@` - | -LL | /// [struct@ambiguous] is ambiguous. - | +++++++ help: to link to the function, add parentheses | LL | /// [ambiguous()] is ambiguous. | ++ +help: to link to the struct, prefix with `struct@` + | +LL | /// [struct@ambiguous] is ambiguous. + | +++++++ -error: `multi_conflict` is a struct, a function, and a macro +error: `multi_conflict` is a function, a struct, and a macro --> $DIR/ambiguity.rs:31:7 | LL | /// [`multi_conflict`] is a three-way conflict. | ^^^^^^^^^^^^^^ ambiguous link | -help: to link to the struct, prefix with `struct@` - | -LL | /// [`struct@multi_conflict`] is a three-way conflict. - | +++++++ help: to link to the function, add parentheses | LL | /// [`multi_conflict()`] is a three-way conflict. | ++ +help: to link to the struct, prefix with `struct@` + | +LL | /// [`struct@multi_conflict`] is a three-way conflict. + | +++++++ help: to link to the macro, add an exclamation mark | LL | /// [`multi_conflict!`] is a three-way conflict. | + -error: `type_and_value` is both a module and a constant +error: `type_and_value` is both a constant and a module --> $DIR/ambiguity.rs:33:16 | LL | /// Ambiguous [type_and_value]. | ^^^^^^^^^^^^^^ ambiguous link | -help: to link to the module, prefix with `mod@` - | -LL | /// Ambiguous [mod@type_and_value]. - | ++++ help: to link to the constant, prefix with `const@` | LL | /// Ambiguous [const@type_and_value]. | ++++++ +help: to link to the module, prefix with `mod@` + | +LL | /// Ambiguous [mod@type_and_value]. + | ++++ -error: `foo::bar` is both an enum and a function +error: `foo::bar` is both a function and an enum --> $DIR/ambiguity.rs:35:43 | LL | /// Ambiguous non-implied shortcut link [`foo::bar`]. | ^^^^^^^^ ambiguous link | -help: to link to the enum, prefix with `enum@` - | -LL | /// Ambiguous non-implied shortcut link [`enum@foo::bar`]. - | +++++ help: to link to the function, add parentheses | LL | /// Ambiguous non-implied shortcut link [`foo::bar()`]. | ++ +help: to link to the enum, prefix with `enum@` + | +LL | /// Ambiguous non-implied shortcut link [`enum@foo::bar`]. + | +++++ error: aborting due to 6 previous errors diff --git a/tests/rustdoc-ui/intra-doc/errors.rs b/tests/rustdoc-ui/intra-doc/errors.rs index 95dd2b98e03..f37f49c24cc 100644 --- a/tests/rustdoc-ui/intra-doc/errors.rs +++ b/tests/rustdoc-ui/intra-doc/errors.rs @@ -54,11 +54,11 @@ /// [u8::not_found] //~^ ERROR unresolved link -//~| NOTE the builtin type `u8` has no associated item named `not_found` +//~| NOTE the primitive type `u8` has no associated item named `not_found` /// [std::primitive::u8::not_found] //~^ ERROR unresolved link -//~| NOTE the builtin type `u8` has no associated item named `not_found` +//~| NOTE the primitive type `u8` has no associated item named `not_found` /// [type@Vec::into_iter] //~^ ERROR unresolved link diff --git a/tests/rustdoc-ui/intra-doc/errors.stderr b/tests/rustdoc-ui/intra-doc/errors.stderr index 1b2416d7da7..a982bba0095 100644 --- a/tests/rustdoc-ui/intra-doc/errors.stderr +++ b/tests/rustdoc-ui/intra-doc/errors.stderr @@ -80,13 +80,13 @@ error: unresolved link to `u8::not_found` --> $DIR/errors.rs:55:6 | LL | /// [u8::not_found] - | ^^^^^^^^^^^^^ the builtin type `u8` has no associated item named `not_found` + | ^^^^^^^^^^^^^ the primitive type `u8` has no associated item named `not_found` error: unresolved link to `std::primitive::u8::not_found` --> $DIR/errors.rs:59:6 | LL | /// [std::primitive::u8::not_found] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the builtin type `u8` has no associated item named `not_found` + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the primitive type `u8` has no associated item named `not_found` error: unresolved link to `Vec::into_iter` --> $DIR/errors.rs:63:6 diff --git a/tests/rustdoc-ui/intra-doc/issue-108653-associated-items-10.rs b/tests/rustdoc-ui/intra-doc/issue-108653-associated-items-10.rs new file mode 100644 index 00000000000..464c5f0d543 --- /dev/null +++ b/tests/rustdoc-ui/intra-doc/issue-108653-associated-items-10.rs @@ -0,0 +1,22 @@ +// This test ensures that this warning doesn't show up: +// warning: `PartialEq` is both a trait and a derive macro +// --> tests/rustdoc-ui/intra-doc/issue-108653-associated-items-10.rs:1:7 +// | +// 1 | //! [`PartialEq`] +// | ^^^^^^^^^ ambiguous link +// | +// = note: `#[warn(rustdoc::broken_intra_doc_links)]` on by default +// help: to link to the trait, prefix with `trait@` +// | +// 1 | //! [`trait@PartialEq`] +// | ++++++ +// help: to link to the derive macro, prefix with `derive@` +// | +// 1 | //! [`derive@PartialEq`] +// | +++++++ + +// check-pass + +#![deny(rustdoc::broken_intra_doc_links)] + +//! [`PartialEq`] diff --git a/tests/rustdoc-ui/intra-doc/issue-108653-associated-items-2.rs b/tests/rustdoc-ui/intra-doc/issue-108653-associated-items-2.rs new file mode 100644 index 00000000000..cbe60f746b6 --- /dev/null +++ b/tests/rustdoc-ui/intra-doc/issue-108653-associated-items-2.rs @@ -0,0 +1,17 @@ +// This is ensuring that the UI output for associated items is as expected. + +#![deny(rustdoc::broken_intra_doc_links)] + +/// [`Trait::IDENT`] +//~^ ERROR both an associated constant and an associated type +pub trait Trait { + type IDENT; + const IDENT: usize; +} + +/// [`Trait2::IDENT`] +//~^ ERROR both an associated function and an associated type +pub trait Trait2 { + type IDENT; + fn IDENT() {} +} diff --git a/tests/rustdoc-ui/intra-doc/issue-108653-associated-items-2.stderr b/tests/rustdoc-ui/intra-doc/issue-108653-associated-items-2.stderr new file mode 100644 index 00000000000..952392548da --- /dev/null +++ b/tests/rustdoc-ui/intra-doc/issue-108653-associated-items-2.stderr @@ -0,0 +1,37 @@ +error: `Trait::IDENT` is both an associated constant and an associated type + --> $DIR/issue-108653-associated-items-2.rs:5:7 + | +LL | /// [`Trait::IDENT`] + | ^^^^^^^^^^^^ ambiguous link + | +note: the lint level is defined here + --> $DIR/issue-108653-associated-items-2.rs:3:9 + | +LL | #![deny(rustdoc::broken_intra_doc_links)] + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +help: to link to the associated constant, prefix with `const@` + | +LL | /// [`const@Trait::IDENT`] + | ++++++ +help: to link to the associated type, prefix with `type@` + | +LL | /// [`type@Trait::IDENT`] + | +++++ + +error: `Trait2::IDENT` is both an associated function and an associated type + --> $DIR/issue-108653-associated-items-2.rs:12:7 + | +LL | /// [`Trait2::IDENT`] + | ^^^^^^^^^^^^^ ambiguous link + | +help: to link to the associated function, add parentheses + | +LL | /// [`Trait2::IDENT()`] + | ++ +help: to link to the associated type, prefix with `type@` + | +LL | /// [`type@Trait2::IDENT`] + | +++++ + +error: aborting due to 2 previous errors + diff --git a/tests/rustdoc-ui/intra-doc/issue-108653-associated-items-3.rs b/tests/rustdoc-ui/intra-doc/issue-108653-associated-items-3.rs new file mode 100644 index 00000000000..7ffd0a40e7c --- /dev/null +++ b/tests/rustdoc-ui/intra-doc/issue-108653-associated-items-3.rs @@ -0,0 +1,16 @@ +// This is ensuring that the UI output for associated items works when it's being documented +// from another item. + +#![deny(rustdoc::broken_intra_doc_links)] +#![allow(nonstandard_style)] + +pub trait Trait { + type Trait; + const Trait: usize; +} + +/// [`Trait`] +//~^ ERROR both a constant and a trait +/// [`Trait::Trait`] +//~^ ERROR both an associated constant and an associated type +pub const Trait: usize = 0; diff --git a/tests/rustdoc-ui/intra-doc/issue-108653-associated-items-3.stderr b/tests/rustdoc-ui/intra-doc/issue-108653-associated-items-3.stderr new file mode 100644 index 00000000000..6401dacb57a --- /dev/null +++ b/tests/rustdoc-ui/intra-doc/issue-108653-associated-items-3.stderr @@ -0,0 +1,37 @@ +error: `Trait` is both a constant and a trait + --> $DIR/issue-108653-associated-items-3.rs:12:7 + | +LL | /// [`Trait`] + | ^^^^^ ambiguous link + | +note: the lint level is defined here + --> $DIR/issue-108653-associated-items-3.rs:4:9 + | +LL | #![deny(rustdoc::broken_intra_doc_links)] + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +help: to link to the constant, prefix with `const@` + | +LL | /// [`const@Trait`] + | ++++++ +help: to link to the trait, prefix with `trait@` + | +LL | /// [`trait@Trait`] + | ++++++ + +error: `Trait::Trait` is both an associated constant and an associated type + --> $DIR/issue-108653-associated-items-3.rs:14:7 + | +LL | /// [`Trait::Trait`] + | ^^^^^^^^^^^^ ambiguous link + | +help: to link to the associated constant, prefix with `const@` + | +LL | /// [`const@Trait::Trait`] + | ++++++ +help: to link to the associated type, prefix with `type@` + | +LL | /// [`type@Trait::Trait`] + | +++++ + +error: aborting due to 2 previous errors + diff --git a/tests/rustdoc-ui/intra-doc/issue-108653-associated-items-4.rs b/tests/rustdoc-ui/intra-doc/issue-108653-associated-items-4.rs new file mode 100644 index 00000000000..537d61364bb --- /dev/null +++ b/tests/rustdoc-ui/intra-doc/issue-108653-associated-items-4.rs @@ -0,0 +1,21 @@ +// This is ensuring that the UI output for associated items works when it's being documented +// from another item. + +#![deny(rustdoc::broken_intra_doc_links)] +#![allow(nonstandard_style)] + +pub trait Trait { + type Trait; +} + +/// [`Struct::Trait`] +//~^ ERROR both an associated constant and an associated type +pub struct Struct; + +impl Trait for Struct { + type Trait = Struct; +} + +impl Struct { + pub const Trait: usize = 0; +} diff --git a/tests/rustdoc-ui/intra-doc/issue-108653-associated-items-4.stderr b/tests/rustdoc-ui/intra-doc/issue-108653-associated-items-4.stderr new file mode 100644 index 00000000000..a8dc91204c0 --- /dev/null +++ b/tests/rustdoc-ui/intra-doc/issue-108653-associated-items-4.stderr @@ -0,0 +1,22 @@ +error: `Struct::Trait` is both an associated constant and an associated type + --> $DIR/issue-108653-associated-items-4.rs:11:7 + | +LL | /// [`Struct::Trait`] + | ^^^^^^^^^^^^^ ambiguous link + | +note: the lint level is defined here + --> $DIR/issue-108653-associated-items-4.rs:4:9 + | +LL | #![deny(rustdoc::broken_intra_doc_links)] + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +help: to link to the associated constant, prefix with `const@` + | +LL | /// [`const@Struct::Trait`] + | ++++++ +help: to link to the associated type, prefix with `type@` + | +LL | /// [`type@Struct::Trait`] + | +++++ + +error: aborting due to previous error + diff --git a/tests/rustdoc-ui/intra-doc/issue-108653-associated-items-5.rs b/tests/rustdoc-ui/intra-doc/issue-108653-associated-items-5.rs new file mode 100644 index 00000000000..bc28bc54421 --- /dev/null +++ b/tests/rustdoc-ui/intra-doc/issue-108653-associated-items-5.rs @@ -0,0 +1,8 @@ +#![deny(rustdoc::broken_intra_doc_links)] +#![allow(nonstandard_style)] + +/// [`u32::MAX`] +//~^ ERROR both an associated constant and a trait +pub mod u32 { + pub trait MAX {} +} diff --git a/tests/rustdoc-ui/intra-doc/issue-108653-associated-items-5.stderr b/tests/rustdoc-ui/intra-doc/issue-108653-associated-items-5.stderr new file mode 100644 index 00000000000..7430044ac3f --- /dev/null +++ b/tests/rustdoc-ui/intra-doc/issue-108653-associated-items-5.stderr @@ -0,0 +1,22 @@ +error: `u32::MAX` is both an associated constant and a trait + --> $DIR/issue-108653-associated-items-5.rs:4:7 + | +LL | /// [`u32::MAX`] + | ^^^^^^^^ ambiguous link + | +note: the lint level is defined here + --> $DIR/issue-108653-associated-items-5.rs:1:9 + | +LL | #![deny(rustdoc::broken_intra_doc_links)] + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +help: to link to the associated constant, prefix with `const@` + | +LL | /// [`const@u32::MAX`] + | ++++++ +help: to link to the trait, prefix with `trait@` + | +LL | /// [`trait@u32::MAX`] + | ++++++ + +error: aborting due to previous error + diff --git a/tests/rustdoc-ui/intra-doc/issue-108653-associated-items-6.rs b/tests/rustdoc-ui/intra-doc/issue-108653-associated-items-6.rs new file mode 100644 index 00000000000..8fde74d0ddb --- /dev/null +++ b/tests/rustdoc-ui/intra-doc/issue-108653-associated-items-6.rs @@ -0,0 +1,8 @@ +#![deny(rustdoc::broken_intra_doc_links)] +#![allow(nonstandard_style)] + +/// [`u32::MAX`] +//~^ ERROR both an associated constant and a primitive type +pub mod u32 { + pub use std::primitive::u32 as MAX; +} diff --git a/tests/rustdoc-ui/intra-doc/issue-108653-associated-items-6.stderr b/tests/rustdoc-ui/intra-doc/issue-108653-associated-items-6.stderr new file mode 100644 index 00000000000..fe2d8cafa30 --- /dev/null +++ b/tests/rustdoc-ui/intra-doc/issue-108653-associated-items-6.stderr @@ -0,0 +1,22 @@ +error: `u32::MAX` is both an associated constant and a primitive type + --> $DIR/issue-108653-associated-items-6.rs:4:7 + | +LL | /// [`u32::MAX`] + | ^^^^^^^^ ambiguous link + | +note: the lint level is defined here + --> $DIR/issue-108653-associated-items-6.rs:1:9 + | +LL | #![deny(rustdoc::broken_intra_doc_links)] + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +help: to link to the associated constant, prefix with `const@` + | +LL | /// [`const@u32::MAX`] + | ++++++ +help: to link to the primitive type, prefix with `prim@` + | +LL | /// [`prim@u32::MAX`] + | +++++ + +error: aborting due to previous error + diff --git a/tests/rustdoc-ui/intra-doc/issue-108653-associated-items-7.rs b/tests/rustdoc-ui/intra-doc/issue-108653-associated-items-7.rs new file mode 100644 index 00000000000..6e99f4365a7 --- /dev/null +++ b/tests/rustdoc-ui/intra-doc/issue-108653-associated-items-7.rs @@ -0,0 +1,12 @@ +#![deny(rustdoc::broken_intra_doc_links)] +#![allow(nonstandard_style)] + +pub trait Trait { + type MAX; +} + +/// [`u32::MAX`] +//~^ ERROR both an associated constant and an associated type +impl Trait for u32 { + type MAX = u32; +} diff --git a/tests/rustdoc-ui/intra-doc/issue-108653-associated-items-7.stderr b/tests/rustdoc-ui/intra-doc/issue-108653-associated-items-7.stderr new file mode 100644 index 00000000000..1d302ff42e8 --- /dev/null +++ b/tests/rustdoc-ui/intra-doc/issue-108653-associated-items-7.stderr @@ -0,0 +1,22 @@ +error: `u32::MAX` is both an associated constant and an associated type + --> $DIR/issue-108653-associated-items-7.rs:8:7 + | +LL | /// [`u32::MAX`] + | ^^^^^^^^ ambiguous link + | +note: the lint level is defined here + --> $DIR/issue-108653-associated-items-7.rs:1:9 + | +LL | #![deny(rustdoc::broken_intra_doc_links)] + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +help: to link to the associated constant, prefix with `const@` + | +LL | /// [`const@u32::MAX`] + | ++++++ +help: to link to the associated type, prefix with `type@` + | +LL | /// [`type@u32::MAX`] + | +++++ + +error: aborting due to previous error + diff --git a/tests/rustdoc-ui/intra-doc/issue-108653-associated-items-8.rs b/tests/rustdoc-ui/intra-doc/issue-108653-associated-items-8.rs new file mode 100644 index 00000000000..2f8ee1566bd --- /dev/null +++ b/tests/rustdoc-ui/intra-doc/issue-108653-associated-items-8.rs @@ -0,0 +1,12 @@ +#![deny(rustdoc::broken_intra_doc_links)] +#![allow(nonstandard_style)] + +/// [`u32::MAX`] +//~^ ERROR both an associated constant and an associated type +pub trait T { + type MAX; +} + +impl T for u32 { + type MAX = (); +} diff --git a/tests/rustdoc-ui/intra-doc/issue-108653-associated-items-8.stderr b/tests/rustdoc-ui/intra-doc/issue-108653-associated-items-8.stderr new file mode 100644 index 00000000000..efed0e2ce0f --- /dev/null +++ b/tests/rustdoc-ui/intra-doc/issue-108653-associated-items-8.stderr @@ -0,0 +1,22 @@ +error: `u32::MAX` is both an associated constant and an associated type + --> $DIR/issue-108653-associated-items-8.rs:4:7 + | +LL | /// [`u32::MAX`] + | ^^^^^^^^ ambiguous link + | +note: the lint level is defined here + --> $DIR/issue-108653-associated-items-8.rs:1:9 + | +LL | #![deny(rustdoc::broken_intra_doc_links)] + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +help: to link to the associated constant, prefix with `const@` + | +LL | /// [`const@u32::MAX`] + | ++++++ +help: to link to the associated type, prefix with `type@` + | +LL | /// [`type@u32::MAX`] + | +++++ + +error: aborting due to previous error + diff --git a/tests/rustdoc-ui/intra-doc/issue-108653-associated-items-9.rs b/tests/rustdoc-ui/intra-doc/issue-108653-associated-items-9.rs new file mode 100644 index 00000000000..3357ccf2460 --- /dev/null +++ b/tests/rustdoc-ui/intra-doc/issue-108653-associated-items-9.rs @@ -0,0 +1,11 @@ +// check-pass + +#![deny(warnings)] + +//! [usize::Item] + +pub trait Foo { type Item; } +pub trait Bar { type Item; } + +impl Foo for usize { type Item = u32; } +impl Bar for usize { type Item = i32; } diff --git a/tests/rustdoc-ui/intra-doc/issue-108653-associated-items.rs b/tests/rustdoc-ui/intra-doc/issue-108653-associated-items.rs new file mode 100644 index 00000000000..0a393e26d6a --- /dev/null +++ b/tests/rustdoc-ui/intra-doc/issue-108653-associated-items.rs @@ -0,0 +1,35 @@ +// This is ensuring that the UI output for associated items is as expected. + +#![deny(rustdoc::broken_intra_doc_links)] + +pub enum Enum { + IDENT, +} + +/// [`Self::IDENT`] +//~^ ERROR both an associated function and an associated type +pub trait Trait { + type IDENT; + fn IDENT(); +} + +/// [`Self::IDENT`] +//~^ ERROR both an associated function and a variant +impl Trait for Enum { + type IDENT = usize; + fn IDENT() {} +} + +/// [`Self::IDENT2`] +//~^ ERROR both an associated constant and an associated type +pub trait Trait2 { + type IDENT2; + const IDENT2: usize; +} + +/// [`Self::IDENT2`] +//~^ ERROR both an associated constant and an associated type +impl Trait2 for Enum { + type IDENT2 = usize; + const IDENT2: usize = 0; +} diff --git a/tests/rustdoc-ui/intra-doc/issue-108653-associated-items.stderr b/tests/rustdoc-ui/intra-doc/issue-108653-associated-items.stderr new file mode 100644 index 00000000000..084aefc97c8 --- /dev/null +++ b/tests/rustdoc-ui/intra-doc/issue-108653-associated-items.stderr @@ -0,0 +1,67 @@ +error: `Self::IDENT` is both an associated function and an associated type + --> $DIR/issue-108653-associated-items.rs:9:7 + | +LL | /// [`Self::IDENT`] + | ^^^^^^^^^^^ ambiguous link + | +note: the lint level is defined here + --> $DIR/issue-108653-associated-items.rs:3:9 + | +LL | #![deny(rustdoc::broken_intra_doc_links)] + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +help: to link to the associated function, add parentheses + | +LL | /// [`Self::IDENT()`] + | ++ +help: to link to the associated type, prefix with `type@` + | +LL | /// [`type@Self::IDENT`] + | +++++ + +error: `Self::IDENT2` is both an associated constant and an associated type + --> $DIR/issue-108653-associated-items.rs:23:7 + | +LL | /// [`Self::IDENT2`] + | ^^^^^^^^^^^^ ambiguous link + | +help: to link to the associated constant, prefix with `const@` + | +LL | /// [`const@Self::IDENT2`] + | ++++++ +help: to link to the associated type, prefix with `type@` + | +LL | /// [`type@Self::IDENT2`] + | +++++ + +error: `Self::IDENT2` is both an associated constant and an associated type + --> $DIR/issue-108653-associated-items.rs:30:7 + | +LL | /// [`Self::IDENT2`] + | ^^^^^^^^^^^^ ambiguous link + | +help: to link to the associated constant, prefix with `const@` + | +LL | /// [`const@Self::IDENT2`] + | ++++++ +help: to link to the associated type, prefix with `type@` + | +LL | /// [`type@Self::IDENT2`] + | +++++ + +error: `Self::IDENT` is both an associated function and a variant + --> $DIR/issue-108653-associated-items.rs:16:7 + | +LL | /// [`Self::IDENT`] + | ^^^^^^^^^^^ ambiguous link + | +help: to link to the associated function, add parentheses + | +LL | /// [`Self::IDENT()`] + | ++ +help: to link to the variant, prefix with `type@` + | +LL | /// [`type@Self::IDENT`] + | +++++ + +error: aborting due to 4 previous errors + diff --git a/tests/rustdoc-ui/intra-doc/non-path-primitives.stderr b/tests/rustdoc-ui/intra-doc/non-path-primitives.stderr index 8ec894d101b..6e08a923963 100644 --- a/tests/rustdoc-ui/intra-doc/non-path-primitives.stderr +++ b/tests/rustdoc-ui/intra-doc/non-path-primitives.stderr @@ -39,25 +39,25 @@ error: unresolved link to `unit::eq` --> $DIR/non-path-primitives.rs:28:6 | LL | //! [unit::eq] - | ^^^^^^^^ the builtin type `unit` has no associated item named `eq` + | ^^^^^^^^ the primitive type `unit` has no associated item named `eq` error: unresolved link to `tuple::eq` --> $DIR/non-path-primitives.rs:29:6 | LL | //! [tuple::eq] - | ^^^^^^^^^ the builtin type `tuple` has no associated item named `eq` + | ^^^^^^^^^ the primitive type `tuple` has no associated item named `eq` error: unresolved link to `fn::eq` --> $DIR/non-path-primitives.rs:30:6 | LL | //! [fn::eq] - | ^^^^^^ the builtin type `fn` has no associated item named `eq` + | ^^^^^^ the primitive type `fn` has no associated item named `eq` error: unresolved link to `reference::deref` --> $DIR/non-path-primitives.rs:34:6 | LL | //! [reference::deref] - | ^^^^^^^^^^^^^^^^ the builtin type `reference` has no associated item named `deref` + | ^^^^^^^^^^^^^^^^ the primitive type `reference` has no associated item named `deref` error: aborting due to 8 previous errors diff --git a/tests/rustdoc-ui/intra-doc/prim-conflict.rs b/tests/rustdoc-ui/intra-doc/prim-conflict.rs index 2c1a8b5357a..e87ce095cd4 100644 --- a/tests/rustdoc-ui/intra-doc/prim-conflict.rs +++ b/tests/rustdoc-ui/intra-doc/prim-conflict.rs @@ -2,16 +2,16 @@ //~^ NOTE lint level is defined /// [char] -//~^ ERROR both a module and a builtin type +//~^ ERROR both a module and a primitive type //~| NOTE ambiguous link //~| HELP to link to the module -//~| HELP to link to the builtin type +//~| HELP to link to the primitive type /// [type@char] -//~^ ERROR both a module and a builtin type +//~^ ERROR both a module and a primitive type //~| NOTE ambiguous link //~| HELP to link to the module -//~| HELP to link to the builtin type +//~| HELP to link to the primitive type /// [mod@char] // ok /// [prim@char] // ok @@ -26,5 +26,5 @@ pub mod inner { //! [struct@char] //~^ ERROR incompatible link //~| HELP prefix with `prim@` - //~| NOTE resolved to a builtin type + //~| NOTE resolved to a primitive type } diff --git a/tests/rustdoc-ui/intra-doc/prim-conflict.stderr b/tests/rustdoc-ui/intra-doc/prim-conflict.stderr index 6ef3b7eab3b..03ce8f15f0a 100644 --- a/tests/rustdoc-ui/intra-doc/prim-conflict.stderr +++ b/tests/rustdoc-ui/intra-doc/prim-conflict.stderr @@ -1,4 +1,4 @@ -error: `char` is both a module and a builtin type +error: `char` is both a module and a primitive type --> $DIR/prim-conflict.rs:4:6 | LL | /// [char] @@ -13,12 +13,12 @@ help: to link to the module, prefix with `mod@` | LL | /// [mod@char] | ++++ -help: to link to the builtin type, prefix with `prim@` +help: to link to the primitive type, prefix with `prim@` | LL | /// [prim@char] | +++++ -error: `char` is both a module and a builtin type +error: `char` is both a module and a primitive type --> $DIR/prim-conflict.rs:10:6 | LL | /// [type@char] @@ -28,7 +28,7 @@ help: to link to the module, prefix with `mod@` | LL | /// [mod@char] | ~~~~ -help: to link to the builtin type, prefix with `prim@` +help: to link to the primitive type, prefix with `prim@` | LL | /// [prim@char] | ~~~~~ @@ -48,9 +48,9 @@ error: incompatible link kind for `char` --> $DIR/prim-conflict.rs:26:10 | LL | //! [struct@char] - | ^^^^^^^^^^^ this link resolved to a builtin type, which is not a struct + | ^^^^^^^^^^^ this link resolved to a primitive type, which is not a struct | -help: to link to the builtin type, prefix with `prim@` +help: to link to the primitive type, prefix with `prim@` | LL | //! [prim@char] | ~~~~~ diff --git a/tests/rustdoc/async-fn-opaque-item.rs b/tests/rustdoc/async-fn-opaque-item.rs new file mode 100644 index 00000000000..a73e84f3fdc --- /dev/null +++ b/tests/rustdoc/async-fn-opaque-item.rs @@ -0,0 +1,15 @@ +// compile-flags: --document-private-items --crate-type=lib +// edition: 2021 + +// Issue 109931 -- test against accidentally documenting the `impl Future` +// that comes from an async fn desugaring. + +// Check that we don't document an unnamed opaque type +// @!has async_fn_opaque_item/opaque..html + +// Checking there is only a "Functions" header and no "Opaque types". +// @has async_fn_opaque_item/index.html +// @count - '//*[@class="small-section-header"]' 1 +// @has - '//*[@class="small-section-header"]' 'Functions' + +pub async fn test() {} diff --git a/tests/rustdoc/auto-impl-primitive.rs b/tests/rustdoc/auto-impl-primitive.rs index 172333d445d..a6db93dbc33 100644 --- a/tests/rustdoc/auto-impl-primitive.rs +++ b/tests/rustdoc/auto-impl-primitive.rs @@ -1,10 +1,10 @@ -#![feature(rustdoc_internals)] +#![feature(rustc_attrs)] #![crate_name = "foo"] pub use std::fs::File; // @has 'foo/primitive.i16.html' '//h2[@id="synthetic-implementations"]' 'Auto Trait Implementation' -#[doc(primitive = "i16")] +#[rustc_doc_primitive = "i16"] /// I love poneys! mod prim {} diff --git a/tests/rustdoc/auxiliary/issue-15318.rs b/tests/rustdoc/auxiliary/issue-15318.rs index 695fa58ef1d..a2f426c6352 100644 --- a/tests/rustdoc/auxiliary/issue-15318.rs +++ b/tests/rustdoc/auxiliary/issue-15318.rs @@ -2,6 +2,7 @@ // compile-flags: -Cmetadata=aux #![crate_type = "rlib"] #![doc(html_root_url = "http://example.com/")] +#![feature(rustc_attrs)] #![feature(lang_items)] #![no_std] @@ -12,5 +13,5 @@ fn foo() {} fn bar(_: &core::panic::PanicInfo) -> ! { loop {} } /// dox -#[doc(primitive = "pointer")] +#[rustc_doc_primitive = "pointer"] pub mod ptr {} diff --git a/tests/rustdoc/auxiliary/primitive-doc.rs b/tests/rustdoc/auxiliary/primitive-doc.rs index e8da852a57e..d1785e42391 100644 --- a/tests/rustdoc/auxiliary/primitive-doc.rs +++ b/tests/rustdoc/auxiliary/primitive-doc.rs @@ -1,9 +1,10 @@ // compile-flags: --crate-type lib --edition 2018 +#![feature(rustc_attrs)] #![feature(no_core)] #![no_core] -#[doc(primitive = "usize")] +#[rustc_doc_primitive = "usize"] /// This is the built-in type `usize`. mod usize { } diff --git a/tests/rustdoc/check-source-code-urls-to-def.rs b/tests/rustdoc/check-source-code-urls-to-def.rs index 5959f9c7c59..41b9d41fa44 100644 --- a/tests/rustdoc/check-source-code-urls-to-def.rs +++ b/tests/rustdoc/check-source-code-urls-to-def.rs @@ -2,7 +2,7 @@ // aux-build:source_code.rs // build-aux-docs -#![feature(rustdoc_internals)] +#![feature(rustc_attrs)] #![crate_name = "foo"] @@ -65,5 +65,5 @@ pub fn foo4() { } // @has - '//pre[@class="rust"]//a[@href="../../foo/primitive.bool.html"]' 'bool' -#[doc(primitive = "bool")] +#[rustc_doc_primitive = "bool"] mod whatever {} diff --git a/tests/rustdoc/generic-associated-types/issue-109488.rs b/tests/rustdoc/generic-associated-types/issue-109488.rs new file mode 100644 index 00000000000..99ae8a6c36c --- /dev/null +++ b/tests/rustdoc/generic-associated-types/issue-109488.rs @@ -0,0 +1,18 @@ +// Make sure that we escape the arguments of the GAT projection even if we fail to compute +// the href of the corresponding trait (in this case it is private). +// Further, test that we also linkify the GAT arguments. + +// @has 'issue_109488/type.A.html' +// @has - '//pre[@class="rust item-decl"]' '<S as Tr>::P<Option<i32>>' +// @has - '//pre[@class="rust item-decl"]//a[@class="enum"]/@href' '{{channel}}/core/option/enum.Option.html' +pub type A = <S as Tr>::P<Option<i32>>; + +/*private*/ trait Tr { + type P<T>; +} + +pub struct S; + +impl Tr for S { + type P<T> = (); +} diff --git a/tests/rustdoc/intra-doc/auxiliary/my-core.rs b/tests/rustdoc/intra-doc/auxiliary/my-core.rs index e22feb03ae6..c050929db96 100644 --- a/tests/rustdoc/intra-doc/auxiliary/my-core.rs +++ b/tests/rustdoc/intra-doc/auxiliary/my-core.rs @@ -3,7 +3,7 @@ #![rustc_coherence_is_core] #![crate_type="rlib"] -#[doc(primitive = "char")] +#[rustc_doc_primitive = "char"] /// Some char docs mod char {} diff --git a/tests/rustdoc/intra-doc/no-doc-primitive.rs b/tests/rustdoc/intra-doc/no-doc-primitive.rs index e5eba1d8d48..711ac09ba9a 100644 --- a/tests/rustdoc/intra-doc/no-doc-primitive.rs +++ b/tests/rustdoc/intra-doc/no-doc-primitive.rs @@ -1,4 +1,4 @@ -// Crate tree without a `doc(primitive)` module for primitive type linked to by a doc link. +// Crate tree without a `rustc_doc_primitive` module for primitive type linked to by a doc link. #![deny(rustdoc::broken_intra_doc_links)] #![feature(no_core, lang_items, rustc_attrs)] diff --git a/tests/rustdoc/intra-doc/prim-methods-local.rs b/tests/rustdoc/intra-doc/prim-methods-local.rs index 79d8df04515..6de4ec1802f 100644 --- a/tests/rustdoc/intra-doc/prim-methods-local.rs +++ b/tests/rustdoc/intra-doc/prim-methods-local.rs @@ -10,7 +10,7 @@ //! A [prim@`char`] and its [`char::len_utf8`]. -#[doc(primitive = "char")] +#[rustc_doc_primitive = "char"] mod char {} impl char { diff --git a/tests/rustdoc/intra-doc/prim-self.rs b/tests/rustdoc/intra-doc/prim-self.rs index c7ce71b15f3..d13858a53cf 100644 --- a/tests/rustdoc/intra-doc/prim-self.rs +++ b/tests/rustdoc/intra-doc/prim-self.rs @@ -25,7 +25,7 @@ impl usize { pub type ME = usize; } -#[doc(primitive = "usize")] +#[rustc_doc_primitive = "usize"] /// This has some docs. mod usize {} diff --git a/tests/rustdoc/issue-15318-3.rs b/tests/rustdoc/issue-15318-3.rs index 2fadc26b006..2dab8f94883 100644 --- a/tests/rustdoc/issue-15318-3.rs +++ b/tests/rustdoc/issue-15318-3.rs @@ -1,7 +1,7 @@ -#![feature(rustdoc_internals)] +#![feature(rustc_attrs)] // @has issue_15318_3/primitive.pointer.html /// dox -#[doc(primitive = "pointer")] +#[rustc_doc_primitive = "pointer"] pub mod ptr {} diff --git a/tests/rustdoc/issue-23511.rs b/tests/rustdoc/issue-23511.rs index 7576ebb0305..21d02842431 100644 --- a/tests/rustdoc/issue-23511.rs +++ b/tests/rustdoc/issue-23511.rs @@ -3,7 +3,7 @@ #![no_std] pub mod str { - #![doc(primitive = "str")] + #![rustc_doc_primitive = "str"] impl str { // @hasraw search-index.js foo diff --git a/tests/rustdoc/notable-trait/doc-notable_trait-mut_t_is_not_an_iterator.rs b/tests/rustdoc/notable-trait/doc-notable_trait-mut_t_is_not_an_iterator.rs index bfce46cf444..5af5f7616b5 100644 --- a/tests/rustdoc/notable-trait/doc-notable_trait-mut_t_is_not_an_iterator.rs +++ b/tests/rustdoc/notable-trait/doc-notable_trait-mut_t_is_not_an_iterator.rs @@ -6,10 +6,10 @@ //! //! [#80737]: https://github.com/rust-lang/rust/issues/80737 -#![feature(rustdoc_internals)] +#![feature(rustc_attrs)] #![no_std] -#[doc(primitive = "reference")] +#[rustc_doc_primitive = "reference"] /// Some useless docs, wouhou! /// /// We need to put this in here, because notable traits diff --git a/tests/rustdoc/notable-trait/doc-notable_trait-mut_t_is_not_ref_t.rs b/tests/rustdoc/notable-trait/doc-notable_trait-mut_t_is_not_ref_t.rs index b359dcea0ff..6c980aaa2b1 100644 --- a/tests/rustdoc/notable-trait/doc-notable_trait-mut_t_is_not_ref_t.rs +++ b/tests/rustdoc/notable-trait/doc-notable_trait-mut_t_is_not_ref_t.rs @@ -5,9 +5,9 @@ //! //! [#78160]: https://github.com/rust-lang/rust/issues/78160 -#![feature(rustdoc_internals)] +#![feature(rustc_attrs)] -#[doc(primitive = "reference")] +#[rustc_doc_primitive = "reference"] /// Some useless docs, wouhou! /// /// We need to put this in here, because notable traits diff --git a/tests/rustdoc/primitive-reference.rs b/tests/rustdoc/primitive-reference.rs index 10efbefd2b1..6f034224df5 100644 --- a/tests/rustdoc/primitive-reference.rs +++ b/tests/rustdoc/primitive-reference.rs @@ -1,6 +1,6 @@ #![crate_name = "foo"] -#![feature(rustdoc_internals)] +#![feature(rustc_attrs)] // @has foo/index.html // @has - '//h2[@id="primitives"]' 'Primitive Types' @@ -16,7 +16,7 @@ // @count - '//*[@class="impl"]' 1 // @has - '//*[@id="impl-Foo%3C%26A%3E-for-%26B"]/*[@class="code-header"]' \ // 'impl<A, B> Foo<&A> for &B' -#[doc(primitive = "reference")] +#[rustc_doc_primitive = "reference"] /// this is a test! mod reference {} diff --git a/tests/rustdoc/primitive-slice-auto-trait.rs b/tests/rustdoc/primitive-slice-auto-trait.rs index 77922414676..ba15a73ca1d 100644 --- a/tests/rustdoc/primitive-slice-auto-trait.rs +++ b/tests/rustdoc/primitive-slice-auto-trait.rs @@ -1,7 +1,7 @@ // compile-flags: --crate-type lib --edition 2018 #![crate_name = "foo"] -#![feature(rustdoc_internals)] +#![feature(rustc_attrs)] // @has foo/primitive.slice.html '//a[@class="primitive"]' 'slice' // @has - '//h1' 'Primitive Type slice' @@ -9,6 +9,6 @@ // @has - '//h2[@id="synthetic-implementations"]' 'Auto Trait Implementations' // @has - '//div[@id="synthetic-implementations-list"]//h3' 'impl<T> Send for [T]where T: Send' // @has - '//div[@id="synthetic-implementations-list"]//h3' 'impl<T> Sync for [T]where T: Sync' -#[doc(primitive = "slice")] +#[rustc_doc_primitive = "slice"] /// this is a test! mod slice_prim {} diff --git a/tests/rustdoc/primitive-tuple-auto-trait.rs b/tests/rustdoc/primitive-tuple-auto-trait.rs index 4344d24f986..2b407b586a3 100644 --- a/tests/rustdoc/primitive-tuple-auto-trait.rs +++ b/tests/rustdoc/primitive-tuple-auto-trait.rs @@ -1,7 +1,7 @@ // compile-flags: --crate-type lib --edition 2018 #![crate_name = "foo"] -#![feature(rustdoc_internals)] +#![feature(rustc_attrs)] // @has foo/primitive.tuple.html '//a[@class="primitive"]' 'tuple' // @has - '//h1' 'Primitive Type tuple' @@ -9,7 +9,7 @@ // @has - '//h2[@id="synthetic-implementations"]' 'Auto Trait Implementations' // @has - '//div[@id="synthetic-implementations-list"]//h3' 'Send' // @has - '//div[@id="synthetic-implementations-list"]//h3' 'Sync' -#[doc(primitive = "tuple")] +#[rustc_doc_primitive = "tuple"] /// this is a test! /// // Hardcoded anchor to header written in library/core/src/primitive_docs.rs diff --git a/tests/rustdoc/primitive-unit-auto-trait.rs b/tests/rustdoc/primitive-unit-auto-trait.rs index 61850e2462d..5a56f1fd83b 100644 --- a/tests/rustdoc/primitive-unit-auto-trait.rs +++ b/tests/rustdoc/primitive-unit-auto-trait.rs @@ -1,7 +1,7 @@ // compile-flags: --crate-type lib --edition 2018 #![crate_name = "foo"] -#![feature(rustdoc_internals)] +#![feature(rustc_attrs)] // @has foo/primitive.unit.html '//a[@class="primitive"]' 'unit' // @has - '//h1' 'Primitive Type unit' @@ -9,6 +9,6 @@ // @has - '//h2[@id="synthetic-implementations"]' 'Auto Trait Implementations' // @has - '//div[@id="synthetic-implementations-list"]//h3' 'impl Send for ()' // @has - '//div[@id="synthetic-implementations-list"]//h3' 'impl Sync for ()' -#[doc(primitive = "unit")] +#[rustc_doc_primitive = "unit"] /// this is a test! mod unit_prim {} diff --git a/tests/rustdoc/primitive/primitive-generic-impl.rs b/tests/rustdoc/primitive/primitive-generic-impl.rs index 7b336b39810..2da8ae6ff38 100644 --- a/tests/rustdoc/primitive/primitive-generic-impl.rs +++ b/tests/rustdoc/primitive/primitive-generic-impl.rs @@ -1,8 +1,8 @@ -#![feature(rustdoc_internals)] +#![feature(rustc_attrs)] #![crate_name = "foo"] // @has foo/primitive.i32.html '//*[@id="impl-ToString-for-i32"]//h3[@class="code-header"]' 'impl<T> ToString for T' -#[doc(primitive = "i32")] +#[rustc_doc_primitive = "i32"] /// Some useless docs, wouhou! mod i32 {} diff --git a/tests/rustdoc/primitive/primitive.rs b/tests/rustdoc/primitive/primitive.rs index 516c7c0c6fe..32af2636c18 100644 --- a/tests/rustdoc/primitive/primitive.rs +++ b/tests/rustdoc/primitive/primitive.rs @@ -1,6 +1,6 @@ #![crate_name = "foo"] -#![feature(rustdoc_internals)] +#![feature(rustc_attrs)] // @has foo/index.html '//h2[@id="primitives"]' 'Primitive Types' // @has foo/index.html '//a[@href="primitive.i32.html"]' 'i32' @@ -11,11 +11,11 @@ // @has foo/primitive.i32.html '//section[@id="main-content"]//div[@class="docblock"]//p' 'this is a test!' // @has foo/index.html '//a/@href' '../foo/index.html' // @!has foo/index.html '//span' '🔒' -#[doc(primitive = "i32")] +#[rustc_doc_primitive = "i32"] /// this is a test! mod i32{} // @has foo/primitive.bool.html '//section[@id="main-content"]//div[@class="docblock"]//p' 'hello' -#[doc(primitive = "bool")] +#[rustc_doc_primitive = "bool"] /// hello mod bool {} diff --git a/tests/rustdoc/sidebar-all-page.rs b/tests/rustdoc/sidebar-all-page.rs index e74b981de64..45a6ba8ed2e 100644 --- a/tests/rustdoc/sidebar-all-page.rs +++ b/tests/rustdoc/sidebar-all-page.rs @@ -1,6 +1,6 @@ #![crate_name = "foo"] -#![feature(rustdoc_internals)] +#![feature(rustc_attrs)] // @has 'foo/all.html' // @has - '//*[@class="sidebar-elems"]//li' 'Structs' @@ -31,5 +31,5 @@ macro_rules! foo { pub type Type = u8; pub const FOO: u8 = 0; pub static BAR: u8 = 0; -#[doc(primitive = "u8")] +#[rustc_doc_primitive = "u8"] mod u8 {} diff --git a/tests/rustdoc/tab_title.rs b/tests/rustdoc/tab_title.rs index 0cc4f147e1c..8d781b40e46 100644 --- a/tests/rustdoc/tab_title.rs +++ b/tests/rustdoc/tab_title.rs @@ -1,4 +1,5 @@ #![crate_name = "foo"] +#![feature(rustc_attrs)] #![feature(rustdoc_internals)] // tests for the html <title> element @@ -39,6 +40,6 @@ mod continue_keyword {} // @has foo/primitive.u8.html '//head/title' 'u8 - Rust' // @!has - '//head/title' 'foo' -#[doc(primitive = "u8")] +#[rustc_doc_primitive = "u8"] /// `u8` docs mod u8 {} diff --git a/tests/rustdoc/titles.rs b/tests/rustdoc/titles.rs index 69e8b856b0a..e1feb1cd64f 100644 --- a/tests/rustdoc/titles.rs +++ b/tests/rustdoc/titles.rs @@ -1,5 +1,5 @@ #![crate_name = "foo"] -#![feature(rustdoc_internals)] +#![feature(rustc_attrs)] // @matches 'foo/index.html' '//h1' 'Crate foo' // @matches 'foo/index.html' '//h2[@class="location"]' 'Crate foo' @@ -41,7 +41,7 @@ macro_rules! foo_macro { } // @matches 'foo/primitive.bool.html' '//h1' 'Primitive Type bool' -#[doc(primitive = "bool")] +#[rustc_doc_primitive = "bool"] mod bool {} // @matches 'foo/static.FOO_STATIC.html' '//h1' 'Static foo::FOO_STATIC' diff --git a/tests/ui-fulldeps/fluent-messages/test.rs b/tests/ui-fulldeps/fluent-messages/test.rs index 1ee7227a8e9..6ba13387b04 100644 --- a/tests/ui-fulldeps/fluent-messages/test.rs +++ b/tests/ui-fulldeps/fluent-messages/test.rs @@ -1,4 +1,4 @@ -// normalize-stderr-test "note.*" -> "note: os-specific message" +// normalize-stderr-test "could not open Fluent resource:.*" -> "could not open Fluent resource: os-specific message" #![feature(rustc_private)] #![crate_type = "lib"] diff --git a/tests/ui-fulldeps/fluent-messages/test.stderr b/tests/ui-fulldeps/fluent-messages/test.stderr index 8a6a4a91cc2..2affe621c11 100644 --- a/tests/ui-fulldeps/fluent-messages/test.stderr +++ b/tests/ui-fulldeps/fluent-messages/test.stderr @@ -1,18 +1,14 @@ -error: could not open Fluent resource +error: could not open Fluent resource: os-specific message --> $DIR/test.rs:24:24 | LL | fluent_messages! { "/definitely_does_not_exist.ftl" } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = note: os-specific message -error: could not open Fluent resource +error: could not open Fluent resource: os-specific message --> $DIR/test.rs:31:24 | LL | fluent_messages! { "../definitely_does_not_exist.ftl" } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = note: os-specific message error: could not parse Fluent resource --> $DIR/test.rs:38:24 @@ -89,7 +85,7 @@ error: invalid escape `\n` in Fluent resource LL | fluent_messages! { "./invalid-escape.ftl" } | ^^^^^^^^^^^^^^^^^^^^^^ | - = note: os-specific message + = note: Fluent does not interpret these escape sequences (<https://projectfluent.org/fluent/guide/special.html>) error: invalid escape `\"` in Fluent resource --> $DIR/test.rs:99:24 @@ -97,7 +93,7 @@ error: invalid escape `\"` in Fluent resource LL | fluent_messages! { "./invalid-escape.ftl" } | ^^^^^^^^^^^^^^^^^^^^^^ | - = note: os-specific message + = note: Fluent does not interpret these escape sequences (<https://projectfluent.org/fluent/guide/special.html>) error: invalid escape `\'` in Fluent resource --> $DIR/test.rs:99:24 @@ -105,7 +101,7 @@ error: invalid escape `\'` in Fluent resource LL | fluent_messages! { "./invalid-escape.ftl" } | ^^^^^^^^^^^^^^^^^^^^^^ | - = note: os-specific message + = note: Fluent does not interpret these escape sequences (<https://projectfluent.org/fluent/guide/special.html>) error: aborting due to 13 previous errors diff --git a/tests/ui/associated-type-bounds/return-type-notation/bad-inputs-and-output.rs b/tests/ui/associated-type-bounds/return-type-notation/bad-inputs-and-output.rs new file mode 100644 index 00000000000..2f9a1d1c76e --- /dev/null +++ b/tests/ui/associated-type-bounds/return-type-notation/bad-inputs-and-output.rs @@ -0,0 +1,22 @@ +// edition: 2021 + +#![feature(return_type_notation, async_fn_in_trait)] +//~^ WARN the feature `return_type_notation` is incomplete +//~| WARN the feature `async_fn_in_trait` is incomplete + +trait Trait { + async fn method() {} +} + +fn foo<T: Trait<method(i32): Send>>() {} +//~^ ERROR argument types not allowed with return type notation +//~| ERROR associated type bounds are unstable + +fn bar<T: Trait<method(..) -> (): Send>>() {} +//~^ ERROR return type not allowed with return type notation + +fn baz<T: Trait<method(): Send>>() {} +//~^ ERROR return type notation arguments must be elided with `..` +//~| ERROR associated type bounds are unstable + +fn main() {} diff --git a/tests/ui/associated-type-bounds/return-type-notation/bad-inputs-and-output.stderr b/tests/ui/associated-type-bounds/return-type-notation/bad-inputs-and-output.stderr new file mode 100644 index 00000000000..b354a6805d6 --- /dev/null +++ b/tests/ui/associated-type-bounds/return-type-notation/bad-inputs-and-output.stderr @@ -0,0 +1,56 @@ +error: return type not allowed with return type notation + --> $DIR/bad-inputs-and-output.rs:15:28 + | +LL | fn bar<T: Trait<method(..) -> (): Send>>() {} + | ^^^^^ help: remove the return type + +error[E0658]: associated type bounds are unstable + --> $DIR/bad-inputs-and-output.rs:11:17 + | +LL | fn foo<T: Trait<method(i32): Send>>() {} + | ^^^^^^^^^^^^^^^^^ + | + = note: see issue #52662 <https://github.com/rust-lang/rust/issues/52662> for more information + = help: add `#![feature(associated_type_bounds)]` to the crate attributes to enable + +error[E0658]: associated type bounds are unstable + --> $DIR/bad-inputs-and-output.rs:18:17 + | +LL | fn baz<T: Trait<method(): Send>>() {} + | ^^^^^^^^^^^^^^ + | + = note: see issue #52662 <https://github.com/rust-lang/rust/issues/52662> for more information + = help: add `#![feature(associated_type_bounds)]` to the crate attributes to enable + +warning: the feature `return_type_notation` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/bad-inputs-and-output.rs:3:12 + | +LL | #![feature(return_type_notation, async_fn_in_trait)] + | ^^^^^^^^^^^^^^^^^^^^ + | + = note: see issue #109417 <https://github.com/rust-lang/rust/issues/109417> for more information + = note: `#[warn(incomplete_features)]` on by default + +warning: the feature `async_fn_in_trait` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/bad-inputs-and-output.rs:3:34 + | +LL | #![feature(return_type_notation, async_fn_in_trait)] + | ^^^^^^^^^^^^^^^^^ + | + = note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information + +error: argument types not allowed with return type notation + --> $DIR/bad-inputs-and-output.rs:11:23 + | +LL | fn foo<T: Trait<method(i32): Send>>() {} + | ^^^^^ help: remove the input types: `(..)` + +error: return type notation arguments must be elided with `..` + --> $DIR/bad-inputs-and-output.rs:18:23 + | +LL | fn baz<T: Trait<method(): Send>>() {} + | ^^ help: add `..`: `(..)` + +error: aborting due to 5 previous errors; 2 warnings emitted + +For more information about this error, try `rustc --explain E0658`. diff --git a/tests/ui/associated-type-bounds/return-type-notation/basic.rs b/tests/ui/associated-type-bounds/return-type-notation/basic.rs new file mode 100644 index 00000000000..75d1dc745d1 --- /dev/null +++ b/tests/ui/associated-type-bounds/return-type-notation/basic.rs @@ -0,0 +1,28 @@ +// revisions: with without +// edition: 2021 +//[with] check-pass + +#![feature(return_type_notation, async_fn_in_trait)] +//~^ WARN the feature `return_type_notation` is incomplete +//~| WARN the feature `async_fn_in_trait` is incomplete + +trait Foo { + async fn method() -> Result<(), ()>; +} + +async fn foo<T: Foo>() -> Result<(), ()> { + T::method().await?; + Ok(()) +} + +fn is_send(_: impl Send) {} + +fn test< + #[cfg(with)] T: Foo<method(..): Send>, + #[cfg(without)] T: Foo, +>() { + is_send(foo::<T>()); + //[without]~^ ERROR future cannot be sent between threads safely +} + +fn main() {} diff --git a/tests/ui/associated-type-bounds/return-type-notation/basic.with.stderr b/tests/ui/associated-type-bounds/return-type-notation/basic.with.stderr new file mode 100644 index 00000000000..722c774cb33 --- /dev/null +++ b/tests/ui/associated-type-bounds/return-type-notation/basic.with.stderr @@ -0,0 +1,19 @@ +warning: the feature `return_type_notation` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/basic.rs:5:12 + | +LL | #![feature(return_type_notation, async_fn_in_trait)] + | ^^^^^^^^^^^^^^^^^^^^ + | + = note: see issue #109417 <https://github.com/rust-lang/rust/issues/109417> for more information + = note: `#[warn(incomplete_features)]` on by default + +warning: the feature `async_fn_in_trait` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/basic.rs:5:34 + | +LL | #![feature(return_type_notation, async_fn_in_trait)] + | ^^^^^^^^^^^^^^^^^ + | + = note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information + +warning: 2 warnings emitted + diff --git a/tests/ui/associated-type-bounds/return-type-notation/basic.without.stderr b/tests/ui/associated-type-bounds/return-type-notation/basic.without.stderr new file mode 100644 index 00000000000..1645d8c2650 --- /dev/null +++ b/tests/ui/associated-type-bounds/return-type-notation/basic.without.stderr @@ -0,0 +1,37 @@ +warning: the feature `return_type_notation` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/basic.rs:5:12 + | +LL | #![feature(return_type_notation, async_fn_in_trait)] + | ^^^^^^^^^^^^^^^^^^^^ + | + = note: see issue #109417 <https://github.com/rust-lang/rust/issues/109417> for more information + = note: `#[warn(incomplete_features)]` on by default + +warning: the feature `async_fn_in_trait` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/basic.rs:5:34 + | +LL | #![feature(return_type_notation, async_fn_in_trait)] + | ^^^^^^^^^^^^^^^^^ + | + = note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information + +error: future cannot be sent between threads safely + --> $DIR/basic.rs:24:13 + | +LL | is_send(foo::<T>()); + | ^^^^^^^^^^ future returned by `foo` is not `Send` + | + = help: within `impl Future<Output = Result<(), ()>>`, the trait `Send` is not implemented for `impl Future<Output = Result<(), ()>>` +note: future is not `Send` as it awaits another future which is not `Send` + --> $DIR/basic.rs:14:5 + | +LL | T::method().await?; + | ^^^^^^^^^^^ await occurs here on type `impl Future<Output = Result<(), ()>>`, which is not `Send` +note: required by a bound in `is_send` + --> $DIR/basic.rs:18:20 + | +LL | fn is_send(_: impl Send) {} + | ^^^^ required by this bound in `is_send` + +error: aborting due to previous error; 2 warnings emitted + diff --git a/tests/ui/associated-type-bounds/return-type-notation/equality.rs b/tests/ui/associated-type-bounds/return-type-notation/equality.rs new file mode 100644 index 00000000000..c8fc980974e --- /dev/null +++ b/tests/ui/associated-type-bounds/return-type-notation/equality.rs @@ -0,0 +1,16 @@ +// edition: 2021 + +#![feature(return_type_notation, async_fn_in_trait)] +//~^ WARN the feature `return_type_notation` is incomplete +//~| WARN the feature `async_fn_in_trait` is incomplete + +use std::future::Future; + +trait Trait { + async fn method() {} +} + +fn test<T: Trait<method(..) = Box<dyn Future<Output = ()>>>>() {} +//~^ ERROR return type notation is not allowed to use type equality + +fn main() {} diff --git a/tests/ui/associated-type-bounds/return-type-notation/equality.stderr b/tests/ui/associated-type-bounds/return-type-notation/equality.stderr new file mode 100644 index 00000000000..cd50ff38694 --- /dev/null +++ b/tests/ui/associated-type-bounds/return-type-notation/equality.stderr @@ -0,0 +1,25 @@ +warning: the feature `return_type_notation` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/equality.rs:3:12 + | +LL | #![feature(return_type_notation, async_fn_in_trait)] + | ^^^^^^^^^^^^^^^^^^^^ + | + = note: see issue #109417 <https://github.com/rust-lang/rust/issues/109417> for more information + = note: `#[warn(incomplete_features)]` on by default + +warning: the feature `async_fn_in_trait` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/equality.rs:3:34 + | +LL | #![feature(return_type_notation, async_fn_in_trait)] + | ^^^^^^^^^^^^^^^^^ + | + = note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information + +error: return type notation is not allowed to use type equality + --> $DIR/equality.rs:13:18 + | +LL | fn test<T: Trait<method(..) = Box<dyn Future<Output = ()>>>>() {} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: aborting due to previous error; 2 warnings emitted + diff --git a/tests/ui/associated-type-bounds/return-type-notation/missing.rs b/tests/ui/associated-type-bounds/return-type-notation/missing.rs new file mode 100644 index 00000000000..1263cae4477 --- /dev/null +++ b/tests/ui/associated-type-bounds/return-type-notation/missing.rs @@ -0,0 +1,14 @@ +// edition: 2021 + +#![feature(return_type_notation, async_fn_in_trait)] +//~^ WARN the feature `return_type_notation` is incomplete +//~| WARN the feature `async_fn_in_trait` is incomplete + +trait Trait { + async fn method() {} +} + +fn bar<T: Trait<methid(..): Send>>() {} +//~^ ERROR cannot find associated function `methid` in trait `Trait` + +fn main() {} diff --git a/tests/ui/associated-type-bounds/return-type-notation/missing.stderr b/tests/ui/associated-type-bounds/return-type-notation/missing.stderr new file mode 100644 index 00000000000..93111b5c36b --- /dev/null +++ b/tests/ui/associated-type-bounds/return-type-notation/missing.stderr @@ -0,0 +1,25 @@ +warning: the feature `return_type_notation` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/missing.rs:3:12 + | +LL | #![feature(return_type_notation, async_fn_in_trait)] + | ^^^^^^^^^^^^^^^^^^^^ + | + = note: see issue #109417 <https://github.com/rust-lang/rust/issues/109417> for more information + = note: `#[warn(incomplete_features)]` on by default + +warning: the feature `async_fn_in_trait` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/missing.rs:3:34 + | +LL | #![feature(return_type_notation, async_fn_in_trait)] + | ^^^^^^^^^^^^^^^^^ + | + = note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information + +error: cannot find associated function `methid` in trait `Trait` + --> $DIR/missing.rs:11:17 + | +LL | fn bar<T: Trait<methid(..): Send>>() {} + | ^^^^^^^^^^^^^^^^ + +error: aborting due to previous error; 2 warnings emitted + diff --git a/tests/ui/associated-type-bounds/return-type-notation/non-rpitit.rs b/tests/ui/associated-type-bounds/return-type-notation/non-rpitit.rs new file mode 100644 index 00000000000..d283c6eab37 --- /dev/null +++ b/tests/ui/associated-type-bounds/return-type-notation/non-rpitit.rs @@ -0,0 +1,11 @@ +#![feature(return_type_notation)] +//~^ WARN the feature `return_type_notation` is incomplete + +trait Trait { + fn method() {} +} + +fn test<T: Trait<method(..): Send>>() {} +//~^ ERROR return type notation used on function that is not `async` and does not return `impl Trait` + +fn main() {} diff --git a/tests/ui/associated-type-bounds/return-type-notation/non-rpitit.stderr b/tests/ui/associated-type-bounds/return-type-notation/non-rpitit.stderr new file mode 100644 index 00000000000..38c498bc2fb --- /dev/null +++ b/tests/ui/associated-type-bounds/return-type-notation/non-rpitit.stderr @@ -0,0 +1,22 @@ +warning: the feature `return_type_notation` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/non-rpitit.rs:1:12 + | +LL | #![feature(return_type_notation)] + | ^^^^^^^^^^^^^^^^^^^^ + | + = note: see issue #109417 <https://github.com/rust-lang/rust/issues/109417> for more information + = note: `#[warn(incomplete_features)]` on by default + +error: return type notation used on function that is not `async` and does not return `impl Trait` + --> $DIR/non-rpitit.rs:8:18 + | +LL | fn method() {} + | ----------- this function must be `async` or return `impl Trait` +... +LL | fn test<T: Trait<method(..): Send>>() {} + | ^^^^^^^^^^^^^^^^ + | + = note: function returns `()`, which is not compatible with associated type return bounds + +error: aborting due to previous error; 1 warning emitted + diff --git a/tests/ui/associated-type-bounds/return-type-notation/unpretty-parenthesized.rs b/tests/ui/associated-type-bounds/return-type-notation/unpretty-parenthesized.rs new file mode 100644 index 00000000000..9129f37e0c6 --- /dev/null +++ b/tests/ui/associated-type-bounds/return-type-notation/unpretty-parenthesized.rs @@ -0,0 +1,11 @@ +// edition: 2021 +// compile-flags: -Zunpretty=expanded + +trait Trait { + async fn method() {} +} + +fn foo<T: Trait<method(i32): Send>>() {} +//~^ ERROR associated type bounds are unstable + +fn main() {} diff --git a/tests/ui/associated-type-bounds/return-type-notation/unpretty-parenthesized.stderr b/tests/ui/associated-type-bounds/return-type-notation/unpretty-parenthesized.stderr new file mode 100644 index 00000000000..77e015b4160 --- /dev/null +++ b/tests/ui/associated-type-bounds/return-type-notation/unpretty-parenthesized.stderr @@ -0,0 +1,12 @@ +error[E0658]: associated type bounds are unstable + --> $DIR/unpretty-parenthesized.rs:8:17 + | +LL | fn foo<T: Trait<method(i32): Send>>() {} + | ^^^^^^^^^^^^^^^^^ + | + = note: see issue #52662 <https://github.com/rust-lang/rust/issues/52662> for more information + = help: add `#![feature(associated_type_bounds)]` to the crate attributes to enable + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0658`. diff --git a/tests/ui/associated-type-bounds/return-type-notation/unpretty-parenthesized.stdout b/tests/ui/associated-type-bounds/return-type-notation/unpretty-parenthesized.stdout new file mode 100644 index 00000000000..b3dea8f6eca --- /dev/null +++ b/tests/ui/associated-type-bounds/return-type-notation/unpretty-parenthesized.stdout @@ -0,0 +1,15 @@ +#![feature(prelude_import)] +#[prelude_import] +use std::prelude::rust_2021::*; +#[macro_use] +extern crate std; +// edition: 2021 +// compile-flags: -Zunpretty=expanded + +trait Trait { + async fn method() {} +} + +fn foo<T: Trait<method(i32) : Send>>() {} + +fn main() {} diff --git a/tests/ui/async-await/missed-capture-issue-107414.rs b/tests/ui/async-await/missed-capture-issue-107414.rs new file mode 100644 index 00000000000..0ab4f5ade98 --- /dev/null +++ b/tests/ui/async-await/missed-capture-issue-107414.rs @@ -0,0 +1,24 @@ +// check-pass +// edition:2018 + +fn main() {} + +struct StructA {} +struct StructB {} + +impl StructA { + fn fn_taking_struct_b(&self, struct_b: &StructB) -> bool { + true + } +} + +async fn get_struct_a_async() -> StructA { + StructA {} +} + +async fn ice() { + match Some(StructB {}) { + Some(struct_b) if get_struct_a_async().await.fn_taking_struct_b(&struct_b) => {} + _ => {} + } +} diff --git a/tests/ui/autoref-autoderef/issue-38940.rs b/tests/ui/autoref-autoderef/issue-38940.rs deleted file mode 100644 index d2f1c6e3271..00000000000 --- a/tests/ui/autoref-autoderef/issue-38940.rs +++ /dev/null @@ -1,52 +0,0 @@ -// issue-38940: error printed twice for deref recursion limit exceeded -// Test that the recursion limit can be changed. In this case, we have -// deeply nested types that will fail the `Send` check by overflow -// when the recursion limit is set very low. -// compile-flags: -Zdeduplicate-diagnostics=yes - -#![allow(dead_code)] -#![recursion_limit = "10"] -macro_rules! link { - ($outer:ident, $inner:ident) => { - struct $outer($inner); - impl $outer { - fn new() -> $outer { - $outer($inner::new()) - } - } - impl std::ops::Deref for $outer { - type Target = $inner; - fn deref(&self) -> &$inner { - &self.0 - } - } - }; -} - -struct Bottom; - -impl Bottom { - fn new() -> Bottom { - Bottom - } -} - -link!(Top, A); -link!(A, B); -link!(B, C); -link!(C, D); -link!(D, E); -link!(E, F); -link!(F, G); -link!(G, H); -link!(H, I); -link!(I, J); -link!(J, K); -link!(K, Bottom); - -fn main() { - let t = Top::new(); - let x: &Bottom = &t; - //~^ ERROR mismatched types - //~| ERROR reached the recursion limit while auto-dereferencing `J` -} diff --git a/tests/ui/autoref-autoderef/issue-38940.stderr b/tests/ui/autoref-autoderef/issue-38940.stderr deleted file mode 100644 index 8e98bfcd90f..00000000000 --- a/tests/ui/autoref-autoderef/issue-38940.stderr +++ /dev/null @@ -1,23 +0,0 @@ -error[E0055]: reached the recursion limit while auto-dereferencing `J` - --> $DIR/issue-38940.rs:49:22 - | -LL | let x: &Bottom = &t; - | ^^ deref recursion limit reached - | - = help: consider increasing the recursion limit by adding a `#![recursion_limit = "20"]` attribute to your crate (`issue_38940`) - -error[E0308]: mismatched types - --> $DIR/issue-38940.rs:49:22 - | -LL | let x: &Bottom = &t; - | ------- ^^ expected `&Bottom`, found `&Top` - | | - | expected due to this - | - = note: expected reference `&Bottom` - found reference `&Top` - -error: aborting due to 2 previous errors - -Some errors have detailed explanations: E0055, E0308. -For more information about an error, try `rustc --explain E0055`. diff --git a/tests/ui/closures/2229_closure_analysis/array_subslice.rs b/tests/ui/closures/2229_closure_analysis/array_subslice.rs new file mode 100644 index 00000000000..5f244ea8936 --- /dev/null +++ b/tests/ui/closures/2229_closure_analysis/array_subslice.rs @@ -0,0 +1,13 @@ +// regression test for #109298 +// edition: 2021 + +pub fn subslice_array(x: [u8; 3]) { + let f = || { + let [_x @ ..] = x; + let [ref y, ref mut z @ ..] = x; //~ ERROR cannot borrow `x[..]` as mutable + }; + + f(); //~ ERROR cannot borrow `f` as mutable +} + +fn main() {} diff --git a/tests/ui/closures/2229_closure_analysis/array_subslice.stderr b/tests/ui/closures/2229_closure_analysis/array_subslice.stderr new file mode 100644 index 00000000000..888c60d5e91 --- /dev/null +++ b/tests/ui/closures/2229_closure_analysis/array_subslice.stderr @@ -0,0 +1,26 @@ +error[E0596]: cannot borrow `x[..]` as mutable, as `x` is not declared as mutable + --> $DIR/array_subslice.rs:7:21 + | +LL | pub fn subslice_array(x: [u8; 3]) { + | - help: consider changing this to be mutable: `mut x` +... +LL | let [ref y, ref mut z @ ..] = x; + | ^^^^^^^^^ cannot borrow as mutable + +error[E0596]: cannot borrow `f` as mutable, as it is not declared as mutable + --> $DIR/array_subslice.rs:10:5 + | +LL | let [ref y, ref mut z @ ..] = x; + | - calling `f` requires mutable binding due to mutable borrow of `x` +... +LL | f(); + | ^ cannot borrow as mutable + | +help: consider changing this to be mutable + | +LL | let mut f = || { + | +++ + +error: aborting due to 2 previous errors + +For more information about this error, try `rustc --explain E0596`. diff --git a/tests/ui/did_you_mean/recursion_limit_deref.stderr b/tests/ui/did_you_mean/recursion_limit_deref.stderr index 32fb628c470..b0c493faf1e 100644 --- a/tests/ui/did_you_mean/recursion_limit_deref.stderr +++ b/tests/ui/did_you_mean/recursion_limit_deref.stderr @@ -1,3 +1,7 @@ +error: reached the recursion limit finding the struct tail for `Bottom` + | + = help: consider increasing the recursion limit by adding a `#![recursion_limit = "20"]` + error[E0055]: reached the recursion limit while auto-dereferencing `J` --> $DIR/recursion_limit_deref.rs:51:22 | @@ -17,7 +21,7 @@ LL | let x: &Bottom = &t; = note: expected reference `&Bottom` found reference `&Top` -error: aborting due to 2 previous errors +error: aborting due to 3 previous errors Some errors have detailed explanations: E0055, E0308. For more information about an error, try `rustc --explain E0055`. diff --git a/tests/ui/feature-gates/feature-gate-return_type_notation.cfg.stderr b/tests/ui/feature-gates/feature-gate-return_type_notation.cfg.stderr new file mode 100644 index 00000000000..85728f8e1ad --- /dev/null +++ b/tests/ui/feature-gates/feature-gate-return_type_notation.cfg.stderr @@ -0,0 +1,21 @@ +error[E0658]: return type notation is experimental + --> $DIR/feature-gate-return_type_notation.rs:12:18 + | +LL | fn foo<T: Trait<m(..): Send>>() {} + | ^^^^ + | + = note: see issue #109417 <https://github.com/rust-lang/rust/issues/109417> for more information + = help: add `#![feature(return_type_notation)]` to the crate attributes to enable + +warning: the feature `async_fn_in_trait` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/feature-gate-return_type_notation.rs:4:12 + | +LL | #![feature(async_fn_in_trait)] + | ^^^^^^^^^^^^^^^^^ + | + = note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information + = note: `#[warn(incomplete_features)]` on by default + +error: aborting due to previous error; 1 warning emitted + +For more information about this error, try `rustc --explain E0658`. diff --git a/tests/ui/feature-gates/feature-gate-return_type_notation.no.stderr b/tests/ui/feature-gates/feature-gate-return_type_notation.no.stderr new file mode 100644 index 00000000000..85728f8e1ad --- /dev/null +++ b/tests/ui/feature-gates/feature-gate-return_type_notation.no.stderr @@ -0,0 +1,21 @@ +error[E0658]: return type notation is experimental + --> $DIR/feature-gate-return_type_notation.rs:12:18 + | +LL | fn foo<T: Trait<m(..): Send>>() {} + | ^^^^ + | + = note: see issue #109417 <https://github.com/rust-lang/rust/issues/109417> for more information + = help: add `#![feature(return_type_notation)]` to the crate attributes to enable + +warning: the feature `async_fn_in_trait` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/feature-gate-return_type_notation.rs:4:12 + | +LL | #![feature(async_fn_in_trait)] + | ^^^^^^^^^^^^^^^^^ + | + = note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information + = note: `#[warn(incomplete_features)]` on by default + +error: aborting due to previous error; 1 warning emitted + +For more information about this error, try `rustc --explain E0658`. diff --git a/tests/ui/feature-gates/feature-gate-return_type_notation.rs b/tests/ui/feature-gates/feature-gate-return_type_notation.rs new file mode 100644 index 00000000000..b75feb130a6 --- /dev/null +++ b/tests/ui/feature-gates/feature-gate-return_type_notation.rs @@ -0,0 +1,15 @@ +// edition: 2021 +// revisions: cfg no + +#![feature(async_fn_in_trait)] +//~^ WARN the feature `async_fn_in_trait` is incomplete + +trait Trait { + async fn m(); +} + +#[cfg(cfg)] +fn foo<T: Trait<m(..): Send>>() {} +//~^ ERROR return type notation is experimental + +fn main() {} diff --git a/tests/ui/fn/fn-ptr-trait-int-float-infer-var.rs b/tests/ui/fn/fn-ptr-trait-int-float-infer-var.rs new file mode 100644 index 00000000000..eec7da044c0 --- /dev/null +++ b/tests/ui/fn/fn-ptr-trait-int-float-infer-var.rs @@ -0,0 +1,10 @@ +// check-pass +trait MyCmp { + fn cmp(&self) {} +} +impl MyCmp for f32 {} + +fn main() { + // Ensure that `impl<F: FnPtr> Ord for F` is never considered for int and float infer vars. + 0.0.cmp(); +} diff --git a/tests/ui/slightly-nice-generic-literal-messages.rs b/tests/ui/generics/slightly-nice-generic-literal-messages.rs index 268009f65a5..268009f65a5 100644 --- a/tests/ui/slightly-nice-generic-literal-messages.rs +++ b/tests/ui/generics/slightly-nice-generic-literal-messages.rs diff --git a/tests/ui/slightly-nice-generic-literal-messages.stderr b/tests/ui/generics/slightly-nice-generic-literal-messages.stderr index 83ef522ab46..83ef522ab46 100644 --- a/tests/ui/slightly-nice-generic-literal-messages.stderr +++ b/tests/ui/generics/slightly-nice-generic-literal-messages.stderr diff --git a/tests/ui/implied-bounds/normalization-nested.lifetime.stderr b/tests/ui/implied-bounds/normalization-nested.lifetime.stderr new file mode 100644 index 00000000000..898e5e9511e --- /dev/null +++ b/tests/ui/implied-bounds/normalization-nested.lifetime.stderr @@ -0,0 +1,18 @@ +error[E0759]: `fn` parameter has lifetime `'x` but it needs to satisfy a `'static` lifetime requirement + --> $DIR/normalization-nested.rs:35:20 + | +LL | pub fn test<'x>(_: Map<Vec<&'x ()>>, s: &'x str) -> &'static str { + | ^^^^^^^^^^^^^^^^ + | | + | this data with lifetime `'x`... + | ...is used and required to live as long as `'static` here + | +note: `'static` lifetime requirement introduced by this bound + --> $DIR/normalization-nested.rs:33:14 + | +LL | I::Item: 'static; + | ^^^^^^^ + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0759`. diff --git a/tests/ui/implied-bounds/normalization-nested.rs b/tests/ui/implied-bounds/normalization-nested.rs new file mode 100644 index 00000000000..5f1cbb3f697 --- /dev/null +++ b/tests/ui/implied-bounds/normalization-nested.rs @@ -0,0 +1,39 @@ +// Test for normalization of projections that appear in the item bounds +// (versus those that appear directly in the input types). +// Both revisions should pass. `lifetime` revision is a bug. +// +// revisions: param_ty lifetime +// [param_ty] check-pass +// [lifetime] check-fail +// [lifetime] known-bug: #109799 + +pub trait Iter { + type Item; +} + +#[cfg(param_ty)] +impl<X, I> Iter for I +where + I: IntoIterator<Item = X>, +{ + type Item = X; +} + +#[cfg(lifetime)] +impl<'x, I> Iter for I +where + I: IntoIterator<Item = &'x ()>, +{ + type Item = &'x (); +} + +pub struct Map<I>(I) +where + I: Iter, + I::Item: 'static; + +pub fn test<'x>(_: Map<Vec<&'x ()>>, s: &'x str) -> &'static str { + s +} + +fn main() {} diff --git a/tests/ui/unterminated-comment.rs b/tests/ui/lexer/unterminated-comment.rs index 1cfdfb1fb45..1cfdfb1fb45 100644 --- a/tests/ui/unterminated-comment.rs +++ b/tests/ui/lexer/unterminated-comment.rs diff --git a/tests/ui/unterminated-comment.stderr b/tests/ui/lexer/unterminated-comment.stderr index c513fafeeb3..c513fafeeb3 100644 --- a/tests/ui/unterminated-comment.stderr +++ b/tests/ui/lexer/unterminated-comment.stderr diff --git a/tests/ui/unterminated-nested-comment.rs b/tests/ui/lexer/unterminated-nested-comment.rs index db5f2f3ba13..db5f2f3ba13 100644 --- a/tests/ui/unterminated-nested-comment.rs +++ b/tests/ui/lexer/unterminated-nested-comment.rs diff --git a/tests/ui/unterminated-nested-comment.stderr b/tests/ui/lexer/unterminated-nested-comment.stderr index 3653e76c9cb..3653e76c9cb 100644 --- a/tests/ui/unterminated-nested-comment.stderr +++ b/tests/ui/lexer/unterminated-nested-comment.stderr diff --git a/tests/ui/lifetimes/issue-93911.rs b/tests/ui/lifetimes/issue-93911.rs new file mode 100644 index 00000000000..b7ccac1ee52 --- /dev/null +++ b/tests/ui/lifetimes/issue-93911.rs @@ -0,0 +1,18 @@ +// check-pass +// edition:2021 + +#![allow(dead_code)] + +struct Foo<'a>(&'a u32); + +impl<'a> Foo<'a> { + async fn foo() { + struct Bar<'b>(&'b u32); + + impl<'b> Bar<'b> { + async fn bar() {} + } + } +} + +fn main() {} diff --git a/tests/ui/lint/lint-temporary-cstring-as-ptr.rs b/tests/ui/lint/lint-temporary-cstring-as-ptr.rs index 7aa4f2e1e00..fab792f1284 100644 --- a/tests/ui/lint/lint-temporary-cstring-as-ptr.rs +++ b/tests/ui/lint/lint-temporary-cstring-as-ptr.rs @@ -3,7 +3,15 @@ use std::ffi::CString; +macro_rules! mymacro { + () => { + let s = CString::new("some text").unwrap().as_ptr(); + //~^ ERROR getting the inner pointer of a temporary `CString` + } +} + fn main() { let s = CString::new("some text").unwrap().as_ptr(); //~^ ERROR getting the inner pointer of a temporary `CString` + mymacro!(); } diff --git a/tests/ui/lint/lint-temporary-cstring-as-ptr.stderr b/tests/ui/lint/lint-temporary-cstring-as-ptr.stderr index 79ef57dd1a3..4e5c8aa0693 100644 --- a/tests/ui/lint/lint-temporary-cstring-as-ptr.stderr +++ b/tests/ui/lint/lint-temporary-cstring-as-ptr.stderr @@ -1,5 +1,5 @@ error: getting the inner pointer of a temporary `CString` - --> $DIR/lint-temporary-cstring-as-ptr.rs:7:48 + --> $DIR/lint-temporary-cstring-as-ptr.rs:14:48 | LL | let s = CString::new("some text").unwrap().as_ptr(); | ---------------------------------- ^^^^^^ this pointer will be invalid @@ -14,5 +14,20 @@ note: the lint level is defined here LL | #![deny(temporary_cstring_as_ptr)] | ^^^^^^^^^^^^^^^^^^^^^^^^ -error: aborting due to previous error +error: getting the inner pointer of a temporary `CString` + --> $DIR/lint-temporary-cstring-as-ptr.rs:8:52 + | +LL | let s = CString::new("some text").unwrap().as_ptr(); + | ---------------------------------- ^^^^^^ this pointer will be invalid + | | + | this `CString` is deallocated at the end of the statement, bind it to a variable to extend its lifetime +... +LL | mymacro!(); + | ---------- in this macro invocation + | + = note: pointers do not have a lifetime; when calling `as_ptr` the `CString` will be deallocated at the end of the statement because nothing is referencing it as far as the type system is concerned + = help: for more information, see https://doc.rust-lang.org/reference/destructors.html + = note: this error originates in the macro `mymacro` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: aborting due to 2 previous errors diff --git a/tests/ui/lint/use-redundant/issue-92904.rs b/tests/ui/lint/use-redundant/issue-92904.rs new file mode 100644 index 00000000000..511d9d263cf --- /dev/null +++ b/tests/ui/lint/use-redundant/issue-92904.rs @@ -0,0 +1,17 @@ +// check-pass + +pub struct Foo(bar::Bar); + +pub mod bar { + pub struct Foo(pub Bar); + pub struct Bar(pub char); +} + +pub fn warning() -> Foo { + use bar::*; + #[deny(unused_imports)] + use self::Foo; // no error + Foo(Bar('a')) +} + +fn main() {} diff --git a/tests/ui/lint/use-redundant/use-redundant-glob-parent.rs b/tests/ui/lint/use-redundant/use-redundant-glob-parent.rs new file mode 100644 index 00000000000..6b1e018d2dc --- /dev/null +++ b/tests/ui/lint/use-redundant/use-redundant-glob-parent.rs @@ -0,0 +1,16 @@ +// check-pass +#![warn(unused_imports)] + +pub mod bar { + pub struct Foo(pub Bar); + pub struct Bar(pub char); +} + +use bar::*; + +pub fn warning() -> Foo { + use bar::Foo; //~ WARNING imported redundantly + Foo(Bar('a')) +} + +fn main() {} diff --git a/tests/ui/lint/use-redundant/use-redundant-glob-parent.stderr b/tests/ui/lint/use-redundant/use-redundant-glob-parent.stderr new file mode 100644 index 00000000000..2c3b3345270 --- /dev/null +++ b/tests/ui/lint/use-redundant/use-redundant-glob-parent.stderr @@ -0,0 +1,17 @@ +warning: the item `Foo` is imported redundantly + --> $DIR/use-redundant-glob-parent.rs:12:9 + | +LL | use bar::*; + | ------ the item `Foo` is already imported here +... +LL | use bar::Foo; + | ^^^^^^^^ + | +note: the lint level is defined here + --> $DIR/use-redundant-glob-parent.rs:2:9 + | +LL | #![warn(unused_imports)] + | ^^^^^^^^^^^^^^ + +warning: 1 warning emitted + diff --git a/tests/ui/lint/use-redundant/use-redundant-glob.rs b/tests/ui/lint/use-redundant/use-redundant-glob.rs new file mode 100644 index 00000000000..bd9e51b6f59 --- /dev/null +++ b/tests/ui/lint/use-redundant/use-redundant-glob.rs @@ -0,0 +1,15 @@ +// check-pass +#![warn(unused_imports)] + +pub mod bar { + pub struct Foo(pub Bar); + pub struct Bar(pub char); +} + +pub fn warning() -> bar::Foo { + use bar::*; + use bar::Foo; //~ WARNING imported redundantly + Foo(Bar('a')) +} + +fn main() {} diff --git a/tests/ui/lint/use-redundant/use-redundant-glob.stderr b/tests/ui/lint/use-redundant/use-redundant-glob.stderr new file mode 100644 index 00000000000..d3b406d82b6 --- /dev/null +++ b/tests/ui/lint/use-redundant/use-redundant-glob.stderr @@ -0,0 +1,16 @@ +warning: the item `Foo` is imported redundantly + --> $DIR/use-redundant-glob.rs:11:9 + | +LL | use bar::*; + | ------ the item `Foo` is already imported here +LL | use bar::Foo; + | ^^^^^^^^ + | +note: the lint level is defined here + --> $DIR/use-redundant-glob.rs:2:9 + | +LL | #![warn(unused_imports)] + | ^^^^^^^^^^^^^^ + +warning: 1 warning emitted + diff --git a/tests/ui/lint/use-redundant/use-redundant-multiple-namespaces.rs b/tests/ui/lint/use-redundant/use-redundant-multiple-namespaces.rs new file mode 100644 index 00000000000..0fb60840f8a --- /dev/null +++ b/tests/ui/lint/use-redundant/use-redundant-multiple-namespaces.rs @@ -0,0 +1,21 @@ +// check-pass +#![allow(nonstandard_style)] + +pub mod bar { + pub struct Foo { pub bar: Bar } + pub struct Bar(pub char); +} + +pub mod x { + use crate::bar; + pub const Foo: bar::Bar = bar::Bar('a'); +} + +pub fn warning() -> bar::Foo { + #![deny(unused_imports)] // no error + use bar::*; + use x::Foo; + Foo { bar: Foo } +} + +fn main() {} diff --git a/tests/ui/lint/use-redundant/use-redundant-not-parent.rs b/tests/ui/lint/use-redundant/use-redundant-not-parent.rs new file mode 100644 index 00000000000..c97a3d34163 --- /dev/null +++ b/tests/ui/lint/use-redundant/use-redundant-not-parent.rs @@ -0,0 +1,19 @@ +// check-pass + +pub mod bar { + pub struct Foo(pub Bar); + pub struct Bar(pub char); +} + +pub mod x { + pub struct Foo(pub crate::bar::Bar); +} + +pub fn warning() -> x::Foo { + use bar::*; + #[deny(unused_imports)] + use x::Foo; // no error + Foo(Bar('a')) +} + +fn main() {} diff --git a/tests/ui/lint/use-redundant.rs b/tests/ui/lint/use-redundant/use-redundant.rs index 53315dcf638..53315dcf638 100644 --- a/tests/ui/lint/use-redundant.rs +++ b/tests/ui/lint/use-redundant/use-redundant.rs diff --git a/tests/ui/lint/use-redundant.stderr b/tests/ui/lint/use-redundant/use-redundant.stderr index c861a1956e1..c861a1956e1 100644 --- a/tests/ui/lint/use-redundant.stderr +++ b/tests/ui/lint/use-redundant/use-redundant.stderr diff --git a/tests/ui/mir/issue-109004-drop-large-array.rs b/tests/ui/mir/issue-109004-drop-large-array.rs new file mode 100644 index 00000000000..5e3361cef6e --- /dev/null +++ b/tests/ui/mir/issue-109004-drop-large-array.rs @@ -0,0 +1,16 @@ +// check-pass + +const SZ: usize = 64_000_000; +type BigDrop = [String; SZ]; + +fn f(_dropme: BigDrop) {} + +fn f2(_moveme: BigDrop) -> String { + let [a, ..] = _moveme; + a +} + +fn main() { + f(std::array::from_fn(|_| String::new())); + f2(std::array::from_fn(|_| String::new())); +} diff --git a/tests/ui/mir/issue-109743.rs b/tests/ui/mir/issue-109743.rs new file mode 100644 index 00000000000..73f3405e3ad --- /dev/null +++ b/tests/ui/mir/issue-109743.rs @@ -0,0 +1,51 @@ +// build-pass +// compile-flags: --crate-type=lib + +use std::marker::PhantomData; + +pub trait StreamOnce { + type Token; +} + +impl StreamOnce for &str { + type Token = (); +} + +pub trait Parser<Input: StreamOnce> { + type PartialState: Default; + fn parse_mode(&self, _state: &Self::PartialState) {} + fn parse_mode_impl() {} +} + +pub fn parse_bool<'a>() -> impl Parser<&'a str> { + pub struct TokensCmp<C, Input> + where + Input: StreamOnce, + { + _cmp: C, + _marker: PhantomData<Input>, + } + + impl<Input, C> Parser<Input> for TokensCmp<C, Input> + where + C: FnMut(Input::Token), + Input: StreamOnce, + { + type PartialState = (); + } + + TokensCmp { _cmp: |_| (), _marker: PhantomData } +} + +pub struct ParseBool; + +impl<'a> Parser<&'a str> for ParseBool +where + &'a str: StreamOnce, +{ + type PartialState = (); + + fn parse_mode_impl() { + parse_bool().parse_mode(&Default::default()) + } +} diff --git a/tests/ui/nll/user-annotations/region-error-ice-109072.rs b/tests/ui/nll/user-annotations/region-error-ice-109072.rs new file mode 100644 index 00000000000..3f2ad3ccbf5 --- /dev/null +++ b/tests/ui/nll/user-annotations/region-error-ice-109072.rs @@ -0,0 +1,14 @@ +// Regression test for #109072. +// Check that we don't ICE when canonicalizing user annotation. + +trait Lt<'a> { + type T; +} + +impl Lt<'missing> for () { //~ ERROR undeclared lifetime + type T = &'missing (); //~ ERROR undeclared lifetime +} + +fn main() { + let _: <() as Lt<'_>>::T = &(); +} diff --git a/tests/ui/nll/user-annotations/region-error-ice-109072.stderr b/tests/ui/nll/user-annotations/region-error-ice-109072.stderr new file mode 100644 index 00000000000..d90971bed25 --- /dev/null +++ b/tests/ui/nll/user-annotations/region-error-ice-109072.stderr @@ -0,0 +1,26 @@ +error[E0261]: use of undeclared lifetime name `'missing` + --> $DIR/region-error-ice-109072.rs:8:9 + | +LL | impl Lt<'missing> for () { + | - ^^^^^^^^ undeclared lifetime + | | + | help: consider introducing lifetime `'missing` here: `<'missing>` + +error[E0261]: use of undeclared lifetime name `'missing` + --> $DIR/region-error-ice-109072.rs:9:15 + | +LL | type T = &'missing (); + | ^^^^^^^^ undeclared lifetime + | +help: consider introducing lifetime `'missing` here + | +LL | type T<'missing> = &'missing (); + | ++++++++++ +help: consider introducing lifetime `'missing` here + | +LL | impl<'missing> Lt<'missing> for () { + | ++++++++++ + +error: aborting due to 2 previous errors + +For more information about this error, try `rustc --explain E0261`. diff --git a/tests/ui/auxiliary/xc-private-method-lib.rs b/tests/ui/privacy/auxiliary/xc-private-method-lib.rs index 4d5ec6de392..4d5ec6de392 100644 --- a/tests/ui/auxiliary/xc-private-method-lib.rs +++ b/tests/ui/privacy/auxiliary/xc-private-method-lib.rs diff --git a/tests/ui/xc-private-method.rs b/tests/ui/privacy/xc-private-method.rs index f05994646b3..f05994646b3 100644 --- a/tests/ui/xc-private-method.rs +++ b/tests/ui/privacy/xc-private-method.rs diff --git a/tests/ui/xc-private-method.stderr b/tests/ui/privacy/xc-private-method.stderr index 0eabc592aa4..0eabc592aa4 100644 --- a/tests/ui/xc-private-method.stderr +++ b/tests/ui/privacy/xc-private-method.stderr diff --git a/tests/ui/xc-private-method2.rs b/tests/ui/privacy/xc-private-method2.rs index f11b251082b..f11b251082b 100644 --- a/tests/ui/xc-private-method2.rs +++ b/tests/ui/privacy/xc-private-method2.rs diff --git a/tests/ui/xc-private-method2.stderr b/tests/ui/privacy/xc-private-method2.stderr index af0c3cfcb2c..af0c3cfcb2c 100644 --- a/tests/ui/xc-private-method2.stderr +++ b/tests/ui/privacy/xc-private-method2.stderr diff --git a/tests/ui/reachable-unnameable-type-alias.rs b/tests/ui/reachable/reachable-unnameable-type-alias.rs index 461355f87cf..461355f87cf 100644 --- a/tests/ui/reachable-unnameable-type-alias.rs +++ b/tests/ui/reachable/reachable-unnameable-type-alias.rs diff --git a/tests/ui/disambiguate-identical-names.rs b/tests/ui/resolve/disambiguate-identical-names.rs index 708d2cd76a1..708d2cd76a1 100644 --- a/tests/ui/disambiguate-identical-names.rs +++ b/tests/ui/resolve/disambiguate-identical-names.rs diff --git a/tests/ui/disambiguate-identical-names.stderr b/tests/ui/resolve/disambiguate-identical-names.stderr index 7d8293018d2..7d8293018d2 100644 --- a/tests/ui/disambiguate-identical-names.stderr +++ b/tests/ui/resolve/disambiguate-identical-names.stderr diff --git a/tests/ui/rfc-2008-non-exhaustive/omitted-patterns.rs b/tests/ui/rfc-2008-non-exhaustive/omitted-patterns.rs index d8f07bb8f24..3482af74752 100644 --- a/tests/ui/rfc-2008-non-exhaustive/omitted-patterns.rs +++ b/tests/ui/rfc-2008-non-exhaustive/omitted-patterns.rs @@ -184,4 +184,28 @@ fn main() { // OK: both unstable and stable fields are matched with feature on #[warn(non_exhaustive_omitted_patterns)] let UnstableStruct { stable, stable2, unstable, .. } = UnstableStruct::default(); + + // Ok: local bindings are allowed + #[deny(non_exhaustive_omitted_patterns)] + let local = NonExhaustiveEnum::Unit; + + // Ok: missing patterns will be blocked by the pattern being refutable + #[deny(non_exhaustive_omitted_patterns)] + let local_refutable @ NonExhaustiveEnum::Unit = NonExhaustiveEnum::Unit; + //~^ refutable pattern in local binding + + // Check that matching on a reference results in a correctly spanned diagnostic + #[deny(non_exhaustive_omitted_patterns)] + match &non_enum { + NonExhaustiveEnum::Unit => {} + NonExhaustiveEnum::Tuple(_) => {} + _ => {} + } + //~^^ some variants are not matched explicitly +} + +#[deny(non_exhaustive_omitted_patterns)] +// Ok: Pattern in a param is always wildcard +pub fn takes_non_exhaustive(_: NonExhaustiveEnum) { + let _closure = |_: NonExhaustiveEnum| {}; } diff --git a/tests/ui/rfc-2008-non-exhaustive/omitted-patterns.stderr b/tests/ui/rfc-2008-non-exhaustive/omitted-patterns.stderr index 996bd4a1298..520a90322c1 100644 --- a/tests/ui/rfc-2008-non-exhaustive/omitted-patterns.stderr +++ b/tests/ui/rfc-2008-non-exhaustive/omitted-patterns.stderr @@ -184,5 +184,34 @@ note: the lint level is defined here LL | #[deny(non_exhaustive_omitted_patterns)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -error: aborting due to 8 previous errors; 6 warnings emitted +error[E0005]: refutable pattern in local binding + --> $DIR/omitted-patterns.rs:194:9 + | +LL | let local_refutable @ NonExhaustiveEnum::Unit = NonExhaustiveEnum::Unit; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ pattern `_` not covered + | + = note: `let` bindings require an "irrefutable pattern", like a `struct` or an `enum` with only one variant + = note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html + = note: the matched value is of type `NonExhaustiveEnum` +help: you might want to use `let else` to handle the variant that isn't matched + | +LL | let local_refutable @ NonExhaustiveEnum::Unit = NonExhaustiveEnum::Unit else { todo!() }; + | ++++++++++++++++ + +error: some variants are not matched explicitly + --> $DIR/omitted-patterns.rs:202:9 + | +LL | _ => {} + | ^ pattern `NonExhaustiveEnum::Struct { .. }` not covered + | + = help: ensure that all variants are matched explicitly by adding the suggested match arms + = note: the matched value is of type `NonExhaustiveEnum` and the `non_exhaustive_omitted_patterns` attribute was found +note: the lint level is defined here + --> $DIR/omitted-patterns.rs:198:12 + | +LL | #[deny(non_exhaustive_omitted_patterns)] + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: aborting due to 10 previous errors; 6 warnings emitted +For more information about this error, try `rustc --explain E0005`. diff --git a/tests/ui/rustdoc/doc-primitive.rs b/tests/ui/rustdoc/doc-primitive.rs new file mode 100644 index 00000000000..4336961e3b5 --- /dev/null +++ b/tests/ui/rustdoc/doc-primitive.rs @@ -0,0 +1,8 @@ +#![deny(invalid_doc_attributes)] + +#[doc(primitive = "foo")] +//~^ ERROR unknown `doc` attribute `primitive` +//~| WARN +mod bar {} + +fn main() {} diff --git a/tests/ui/rustdoc/doc-primitive.stderr b/tests/ui/rustdoc/doc-primitive.stderr new file mode 100644 index 00000000000..d61eb381647 --- /dev/null +++ b/tests/ui/rustdoc/doc-primitive.stderr @@ -0,0 +1,16 @@ +error: unknown `doc` attribute `primitive` + --> $DIR/doc-primitive.rs:3:7 + | +LL | #[doc(primitive = "foo")] + | ^^^^^^^^^^^^^^^^^ + | + = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! + = note: for more information, see issue #82730 <https://github.com/rust-lang/rust/issues/82730> +note: the lint level is defined here + --> $DIR/doc-primitive.rs:1:9 + | +LL | #![deny(invalid_doc_attributes)] + | ^^^^^^^^^^^^^^^^^^^^^^ + +error: aborting due to previous error + diff --git a/tests/ui/rustdoc/feature-gate-doc_primitive.rs b/tests/ui/rustdoc/feature-gate-doc_primitive.rs index 18e99e72f8b..78fcd90752e 100644 --- a/tests/ui/rustdoc/feature-gate-doc_primitive.rs +++ b/tests/ui/rustdoc/feature-gate-doc_primitive.rs @@ -1,7 +1,5 @@ -// check-pass -#[doc(primitive = "usize")] -//~^ WARNING `doc(primitive)` should never have been stable -//~| WARNING hard error in a future release +#[rustc_doc_primitive = "usize"] +//~^ ERROR `rustc_doc_primitive` is a rustc internal attribute /// Some docs mod usize {} diff --git a/tests/ui/rustdoc/feature-gate-doc_primitive.stderr b/tests/ui/rustdoc/feature-gate-doc_primitive.stderr index 194b2d87db2..5920880675d 100644 --- a/tests/ui/rustdoc/feature-gate-doc_primitive.stderr +++ b/tests/ui/rustdoc/feature-gate-doc_primitive.stderr @@ -1,12 +1,11 @@ -warning: `doc(primitive)` should never have been stable - --> $DIR/feature-gate-doc_primitive.rs:2:7 +error[E0658]: `rustc_doc_primitive` is a rustc internal attribute + --> $DIR/feature-gate-doc_primitive.rs:1:1 | -LL | #[doc(primitive = "usize")] - | ^^^^^^^^^^^^^^^^^^^ +LL | #[rustc_doc_primitive = "usize"] + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #82730 <https://github.com/rust-lang/rust/issues/82730> - = note: `#[warn(invalid_doc_attributes)]` on by default + = help: add `#![feature(rustc_attrs)]` to the crate attributes to enable -warning: 1 warning emitted +error: aborting due to previous error +For more information about this error, try `rustc --explain E0658`. diff --git a/tests/ui/stats/hir-stats.stderr b/tests/ui/stats/hir-stats.stderr index ee62d8f2d25..d723ff538a8 100644 --- a/tests/ui/stats/hir-stats.stderr +++ b/tests/ui/stats/hir-stats.stderr @@ -15,45 +15,45 @@ ast-stats-1 Arm 96 ( 1.5%) 2 48 ast-stats-1 ForeignItem 96 ( 1.5%) 1 96 ast-stats-1 - Fn 96 ( 1.5%) 1 ast-stats-1 FnDecl 120 ( 1.8%) 5 24 -ast-stats-1 FieldDef 160 ( 2.4%) 2 80 -ast-stats-1 Stmt 160 ( 2.4%) 5 32 +ast-stats-1 FieldDef 160 ( 2.5%) 2 80 +ast-stats-1 Stmt 160 ( 2.5%) 5 32 ast-stats-1 - Local 32 ( 0.5%) 1 ast-stats-1 - MacCall 32 ( 0.5%) 1 ast-stats-1 - Expr 96 ( 1.5%) 3 -ast-stats-1 Param 160 ( 2.4%) 4 40 -ast-stats-1 Block 192 ( 2.9%) 6 32 +ast-stats-1 Param 160 ( 2.5%) 4 40 +ast-stats-1 Block 192 ( 3.0%) 6 32 ast-stats-1 Variant 208 ( 3.2%) 2 104 -ast-stats-1 GenericBound 224 ( 3.4%) 4 56 -ast-stats-1 - Trait 224 ( 3.4%) 4 -ast-stats-1 AssocItem 416 ( 6.3%) 4 104 -ast-stats-1 - Type 208 ( 3.2%) 2 -ast-stats-1 - Fn 208 ( 3.2%) 2 -ast-stats-1 GenericParam 480 ( 7.3%) 5 96 -ast-stats-1 Pat 504 ( 7.7%) 7 72 +ast-stats-1 GenericBound 224 ( 3.5%) 4 56 +ast-stats-1 - Trait 224 ( 3.5%) 4 +ast-stats-1 AssocItem 352 ( 5.4%) 4 88 +ast-stats-1 - Type 176 ( 2.7%) 2 +ast-stats-1 - Fn 176 ( 2.7%) 2 +ast-stats-1 GenericParam 480 ( 7.4%) 5 96 +ast-stats-1 Pat 504 ( 7.8%) 7 72 ast-stats-1 - Struct 72 ( 1.1%) 1 ast-stats-1 - Wild 72 ( 1.1%) 1 ast-stats-1 - Ident 360 ( 5.5%) 5 -ast-stats-1 Expr 576 ( 8.8%) 8 72 +ast-stats-1 Expr 576 ( 8.9%) 8 72 ast-stats-1 - Path 72 ( 1.1%) 1 ast-stats-1 - Match 72 ( 1.1%) 1 ast-stats-1 - Struct 72 ( 1.1%) 1 ast-stats-1 - Lit 144 ( 2.2%) 2 ast-stats-1 - Block 216 ( 3.3%) 3 -ast-stats-1 PathSegment 720 (11.0%) 30 24 -ast-stats-1 Ty 896 (13.7%) 14 64 +ast-stats-1 PathSegment 720 (11.1%) 30 24 +ast-stats-1 Ty 896 (13.8%) 14 64 ast-stats-1 - Ptr 64 ( 1.0%) 1 ast-stats-1 - Ref 64 ( 1.0%) 1 ast-stats-1 - ImplicitSelf 128 ( 2.0%) 2 -ast-stats-1 - Path 640 ( 9.8%) 10 -ast-stats-1 Item 1_224 (18.7%) 9 136 +ast-stats-1 - Path 640 ( 9.9%) 10 +ast-stats-1 Item 1_224 (18.9%) 9 136 ast-stats-1 - Trait 136 ( 2.1%) 1 ast-stats-1 - Enum 136 ( 2.1%) 1 ast-stats-1 - ForeignMod 136 ( 2.1%) 1 ast-stats-1 - Impl 136 ( 2.1%) 1 ast-stats-1 - Fn 272 ( 4.2%) 2 -ast-stats-1 - Use 408 ( 6.2%) 3 +ast-stats-1 - Use 408 ( 6.3%) 3 ast-stats-1 ---------------------------------------------------------------- -ast-stats-1 Total 6_552 +ast-stats-1 Total 6_488 ast-stats-1 ast-stats-2 POST EXPANSION AST STATS ast-stats-2 Name Accumulated Size Count Item Size @@ -65,32 +65,32 @@ ast-stats-2 ExprField 48 ( 0.7%) 1 48 ast-stats-2 WherePredicate 56 ( 0.8%) 1 56 ast-stats-2 - BoundPredicate 56 ( 0.8%) 1 ast-stats-2 Local 72 ( 1.0%) 1 72 -ast-stats-2 Arm 96 ( 1.3%) 2 48 -ast-stats-2 ForeignItem 96 ( 1.3%) 1 96 -ast-stats-2 - Fn 96 ( 1.3%) 1 +ast-stats-2 Arm 96 ( 1.4%) 2 48 +ast-stats-2 ForeignItem 96 ( 1.4%) 1 96 +ast-stats-2 - Fn 96 ( 1.4%) 1 ast-stats-2 InlineAsm 120 ( 1.7%) 1 120 ast-stats-2 FnDecl 120 ( 1.7%) 5 24 ast-stats-2 Attribute 128 ( 1.8%) 4 32 -ast-stats-2 - DocComment 32 ( 0.4%) 1 -ast-stats-2 - Normal 96 ( 1.3%) 3 -ast-stats-2 FieldDef 160 ( 2.2%) 2 80 -ast-stats-2 Stmt 160 ( 2.2%) 5 32 -ast-stats-2 - Local 32 ( 0.4%) 1 -ast-stats-2 - Semi 32 ( 0.4%) 1 -ast-stats-2 - Expr 96 ( 1.3%) 3 -ast-stats-2 Param 160 ( 2.2%) 4 40 +ast-stats-2 - DocComment 32 ( 0.5%) 1 +ast-stats-2 - Normal 96 ( 1.4%) 3 +ast-stats-2 FieldDef 160 ( 2.3%) 2 80 +ast-stats-2 Stmt 160 ( 2.3%) 5 32 +ast-stats-2 - Local 32 ( 0.5%) 1 +ast-stats-2 - Semi 32 ( 0.5%) 1 +ast-stats-2 - Expr 96 ( 1.4%) 3 +ast-stats-2 Param 160 ( 2.3%) 4 40 ast-stats-2 Block 192 ( 2.7%) 6 32 ast-stats-2 Variant 208 ( 2.9%) 2 104 -ast-stats-2 GenericBound 224 ( 3.1%) 4 56 -ast-stats-2 - Trait 224 ( 3.1%) 4 -ast-stats-2 AssocItem 416 ( 5.8%) 4 104 -ast-stats-2 - Type 208 ( 2.9%) 2 -ast-stats-2 - Fn 208 ( 2.9%) 2 -ast-stats-2 GenericParam 480 ( 6.7%) 5 96 -ast-stats-2 Pat 504 ( 7.0%) 7 72 +ast-stats-2 GenericBound 224 ( 3.2%) 4 56 +ast-stats-2 - Trait 224 ( 3.2%) 4 +ast-stats-2 AssocItem 352 ( 5.0%) 4 88 +ast-stats-2 - Type 176 ( 2.5%) 2 +ast-stats-2 - Fn 176 ( 2.5%) 2 +ast-stats-2 GenericParam 480 ( 6.8%) 5 96 +ast-stats-2 Pat 504 ( 7.1%) 7 72 ast-stats-2 - Struct 72 ( 1.0%) 1 ast-stats-2 - Wild 72 ( 1.0%) 1 -ast-stats-2 - Ident 360 ( 5.0%) 5 +ast-stats-2 - Ident 360 ( 5.1%) 5 ast-stats-2 Expr 648 ( 9.1%) 9 72 ast-stats-2 - Path 72 ( 1.0%) 1 ast-stats-2 - Match 72 ( 1.0%) 1 @@ -98,22 +98,22 @@ ast-stats-2 - Struct 72 ( 1.0%) 1 ast-stats-2 - InlineAsm 72 ( 1.0%) 1 ast-stats-2 - Lit 144 ( 2.0%) 2 ast-stats-2 - Block 216 ( 3.0%) 3 -ast-stats-2 PathSegment 792 (11.1%) 33 24 -ast-stats-2 Ty 896 (12.5%) 14 64 +ast-stats-2 PathSegment 792 (11.2%) 33 24 +ast-stats-2 Ty 896 (12.6%) 14 64 ast-stats-2 - Ptr 64 ( 0.9%) 1 ast-stats-2 - Ref 64 ( 0.9%) 1 ast-stats-2 - ImplicitSelf 128 ( 1.8%) 2 -ast-stats-2 - Path 640 ( 8.9%) 10 -ast-stats-2 Item 1_496 (20.9%) 11 136 +ast-stats-2 - Path 640 ( 9.0%) 10 +ast-stats-2 Item 1_496 (21.1%) 11 136 ast-stats-2 - Trait 136 ( 1.9%) 1 ast-stats-2 - Enum 136 ( 1.9%) 1 ast-stats-2 - ExternCrate 136 ( 1.9%) 1 ast-stats-2 - ForeignMod 136 ( 1.9%) 1 ast-stats-2 - Impl 136 ( 1.9%) 1 ast-stats-2 - Fn 272 ( 3.8%) 2 -ast-stats-2 - Use 544 ( 7.6%) 4 +ast-stats-2 - Use 544 ( 7.7%) 4 ast-stats-2 ---------------------------------------------------------------- -ast-stats-2 Total 7_152 +ast-stats-2 Total 7_088 ast-stats-2 hir-stats HIR STATS hir-stats Name Accumulated Size Count Item Size diff --git a/tests/ui/thread-local-mutation.rs b/tests/ui/thread-local/thread-local-mutation.rs index e738225ce2a..e738225ce2a 100644 --- a/tests/ui/thread-local-mutation.rs +++ b/tests/ui/thread-local/thread-local-mutation.rs diff --git a/tests/ui/thread-local-mutation.stderr b/tests/ui/thread-local/thread-local-mutation.stderr index e5dc0e72edf..e5dc0e72edf 100644 --- a/tests/ui/thread-local-mutation.stderr +++ b/tests/ui/thread-local/thread-local-mutation.stderr diff --git a/tests/ui/thread-local-static.rs b/tests/ui/thread-local/thread-local-static.rs index c7fee9e6b4c..c7fee9e6b4c 100644 --- a/tests/ui/thread-local-static.rs +++ b/tests/ui/thread-local/thread-local-static.rs diff --git a/tests/ui/thread-local-static.stderr b/tests/ui/thread-local/thread-local-static.stderr index 712050a25fc..712050a25fc 100644 --- a/tests/ui/thread-local-static.stderr +++ b/tests/ui/thread-local/thread-local-static.stderr diff --git a/tests/ui/wrong-mul-method-signature.rs b/tests/ui/traits/wrong-mul-method-signature.rs index 1c2f865599e..1c2f865599e 100644 --- a/tests/ui/wrong-mul-method-signature.rs +++ b/tests/ui/traits/wrong-mul-method-signature.rs diff --git a/tests/ui/wrong-mul-method-signature.stderr b/tests/ui/traits/wrong-mul-method-signature.stderr index 25a92f5ec12..25a92f5ec12 100644 --- a/tests/ui/wrong-mul-method-signature.stderr +++ b/tests/ui/traits/wrong-mul-method-signature.stderr diff --git a/tests/ui/tuple-index.rs b/tests/ui/tuple/tuple-index.rs index 3e1d92b42aa..3e1d92b42aa 100644 --- a/tests/ui/tuple-index.rs +++ b/tests/ui/tuple/tuple-index.rs diff --git a/tests/ui/output-type-mismatch.rs b/tests/ui/typeck/output-type-mismatch.rs index 35097aa9ec6..35097aa9ec6 100644 --- a/tests/ui/output-type-mismatch.rs +++ b/tests/ui/typeck/output-type-mismatch.rs diff --git a/tests/ui/output-type-mismatch.stderr b/tests/ui/typeck/output-type-mismatch.stderr index 4507a4df621..4507a4df621 100644 --- a/tests/ui/output-type-mismatch.stderr +++ b/tests/ui/typeck/output-type-mismatch.stderr diff --git a/tests/ui/suppressed-error.rs b/tests/ui/typeck/suppressed-error.rs index 1e39be46080..1e39be46080 100644 --- a/tests/ui/suppressed-error.rs +++ b/tests/ui/typeck/suppressed-error.rs diff --git a/tests/ui/suppressed-error.stderr b/tests/ui/typeck/suppressed-error.stderr index 11d70f8a433..11d70f8a433 100644 --- a/tests/ui/suppressed-error.stderr +++ b/tests/ui/typeck/suppressed-error.stderr diff --git a/tests/ui/tag-that-dare-not-speak-its-name.rs b/tests/ui/typeck/tag-that-dare-not-speak-its-name.rs index 0e76ec246d7..0e76ec246d7 100644 --- a/tests/ui/tag-that-dare-not-speak-its-name.rs +++ b/tests/ui/typeck/tag-that-dare-not-speak-its-name.rs diff --git a/tests/ui/tag-that-dare-not-speak-its-name.stderr b/tests/ui/typeck/tag-that-dare-not-speak-its-name.stderr index f53abe53bf1..f53abe53bf1 100644 --- a/tests/ui/tag-that-dare-not-speak-its-name.stderr +++ b/tests/ui/typeck/tag-that-dare-not-speak-its-name.stderr diff --git a/tests/ui/terr-in-field.rs b/tests/ui/typeck/terr-in-field.rs index cfe350ef86d..cfe350ef86d 100644 --- a/tests/ui/terr-in-field.rs +++ b/tests/ui/typeck/terr-in-field.rs diff --git a/tests/ui/terr-in-field.stderr b/tests/ui/typeck/terr-in-field.stderr index 09df4b34bb5..09df4b34bb5 100644 --- a/tests/ui/terr-in-field.stderr +++ b/tests/ui/typeck/terr-in-field.stderr diff --git a/tests/ui/terr-sorts.rs b/tests/ui/typeck/terr-sorts.rs index c1e2f7daee5..c1e2f7daee5 100644 --- a/tests/ui/terr-sorts.rs +++ b/tests/ui/typeck/terr-sorts.rs diff --git a/tests/ui/terr-sorts.stderr b/tests/ui/typeck/terr-sorts.stderr index 8f1975374a5..8f1975374a5 100644 --- a/tests/ui/terr-sorts.stderr +++ b/tests/ui/typeck/terr-sorts.stderr diff --git a/tests/ui/while-type-error.rs b/tests/ui/typeck/while-type-error.rs index 8098bfcd8d9..8098bfcd8d9 100644 --- a/tests/ui/while-type-error.rs +++ b/tests/ui/typeck/while-type-error.rs diff --git a/tests/ui/while-type-error.stderr b/tests/ui/typeck/while-type-error.stderr index 529cbff0563..529cbff0563 100644 --- a/tests/ui/while-type-error.stderr +++ b/tests/ui/typeck/while-type-error.stderr diff --git a/tests/ui/wrong-ret-type.rs b/tests/ui/typeck/wrong-ret-type.rs index cbff8dbae21..cbff8dbae21 100644 --- a/tests/ui/wrong-ret-type.rs +++ b/tests/ui/typeck/wrong-ret-type.rs diff --git a/tests/ui/wrong-ret-type.stderr b/tests/ui/typeck/wrong-ret-type.stderr index c686a0b2f5a..c686a0b2f5a 100644 --- a/tests/ui/wrong-ret-type.stderr +++ b/tests/ui/typeck/wrong-ret-type.stderr diff --git a/tests/ui/ufcs-polymorphic-paths.rs b/tests/ui/ufcs/ufcs-polymorphic-paths.rs index a14ebd6a41f..a14ebd6a41f 100644 --- a/tests/ui/ufcs-polymorphic-paths.rs +++ b/tests/ui/ufcs/ufcs-polymorphic-paths.rs diff --git a/tests/ui/expr-block-generic-unique1.rs b/tests/ui/unique/expr-block-generic-unique1.rs index 14603a2c71f..14603a2c71f 100644 --- a/tests/ui/expr-block-generic-unique1.rs +++ b/tests/ui/unique/expr-block-generic-unique1.rs diff --git a/tests/ui/expr-block-generic-unique2.rs b/tests/ui/unique/expr-block-generic-unique2.rs index 7879c144b10..7879c144b10 100644 --- a/tests/ui/expr-block-generic-unique2.rs +++ b/tests/ui/unique/expr-block-generic-unique2.rs diff --git a/tests/ui/expr-if-unique.rs b/tests/ui/unique/expr-if-unique.rs index 86232683549..86232683549 100644 --- a/tests/ui/expr-if-unique.rs +++ b/tests/ui/unique/expr-if-unique.rs diff --git a/tests/ui/unique-object-noncopyable.rs b/tests/ui/unique/unique-object-noncopyable.rs index 2c40dfc7a4b..2c40dfc7a4b 100644 --- a/tests/ui/unique-object-noncopyable.rs +++ b/tests/ui/unique/unique-object-noncopyable.rs diff --git a/tests/ui/unique-object-noncopyable.stderr b/tests/ui/unique/unique-object-noncopyable.stderr index db42ed9baf1..db42ed9baf1 100644 --- a/tests/ui/unique-object-noncopyable.stderr +++ b/tests/ui/unique/unique-object-noncopyable.stderr diff --git a/tests/ui/unique-pinned-nocopy.rs b/tests/ui/unique/unique-pinned-nocopy.rs index 8edaeef51e0..8edaeef51e0 100644 --- a/tests/ui/unique-pinned-nocopy.rs +++ b/tests/ui/unique/unique-pinned-nocopy.rs diff --git a/tests/ui/unique-pinned-nocopy.stderr b/tests/ui/unique/unique-pinned-nocopy.stderr index de6611324ca..de6611324ca 100644 --- a/tests/ui/unique-pinned-nocopy.stderr +++ b/tests/ui/unique/unique-pinned-nocopy.stderr diff --git a/tests/ui/unwind-unique.rs b/tests/ui/unique/unwind-unique.rs index 50ecf751a86..50ecf751a86 100644 --- a/tests/ui/unwind-unique.rs +++ b/tests/ui/unique/unwind-unique.rs diff --git a/tests/ui/mir-unpretty.rs b/tests/ui/unpretty/mir-unpretty.rs index 30620c69fea..30620c69fea 100644 --- a/tests/ui/mir-unpretty.rs +++ b/tests/ui/unpretty/mir-unpretty.rs diff --git a/tests/ui/mir-unpretty.stderr b/tests/ui/unpretty/mir-unpretty.stderr index 3808f8583b8..3808f8583b8 100644 --- a/tests/ui/mir-unpretty.stderr +++ b/tests/ui/unpretty/mir-unpretty.stderr diff --git a/tests/ui/unpretty-expr-fn-arg.rs b/tests/ui/unpretty/unpretty-expr-fn-arg.rs index 6e1132a3372..6e1132a3372 100644 --- a/tests/ui/unpretty-expr-fn-arg.rs +++ b/tests/ui/unpretty/unpretty-expr-fn-arg.rs diff --git a/tests/ui/unpretty-expr-fn-arg.stdout b/tests/ui/unpretty/unpretty-expr-fn-arg.stdout index b745b988631..b745b988631 100644 --- a/tests/ui/unpretty-expr-fn-arg.stdout +++ b/tests/ui/unpretty/unpretty-expr-fn-arg.stdout diff --git a/tests/ui/foreign-unsafe-fn-called.mir.stderr b/tests/ui/unsafe/foreign-unsafe-fn-called.mir.stderr index d3cf5d84fdd..d3cf5d84fdd 100644 --- a/tests/ui/foreign-unsafe-fn-called.mir.stderr +++ b/tests/ui/unsafe/foreign-unsafe-fn-called.mir.stderr diff --git a/tests/ui/foreign-unsafe-fn-called.rs b/tests/ui/unsafe/foreign-unsafe-fn-called.rs index 67302ea1bcd..67302ea1bcd 100644 --- a/tests/ui/foreign-unsafe-fn-called.rs +++ b/tests/ui/unsafe/foreign-unsafe-fn-called.rs diff --git a/tests/ui/foreign-unsafe-fn-called.thir.stderr b/tests/ui/unsafe/foreign-unsafe-fn-called.thir.stderr index 00ba0f7a6a3..00ba0f7a6a3 100644 --- a/tests/ui/foreign-unsafe-fn-called.thir.stderr +++ b/tests/ui/unsafe/foreign-unsafe-fn-called.thir.stderr diff --git a/tests/ui/new-unsafe-pointers.rs b/tests/ui/unsafe/new-unsafe-pointers.rs index d99eb4cbd1c..d99eb4cbd1c 100644 --- a/tests/ui/new-unsafe-pointers.rs +++ b/tests/ui/unsafe/new-unsafe-pointers.rs diff --git a/tests/ui/unsafe-fn-called-from-unsafe-blk.rs b/tests/ui/unsafe/unsafe-fn-called-from-unsafe-blk.rs index 3713a7065f5..3713a7065f5 100644 --- a/tests/ui/unsafe-fn-called-from-unsafe-blk.rs +++ b/tests/ui/unsafe/unsafe-fn-called-from-unsafe-blk.rs diff --git a/tests/ui/unsafe-fn-called-from-unsafe-fn.rs b/tests/ui/unsafe/unsafe-fn-called-from-unsafe-fn.rs index 5e953107686..5e953107686 100644 --- a/tests/ui/unsafe-fn-called-from-unsafe-fn.rs +++ b/tests/ui/unsafe/unsafe-fn-called-from-unsafe-fn.rs diff --git a/tests/ui/unsafe-pointer-assignability.rs b/tests/ui/unsafe/unsafe-pointer-assignability.rs index db822bb6a02..db822bb6a02 100644 --- a/tests/ui/unsafe-pointer-assignability.rs +++ b/tests/ui/unsafe/unsafe-pointer-assignability.rs diff --git a/tests/ui/variance-intersection-of-ref-and-opt-ref.rs b/tests/ui/variance/variance-intersection-of-ref-and-opt-ref.rs index 74707a98d32..74707a98d32 100644 --- a/tests/ui/variance-intersection-of-ref-and-opt-ref.rs +++ b/tests/ui/variance/variance-intersection-of-ref-and-opt-ref.rs diff --git a/tests/ui/variance-iterators-in-libcore.rs b/tests/ui/variance/variance-iterators-in-libcore.rs index a542e44d517..a542e44d517 100644 --- a/tests/ui/variance-iterators-in-libcore.rs +++ b/tests/ui/variance/variance-iterators-in-libcore.rs diff --git a/tests/ui/wasm-custom-section-relocations.rs b/tests/ui/wasm/wasm-custom-section-relocations.rs index c3cca3a35ac..c3cca3a35ac 100644 --- a/tests/ui/wasm-custom-section-relocations.rs +++ b/tests/ui/wasm/wasm-custom-section-relocations.rs diff --git a/tests/ui/wasm-custom-section-relocations.stderr b/tests/ui/wasm/wasm-custom-section-relocations.stderr index a37edc51d19..a37edc51d19 100644 --- a/tests/ui/wasm-custom-section-relocations.stderr +++ b/tests/ui/wasm/wasm-custom-section-relocations.stderr diff --git a/triagebot.toml b/triagebot.toml index c86c1613fa9..20a8be283b9 100644 --- a/triagebot.toml +++ b/triagebot.toml @@ -482,7 +482,7 @@ message = "This PR changes src/bootstrap/defaults/config.codegen.toml. If approp [assign] warn_non_default_branch = true -contributing_url = "https://rustc-dev-guide.rust-lang.org/contributing.html" +contributing_url = "https://rustc-dev-guide.rust-lang.org/getting-started.html" [assign.adhoc_groups] compiler-team = [ |
