Skip to content

Commit 2b4ec5b

Browse files
committed
Auto merge of #145388 - GuillaumeGomez:rollup-hnlt5ov, r=GuillaumeGomez
Rollup of 13 pull requests Successful merges: - rust-lang/rust#140434 (rustdoc: Allow multiple references to a single footnote) - rust-lang/rust#142372 (Improve `--remap-path-prefix` documentation) - rust-lang/rust#142741 (Fix unsoundness in some tests) - rust-lang/rust#144515 (Implement `ptr_cast_array`) - rust-lang/rust#144727 (Add tracing to resolve-related functions) - rust-lang/rust#144959 (fix(unicode-table-generator): fix duplicated unique indices) - rust-lang/rust#145179 (Avoid abbreviating "numerator" as "numer", to allow catching typo "numer" elsewhere) - rust-lang/rust#145250 (Add regression test for a former ICE involving helper attributes containing interpolated tokens) - rust-lang/rust#145266 (Reduce some queries around associated items) - rust-lang/rust#145299 (doc test: fix mpsc.rs try_send doc test) - rust-lang/rust#145323 (Port the `#[linkage]` attribute to the new attribute system) - rust-lang/rust#145361 (Suppress wrapper suggestion when expected and actual ty are the same adt and the variant is unresolved) - rust-lang/rust#145372 (resolve: Miscellaneous cleanups) r? `@ghost` `@rustbot` modify labels: rollup
2 parents 95f7f5e + 4d796c1 commit 2b4ec5b

3 files changed

Lines changed: 8 additions & 8 deletions

File tree

src/constant.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -281,8 +281,8 @@ fn data_id_for_static(
281281
.abi
282282
.bytes();
283283

284-
let linkage = if import_linkage == rustc_middle::mir::mono::Linkage::ExternalWeak
285-
|| import_linkage == rustc_middle::mir::mono::Linkage::WeakAny
284+
let linkage = if import_linkage == rustc_hir::attrs::Linkage::ExternalWeak
285+
|| import_linkage == rustc_hir::attrs::Linkage::WeakAny
286286
{
287287
Linkage::Preemptible
288288
} else {
@@ -332,8 +332,8 @@ fn data_id_for_static(
332332

333333
let linkage = if definition {
334334
crate::linkage::get_static_linkage(tcx, def_id)
335-
} else if attrs.linkage == Some(rustc_middle::mir::mono::Linkage::ExternalWeak)
336-
|| attrs.linkage == Some(rustc_middle::mir::mono::Linkage::WeakAny)
335+
} else if attrs.linkage == Some(rustc_hir::attrs::Linkage::ExternalWeak)
336+
|| attrs.linkage == Some(rustc_hir::attrs::Linkage::WeakAny)
337337
{
338338
Linkage::Preemptible
339339
} else {

src/driver/aot.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,11 @@ use rustc_codegen_ssa::{
1818
use rustc_data_structures::profiling::SelfProfilerRef;
1919
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
2020
use rustc_data_structures::sync::{IntoDynSyncSend, par_map};
21+
use rustc_hir::attrs::Linkage as RLinkage;
2122
use rustc_metadata::fs::copy_to_stdout;
2223
use rustc_middle::dep_graph::{WorkProduct, WorkProductId};
2324
use rustc_middle::middle::codegen_fn_attrs::CodegenFnAttrFlags;
24-
use rustc_middle::mir::mono::{
25-
CodegenUnit, Linkage as RLinkage, MonoItem, MonoItemData, Visibility,
26-
};
25+
use rustc_middle::mir::mono::{CodegenUnit, MonoItem, MonoItemData, Visibility};
2726
use rustc_session::Session;
2827
use rustc_session::config::{DebugInfo, OutFileName, OutputFilenames, OutputType};
2928

src/linkage.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
use rustc_middle::mir::mono::{Linkage as RLinkage, MonoItem, Visibility};
1+
use rustc_hir::attrs::Linkage as RLinkage;
2+
use rustc_middle::mir::mono::{MonoItem, Visibility};
23

34
use crate::prelude::*;
45

0 commit comments

Comments
 (0)