-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rename librustc
to librustc_middle
#70536
Conversation
/// are implemented in `SelectionContext::copy_clone_conditions()` in librustc. | ||
/// are implemented in `SelectionContext::copy_clone_conditions()` in librustc_middle. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this accurate? Some stuff has been moved out into separate crates.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Filed #70537 for checking followups.
//! Their definition should always match the ABI defined in `rustc::back::abi`. | ||
//! Their definition should always match the ABI defined in `rustc_target::abi`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rustc_middle::ty::layout
(which IMO should be rustc_middle::ty::abi
or rustc_middle::abi
but I've never gotten around to it)
// for symbol names src/librustc/middle/allocator.rs | ||
// for symbol names src/librustc_middle/middle/allocator.rs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is that file still there? But also I'm suspicious of rustc_middle::middle
existing, in general.
//! `rustc::middle::typeck::infer::region_constraints`, generating a | ||
//! `rustc_middle::middle::typeck::infer::region_constraints`, generating a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this module even exist anymore, it looks off.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I don't think it does.
/// `InferCtxt::type_must_outlive` in `rustc::infer::outlives`. | ||
/// `InferCtxt::type_must_outlive` in `rustc_middle::infer::outlives`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is that still there, wasn't InferCtxt
moved?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was moved to rustc_infer::infer::InferCtxt
says rustdoc nightly docs.
/// **Any `rustc::infer` operations that might generate region | ||
/// **Any `rustc_middle::infer` operations that might generate region |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again, I'm not sure infer
is really there anymore.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rustc_middle::infer
exists, but it's only 3 small modules.
// compiling librustc crates themselves so we can leverage crates.io | ||
// compiling librustc_middle crates themselves so we can leverage crates.io |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NB: this said "librustc crates". It could now be "librustc_*
crates" or just "rustc crates".
// of the directory where librustc is located, rather than where the rustc | ||
// of the directory where librustc_middle is located, rather than where the rustc |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should probably say librustc_driver
, if it refers to the dynamic library (since it's the only one left).
@@ -207,7 +207,7 @@ pub struct BufferedEarlyLint { | |||
/// The `NodeId` of the AST node that generated the lint. | |||
pub node_id: NodeId, | |||
|
|||
/// A lint Id that can be passed to `rustc::lint::Lint::from_parser_lint_id`. | |||
/// A lint Id that can be passed to `rustc_session::lint::Lint::from_parser_lint_id`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The two mentions of "passed" in this file should refer to the same thing, no?
@@ -195,7 +195,7 @@ pub enum BuiltinLintDiagnostics { | |||
} | |||
|
|||
/// Lints that are buffered up early on in the `Session` before the | |||
/// `LintLevels` is calculated. These are later passed to `librustc`. | |||
/// `LintLevels` is calculated. These are later passed to `librustc_middle`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the other "passed to" (GH won't let me do multi-line comments on this diff).
// `rustc::ty::instance::resolve_associated_item()`. | ||
// `rustc_middle::ty::instance::resolve_associated_item()`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this was moved.
//! Do not call this query directory. See [`rustc::traits::query::implied_outlives_bounds`]. | ||
//! Do not call this query directory. See [`rustc_middle::traits::query::implied_outlives_bounds`]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Likely outdated.
// `rustc::traits::project::assemble_candidates_from_impls()`. | ||
// `rustc_middle::traits::project::assemble_candidates_from_impls()`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Likely moved in the meanwhile.
cc @rust-lang/compiler I'm approving this now because it's easier to revert it than to land it. (long-term, I'd like "type/trait-system is part of MIR", which is why the @bors r+ p=123 |
📌 Commit aaad8e77c07bad1db5aae2a40ed4d09e439c7ef5 has been approved by |
⌛ Testing commit aaad8e77c07bad1db5aae2a40ed4d09e439c7ef5 with merge 4119b5a1717ea70c38981c45b8ba9d4d8d986364... |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
So now we have |
Yep, and |
rustup rust-lang/rust#70536 changelog: none
Changes: ```` rustup rust-lang#70536 Rustup to rust-lang#70449 readme: move "how to run single lint" instructions to "Allowing/denying lints" section. git attribute macros not allowed in submodules Deprecate REPLACE_CONSTS lint Bump itertools ```` Fixes rust-lang#70554
submodules: update clippy from 70b93aa to e170c84 Changes: ```` rustup rust-lang#70536 Rustup to rust-lang#70449 readme: move "how to run single lint" instructions to "Allowing/denying lints" section. git attribute macros not allowed in submodules Deprecate REPLACE_CONSTS lint Bump itertools ```` Fixes rust-lang#70554
"rustc" package was renamed to "rustc_middle" in rust-lang/rust#70536 (>=1.42.0)
5220: Fix stdlib detection when working with rust-lang/rust project r=vlad20012 a=ortem Our analysis is broken on the latest nightly rustc (1.42.0) because "rustc" package was renamed to "rustc_middle" in rust-lang/rust#70536 and now "rust-lang/rust" is not detected by the plugin. Co-authored-by: ortem <[email protected]>
Changes: ```` rustup rust-lang/rust#70536 Rustup to rust-lang/rust#70449 readme: move "how to run single lint" instructions to "Allowing/denying lints" section. git attribute macros not allowed in submodules Deprecate REPLACE_CONSTS lint Bump itertools ```` Fixes #70554
Here we rename
librustc
tolibrustc_middle
.This crate is not nearly as large or central as it was previously and so it doesn't make much sense to give it such a central name as
librustc
("the entry point to the compiler"). Moreover, there is already arustc
crate which is has the actualfn main
ofrustc
, so havinglibrustc
is confusing relative to that.r? @eddyb