8000 Rollup merge of #70112 - Centril:rollup-gpi5tbq, r=Centril · rust-lang/rust@11053ba · GitHub
[go: up one dir, main page]

Skip to content

Commit 11053ba

Browse files
authored
Rollup merge of #70112 - Centril:rollup-gpi5tbq, r=Centril
Rollup of 10 pull requests Successful merges: - #67749 (keyword docs for else and inkeyword docs for else and in.) - #69139 (clean up E0308 explanation) - #69189 (Erase regions in writeback) - #69837 (Use smaller discriminants for generators) - #69838 (Expansion-driven outline module parsing) - #69839 (Miri error reform) - #69899 (Make methods declared by `newtype_index` macro `const`) - #69920 (Remove some imports to the rustc crate) - #70075 (Fix repr pretty display) - #70106 (Tidy: fix running rustfmt twice) Failed merges: - #70051 (Allow `hir().find` to return `None`) - #70074 (Expand: nix all fatal errors) r? @ghost
2 parents f509b26 + b6f61a1 commit 11053ba

File tree

284 files changed

+2024
-1837
lines changed
  • librustc_codegen_llvm
  • librustc_codegen_ssa
  • librustc_codegen_utils
  • librustc_driver
  • librustc_error_codes/error_codes
  • librustc_errors
  • librustc_expand
  • librustc_hir
  • librustc_incremental/persist
  • librustc_index
  • librustc_infer
  • librustc_interface
  • librustc_lint
  • librustc_metadata
  • librustc_mir_build
  • librustc_mir
  • librustc_parse
  • librustc_passes
  • librustc_plugin_impl
  • librustc_privacy
  • librustc_resolve
  • librustc_save_analysis
  • librustc_span
  • librustc_target
  • librustc_trait_selection
  • librustc_typeck
  • librustc_ty
  • librustc
  • librustdoc
  • libstd
  • test
  • Some content is hidden

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

    284 files changed

    +2024
    -1837
    lines changed

    Cargo.lock

    Lines changed: 10 additions & 0 deletions
    Original file line numberDiff line numberDiff line change
    @@ -3624,6 +3624,7 @@ dependencies = [
    36243624
    "rustc_data_structures",
    36253625
    "rustc_hir",
    36263626
    "rustc_metadata",
    3627+
    "rustc_session",
    36273628
    "rustc_span",
    36283629
    "rustc_target",
    36293630
    ]
    @@ -3677,6 +3678,7 @@ dependencies = [
    36773678
    "rustc_parse",
    36783679
    "rustc_plugin_impl",
    36793680
    "rustc_save_analysis",
    3681+
    "rustc_session",
    36803682
    "rustc_span",
    36813683
    "rustc_target",
    36823684
    "serialize",
    @@ -3791,6 +3793,7 @@ dependencies = [
    37913793
    "rustc_hir",
    37923794
    "rustc_index",
    37933795
    "rustc_macros",
    3796+
    "rustc_session",
    37943797
    "rustc_span",
    37953798
    "rustc_target",
    37963799
    "smallvec 1.0.0",
    @@ -3903,6 +3906,7 @@ dependencies = [
    39033906
    "rustc_expand",
    39043907
    "rustc_hir",
    39053908
    "rustc_index",
    3909+
    "rustc_session",
    39063910
    "rustc_span",
    39073911
    "rustc_target",
    39083912
    "serialize",
    @@ -3933,6 +3937,7 @@ dependencies = [
    39333937
    "rustc_infer",
    39343938
    "rustc_lexer",
    39353939
    "rustc_macros",
    3940+
    "rustc_session",
    39363941
    "rustc_span",
    39373942
    "rustc_target",
    39383943
    "rustc_trait_selection",
    @@ -4013,6 +4018,7 @@ dependencies = [
    40134018
    "rustc_hir",
    40144019
    "rustc_lint",
    40154020
    "rustc_metadata",
    4021+
    "rustc_session",
    40164022
    "rustc_span",
    40174023
    ]
    40184024

    @@ -4027,6 +4033,7 @@ dependencies = [
    40274033
    "rustc_data_structures",
    40284034
    "rustc_errors",
    40294035
    "rustc_hir",
    4036+
    "rustc_session",
    40304037
    "rustc_span",
    40314038
    "rustc_typeck",
    40324039
    ]
    @@ -4068,6 +4075,7 @@ dependencies = [
    40684075
    "rustc_data_structures",
    40694076
    "rustc_hir",
    40704077
    "rustc_parse",
    4078+
    "rustc_session",
    40714079
    "rustc_span",
    40724080
    "serde_json",
    40734081
    ]
    @@ -4174,6 +4182,7 @@ dependencies = [
    41744182
    "rustc_data_structures",
    41754183
    "rustc_hir",
    41764184
    "rustc_infer",
    4185+
    "rustc_session",
    41774186
    "rustc_span",
    41784187
    "rustc_target",
    41794188
    "rustc_trait_selection",
    @@ -4193,6 +4202,7 @@ dependencies = [
    41934202
    "rustc_hir",
    41944203
    "rustc_index",
    41954204
    "rustc_infer",
    4205+
    "rustc_session",
    41964206
    "rustc_span",
    41974207
    "rustc_target",
    41984208
    "rustc_trait_selection",

    src/bootstrap/format.rs

    Lines changed: 3 additions & 0 deletions
    Original file line numberDiff line numberDiff line change
    @@ -37,6 +37,9 @@ struct RustfmtConfig {
    3737
    }
    3838

    3939
    pub fn format(build: &Build, check: bool) {
    40+
    if build.config.dry_run {
    41+
    return;
    42+
    }
    4043
    let mut builder = ignore::types::TypesBuilder::new();
    4144
    builder.add_defaults();
    4245
    builder.select("rust");

    src/libpanic_unwind/emcc.rs

    Lines changed: 0 additions & 2 deletions
    Original file line numberDiff line numberDiff line change
    @@ -6,8 +6,6 @@
    66
    //! Emscripten's runtime always implements those APIs and does not
    77
    //! implement libunwind.
    88
    9-
    #![allow(private_no_mangle_fns)]
    10-
    119
    use alloc::boxed::Box;
    1210
    use core::any::Any;
    1311
    use core::mem;

    src/libpanic_unwind/gcc.rs

    Lines changed: 0 additions & 2 deletions
    Original file line numberDiff line numberDiff line change
    @@ -36,8 +36,6 @@
    3636
    //! Once stack has been unwound down to the handler frame level, unwinding stops
    3737
    //! and the last personality routine transfers control to the catch block.
    3838
    39-
    #![allow(private_no_mangle_fns)]
    40-
    4139
    use alloc::boxed::Box;
    4240
    use core::any::Any;
    4341

    src/libpanic_unwind/seh.rs

    Lines changed: 0 additions & 1 deletion
    Original file line numberDiff line numberDiff line change
    @@ -45,7 +45,6 @@
    4545
    //! [llvm]: http://llvm.org/docs/ExceptionHandling.html#background-on-windows-exceptions
    4646
    4747
    #![allow(nonstandard_style)]
    48-
    #![allow(private_no_mangle_fns)]
    4948

    5049
    use alloc::boxed::Box;
    5150
    use core::any::Any;

    src/librustc/hir/map/mod.rs

    Lines changed: 1 addition & 1 deletion
    Original file line numberDiff line numberDiff line change
    @@ -346,7 +346,7 @@ impl<'hir> Map<'hir> {
    346346
    }
    347347

    348348
    fn get_entry(&self, id: HirId) -> Entry<'hir> {
    349-
    if id.local_id == ItemLocalId::from_u32_const(0) { F438
    349+
    if id.local_id == ItemLocalId::from_u32(0) {
    350350
    let owner = self.tcx.hir_owner(id.owner_def_id());
    351351
    Entry { parent: owner.parent, node: owner.node }
    352352
    } else {

    src/librustc/ich/hcx.rs

    Lines changed: 2 additions & 3 deletions
    Original file line numberDiff line numberDiff line change
    @@ -1,8 +1,6 @@
    1-
    use crate::hir::map::definitions::Definitions;
    2-
    use crate::hir::map::DefPathHash;
    1+
    use crate::hir::map::definitions::{DefPathHash, Definitions};
    32
    use crate::ich::{self, CachingSourceMapView};
    43
    use crate::middle::cstore::CrateStore;
    5-
    use crate::session::Session;
    64
    use crate::ty::{fast_reject, TyCtxt};
    75

    86
    use rustc_ast::ast;
    @@ -11,6 +9,7 @@ use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
    119
    use rustc_data_structures::sync::Lrc;
    1210
    use rustc_hir as hir;
    1311
    use rustc_hir::def_id::{DefId, DefIndex};
    12+
    use rustc_session::Session;
    1413
    use rustc_span::source_map::SourceMap;
    1514
    use rustc_span::symbol::Symbol;
    1615
    use rustc_span::{BytePos, SourceFile};

    src/librustc/lib.rs

    Lines changed: 3 additions & 1 deletion
    Original file line numberDiff line numberDiff line change
    @@ -26,6 +26,9 @@
    2626
    #![feature(bool_to_option)]
    2727
    #![feature(box_patterns)]
    2828
    #![feature(box_syntax)]
    29+
    #![feature(const_if_match)]
    30+
    #![feature(const_fn)]
    31+
    #![feature(const_panic)]
    2932
    #![feature(const_transmute)]
    3033
    #![feature(core_intrinsics)]
    3134
    #![feature(drain_filter)]
    @@ -80,7 +83,6 @@ pub mod infer;
    8083
    pub mod lint;
    8184
    pub mod middle;
    8285
    pub mod mir;
    83-
    pub use rustc_session as session;
    8486
    pub mod traits;
    8587
    pub mod ty;
    8688

    src/librustc/lint.rs

    Lines changed: 1 addition & 1 deletion
    Original file line numberDiff line numberDiff line change
    @@ -5,7 +5,7 @@ use rustc_data_structures::fx::FxHashMap;
    55
    use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
    66
    use rustc_errors::{pluralize, Applicability, DiagnosticBuilder, DiagnosticId};
    77
    use rustc_hir::HirId;
    8-
    pub use rustc_session::lint::{builtin, Level, Lint, LintId, LintPass};
    8+
    use rustc_session::lint::{builtin, Level, Lint, LintId};
    99
    use rustc_session::{DiagnosticMessageId, Session};
    1010
    use rustc_span::hygiene::MacroKind;
    1111
    use rustc_span::source_map::{DesugaringKind, ExpnKind, MultiSpan};

    src/librustc/middle/cstore.rs

    Lines changed: 9 additions & 9 deletions
    Original file line numberDiff line numberDiff line change
    @@ -2,10 +2,9 @@
    22
    //! are *mostly* used as a part of that interface, but these should
    33
    //! probably get a better home if someone can find one.
    44
    5-
    use crate::hir::map as hir_map;
    6-
    use crate::hir::map::definitions::{DefKey, DefPathTable};
    7-
    use crate::session::search_paths::PathKind;
    8-
    use crate::session::CrateDisambiguator;
    5+
    pub use self::NativeLibraryKind::*;
    6+
    7+
    use crate::hir::map::definitions::{DefKey, DefPath, DefPathHash, DefPathTable};
    98
    use crate::ty::TyCtxt;
    109

    1110
    use rustc_ast::ast;
    @@ -14,15 +13,16 @@ use rustc_data_structures::svh::Svh;
    1413
    use rustc_data_structures::sync::{self, MetadataRef};
    1514
    use rustc_hir::def_id::{CrateNum, DefId, LOCAL_CRATE};
    1615
    use rustc_macros::HashStable;
    16+
    use rustc_session::search_paths::PathKind;
    17+
    pub use rustc_session::utils::NativeLibraryKind;
    18+
    use rustc_session::CrateDisambiguator;
    1719
    use rustc_span::symbol::Symbol;
    1820
    use rustc_span::Span;
    1921
    use rustc_target::spec::Target;
    22+
    2023
    use std::any::Any;
    2124
    use std::path::{Path, PathBuf};
    2225

    23-
    pub use self::NativeLibraryKind::*;
    24-
    pub use rustc_session::utils::NativeLibraryKind;
    25-
    2626
    // lonely orphan structs and enums looking for a better home
    2727

    2828
    /// Where a crate came from on the local filesystem. One of these three options
    @@ -197,8 +197,8 @@ pub trait CrateStore {
    197197

    198198
    // resolve
    199199
    fn def_key(&self, def: DefId) -> DefKey;
    200-
    fn def_path(&self, def: DefId) -> hir_map::DefPath;
    201-
    fn def_path_hash(&self, def: DefId) -> hir_map::DefPathHash;
    200+
    fn def_path(&self, def: DefId) -> DefPath;
    201+
    fn def_path_hash(&self, def: DefId) -> DefPathHash;
    202202
    fn def_path_table(&self, cnum: CrateNum) -> &DefPathTable;
    203203

    204204
    // "queries" used in resolve that aren't tracked for incremental compilation

    0 commit comments

    Comments
     (0)
    0