Skip to content

Commit ca36ed2

Browse files
authored
Rollup merge of #119600 - aDotInTheVoid:comment-fix, r=compiler-errors
Remove outdated references to librustc_middle The relevant comment is now in https://github.com/rust-lang/rust/blob/791a53f380d5cf800191f25941c94ace5099876e/compiler/rustc_middle/src/tests.rs#L3-L13
2 parents 7158b3d + 16e117c commit ca36ed2

File tree

7 files changed

+9
-10
lines changed

7 files changed

+9
-10
lines changed

compiler/rustc_const_eval/src/const_eval/error.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,7 @@ impl MachineStopType for ConstEvalErrKind {
4949
}
5050
}
5151

52-
// The errors become `MachineStop` with plain strings when being raised.
53-
// `ConstEvalErr` (in `librustc_middle/mir/interpret/error.rs`) knows to
54-
// handle these.
52+
/// The errors become [`InterpError::MachineStop`] when being raised.
5553
impl<'tcx> Into<InterpErrorInfo<'tcx>> for ConstEvalErrKind {
5654
fn into(self) -> InterpErrorInfo<'tcx> {
5755
err_machine_stop!(self).into()

compiler/rustc_data_structures/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ pub fn make_display(f: impl Fn(&mut fmt::Formatter<'_>) -> fmt::Result) -> impl
148148
Printer { f }
149149
}
150150

151-
// See comments in src/librustc_middle/lib.rs
151+
// See comments in compiler/rustc_middle/src/tests.rs
152152
#[doc(hidden)]
153153
pub fn __noop_fix_for_27438() {}
154154

compiler/rustc_error_codes/src/error_codes/E0264.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ extern "C" {
1313
```
1414

1515
A list of available external lang items is available in
16-
`src/librustc_middle/middle/weak_lang_items.rs`. Example:
16+
`compiler/rustc_hir/src/weak_lang_items.rs`. Example:
1717

1818
```
1919
#![feature(lang_items)]

compiler/rustc_errors/src/lib.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -645,7 +645,8 @@ impl DiagCtxt {
645645
}
646646

647647
// This is here to not allow mutation of flags;
648-
// as of this writing it's only used in tests in librustc_middle.
648+
// as of this writing it's used in Session::consider_optimizing and
649+
// in tests in rustc_interface.
649650
pub fn can_emit_warnings(&self) -> bool {
650651
self.inner.borrow_mut().flags.can_emit_warnings
651652
}

compiler/rustc_lint/src/builtin.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ use crate::nonstandard_style::{method_context, MethodLateContext};
7272

7373
use std::fmt::Write;
7474

75-
// hardwired lints from librustc_middle
75+
// hardwired lints from rustc_lint_defs
7676
pub use rustc_session::lint::builtin::*;
7777

7878
declare_lint! {

compiler/rustc_middle/src/arena.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ macro_rules! arena_types {
9494

9595
// Note that this deliberately duplicates items in the `rustc_hir::arena`,
9696
// since we need to allocate this type on both the `rustc_hir` arena
97-
// (during lowering) and the `librustc_middle` arena (for decoding MIR)
97+
// (during lowering) and the `rustc_middle` arena (for decoding MIR)
9898
[decode] asm_template: rustc_ast::InlineAsmTemplatePiece,
9999
[decode] used_trait_imports: rustc_data_structures::unord::UnordSet<rustc_hir::def_id::LocalDefId>,
100100
[decode] is_late_bound_map: rustc_data_structures::fx::FxIndexSet<rustc_hir::ItemLocalId>,

compiler/rustc_middle/src/tests.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use super::*;
22

3-
// FIXME(#27438): right now the unit tests of librustc_middle don't refer to any actual
4-
// functions generated in librustc_data_structures (all
3+
// FIXME(#27438): right now the unit tests of rustc_middle don't refer to any actual
4+
// functions generated in rustc_data_structures (all
55
// references are through generic functions), but statics are
66
// referenced from time to time. Due to this bug we won't
77
// actually correctly link in the statics unless we also

0 commit comments

Comments
 (0)