Skip to content
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

Rollup of 7 pull requests #118126

Merged
merged 24 commits into from
Nov 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
55e3dc4
CFI: Add missing use core::ffi::c_int
rcvalle Nov 10, 2023
251e75c
Explicitly unset $CARGO for compiletest
Noratrieb Nov 19, 2023
e2664eb
Reduce exposure of some items.
nnethercote Nov 16, 2023
a3bd5a0
Inline and remove `record_layout_for_printing`.
nnethercote Nov 16, 2023
9e6ee72
Alphabetize features.
nnethercote Nov 16, 2023
6ba4c2f
Remove unused arena kinds in `rustc_hir` and `rustc_middle`.
nnethercote Nov 20, 2023
b142ed2
Add a comment.
nnethercote Nov 20, 2023
5bec5ae
Put derives on a single line where possible.
nnethercote Nov 20, 2023
f79911d
Remove unused feature.
nnethercote Nov 20, 2023
2fd9442
feat: specialize `SpecFromElem` for `()`
JarvisCraft Nov 20, 2023
91fcdde
chore(GH-118094): explicitly mark `_elem` as unused
JarvisCraft Nov 20, 2023
72a8633
docs(GH-118094): make docs a bit more explicit
JarvisCraft Nov 20, 2023
3c999d8
Update books
rustbot Nov 20, 2023
8cf94c9
Fix occurrences of old fn names in comment and tracing
spastorino Nov 21, 2023
c965a76
Wrap a long line.
nnethercote Nov 20, 2023
ec10e37
Remove some unused functions.
nnethercote Nov 21, 2023
72653c1
Use macros to avoid `expect_*` boilerplate.
nnethercote Nov 21, 2023
6bb671e
Rollup merge of #117790 - rcvalle:rust-cfi-fix-000000, r=workingjubilee
Noratrieb Nov 21, 2023
187d44b
Rollup merge of #118059 - Nilstrieb:unset-cargo, r=dtolnay
Noratrieb Nov 21, 2023
675cba0
Rollup merge of #118081 - nnethercote:rustc_ty_utils, r=compiler-errors
Noratrieb Nov 21, 2023
bfc2675
Rollup merge of #118094 - JarvisCraft:SpecFromElem-for-empty-tuple, r…
Noratrieb Nov 21, 2023
69a5a89
Rollup merge of #118097 - rustbot:docs-update, r=ehuss
Noratrieb Nov 21, 2023
90e4c2d
Rollup merge of #118115 - spastorino:fix-old-fn-names, r=compiler-errors
Noratrieb Nov 21, 2023
f13f980
Rollup merge of #118121 - nnethercote:rustc_hir, r=compiler-errors
Noratrieb Nov 21, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion compiler/rustc_hir/src/arena.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ macro_rules! arena_types {
($macro:path) => (
$macro!([
// HIR types
[] hir_krate: rustc_hir::Crate<'tcx>,
[] asm_template: rustc_ast::InlineAsmTemplatePiece,
[] attribute: rustc_ast::Attribute,
[] owner_info: rustc_hir::OwnerInfo<'tcx>,
Expand Down
17 changes: 7 additions & 10 deletions compiler/rustc_hir/src/def.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ use std::array::IntoIter;
use std::fmt::Debug;

/// Encodes if a `DefKind::Ctor` is the constructor of an enum variant or a struct.
#[derive(Clone, Copy, PartialEq, Eq, Encodable, Decodable, Hash, Debug)]
#[derive(HashStable_Generic)]
#[derive(Clone, Copy, PartialEq, Eq, Encodable, Decodable, Hash, Debug, HashStable_Generic)]
pub enum CtorOf {
/// This `DefKind::Ctor` is a synthesized constructor of a tuple or unit struct.
Struct,
Expand All @@ -23,8 +22,7 @@ pub enum CtorOf {
}

/// What kind of constructor something is.
#[derive(Clone, Copy, PartialEq, Eq, Encodable, Decodable, Hash, Debug)]
#[derive(HashStable_Generic)]
#[derive(Clone, Copy, PartialEq, Eq, Encodable, Decodable, Hash, Debug, HashStable_Generic)]
pub enum CtorKind {
/// Constructor function automatically created by a tuple struct/variant.
Fn,
Expand All @@ -33,8 +31,7 @@ pub enum CtorKind {
}

/// An attribute that is not a macro; e.g., `#[inline]` or `#[rustfmt::skip]`.
#[derive(Clone, Copy, PartialEq, Eq, Encodable, Decodable, Hash, Debug)]
#[derive(HashStable_Generic)]
#[derive(Clone, Copy, PartialEq, Eq, Encodable, Decodable, Hash, Debug, HashStable_Generic)]
pub enum NonMacroAttrKind {
/// Single-segment attribute defined by the language (`#[inline]`)
Builtin(Symbol),
Expand All @@ -48,8 +45,7 @@ pub enum NonMacroAttrKind {
}

/// What kind of definition something is; e.g., `mod` vs `struct`.
#[derive(Clone, Copy, PartialEq, Eq, Encodable, Decodable, Hash, Debug)]
#[derive(HashStable_Generic)]
#[derive(Clone, Copy, PartialEq, Eq, Encodable, Decodable, Hash, Debug, HashStable_Generic)]
pub enum DefKind {
// Type namespace
Mod,
Expand Down Expand Up @@ -299,8 +295,7 @@ impl DefKind {
/// - the call to `str_to_string` will resolve to [`Res::Def`], with the [`DefId`]
/// pointing to the definition of `str_to_string` in the current crate.
//
#[derive(Clone, Copy, PartialEq, Eq, Encodable, Decodable, Hash, Debug)]
#[derive(HashStable_Generic)]
#[derive(Clone, Copy, PartialEq, Eq, Encodable, Decodable, Hash, Debug, HashStable_Generic)]
pub enum Res<Id = hir::HirId> {
/// Definition having a unique ID (`DefId`), corresponds to something defined in user code.
///
Expand Down Expand Up @@ -591,6 +586,8 @@ impl NonMacroAttrKind {
}
}

// Currently trivial, but exists in case a new kind is added in the future whose name starts
// with a vowel.
pub fn article(self) -> &'static str {
"a"
}
Expand Down
Loading
Loading