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

Skip to content

Rollup of 7 pull requests #127143

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

Closed
wants to merge 21 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
b03d939
Improve autovectorization of to_lowercase / to_uppercase functions
jhorstmann Apr 10, 2024
a7aafd7
Add codegen test to ensure the pattern used in convert_while_ascii ge…
jhorstmann Jun 3, 2024
b5ea85f
Remove redundant tests
jhorstmann Jun 3, 2024
879d143
Add `.ignore` file to make `config.toml` searchable in vscode
WaffleLapkin Jun 23, 2024
39bf1dc
Small fixme in core now that split_first has no codegen issues
GrigorenkoPV Jun 24, 2024
5901a2d
Use a fixed chunk size in codegen test
jhorstmann Jun 28, 2024
28ba5e4
Updated docs on `#[panic_handler]` in `library/core/src/lib.rs`
Jun 19, 2024
af8be47
Use a fixed chunk size also in production code and update some comments
jhorstmann Jun 29, 2024
623b9c8
Update comment in codegen test
jhorstmann Jun 29, 2024
e52d95b
Remove unused compiler dependencies
Kobzol Jun 29, 2024
8b783f1
rustdoc: update to pulldown-cmark 0.11
notriddle Jun 29, 2024
61e2f5c
rustdoc: add usable lint for pulldown-cmark-0.11 parsing changes
notriddle Jun 29, 2024
a5fc783
clippy: update to pulldown-cmark 0.11
notriddle Jun 29, 2024
682e7c1
Print `TypeId` as a `u128` for `Debug`
tgross35 Jun 29, 2024
bef24a4
Rollup merge of #123778 - jhorstmann:optimize-upper-lower-auto-vector…
matthiaskrgr Jun 30, 2024
b19c233
Rollup merge of #126705 - safinaskar:panic, r=Mark-Simulacrum
matthiaskrgr Jun 30, 2024
d091d48
Rollup merge of #126876 - WaffleLapkin:unignoreconfigtoml, r=Mark-Sim…
matthiaskrgr Jun 30, 2024
4cf6f8b
Rollup merge of #126906 - GrigorenkoPV:fixme-split_at_first, r=Mark-S…
matthiaskrgr Jun 30, 2024
a23f956
Rollup merge of #127127 - notriddle:not 8000 riddle/pulldown-cmark-0.11, r=…
matthiaskrgr Jun 30, 2024
1fce09b
Rollup merge of #127131 - Kobzol:remove-unused-deps, r=compiler-errors
matthiaskrgr Jun 30, 2024
865788e
Rollup merge of #127134 - tgross35:typeid-debug, r=Nilstrieb
matthiaskrgr Jun 30, 2024
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
Print TypeId as a u128 for Debug
Since <#121358>, `TypeId` is
represented as a `(u64, u64)`. This also made the debug implementation a
lot larger, which is especially apparent with pretty formatting.

Make this less noisy by converting the inner value back to a `u128` then
printing as a tuple struct.

Current:

    TypeId { t: (1403077013027291752, 4518903163082958039) }
    TypeId {
        t: (
            1403077013027291752,
            4518903163082958039,
        ),
    }

New:

    TypeId(25882202575019293479932656973818029271)
    TypeId(
        25882202575019293479932656973818029271,
    )
  • Loading branch information
tgross35 committed Jun 29, 2024
commit 682e7c1174161c6e4e48a50e188e09f2dec80712
13 changes: 12 additions & 1 deletion library/core/src/any.rs
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,7 @@ impl dyn Any + Send + Sync {
/// While `TypeId` implements `Hash`, `PartialOrd`, and `Ord`, it is worth
/// noting that the hashes and ordering will vary between Rust releases. Beware
/// of relying on them inside of your code!
#[derive(Clone, Copy, Debug, Eq, PartialOrd, Ord)]
#[derive(Clone, Copy, Eq, PartialOrd, Ord)]
#[stable(feature = "rust1", since = "1.0.0")]
pub struct TypeId {
// We avoid using `u128` because that imposes higher alignment requirements on many platforms.
Expand Down Expand Up @@ -644,6 +644,10 @@ impl TypeId {
let t2 = t as u64;
TypeId { t: (t1, t2) }
}

fn as_u128(self) -> u128 {
u128::from(self.t.0) << 64 | u128::from(self.t.1)
}
}

#[stable(feature = "rust1", since = "1.0.0")]
Expand All @@ -666,6 +670,13 @@ impl hash::Hash for TypeId {
}
}

#[stable(feature = "rust1", since = "1.0.0")]
impl fmt::Debug for TypeId {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> Result<(), fmt::Error> {
f.debug_tuple("TypeId").field(&self.as_u128()).finish()
}
}

/// Returns the name of a type as a string slice.
///
/// # Note
Expand Down
Loading
0