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 8 pull requests #127454

Merged
merged 26 commits into from
Jul 7, 2024
Merged
Changes from 2 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
69446e3
Print `TypeId` as hex for debugging
tgross35 Jun 30, 2024
23e5468
LinkedList's Cursor: method to get a ref to the cursor's list
GrigorenkoPV Jun 30, 2024
ba1ebc2
doc: update config file path in platform-support/wasm32-wasip1-thread…
iawia002 Jul 2, 2024
a737237
Add test case demonstrating equality of paths "foo/bar" and "foobar"
zanieb Jul 3, 2024
dd509c7
Add more test cases for path comparisons
zanieb Jul 3, 2024
f216834
stir the hash state a little to avoid prefix collisions
the8472 Jul 3, 2024
dd790ab
Remove some unnecessary integer conversions.
nnethercote Jul 4, 2024
ccd8dcc
Describe Sized requirements for mem::offset_of
nicholasbishop Jul 5, 2024
14b859f
Rename `Attribute::tokens` (the inherent method).
nnethercote Jul 3, 2024
88373e9
Remove an unnecessary local variable.
nnethercote Jul 3, 2024
b261501
Remove `HasSpan` trait.
nnethercote Jul 4, 2024
9d33a8f
Simplify `ReplaceRange`.
nnethercote Jul 4, 2024
3a5c4b6
Rename some attribute types for consistency.
nnethercote Jul 7, 2024
022582c
Remove `Clone` derive from `LazyAttrTokenStreamImpl`.
nnethercote Jul 7, 2024
9f16f1f
Add an size assertion.
nnethercote Jul 7, 2024
9e0aab7
Use `filter_map` instead of `flat_map` in `configure_tokens`.
nnethercote Jul 7, 2024
bee9120
once_lock: make test not take as long in Miri
RalfJung Jul 7, 2024
9da3638
Move a span_bug under a condition that cx is tainted
gurry Jul 7, 2024
35a1ca0
Rollup merge of #127179 - tgross35:typeid-debug-hex, r=Nilstrieb
matthiaskrgr Jul 7, 2024
94d07be
Rollup merge of #127189 - GrigorenkoPV:linkedlist-cursor-list, r=Nils…
matthiaskrgr Jul 7, 2024
d84d221
Rollup merge of #127236 - iawia002:wasip1-threads-doc, r=Nilstrieb
matthiaskrgr Jul 7, 2024
56557c4
Rollup merge of #127297 - the8472:path-new-hash, r=Nilstrieb
matthiaskrgr Jul 7, 2024
510020a
Rollup merge of #127308 - nnethercote:Attribute-cleanups, r=petrochenkov
matthiaskrgr Jul 7, 2024
c40530d
Rollup merge of #127354 - nicholasbishop:bishop-sized-doc, r=Nilstrieb
matthiaskrgr Jul 7, 2024
1ee6345
Rollup merge of #127409 - gurry:127332-ice-with-expr-not-struct, r=ol…
matthiaskrgr Jul 7, 2024
b564c51
Rollup merge of #127447 - RalfJung:once_lock_miri, r=joboet
matthiaskrgr Jul 7, 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
14 changes: 14 additions & 0 deletions library/core/src/mem/mod.rs
Original file line number Diff line number Diff line change
@@ -1266,6 +1266,20 @@ impl<T> SizedTypeProperties for T {}
/// // ^^^ error[E0616]: field `private` of struct `Struct` is private
/// ```
///
/// Only [`Sized`] fields are supported, but the container may be unsized:
/// ```
/// # use core::mem;
/// #[repr(C)]
/// pub struct Struct {
/// a: u8,
/// b: [u8],
/// }
///
/// assert_eq!(mem::offset_of!(Struct, a), 0); // OK
/// // assert_eq!(mem::offset_of!(Struct, b), 1);
/// // ^^^ error[E0277]: doesn't have a size known at compile-time
/// ```
///
/// Note that type layout is, in general, [subject to change and
/// platform-specific](https://doc.rust-lang.org/reference/type-layout.html). If
/// layout stability is required, consider using an [explicit `repr` attribute].