Skip to content

Commit

Permalink
Rollup merge of #119600 - aDotInTheVoid:comment-fix, r=compiler-errors
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiaskrgr authored Feb 5, 2024
2 parents 7158b3d + 16e117c commit ca36ed2
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 10 deletions.
4 changes: 1 addition & 3 deletions compiler/rustc_const_eval/src/const_eval/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,7 @@ impl MachineStopType for ConstEvalErrKind {
}
}

// The errors become `MachineStop` with plain strings when being raised.
// `ConstEvalErr` (in `librustc_middle/mir/interpret/error.rs`) knows to
// handle these.
/// The errors become [`InterpError::MachineStop`] when being raised.
impl<'tcx> Into<InterpErrorInfo<'tcx>> for ConstEvalErrKind {
fn into(self) -> InterpErrorInfo<'tcx> {
err_machine_stop!(self).into()
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_data_structures/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ pub fn make_display(f: impl Fn(&mut fmt::Formatter<'_>) -> fmt::Result) -> impl
Printer { f }
}

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

Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_error_codes/src/error_codes/E0264.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ extern "C" {
```

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

```
#![feature(lang_items)]
Expand Down
3 changes: 2 additions & 1 deletion compiler/rustc_errors/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,8 @@ impl DiagCtxt {
}

// This is here to not allow mutation of flags;
// as of this writing it's only used in tests in librustc_middle.
// as of this writing it's used in Session::consider_optimizing and
// in tests in rustc_interface.
pub fn can_emit_warnings(&self) -> bool {
self.inner.borrow_mut().flags.can_emit_warnings
}
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_lint/src/builtin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ use crate::nonstandard_style::{method_context, MethodLateContext};

use std::fmt::Write;

// hardwired lints from librustc_middle
// hardwired lints from rustc_lint_defs
pub use rustc_session::lint::builtin::*;

declare_lint! {
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_middle/src/arena.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ macro_rules! arena_types {

// Note that this deliberately duplicates items in the `rustc_hir::arena`,
// since we need to allocate this type on both the `rustc_hir` arena
// (during lowering) and the `librustc_middle` arena (for decoding MIR)
// (during lowering) and the `rustc_middle` arena (for decoding MIR)
[decode] asm_template: rustc_ast::InlineAsmTemplatePiece,
[decode] used_trait_imports: rustc_data_structures::unord::UnordSet<rustc_hir::def_id::LocalDefId>,
[decode] is_late_bound_map: rustc_data_structures::fx::FxIndexSet<rustc_hir::ItemLocalId>,
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_middle/src/tests.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use super::*;

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

0 comments on commit ca36ed2

Please sign in to comment.