From 29ac30cb32747155589a875175b55e0b8e1f5476 Mon Sep 17 00:00:00 2001 From: reez12g Date: Sat, 16 Jul 2022 20:59:28 +0900 Subject: [PATCH 01/13] Add test execution step to x86_64-gnu-aux --- src/ci/docker/host-x86_64/x86_64-gnu-aux/Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ci/docker/host-x86_64/x86_64-gnu-aux/Dockerfile b/src/ci/docker/host-x86_64/x86_64-gnu-aux/Dockerfile index d55d5b56ad3f5..07926ea3b8e88 100644 --- a/src/ci/docker/host-x86_64/x86_64-gnu-aux/Dockerfile +++ b/src/ci/docker/host-x86_64/x86_64-gnu-aux/Dockerfile @@ -26,3 +26,5 @@ RUN sh /scripts/sccache.sh ENV RUST_CONFIGURE_ARGS --build=x86_64-unknown-linux-gnu ENV RUST_CHECK_TARGET check-aux + +ENV SCRIPT python3 ../x.py test compiler --stage 2 From d79caa3503b7050c95d623c3a2d42dd3b40c5595 Mon Sep 17 00:00:00 2001 From: reez12g Date: Thu, 8 Sep 2022 17:01:23 +0900 Subject: [PATCH 02/13] Revert "Add test execution step to x86_64-gnu-aux" This reverts commit 491e87246bd21c9863c39132672374d75a0cfb6f. --- src/ci/docker/host-x86_64/x86_64-gnu-aux/Dockerfile | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/ci/docker/host-x86_64/x86_64-gnu-aux/Dockerfile b/src/ci/docker/host-x86_64/x86_64-gnu-aux/Dockerfile index 07926ea3b8e88..d55d5b56ad3f5 100644 --- a/src/ci/docker/host-x86_64/x86_64-gnu-aux/Dockerfile +++ b/src/ci/docker/host-x86_64/x86_64-gnu-aux/Dockerfile @@ -26,5 +26,3 @@ RUN sh /scripts/sccache.sh ENV RUST_CONFIGURE_ARGS --build=x86_64-unknown-linux-gnu ENV RUST_CHECK_TARGET check-aux - -ENV SCRIPT python3 ../x.py test compiler --stage 2 From 9a4c5abe453329d4b492e33b442b36011a632117 Mon Sep 17 00:00:00 2001 From: reez12g Date: Sun, 11 Sep 2022 16:04:02 +0900 Subject: [PATCH 03/13] Remove from compiler/ crates --- compiler/rustc_ast/Cargo.toml | 1 - compiler/rustc_ast_lowering/Cargo.toml | 1 - compiler/rustc_ast_pretty/Cargo.toml | 1 - compiler/rustc_attr/Cargo.toml | 1 - compiler/rustc_borrowck/Cargo.toml | 1 - compiler/rustc_builtin_macros/Cargo.toml | 1 - compiler/rustc_codegen_llvm/Cargo.toml | 1 - compiler/rustc_const_eval/Cargo.toml | 1 - compiler/rustc_data_structures/Cargo.toml | 1 - compiler/rustc_error_messages/Cargo.toml | 1 - compiler/rustc_errors/Cargo.toml | 1 - compiler/rustc_expand/Cargo.toml | 1 - compiler/rustc_feature/Cargo.toml | 1 - compiler/rustc_hir/Cargo.toml | 1 - compiler/rustc_hir_pretty/Cargo.toml | 1 - compiler/rustc_incremental/Cargo.toml | 1 - compiler/rustc_index/Cargo.toml | 1 - compiler/rustc_infer/Cargo.toml | 1 - compiler/rustc_interface/Cargo.toml | 1 - compiler/rustc_lexer/Cargo.toml | 1 - compiler/rustc_metadata/Cargo.toml | 1 - compiler/rustc_middle/Cargo.toml | 1 - compiler/rustc_mir_build/Cargo.toml | 1 - compiler/rustc_mir_dataflow/Cargo.toml | 1 - compiler/rustc_mir_transform/Cargo.toml | 1 - .../src/coverage/test_macros/Cargo.toml | 1 - compiler/rustc_monomorphize/Cargo.toml | 1 - compiler/rustc_parse/Cargo.toml | 1 - compiler/rustc_plugin_impl/Cargo.toml | 1 - compiler/rustc_query_impl/Cargo.toml | 1 - compiler/rustc_query_system/Cargo.toml | 1 - compiler/rustc_resolve/Cargo.toml | 1 - compiler/rustc_span/Cargo.toml | 1 - compiler/rustc_symbol_mangling/Cargo.toml | 1 - compiler/rustc_trait_selection/Cargo.toml | 1 - compiler/rustc_type_ir/Cargo.toml | 1 - compiler/rustc_typeck/Cargo.toml | 31 +++++++++++++++++++ 37 files changed, 31 insertions(+), 36 deletions(-) create mode 100644 compiler/rustc_typeck/Cargo.toml diff --git a/compiler/rustc_ast/Cargo.toml b/compiler/rustc_ast/Cargo.toml index c24180bacfc1b..fcbf968182504 100644 --- a/compiler/rustc_ast/Cargo.toml +++ b/compiler/rustc_ast/Cargo.toml @@ -4,7 +4,6 @@ version = "0.0.0" edition = "2021" [lib] -doctest = false [dependencies] bitflags = "1.2.1" diff --git a/compiler/rustc_ast_lowering/Cargo.toml b/compiler/rustc_ast_lowering/Cargo.toml index ce1c8d4997d74..5554fcd29bdc2 100644 --- a/compiler/rustc_ast_lowering/Cargo.toml +++ b/compiler/rustc_ast_lowering/Cargo.toml @@ -4,7 +4,6 @@ version = "0.0.0" edition = "2021" [lib] -doctest = false [dependencies] rustc_arena = { path = "../rustc_arena" } diff --git a/compiler/rustc_ast_pretty/Cargo.toml b/compiler/rustc_ast_pretty/Cargo.toml index 5ad8714e9fec9..a3e3e823b08eb 100644 --- a/compiler/rustc_ast_pretty/Cargo.toml +++ b/compiler/rustc_ast_pretty/Cargo.toml @@ -4,7 +4,6 @@ version = "0.0.0" edition = "2021" [lib] -doctest = false [dependencies] rustc_span = { path = "../rustc_span" } diff --git a/compiler/rustc_attr/Cargo.toml b/compiler/rustc_attr/Cargo.toml index ba310a6860e82..6349ddf31d10b 100644 --- a/compiler/rustc_attr/Cargo.toml +++ b/compiler/rustc_attr/Cargo.toml @@ -4,7 +4,6 @@ version = "0.0.0" edition = "2021" [lib] -doctest = false [dependencies] rustc_ast_pretty = { path = "../rustc_ast_pretty" } diff --git a/compiler/rustc_borrowck/Cargo.toml b/compiler/rustc_borrowck/Cargo.toml index fbf628e865e2c..87c113f3e30b7 100644 --- a/compiler/rustc_borrowck/Cargo.toml +++ b/compiler/rustc_borrowck/Cargo.toml @@ -4,7 +4,6 @@ version = "0.0.0" edition = "2021" [lib] -doctest = false [dependencies] either = "1.5.0" diff --git a/compiler/rustc_builtin_macros/Cargo.toml b/compiler/rustc_builtin_macros/Cargo.toml index 6469d0d7b88a6..5ac45c321c412 100644 --- a/compiler/rustc_builtin_macros/Cargo.toml +++ b/compiler/rustc_builtin_macros/Cargo.toml @@ -4,7 +4,6 @@ version = "0.0.0" edition = "2021" [lib] -doctest = false [dependencies] rustc_ast = { path = "../rustc_ast" } diff --git a/compiler/rustc_codegen_llvm/Cargo.toml b/compiler/rustc_codegen_llvm/Cargo.toml index a068aa2ec6244..f0d435b5a9604 100644 --- a/compiler/rustc_codegen_llvm/Cargo.toml +++ b/compiler/rustc_codegen_llvm/Cargo.toml @@ -5,7 +5,6 @@ edition = "2021" [lib] test = false -doctest = false [dependencies] bitflags = "1.0" diff --git a/compiler/rustc_const_eval/Cargo.toml b/compiler/rustc_const_eval/Cargo.toml index 32e8233a0415f..e09a6d1d6f5aa 100644 --- a/compiler/rustc_const_eval/Cargo.toml +++ b/compiler/rustc_const_eval/Cargo.toml @@ -4,7 +4,6 @@ version = "0.0.0" edition = "2021" [lib] -doctest = false [dependencies] tracing = "0.1" diff --git a/compiler/rustc_data_structures/Cargo.toml b/compiler/rustc_data_structures/Cargo.toml index 2d8658db5e6aa..9daa21ef6b11d 100644 --- a/compiler/rustc_data_structures/Cargo.toml +++ b/compiler/rustc_data_structures/Cargo.toml @@ -4,7 +4,6 @@ version = "0.0.0" edition = "2021" [lib] -doctest = false [dependencies] arrayvec = { version = "0.7", default-features = false } diff --git a/compiler/rustc_error_messages/Cargo.toml b/compiler/rustc_error_messages/Cargo.toml index fc84c7c8665b4..9945f337995d3 100644 --- a/compiler/rustc_error_messages/Cargo.toml +++ b/compiler/rustc_error_messages/Cargo.toml @@ -4,7 +4,6 @@ version = "0.0.0" edition = "2021" [lib] -doctest = false [dependencies] fluent-bundle = "0.15.2" diff --git a/compiler/rustc_errors/Cargo.toml b/compiler/rustc_errors/Cargo.toml index 1eb9dca2a2b91..7803a0792e12c 100644 --- a/compiler/rustc_errors/Cargo.toml +++ b/compiler/rustc_errors/Cargo.toml @@ -4,7 +4,6 @@ version = "0.0.0" edition = "2021" [lib] -doctest = false [dependencies] tracing = "0.1" diff --git a/compiler/rustc_expand/Cargo.toml b/compiler/rustc_expand/Cargo.toml index 4ee7b6c42bbf5..f665f21d48640 100644 --- a/compiler/rustc_expand/Cargo.toml +++ b/compiler/rustc_expand/Cargo.toml @@ -5,7 +5,6 @@ edition = "2021" build = false [lib] -doctest = false [dependencies] rustc_serialize = { path = "../rustc_serialize" } diff --git a/compiler/rustc_feature/Cargo.toml b/compiler/rustc_feature/Cargo.toml index 3d8d0db20d122..6f6468646fc7c 100644 --- a/compiler/rustc_feature/Cargo.toml +++ b/compiler/rustc_feature/Cargo.toml @@ -4,7 +4,6 @@ version = "0.0.0" edition = "2021" [lib] -doctest = false [dependencies] rustc_data_structures = { path = "../rustc_data_structures" } diff --git a/compiler/rustc_hir/Cargo.toml b/compiler/rustc_hir/Cargo.toml index 69ad623b7ea86..129f8d235adbc 100644 --- a/compiler/rustc_hir/Cargo.toml +++ b/compiler/rustc_hir/Cargo.toml @@ -4,7 +4,6 @@ version = "0.0.0" edition = "2021" [lib] -doctest = false [dependencies] rustc_arena = { path = "../rustc_arena" } diff --git a/compiler/rustc_hir_pretty/Cargo.toml b/compiler/rustc_hir_pretty/Cargo.toml index 46a8e7deeed04..1ea7be1ae7b52 100644 --- a/compiler/rustc_hir_pretty/Cargo.toml +++ b/compiler/rustc_hir_pretty/Cargo.toml @@ -4,7 +4,6 @@ version = "0.0.0" edition = "2021" [lib] -doctest = false [dependencies] rustc_ast_pretty = { path = "../rustc_ast_pretty" } diff --git a/compiler/rustc_incremental/Cargo.toml b/compiler/rustc_incremental/Cargo.toml index d3c425a072bce..179e85f32c913 100644 --- a/compiler/rustc_incremental/Cargo.toml +++ b/compiler/rustc_incremental/Cargo.toml @@ -4,7 +4,6 @@ version = "0.0.0" edition = "2021" [lib] -doctest = false [dependencies] rustc_graphviz = { path = "../rustc_graphviz" } diff --git a/compiler/rustc_index/Cargo.toml b/compiler/rustc_index/Cargo.toml index 8a81a93a99cfd..d8ea5aa80b87a 100644 --- a/compiler/rustc_index/Cargo.toml +++ b/compiler/rustc_index/Cargo.toml @@ -4,7 +4,6 @@ version = "0.0.0" edition = "2021" [lib] -doctest = false [dependencies] arrayvec = { version = "0.7", default-features = false } diff --git a/compiler/rustc_infer/Cargo.toml b/compiler/rustc_infer/Cargo.toml index aced787d67116..fb53d360c4ea6 100644 --- a/compiler/rustc_infer/Cargo.toml +++ b/compiler/rustc_infer/Cargo.toml @@ -4,7 +4,6 @@ version = "0.0.0" edition = "2021" [lib] -doctest = false [dependencies] tracing = "0.1" diff --git a/compiler/rustc_interface/Cargo.toml b/compiler/rustc_interface/Cargo.toml index f3c38875b37c6..f0cb861c782f0 100644 --- a/compiler/rustc_interface/Cargo.toml +++ b/compiler/rustc_interface/Cargo.toml @@ -4,7 +4,6 @@ version = "0.0.0" edition = "2021" [lib] -doctest = false [dependencies] libloading = "0.7.1" diff --git a/compiler/rustc_lexer/Cargo.toml b/compiler/rustc_lexer/Cargo.toml index 35af110537d4c..ad685c2ad19f4 100644 --- a/compiler/rustc_lexer/Cargo.toml +++ b/compiler/rustc_lexer/Cargo.toml @@ -12,7 +12,6 @@ Rust lexer used by rustc. No stability guarantees are provided. # Note: do not remove this blank `[lib]` section. # This will be used when publishing this crate as `rustc-ap-rustc_lexer`. [lib] -doctest = false # Note that this crate purposefully does not depend on other rustc crates [dependencies] diff --git a/compiler/rustc_metadata/Cargo.toml b/compiler/rustc_metadata/Cargo.toml index 2c5db9d8b2765..6d85103c9d132 100644 --- a/compiler/rustc_metadata/Cargo.toml +++ b/compiler/rustc_metadata/Cargo.toml @@ -4,7 +4,6 @@ version = "0.0.0" edition = "2021" [lib] -doctest = false [dependencies] libloading = "0.7.1" diff --git a/compiler/rustc_middle/Cargo.toml b/compiler/rustc_middle/Cargo.toml index cca17a4eccd3a..c0e16e7dd822f 100644 --- a/compiler/rustc_middle/Cargo.toml +++ b/compiler/rustc_middle/Cargo.toml @@ -4,7 +4,6 @@ version = "0.0.0" edition = "2021" [lib] -doctest = false [dependencies] bitflags = "1.2.1" diff --git a/compiler/rustc_mir_build/Cargo.toml b/compiler/rustc_mir_build/Cargo.toml index 30f90e383a889..c726fa3a33fff 100644 --- a/compiler/rustc_mir_build/Cargo.toml +++ b/compiler/rustc_mir_build/Cargo.toml @@ -4,7 +4,6 @@ version = "0.0.0" edition = "2021" [lib] -doctest = false [dependencies] rustc_arena = { path = "../rustc_arena" } diff --git a/compiler/rustc_mir_dataflow/Cargo.toml b/compiler/rustc_mir_dataflow/Cargo.toml index 385e9ba748fb9..324644b67928e 100644 --- a/compiler/rustc_mir_dataflow/Cargo.toml +++ b/compiler/rustc_mir_dataflow/Cargo.toml @@ -4,7 +4,6 @@ version = "0.0.0" edition = "2021" [lib] -doctest = false [dependencies] polonius-engine = "0.13.0" diff --git a/compiler/rustc_mir_transform/Cargo.toml b/compiler/rustc_mir_transform/Cargo.toml index 85b7a4af59894..53545cff0cb34 100644 --- a/compiler/rustc_mir_transform/Cargo.toml +++ b/compiler/rustc_mir_transform/Cargo.toml @@ -4,7 +4,6 @@ version = "0.0.0" edition = "2021" [lib] -doctest = false [dependencies] itertools = "0.10.1" diff --git a/compiler/rustc_mir_transform/src/coverage/test_macros/Cargo.toml b/compiler/rustc_mir_transform/src/coverage/test_macros/Cargo.toml index f5e8b65656a3e..f753caa91248e 100644 --- a/compiler/rustc_mir_transform/src/coverage/test_macros/Cargo.toml +++ b/compiler/rustc_mir_transform/src/coverage/test_macros/Cargo.toml @@ -5,4 +5,3 @@ edition = "2021" [lib] proc-macro = true -doctest = false diff --git a/compiler/rustc_monomorphize/Cargo.toml b/compiler/rustc_monomorphize/Cargo.toml index 59ca04ec868d1..6ee5330b63f51 100644 --- a/compiler/rustc_monomorphize/Cargo.toml +++ b/compiler/rustc_monomorphize/Cargo.toml @@ -4,7 +4,6 @@ version = "0.0.0" edition = "2021" [lib] -doctest = false [dependencies] smallvec = { version = "1.8.1", features = [ "union", "may_dangle" ] } diff --git a/compiler/rustc_parse/Cargo.toml b/compiler/rustc_parse/Cargo.toml index c6ca260e9831e..a5c94e1640334 100644 --- a/compiler/rustc_parse/Cargo.toml +++ b/compiler/rustc_parse/Cargo.toml @@ -4,7 +4,6 @@ version = "0.0.0" edition = "2021" [lib] -doctest = false [dependencies] bitflags = "1.0" diff --git a/compiler/rustc_plugin_impl/Cargo.toml b/compiler/rustc_plugin_impl/Cargo.toml index c409b6c3e5440..fa27bfc61d141 100644 --- a/compiler/rustc_plugin_impl/Cargo.toml +++ b/compiler/rustc_plugin_impl/Cargo.toml @@ -5,7 +5,6 @@ build = false edition = "2021" [lib] -doctest = false [dependencies] libloading = "0.7.1" diff --git a/compiler/rustc_query_impl/Cargo.toml b/compiler/rustc_query_impl/Cargo.toml index e7f12caaf33e5..319c749edc039 100644 --- a/compiler/rustc_query_impl/Cargo.toml +++ b/compiler/rustc_query_impl/Cargo.toml @@ -4,7 +4,6 @@ version = "0.0.0" edition = "2021" [lib] -doctest = false [dependencies] measureme = "10.0.0" diff --git a/compiler/rustc_query_system/Cargo.toml b/compiler/rustc_query_system/Cargo.toml index d7599a56c0b66..faddad7417109 100644 --- a/compiler/rustc_query_system/Cargo.toml +++ b/compiler/rustc_query_system/Cargo.toml @@ -4,7 +4,6 @@ version = "0.0.0" edition = "2021" [lib] -doctest = false [dependencies] parking_lot = "0.11" diff --git a/compiler/rustc_resolve/Cargo.toml b/compiler/rustc_resolve/Cargo.toml index 5d2b606b43cd5..d66db1d7a0dd5 100644 --- a/compiler/rustc_resolve/Cargo.toml +++ b/compiler/rustc_resolve/Cargo.toml @@ -4,7 +4,6 @@ version = "0.0.0" edition = "2021" [lib] -doctest = false [dependencies] bitflags = "1.2.1" diff --git a/compiler/rustc_span/Cargo.toml b/compiler/rustc_span/Cargo.toml index 7227b193f2194..48a2ab0f904ac 100644 --- a/compiler/rustc_span/Cargo.toml +++ b/compiler/rustc_span/Cargo.toml @@ -4,7 +4,6 @@ version = "0.0.0" edition = "2021" [lib] -doctest = false [dependencies] rustc_serialize = { path = "../rustc_serialize" } diff --git a/compiler/rustc_symbol_mangling/Cargo.toml b/compiler/rustc_symbol_mangling/Cargo.toml index 3db05225722e7..2a29ad6a9e56b 100644 --- a/compiler/rustc_symbol_mangling/Cargo.toml +++ b/compiler/rustc_symbol_mangling/Cargo.toml @@ -4,7 +4,6 @@ version = "0.0.0" edition = "2021" [lib] -doctest = false [dependencies] bitflags = "1.2.1" diff --git a/compiler/rustc_trait_selection/Cargo.toml b/compiler/rustc_trait_selection/Cargo.toml index 566f236f26a8c..67613e1a4ebc0 100644 --- a/compiler/rustc_trait_selection/Cargo.toml +++ b/compiler/rustc_trait_selection/Cargo.toml @@ -4,7 +4,6 @@ version = "0.0.0" edition = "2021" [lib] -doctest = false [dependencies] rustc_parse_format = { path = "../rustc_parse_format" } diff --git a/compiler/rustc_type_ir/Cargo.toml b/compiler/rustc_type_ir/Cargo.toml index 5aa3cf017fa68..c4008e9b61296 100644 --- a/compiler/rustc_type_ir/Cargo.toml +++ b/compiler/rustc_type_ir/Cargo.toml @@ -4,7 +4,6 @@ version = "0.0.0" edition = "2021" [lib] -doctest = false [dependencies] bitflags = "1.2.1" diff --git a/compiler/rustc_typeck/Cargo.toml b/compiler/rustc_typeck/Cargo.toml new file mode 100644 index 0000000000000..24461270a4d40 --- /dev/null +++ b/compiler/rustc_typeck/Cargo.toml @@ -0,0 +1,31 @@ +[package] +name = "rustc_typeck" +version = "0.0.0" +edition = "2021" + +[lib] +test = false + +[dependencies] +rustc_arena = { path = "../rustc_arena" } +tracing = "0.1" +rustc_macros = { path = "../rustc_macros" } +rustc_middle = { path = "../rustc_middle" } +rustc_attr = { path = "../rustc_attr" } +rustc_data_structures = { path = "../rustc_data_structures" } +rustc_errors = { path = "../rustc_errors" } +rustc_graphviz = { path = "../rustc_graphviz" } +rustc_hir = { path = "../rustc_hir" } +rustc_hir_pretty = { path = "../rustc_hir_pretty" } +rustc_target = { path = "../rustc_target" } +rustc_session = { path = "../rustc_session" } +smallvec = { version = "1.8.1", features = ["union", "may_dangle"] } +rustc_ast = { path = "../rustc_ast" } +rustc_span = { path = "../rustc_span" } +rustc_index = { path = "../rustc_index" } +rustc_infer = { path = "../rustc_infer" } +rustc_trait_selection = { path = "../rustc_trait_selection" } +rustc_ty_utils = { path = "../rustc_ty_utils" } +rustc_lint = { path = "../rustc_lint" } +rustc_serialize = { path = "../rustc_serialize" } +rustc_type_ir = { path = "../rustc_type_ir" } From a1999b76aa019968060c8271d40f0039a567b547 Mon Sep 17 00:00:00 2001 From: reez12g Date: Fri, 16 Sep 2022 15:51:52 +0900 Subject: [PATCH 04/13] Mark ignore(illustrative) on docs in compiler/rustc_ast_lowering/src/expr.rs --- compiler/rustc_ast_lowering/src/expr.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/compiler/rustc_ast_lowering/src/expr.rs b/compiler/rustc_ast_lowering/src/expr.rs index 94137391568c9..46886c518afd5 100644 --- a/compiler/rustc_ast_lowering/src/expr.rs +++ b/compiler/rustc_ast_lowering/src/expr.rs @@ -1609,11 +1609,11 @@ impl<'hir> LoweringContext<'_, 'hir> { } /// Desugar `ExprKind::Yeet` from: `do yeet ` into: - /// ```rust + /// ```ignore(illustrative) /// // If there is an enclosing `try {...}`: - /// break 'catch_target FromResidual::from_residual(Yeet(residual)), + /// break 'catch_target FromResidual::from_residual(Yeet(residual)); /// // Otherwise: - /// return FromResidual::from_residual(Yeet(residual)), + /// return FromResidual::from_residual(Yeet(residual)); /// ``` /// But to simplify this, there's a `from_yeet` lang item function which /// handles the combined `FromResidual::from_residual(Yeet(residual))`. From c2ad8d2551da3cb6ee8fe656fe65cbd696ec0e2d Mon Sep 17 00:00:00 2001 From: reez12g Date: Fri, 16 Sep 2022 16:11:54 +0900 Subject: [PATCH 05/13] Mark ignore on error code docs in compiler/rustc_borrowck/src/diagnostics/region_errors.rs --- compiler/rustc_borrowck/src/diagnostics/region_errors.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/rustc_borrowck/src/diagnostics/region_errors.rs b/compiler/rustc_borrowck/src/diagnostics/region_errors.rs index 43d67bfa72991..a4dfc945e33cb 100644 --- a/compiler/rustc_borrowck/src/diagnostics/region_errors.rs +++ b/compiler/rustc_borrowck/src/diagnostics/region_errors.rs @@ -341,7 +341,7 @@ impl<'a, 'tcx> MirBorrowckCtxt<'a, 'tcx> { /// Report an error because the universal region `fr` was required to outlive /// `outlived_fr` but it is not known to do so. For example: /// - /// ```compile_fail,E0312 + /// ```ignore(compile_fail,E0312) /// fn foo<'a, 'b>(x: &'a u32) -> &'b u32 { x } /// ``` /// From cf31a29492137ac2a7aa59bf49549911ef91ab24 Mon Sep 17 00:00:00 2001 From: reez12g Date: Fri, 16 Sep 2022 16:12:49 +0900 Subject: [PATCH 06/13] Mark ignore on error code docs in compiler/rustc_borrowck/src/region_infer/mod.rs --- compiler/rustc_borrowck/src/region_infer/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/rustc_borrowck/src/region_infer/mod.rs b/compiler/rustc_borrowck/src/region_infer/mod.rs index 244e6e3422d83..7775691c2a7fd 100644 --- a/compiler/rustc_borrowck/src/region_infer/mod.rs +++ b/compiler/rustc_borrowck/src/region_infer/mod.rs @@ -1398,7 +1398,7 @@ impl<'tcx> RegionInferenceContext<'tcx> { /// whether any of the constraints were too strong. In particular, /// we want to check for a case where a universally quantified /// region exceeded its bounds. Consider: - /// ```compile_fail,E0312 + /// ```ignore(compile_fail,E0312) /// fn foo<'a, 'b>(x: &'a u32) -> &'b u32 { x } /// ``` /// In this case, returning `x` requires `&'a u32 <: &'b u32` @@ -1451,7 +1451,7 @@ impl<'tcx> RegionInferenceContext<'tcx> { /// /// /// In the canonical example - /// ```compile_fail,E0312 + /// ```ignore(compile_fail,E0312) /// fn foo<'a, 'b>(x: &'a u32) -> &'b u32 { x } /// ``` /// returning `x` requires `&'a u32 <: &'b u32` and hence we establish (transitively) a From 213910a8a272a577b6ee07eb465804199e8aed49 Mon Sep 17 00:00:00 2001 From: reez12g Date: Fri, 16 Sep 2022 17:19:03 +0900 Subject: [PATCH 07/13] Add feature flag to docs in compiler/rustc_builtin_macros/src/assert/context.rs --- compiler/rustc_builtin_macros/src/assert/context.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/compiler/rustc_builtin_macros/src/assert/context.rs b/compiler/rustc_builtin_macros/src/assert/context.rs index 973a8cb85c2b9..89f7089b11a2f 100644 --- a/compiler/rustc_builtin_macros/src/assert/context.rs +++ b/compiler/rustc_builtin_macros/src/assert/context.rs @@ -58,6 +58,7 @@ impl<'cx, 'a> Context<'cx, 'a> { /// Builds the whole `assert!` expression. For example, `let elem = 1; assert!(elem == 1);` expands to: /// /// ```rust + /// #![feature(generic_assert_internals)] /// let elem = 1; /// { /// #[allow(unused_imports)] From cc8f98f4f2625534326eb3a8e8e88da05449469e Mon Sep 17 00:00:00 2001 From: reez12g Date: Fri, 16 Sep 2022 20:09:51 +0900 Subject: [PATCH 08/13] Fix docs in compiler/rustc_builtin_macros/src/assert/context.rs --- compiler/rustc_builtin_macros/src/assert/context.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/rustc_builtin_macros/src/assert/context.rs b/compiler/rustc_builtin_macros/src/assert/context.rs index 89f7089b11a2f..bb6839360262a 100644 --- a/compiler/rustc_builtin_macros/src/assert/context.rs +++ b/compiler/rustc_builtin_macros/src/assert/context.rs @@ -71,7 +71,7 @@ impl<'cx, 'a> Context<'cx, 'a> { /// __local_bind0 /// } == 1 /// ) { - /// panic!("Assertion failed: elem == 1\nWith captures:\n elem = {}", __capture0) + /// panic!("Assertion failed: elem == 1\nWith captures:\n elem = {:?}", __capture0) /// } /// } /// ``` From 73775a96dcc04ea4d592be5f21040f2401e0aadd Mon Sep 17 00:00:00 2001 From: reez12g Date: Fri, 16 Sep 2022 20:10:25 +0900 Subject: [PATCH 09/13] Fix docs in compiler/rustc_builtin_macros/src/deriving/generic/mod.rs --- compiler/rustc_builtin_macros/src/deriving/generic/mod.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/compiler/rustc_builtin_macros/src/deriving/generic/mod.rs b/compiler/rustc_builtin_macros/src/deriving/generic/mod.rs index 3cc160adb5397..69ce0fbc02bdd 100644 --- a/compiler/rustc_builtin_macros/src/deriving/generic/mod.rs +++ b/compiler/rustc_builtin_macros/src/deriving/generic/mod.rs @@ -1110,6 +1110,11 @@ impl<'a> MethodDef<'a> { /// ``` /// is equivalent to: /// ``` + /// #![feature(core_intrinsics)] + /// enum A { + /// A1, + /// A2(i32) + /// } /// impl ::core::cmp::PartialEq for A { /// #[inline] /// fn eq(&self, other: &A) -> bool { From 00612e23cb863d6730fe77001068438039d8078b Mon Sep 17 00:00:00 2001 From: reez12g Date: Fri, 16 Sep 2022 20:11:46 +0900 Subject: [PATCH 10/13] Mark ignore(illustrative) on docs in compiler/rustc_const_eval/src/interpret/validity.rs --- compiler/rustc_const_eval/src/interpret/validity.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/compiler/rustc_const_eval/src/interpret/validity.rs b/compiler/rustc_const_eval/src/interpret/validity.rs index 14aaee6ac3f9e..d4146c2424101 100644 --- a/compiler/rustc_const_eval/src/interpret/validity.rs +++ b/compiler/rustc_const_eval/src/interpret/validity.rs @@ -56,7 +56,7 @@ macro_rules! throw_validation_failure { /// This lets you use the patterns as a kind of validation list, asserting which errors /// can possibly happen: /// -/// ``` +/// ```ignore(illustrative) /// let v = try_validation!(some_fn(), some_path, { /// Foo | Bar | Baz => { "some failure" }, /// }); @@ -65,7 +65,7 @@ macro_rules! throw_validation_failure { /// The patterns must be of type `UndefinedBehaviorInfo`. /// An additional expected parameter can also be added to the failure message: /// -/// ``` +/// ```ignore(illustrative) /// let v = try_validation!(some_fn(), some_path, { /// Foo | Bar | Baz => { "some failure" } expected { "something that wasn't a failure" }, /// }); @@ -74,7 +74,7 @@ macro_rules! throw_validation_failure { /// An additional nicety is that both parameters actually take format args, so you can just write /// the format string in directly: /// -/// ``` +/// ```ignore(illustrative) /// let v = try_validation!(some_fn(), some_path, { /// Foo | Bar | Baz => { "{:?}", some_failure } expected { "{}", expected_value }, /// }); From e89fbc5872acbf3b003f02242b3889d815bd6de8 Mon Sep 17 00:00:00 2001 From: reez12g Date: Thu, 29 Sep 2022 16:50:48 +0900 Subject: [PATCH 11/13] Fix confliction --- compiler/rustc_typeck/Cargo.toml | 31 ------------------------------- 1 file changed, 31 deletions(-) delete mode 100644 compiler/rustc_typeck/Cargo.toml diff --git a/compiler/rustc_typeck/Cargo.toml b/compiler/rustc_typeck/Cargo.toml deleted file mode 100644 index 24461270a4d40..0000000000000 --- a/compiler/rustc_typeck/Cargo.toml +++ /dev/null @@ -1,31 +0,0 @@ -[package] -name = "rustc_typeck" -version = "0.0.0" -edition = "2021" - -[lib] -test = false - -[dependencies] -rustc_arena = { path = "../rustc_arena" } -tracing = "0.1" -rustc_macros = { path = "../rustc_macros" } -rustc_middle = { path = "../rustc_middle" } -rustc_attr = { path = "../rustc_attr" } -rustc_data_structures = { path = "../rustc_data_structures" } -rustc_errors = { path = "../rustc_errors" } -rustc_graphviz = { path = "../rustc_graphviz" } -rustc_hir = { path = "../rustc_hir" } -rustc_hir_pretty = { path = "../rustc_hir_pretty" } -rustc_target = { path = "../rustc_target" } -rustc_session = { path = "../rustc_session" } -smallvec = { version = "1.8.1", features = ["union", "may_dangle"] } -rustc_ast = { path = "../rustc_ast" } -rustc_span = { path = "../rustc_span" } -rustc_index = { path = "../rustc_index" } -rustc_infer = { path = "../rustc_infer" } -rustc_trait_selection = { path = "../rustc_trait_selection" } -rustc_ty_utils = { path = "../rustc_ty_utils" } -rustc_lint = { path = "../rustc_lint" } -rustc_serialize = { path = "../rustc_serialize" } -rustc_type_ir = { path = "../rustc_type_ir" } From ebcec301829e64cc0e29b2a0f1daf79ecbd73bcd Mon Sep 17 00:00:00 2001 From: reez12g Date: Sun, 2 Oct 2022 11:00:43 +0900 Subject: [PATCH 12/13] Remove 'E0312' from 'compile_fail,E0312' statement temporarily --- compiler/rustc_borrowck/src/diagnostics/region_errors.rs | 2 +- compiler/rustc_borrowck/src/region_infer/mod.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/compiler/rustc_borrowck/src/diagnostics/region_errors.rs b/compiler/rustc_borrowck/src/diagnostics/region_errors.rs index a4dfc945e33cb..038cae9a3ede2 100644 --- a/compiler/rustc_borrowck/src/diagnostics/region_errors.rs +++ b/compiler/rustc_borrowck/src/diagnostics/region_errors.rs @@ -341,7 +341,7 @@ impl<'a, 'tcx> MirBorrowckCtxt<'a, 'tcx> { /// Report an error because the universal region `fr` was required to outlive /// `outlived_fr` but it is not known to do so. For example: /// - /// ```ignore(compile_fail,E0312) + /// ```compile_fail /// fn foo<'a, 'b>(x: &'a u32) -> &'b u32 { x } /// ``` /// diff --git a/compiler/rustc_borrowck/src/region_infer/mod.rs b/compiler/rustc_borrowck/src/region_infer/mod.rs index 7775691c2a7fd..3410f260b2f3b 100644 --- a/compiler/rustc_borrowck/src/region_infer/mod.rs +++ b/compiler/rustc_borrowck/src/region_infer/mod.rs @@ -1398,7 +1398,7 @@ impl<'tcx> RegionInferenceContext<'tcx> { /// whether any of the constraints were too strong. In particular, /// we want to check for a case where a universally quantified /// region exceeded its bounds. Consider: - /// ```ignore(compile_fail,E0312) + /// ```compile_fail /// fn foo<'a, 'b>(x: &'a u32) -> &'b u32 { x } /// ``` /// In this case, returning `x` requires `&'a u32 <: &'b u32` @@ -1451,7 +1451,7 @@ impl<'tcx> RegionInferenceContext<'tcx> { /// /// /// In the canonical example - /// ```ignore(compile_fail,E0312) + /// ```compile_fail /// fn foo<'a, 'b>(x: &'a u32) -> &'b u32 { x } /// ``` /// returning `x` requires `&'a u32 <: &'b u32` and hence we establish (transitively) a From 488eb4209e0e9f829e1a78516ac13c21d13df0d2 Mon Sep 17 00:00:00 2001 From: reez12g Date: Wed, 5 Oct 2022 09:53:49 +0900 Subject: [PATCH 13/13] Temporarily reinstate doctest=false --- compiler/rustc_ast_lowering/Cargo.toml | 1 + compiler/rustc_builtin_macros/Cargo.toml | 1 + compiler/rustc_expand/Cargo.toml | 1 + compiler/rustc_infer/Cargo.toml | 1 + compiler/rustc_middle/Cargo.toml | 1 + compiler/rustc_query_impl/Cargo.toml | 1 + 6 files changed, 6 insertions(+) diff --git a/compiler/rustc_ast_lowering/Cargo.toml b/compiler/rustc_ast_lowering/Cargo.toml index 5554fcd29bdc2..ce1c8d4997d74 100644 --- a/compiler/rustc_ast_lowering/Cargo.toml +++ b/compiler/rustc_ast_lowering/Cargo.toml @@ -4,6 +4,7 @@ version = "0.0.0" edition = "2021" [lib] +doctest = false [dependencies] rustc_arena = { path = "../rustc_arena" } diff --git a/compiler/rustc_builtin_macros/Cargo.toml b/compiler/rustc_builtin_macros/Cargo.toml index 5ac45c321c412..6469d0d7b88a6 100644 --- a/compiler/rustc_builtin_macros/Cargo.toml +++ b/compiler/rustc_builtin_macros/Cargo.toml @@ -4,6 +4,7 @@ version = "0.0.0" edition = "2021" [lib] +doctest = false [dependencies] rustc_ast = { path = "../rustc_ast" } diff --git a/compiler/rustc_expand/Cargo.toml b/compiler/rustc_expand/Cargo.toml index f665f21d48640..4ee7b6c42bbf5 100644 --- a/compiler/rustc_expand/Cargo.toml +++ b/compiler/rustc_expand/Cargo.toml @@ -5,6 +5,7 @@ edition = "2021" build = false [lib] +doctest = false [dependencies] rustc_serialize = { path = "../rustc_serialize" } diff --git a/compiler/rustc_infer/Cargo.toml b/compiler/rustc_infer/Cargo.toml index fb53d360c4ea6..aced787d67116 100644 --- a/compiler/rustc_infer/Cargo.toml +++ b/compiler/rustc_infer/Cargo.toml @@ -4,6 +4,7 @@ version = "0.0.0" edition = "2021" [lib] +doctest = false [dependencies] tracing = "0.1" diff --git a/compiler/rustc_middle/Cargo.toml b/compiler/rustc_middle/Cargo.toml index c0e16e7dd822f..cca17a4eccd3a 100644 --- a/compiler/rustc_middle/Cargo.toml +++ b/compiler/rustc_middle/Cargo.toml @@ -4,6 +4,7 @@ version = "0.0.0" edition = "2021" [lib] +doctest = false [dependencies] bitflags = "1.2.1" diff --git a/compiler/rustc_query_impl/Cargo.toml b/compiler/rustc_query_impl/Cargo.toml index 319c749edc039..e7f12caaf33e5 100644 --- a/compiler/rustc_query_impl/Cargo.toml +++ b/compiler/rustc_query_impl/Cargo.toml @@ -4,6 +4,7 @@ version = "0.0.0" edition = "2021" [lib] +doctest = false [dependencies] measureme = "10.0.0"