Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
7731135
alloc::Layout: explicitly document size invariant on the type level
RalfJung Mar 25, 2024
aa1653e
Rename coroutine_stalled_predicates
compiler-errors Apr 15, 2024
d29178c
Do check_coroutine_obligations once per typeck root
compiler-errors Apr 15, 2024
0650115
redundant ::{self}
compiler-errors Apr 15, 2024
a8c9a0b
crash -> test
compiler-errors Apr 16, 2024
f7ebad4
Emit suggestions when equality constraints are wrongly used
gurry Apr 16, 2024
c623319
Lower deref patterns to MIR
Nadrieril Mar 9, 2024
1dabacd
Don't fake borrow inside a deref pattern
Nadrieril Mar 9, 2024
5c4909b
Track mutability of deref patterns
Nadrieril Apr 3, 2024
377e095
Allow mutable bindings inside deref patterns
Nadrieril Apr 3, 2024
b55afe4
Address closure-related review
Nadrieril Apr 5, 2024
511bd78
Rework fake borrow calculation
Nadrieril Apr 6, 2024
5053180
Add a non-shallow fake borrow
Nadrieril Apr 6, 2024
436c612
Use deep fake borrows for deref patterns
Nadrieril Apr 5, 2024
217a4df
Test or-patterns inside deref patterns
Nadrieril Apr 8, 2024
726fb55
Fix documentation of `BorrowKind::Fake`
Nadrieril Apr 20, 2024
5646b65
Pass translation closure to add_to_diag_with() as reference
Xiretza Apr 18, 2024
c88bb6c
Allow nesting subdiagnostics
Xiretza Apr 20, 2024
b220b74
Fix source ordering of IntoDiagArg impls
Xiretza Apr 20, 2024
6974e9c
Move "elided lifetime in path" to subdiagnostic struct
Xiretza Apr 20, 2024
31e581e
Wrap dyn type with parentheses in suggestion
long-long-float Jan 25, 2024
4815155
Mark @RUSTC_BUILTIN search path usage as unstable
Veykril Apr 23, 2024
80f2b91
Rollup merge of #120929 - long-long-float:wrap-dyn-in-suggestion, r=f…
fmease Apr 23, 2024
68939f7
Rollup merge of #122591 - gurry:122162-impl-type-binding-suggestion, …
fmease Apr 23, 2024
332cac2
Rollup merge of #122598 - Nadrieril:full-derefpats, r=matthewjasper
fmease Apr 23, 2024
2d7d480
Rollup merge of #123048 - RalfJung:layout, r=dtolnay
fmease Apr 23, 2024
e15d6f9
Rollup merge of #123993 - compiler-errors:coroutine-obl, r=lcnr
fmease Apr 23, 2024
6e423e1
Rollup merge of #124218 - Xiretza:subsubdiagnostics, r=davidtwco
fmease Apr 23, 2024
5ff1fa9
Rollup merge of #124285 - ferrocene:unstable-L-rust-builtin, r=petroc…
fmease Apr 23, 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
Next Next commit
alloc::Layout: explicitly document size invariant on the type level
  • Loading branch information
RalfJung committed Mar 25, 2024
commit 7731135af25495bf8eb1cd2f599755f7a0bba37d
4 changes: 3 additions & 1 deletion library/core/src/alloc/layout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ const fn size_align<T>() -> (usize, usize) {
/// An instance of `Layout` describes a particular layout of memory.
/// You build a `Layout` up as an input to give to an allocator.
///
/// All layouts have an associated size and a power-of-two alignment.
/// All layouts have an associated size and a power-of-two alignment. The size, when rounded up to
/// the nearest multiple of `align`, does not overflow isize (i.e., the rounded value will always be
/// less than or equal to `isize::MAX`).
///
/// (Note that layouts are *not* required to have non-zero size,
/// even though `GlobalAlloc` requires that all memory requests
Expand Down