8000 Rollup of 10 pull requests by matthiaskrgr · Pull Request #93069 · rust-lang/rust · GitHub
[go: up one dir, main page]

Skip to content

Rollup of 10 pull requests #93069

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

Merged
merged 28 commits into from
Jan 19, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
3eb87db
doc: guarantee call order for sort_by_cached_key
digama0 Oct 7, 2021
61ff847
Use iterator instead of recursion in `codegen_place`
SparrowLii Nov 27, 2021
4b62a77
Little improves in CString `new` when creating from slice
AngelicosPhosphoros Dec 20, 2021
b9f008b
Update wording
digama0 Jan 4, 2022
06b17a2
Clarify that ordering is unspecified
digama0 Jan 5, 2022
bd1f09d
Annotate dead code lint with notes about ignored derived impls
FabianWolff Jan 11, 2022
8b459dd
Use span of ignored impls for explanatory note
FabianWolff Jan 15, 2022
0882bbb
Remove some unused `Ord` derivations based on `DefId`
pierwill Jan 18, 2022
b160564
Move expr-related pretty printing functions to module
dtolnay Jan 15, 2022
07a0325
Move item-related pretty printing functions to module
dtolnay Jan 15, 2022
282224e
Add Option::is_some_with.
m-ou-se Jan 18, 2022
aaebae9
Add Result::{is_ok_with, is_err_with}.
m-ou-se Jan 18, 2022
148234f
Add is_some_with tracking issue number.
m-ou-se Jan 18, 2022
45dee47
Improve is_err_with example.
m-ou-se Jan 18, 2022
5f74ef4
Formally implement let chains
c410-f3r Jan 18, 2022
5fee3e7
Fix is_some_with tests.
m-ou-se Jan 18, 2022
fa9a843
Remove horizontal lines at top of page
jsha Jan 11, 2022
84e0d9d
Update books
ehuss Jan 19, 2022
5d2928f
Rollup merge of #88642 - c410-f3r:let_chains_2, r=matthewjasper
matthiaskrgr Jan 19, 2022
2a4381d
Rollup merge of #89621 - digama0:patch-2, r=yaahc
matthiaskrgr Jan 19, 2022
3a1db90
Rollup merge of #91278 - SparrowLii:place, r=spastorino
matthiaskrgr Jan 19, 2022
3148a32
Rollup merge of #92124 - AngelicosPhosphoros:remove_extra_alloc_in_cs…
matthiaskrgr Jan 19, 2022
9a82f74
Rollup merge of #92783 - FabianWolff:issue-92726, r=nikomatsakis
matthiaskrgr Jan 19, 2022
7f2dbcb
Rollup merge of #92797 - jsha:fewer-lines, r=GuillaumeGomez
matthiaskrgr Jan 19, 2022
420ada6
Rollup merge of #92920 - dtolnay:printtidy, r=cjgillot
matthiaskrgr Jan 19, 2022
0b9056c
Rollup merge of #93041 - pierwill:rm-unused-defid-ords, r=cjgillot
matthiaskrgr Jan 19, 2022
d5bc168
Rollup merge of #93051 - m-ou-se:is-some-with, r=yaahc
matthiaskrgr Jan 19, 2022
ea1275a
Rollup merge of #93062 - ehuss:update-books, r=ehuss
matthiaskrgr Jan 19, 2022
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
Prev Previous commit
Next Next commit
Remove some unused Ord derivations based on DefId
Removes `Ord` and `PartialOrd` from  middle::mir::mirsource, inlineasmoperand,
terminatorkind, operand, constant, constantkind, and place
  • Loading branch information
pierwill committed Jan 18, 2022
commit 0882bbb3a190c99d0757cbcec87d375a3b85a0ac
22 changes: 6 additions & 16 deletions compiler/rustc_middle/src/mir/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ impl MirPhase {
}

/// Where a specific `mir::Body` comes from.
#[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord)]
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
#[derive(HashStable, TyEncodable, TyDecodable, TypeFoldable)]
pub struct MirSource<'tcx> {
pub instance: InstanceDef<'tcx>,
Expand Down Expand Up @@ -1255,17 +1255,7 @@ pub enum AssertKind<O> {
ResumedAfterPanic(GeneratorKind),
}

#[derive(
Clone,
Debug,
PartialEq,
PartialOrd,
TyEncodable,
TyDecodable,
Hash,
HashStable,
TypeFoldable
)]
#[derive(Clone, Debug, PartialEq, TyEncodable, TyDecodable, Hash, HashStable, TypeFoldable)]
pub enum InlineAsmOperand<'tcx> {
In {
reg: InlineAsmRegOrRegClass,
Expand Down Expand Up @@ -1747,7 +1737,7 @@ pub struct CopyNonOverlapping<'tcx> {

/// A path to a value; something that can be evaluated without
/// changing or disturbing program state.
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, TyEncodable, HashStable)]
#[derive(Copy, Clone, PartialEq, Eq, Hash, TyEncodable, HashStable)]
pub struct Place<'tcx> {
pub local: Local,

Expand Down Expand Up @@ -2072,7 +2062,7 @@ pub struct SourceScopeLocalData {

/// These are values that can appear inside an rvalue. They are intentionally
/// limited to prevent rvalues from being nested in one another.
#[derive(Clone, PartialEq, PartialOrd, TyEncodable, TyDecodable, Hash, HashStable)]
#[derive(Clone, PartialEq, TyEncodable, TyDecodable, Hash, HashStable)]
pub enum Operand<'tcx> {
/// Copy: The value must be available for use afterwards.
///
Expand Down Expand Up @@ -2500,7 +2490,7 @@ impl<'tcx> Debug for Rvalue<'tcx> {
/// this does not necessarily mean that they are `==` in Rust. In
/// particular, one must be wary of `NaN`!

#[derive(Clone, Copy, PartialEq, PartialOrd, TyEncodable, TyDecodable, Hash, HashStable)]
#[derive(Clone, Copy, PartialEq, TyEncodable, TyDecodable, Hash, HashStable)]
pub struct Constant<'tcx> {
pub span: Span,

Expand All @@ -2514,7 +2504,7 @@ pub struct Constant<'tcx> {
pub literal: ConstantKind<'tcx>,
}

#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, TyEncodable, TyDecodable, Hash, HashStable, Debug)]
#[derive(Clone, Copy, PartialEq, Eq, TyEncodable, TyDecodable, Hash, HashStable, Debug)]
#[derive(Lift)]
pub enum ConstantKind<'tcx> {
/// This constant came from the type system
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_middle/src/mir/terminator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ impl<'a> Iterator for SwitchTargetsIter<'a> {

impl<'a> ExactSizeIterator for SwitchTargetsIter<'a> {}

#[derive(Clone, TyEncodable, TyDecodable, Hash, HashStable, PartialEq, PartialOrd)]
#[derive(Clone, TyEncodable, TyDecodable, Hash, HashStable, PartialEq)]
pub enum TerminatorKind<'tcx> {
/// Block should have one successor in the graph; we jump there.
Goto { target: BasicBlock },
Expand Down
0